Added a function to access the dataset memory buffer

Number of dataset items changed from a macro to a getter function.
This commit is contained in:
tevador
2019-04-23 22:15:55 +02:00
parent 59d82bbb01
commit b4dca14f0c
4 changed files with 31 additions and 7 deletions
+3 -2
View File
@@ -20,8 +20,9 @@ int main() {
std::cout << "Dataset allocation failed" << std::endl;
return 1;
}
std::thread t1(&randomx_init_dataset, myDataset, myCache, 0, RANDOMX_DATASET_ITEMS / 2);
std::thread t2(&randomx_init_dataset, myDataset, myCache, RANDOMX_DATASET_ITEMS / 2, RANDOMX_DATASET_ITEMS / 2);
auto datasetItemCount = randomx_dataset_item_count();
std::thread t1(&randomx_init_dataset, myDataset, myCache, 0, datasetItemCount / 2);
std::thread t2(&randomx_init_dataset, myDataset, myCache, datasetItemCount / 2, datasetItemCount / 2);
t1.join();
t2.join();
randomx_release_cache(myCache);