Added command line option --astrobwt-max-size

This commit is contained in:
XMRig 2020-03-08 00:13:47 +07:00
parent 5fee8ba288
commit 6cb27e9662
No known key found for this signature in database
GPG key ID: 446A53638BE94409
7 changed files with 26 additions and 10 deletions

View file

@ -156,6 +156,11 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
return set(doc, kCpu, "asm", arg);
# endif
# ifdef XMRIG_ALGO_ASTROBWT
case IConfig::AstroBWTMaxSizeKey: /* --astrobwt-max-size */
return set(doc, kCpu, "astrobwt-max-size", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
# endif
# ifdef XMRIG_ALGO_RANDOMX
case IConfig::RandomXInitKey: /* --randomx-init */
return set(doc, kRandomX, "init", static_cast<int64_t>(strtol(arg, nullptr, 10)));

View file

@ -107,6 +107,9 @@ static const option options[] = {
{ "randomx-no-rdmsr", 0, nullptr, IConfig::RandomXRdmsrKey },
{ "no-rdmsr", 0, nullptr, IConfig::RandomXRdmsrKey },
# endif
#ifdef XMRIG_ALGO_ASTROBWT
{ "astrobwt-max-size", 1, nullptr, IConfig::AstroBWTMaxSizeKey },
#endif
# ifdef XMRIG_FEATURE_OPENCL
{ "opencl", 0, nullptr, IConfig::OclKey },
{ "opencl-devices", 1, nullptr, IConfig::OclDevicesKey },

View file

@ -94,6 +94,10 @@ static inline const std::string &usage()
u += " --randomx-no-rdmsr disable reverting initial MSR values on exit\n";
# endif
# ifdef XMRIG_ALGO_ASTROBWT
u += " --astrobwt-max-size=N skip hashes with large stage 2 size, default: 550, min: 400, max: 1200\n";
# endif
# ifdef XMRIG_FEATURE_HTTP
u += "\nAPI:\n";
u += " --api-worker-id=ID custom worker-id for API\n";