Add Chukwa support

This commit is contained in:
Brandon Lehmann 2019-05-27 11:46:09 -04:00
parent 1d4bc030fb
commit dcf9c68334
No known key found for this signature in database
GPG key ID: 7029EB58D1934C5E
70 changed files with 7240 additions and 4 deletions

View file

@ -34,6 +34,7 @@
#include "core/ConfigCreator.h"
#include "crypto/Asm.h"
#include "crypto/CryptoNight_constants.h"
#include "crypto/Argon2_constants.h"
#include "rapidjson/document.h"
#include "rapidjson/filewritestream.h"
#include "rapidjson/prettywriter.h"
@ -163,7 +164,16 @@ bool xmrig::Config::finalize()
const AlgoVariant av = getAlgoVariant();
m_threads.mode = m_threads.count ? Simple : Automatic;
const size_t size = CpuThread::multiway(av) * cn_select_memory(m_algorithm.algo()) / 1024;
size_t size;
if (m_algorithm.algo() == xmrig::ARGON2)
{
size = CpuThread::multiway(av) * argon2_select_memory(m_algorithm.variant());
}
else
{
size = CpuThread::multiway(av) * cn_select_memory(m_algorithm.algo()) / 1024;
}
if (!m_threads.count) {
m_threads.count = Cpu::info()->optimalThreadsCount(size, m_maxCpuUsage);