Final adjustments to make RandomX truely throttled

This commit is contained in:
Your Name 2024-05-04 11:06:10 +08:00
parent 531657cb45
commit ce09c5b089
8 changed files with 110 additions and 29 deletions

View file

@ -108,11 +108,12 @@ bool xmrig::RxDataset::init(const Buffer &seed, uint32_t numThreads, int priorit
const uint32_t a = (datasetItemCount * i) / numThreads;
const uint32_t b = (datasetItemCount * (i + 1)) / numThreads;
threads.emplace_back(init_dataset_wrapper, m_dataset, m_cache->get(), a, b - a, priority);
threads[i].join(); // force it to be sequential
}
for (uint32_t i = 0; i < numThreads; ++i) {
threads[i].join();
}
// for (uint32_t i = 0; i < numThreads; ++i) {
// threads[i].join();
// }
}
else {
init_dataset_wrapper(m_dataset, m_cache->get(), 0, datasetItemCount, priority);