mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 00:37:46 +00:00
Added command line options "--randomx-init" and "--randomx-no-numa".
This commit is contained in:
parent
2fb88f10b8
commit
bbcacbc1d4
5 changed files with 21 additions and 1 deletions
|
@ -83,8 +83,9 @@ public:
|
|||
DryRunKey = 5000,
|
||||
HugePagesKey = 1009,
|
||||
ThreadsKey = 't',
|
||||
// HardwareAESKey = 1011,
|
||||
AssemblyKey = 1015,
|
||||
RandomXInitKey = 1022,
|
||||
RandomXNumaKey = 1023,
|
||||
|
||||
// xmrig amd
|
||||
OclPlatformKey = 1400,
|
||||
|
|
|
@ -41,7 +41,10 @@
|
|||
namespace xmrig {
|
||||
|
||||
static const char *kCPU = "cpu";
|
||||
|
||||
#ifdef XMRIG_ALGO_RANDOMX
|
||||
static const char *kRandomX = "randomx";
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ static const char *kAffinity = "affinity";
|
|||
static const char *kAsterisk = "*";
|
||||
static const char *kCpu = "cpu";
|
||||
static const char *kIntensity = "intensity";
|
||||
static const char *kRandomX = "randomx";
|
||||
|
||||
|
||||
static inline uint64_t intensity(uint64_t av)
|
||||
|
@ -165,6 +166,14 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
|
|||
return set(doc, kCpu, "asm", arg);
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
case IConfig::RandomXInitKey: /* --randomx-init */
|
||||
return set(doc, kRandomX, "init", static_cast<int64_t>(strtol(arg, nullptr, 10)));
|
||||
|
||||
case IConfig::RandomXNumaKey: /* --randomx-no-numa */
|
||||
return set(doc, kRandomX, "numa", false);
|
||||
# endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -81,6 +81,8 @@ static const option options[] = {
|
|||
{ "asm", 1, nullptr, IConfig::AssemblyKey },
|
||||
{ "daemon", 0, nullptr, IConfig::DaemonKey },
|
||||
{ "daemon-poll-interval", 1, nullptr, IConfig::DaemonPollKey },
|
||||
{ "randomx-init", 1, nullptr, IConfig::RandomXInitKey },
|
||||
{ "randomx-no-numa", 0, nullptr, IConfig::RandomXNumaKey },
|
||||
{ nullptr, 0, nullptr, 0 }
|
||||
};
|
||||
|
||||
|
|
|
@ -108,6 +108,11 @@ Options:\n\
|
|||
--http-access-token=T access token for HTTP API\n\
|
||||
--http-no-restricted enable full remote access to HTTP API (only if access token set)\n"
|
||||
#endif
|
||||
#ifdef XMRIG_ALGO_RANDOMX
|
||||
"\
|
||||
--randomx-init=N threads count to initialize RandomX dataset\n\
|
||||
--randomx-no-numa disable NUMA support for RandomX\n"
|
||||
#endif
|
||||
"\
|
||||
--dry-run test configuration and exit\n\
|
||||
-h, --help display this help and exit\n\
|
||||
|
|
Loading…
Reference in a new issue