Struct randomx_rs::RandomXDataset [−][src]
pub struct RandomXDataset { /* fields omitted */ }
Expand description
Dataset structure
Implementations
pub fn new(
flags: RandomXFlag,
cache: &RandomXCache,
start: c_ulong
) -> Result<RandomXDataset, RandomXError>
pub fn new(
flags: RandomXFlag,
cache: &RandomXCache,
start: c_ulong
) -> Result<RandomXDataset, RandomXError>
Creates a new dataset object, allocates memory to the dataset
object and initializes it,
error on failure.
flags
is one of the following:
- FLAG_DEFAULT
- FLAG_LARGE_PAGES
cache
is a cache object.
start
is the item number where initialization should start, recommended to pass in 0.
Returns the number of items in the dataset
or an error on failure.