More cleanup.

This commit is contained in:
XMRig 2019-10-03 07:45:25 +07:00
parent 6d8cf91568
commit d1aadc2e3b
7 changed files with 37 additions and 12 deletions

View file

@ -23,8 +23,9 @@
*/
#include "base/io/json/Json.h"
#include "crypto/rx/RxConfig.h"
#include "backend/cpu/Cpu.h"
#include "base/io/json/Json.h"
#include "rapidjson/document.h"
@ -61,3 +62,17 @@ bool xmrig::RxConfig::read(const rapidjson::Value &value)
return false;
}
#ifdef XMRIG_FEATURE_HWLOC
bool xmrig::RxConfig::isNUMA() const
{
return m_numa && Cpu::info()->nodes() > 1;
}
#endif
uint32_t xmrig::RxConfig::threads() const
{
return m_threads < 1 ? static_cast<uint32_t>(Cpu::info()->threads()) : static_cast<uint32_t>(m_threads);
}