randomx_sys

Function randomx_init_dataset

Source
pub unsafe extern "C" fn randomx_init_dataset(
    dataset: *mut randomx_dataset,
    cache: *mut randomx_cache,
    startItem: c_ulong,
    itemCount: c_ulong,
)
Expand description

Initializes dataset items.

Note: In order to use the Dataset, all items from 0 to (randomx_dataset_item_count() - 1) must be initialized. This may be done by several calls to this function using non-overlapping item sequences.

@param dataset is a pointer to a previously allocated randomx_dataset structure. Must not be NULL. @param cache is a pointer to a previously allocated and initialized randomx_cache structure. Must not be NULL. @param startItem is the item number where intialization should start. @param itemCount is the number of items that should be initialized.