Preparation for #1.4.0 (#30)
- Fixed CPU affinity on Windows for NUMA and CPUs with lot of cores - Implemented per thread configurable Multihash mode (double, triple, quadruple, quintuple) - Rebased from XMRig 2.4.4
This commit is contained in:
parent
5f8ea98764
commit
acf27e9341
41 changed files with 2575 additions and 1104 deletions
|
@ -79,7 +79,7 @@ CCClient::CCClient(Options* options, uv_async_t* async)
|
|||
|
||||
m_clientStatus.setHugepagesEnabled(Mem::isHugepagesEnabled());
|
||||
m_clientStatus.setHugepages(Mem::isHugepagesAvailable());
|
||||
m_clientStatus.setDoubleHashMode(m_options->doubleHash());
|
||||
m_clientStatus.setHashFactor(Mem::hashFactor());
|
||||
|
||||
m_clientStatus.setVersion(Version::string());
|
||||
m_clientStatus.setCpuBrand(Cpu::brand());
|
||||
|
|
|
@ -35,9 +35,9 @@ ClientStatus::ClientStatus()
|
|||
: m_currentStatus(Status::PAUSED),
|
||||
m_hasHugepages(false),
|
||||
m_isHugepagesEnabled(false),
|
||||
m_isDoubleHashMode(false),
|
||||
m_isCpuX64(false),
|
||||
m_hasCpuAES(false),
|
||||
m_hashFactor(1),
|
||||
m_hashrateShort(0),
|
||||
m_hashrateMedium(0),
|
||||
m_hashrateLong(0),
|
||||
|
@ -147,14 +147,14 @@ void ClientStatus::setHugepagesEnabled(bool hugepagesEnabled)
|
|||
m_isHugepagesEnabled = hugepagesEnabled;
|
||||
}
|
||||
|
||||
bool ClientStatus::isDoubleHashMode() const
|
||||
int ClientStatus::getHashFactor() const
|
||||
{
|
||||
return m_isDoubleHashMode;
|
||||
return m_hashFactor;
|
||||
}
|
||||
|
||||
void ClientStatus::setDoubleHashMode(bool isDoubleHashMode)
|
||||
void ClientStatus::setHashFactor(int hashFactor)
|
||||
{
|
||||
m_isDoubleHashMode = isDoubleHashMode;
|
||||
m_hashFactor = hashFactor;
|
||||
}
|
||||
|
||||
bool ClientStatus::isCpuX64() const
|
||||
|
@ -365,8 +365,8 @@ bool ClientStatus::parseFromJson(const rapidjson::Document& document)
|
|||
m_isHugepagesEnabled = clientStatus["hugepages_enabled"].GetBool();
|
||||
}
|
||||
|
||||
if (clientStatus.HasMember("double_hash_mode")) {
|
||||
m_isDoubleHashMode = clientStatus["double_hash_mode"].GetBool();
|
||||
if (clientStatus.HasMember("hash_factor")) {
|
||||
m_hashFactor = clientStatus["hash_factor"].GetInt();
|
||||
}
|
||||
|
||||
if (clientStatus.HasMember("cpu_is_x64")) {
|
||||
|
@ -459,7 +459,7 @@ rapidjson::Value ClientStatus::toJson(rapidjson::MemoryPoolAllocator<rapidjson::
|
|||
|
||||
clientStatus.AddMember("hugepages_available", m_hasHugepages, allocator);
|
||||
clientStatus.AddMember("hugepages_enabled", m_isHugepagesEnabled, allocator);
|
||||
clientStatus.AddMember("double_hash_mode", m_isDoubleHashMode, allocator);
|
||||
clientStatus.AddMember("hash_factor", m_hashFactor, allocator);
|
||||
clientStatus.AddMember("cpu_is_x64", m_isCpuX64, allocator);
|
||||
clientStatus.AddMember("cpu_has_aes", m_hasCpuAES, allocator);
|
||||
|
||||
|
|
|
@ -85,8 +85,8 @@ public:
|
|||
bool isHugepagesEnabled() const;
|
||||
void setHugepagesEnabled(bool hugepagesEnabled);
|
||||
|
||||
bool isDoubleHashMode() const;
|
||||
void setDoubleHashMode(bool isDoubleHashMode);
|
||||
int getHashFactor() const;
|
||||
void setHashFactor(int hashFactor);
|
||||
|
||||
bool isCpuX64() const;
|
||||
void setCpuX64(bool isCpuX64);
|
||||
|
@ -161,10 +161,10 @@ private:
|
|||
|
||||
bool m_hasHugepages;
|
||||
bool m_isHugepagesEnabled;
|
||||
bool m_isDoubleHashMode;
|
||||
bool m_isCpuX64;
|
||||
bool m_hasCpuAES;
|
||||
|
||||
int m_hashFactor;
|
||||
double m_hashrateShort;
|
||||
double m_hashrateMedium;
|
||||
double m_hashrateLong;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue