Special handle for cn/2 based algorithms.

This commit is contained in:
XMRig
2019-08-23 00:56:51 +07:00
parent ed7216575c
commit fac7f8d56e

View File

@ -25,6 +25,7 @@
#include "backend/common/Threads.h"
#include "backend/cpu/CpuThreads.h"
#include "crypto/cn/CnAlgo.h"
#include "rapidjson/document.h"
@ -37,6 +38,7 @@ namespace xmrig {
static const char *kAsterisk = "*";
static const char *kCn2 = "cn/2";
} // namespace xmrig
@ -118,6 +120,10 @@ xmrig::String xmrig::Threads<T>::profileName(const Algorithm &algorithm, bool st
return String();
}
if (algorithm.family() == Algorithm::CN && CnAlgo<>::base(algorithm) == Algorithm::CN_2 && has(kCn2)) {
return kCn2;
}
if (name.contains("/")) {
const String base = name.split('/').at(0);
if (has(base)) {