Fix for 272 initialization threads
This commit is contained in:
parent
dc5843651b
commit
edb2c98ad7
1 changed files with 2 additions and 2 deletions
|
@ -72,13 +72,13 @@ bool xmrig::RxDataset::init(const uint8_t *seed, uint32_t numThreads)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint32_t datasetItemCount = randomx_dataset_item_count();
|
const uint64_t datasetItemCount = randomx_dataset_item_count();
|
||||||
|
|
||||||
if (numThreads > 1) {
|
if (numThreads > 1) {
|
||||||
std::vector<std::thread> threads;
|
std::vector<std::thread> threads;
|
||||||
threads.reserve(numThreads);
|
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 a = (datasetItemCount * i) / numThreads;
|
||||||
const uint32_t b = (datasetItemCount * (i + 1)) / numThreads;
|
const uint32_t b = (datasetItemCount * (i + 1)) / numThreads;
|
||||||
threads.emplace_back(randomx_init_dataset, m_dataset, m_cache->get(), a, b - a);
|
threads.emplace_back(randomx_init_dataset, m_dataset, m_cache->get(), a, b - a);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue