From edb2c98ad7904c28c299dadcb5f470c3b292af24 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Mon, 9 Sep 2019 08:15:46 +0200 Subject: [PATCH] Fix for 272 initialization threads --- src/crypto/rx/RxDataset.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypto/rx/RxDataset.cpp b/src/crypto/rx/RxDataset.cpp index 50459a555..7f354c0d0 100644 --- a/src/crypto/rx/RxDataset.cpp +++ b/src/crypto/rx/RxDataset.cpp @@ -72,13 +72,13 @@ bool xmrig::RxDataset::init(const uint8_t *seed, uint32_t numThreads) return true; } - const uint32_t datasetItemCount = randomx_dataset_item_count(); + const uint64_t datasetItemCount = randomx_dataset_item_count(); if (numThreads > 1) { std::vector threads; threads.reserve(numThreads); - for (uint32_t i = 0; i < numThreads; ++i) { + for (uint64_t i = 0; i < numThreads; ++i) { const uint32_t a = (datasetItemCount * i) / numThreads; const uint32_t b = (datasetItemCount * (i + 1)) / numThreads; threads.emplace_back(randomx_init_dataset, m_dataset, m_cache->get(), a, b - a);