Changed CPU threads format.

This commit is contained in:
XMRig 2019-08-07 21:47:42 +07:00
parent fd9039928b
commit 97192f224d
6 changed files with 68 additions and 52 deletions

View file

@ -147,31 +147,32 @@ void xmrig::CpuConfig::read(const rapidjson::Value &value)
void xmrig::CpuConfig::generate()
{
m_shouldSave = true;
m_shouldSave = true;
ICpuInfo *cpu = Cpu::info();
m_threads.disable(Algorithm::CN_0);
m_threads.move(kCn, Cpu::info()->threads(Algorithm::CN_0));
m_threads.move(kCn, cpu->threads(Algorithm::CN_0));
# ifdef XMRIG_ALGO_CN_GPU
m_threads.move(kCnGPU, Cpu::info()->threads(Algorithm::CN_GPU));
m_threads.move(kCnGPU, cpu->threads(Algorithm::CN_GPU));
# endif
# ifdef XMRIG_ALGO_CN_LITE
m_threads.disable(Algorithm::CN_LITE_0);
m_threads.move(kCnLite, Cpu::info()->threads(Algorithm::CN_LITE_1));
m_threads.move(kCnLite, cpu->threads(Algorithm::CN_LITE_1));
# endif
# ifdef XMRIG_ALGO_CN_HEAVY
m_threads.move(kCnHeavy, Cpu::info()->threads(Algorithm::CN_HEAVY_0));
m_threads.move(kCnHeavy, cpu->threads(Algorithm::CN_HEAVY_0));
# endif
# ifdef XMRIG_ALGO_CN_PICO
m_threads.move(kCnPico, Cpu::info()->threads(Algorithm::CN_PICO_0));
m_threads.move(kCnPico, cpu->threads(Algorithm::CN_PICO_0));
# endif
# ifdef XMRIG_ALGO_RANDOMX
m_threads.move(kRx, Cpu::info()->threads(Algorithm::RX_0));
m_threads.move(kRxWOW, Cpu::info()->threads(Algorithm::RX_WOW));
m_threads.move(kRx, cpu->threads(Algorithm::RX_0));
m_threads.move(kRxWOW, cpu->threads(Algorithm::RX_WOW));
# endif
}