Cleanup
This commit is contained in:
parent
503f0ded0f
commit
5e333e1910
6 changed files with 17 additions and 12 deletions
|
@ -27,7 +27,7 @@ enum AsmOptimization
|
||||||
ASM_AUTODETECT,
|
ASM_AUTODETECT,
|
||||||
ASM_INTEL,
|
ASM_INTEL,
|
||||||
ASM_RYZEN,
|
ASM_RYZEN,
|
||||||
ASM_NONE
|
ASM_OFF
|
||||||
};
|
};
|
||||||
|
|
||||||
inline std::string getAsmOptimizationName(AsmOptimization asmOptimization)
|
inline std::string getAsmOptimizationName(AsmOptimization asmOptimization)
|
||||||
|
@ -38,7 +38,7 @@ inline std::string getAsmOptimizationName(AsmOptimization asmOptimization)
|
||||||
return "INTEL";
|
return "INTEL";
|
||||||
case ASM_RYZEN:
|
case ASM_RYZEN:
|
||||||
return "RYZEN";
|
return "RYZEN";
|
||||||
case ASM_NONE:
|
case ASM_OFF:
|
||||||
return "OFF";
|
return "OFF";
|
||||||
case ASM_AUTODETECT:
|
case ASM_AUTODETECT:
|
||||||
default:
|
default:
|
||||||
|
@ -55,7 +55,7 @@ inline AsmOptimization parseAsmOptimization(int optimization)
|
||||||
asmOptimization = AsmOptimization::ASM_AUTODETECT;
|
asmOptimization = AsmOptimization::ASM_AUTODETECT;
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
asmOptimization = AsmOptimization::ASM_NONE;
|
asmOptimization = AsmOptimization::ASM_OFF;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
asmOptimization = AsmOptimization::ASM_INTEL;
|
asmOptimization = AsmOptimization::ASM_INTEL;
|
||||||
|
@ -75,7 +75,7 @@ inline AsmOptimization parseAsmOptimization(const std::string optimization)
|
||||||
AsmOptimization asmOptimization = AsmOptimization::ASM_AUTODETECT;
|
AsmOptimization asmOptimization = AsmOptimization::ASM_AUTODETECT;
|
||||||
|
|
||||||
if (optimization == "0" || optimization == "none" || optimization == "off") {
|
if (optimization == "0" || optimization == "none" || optimization == "off") {
|
||||||
asmOptimization = AsmOptimization::ASM_NONE;
|
asmOptimization = AsmOptimization::ASM_OFF;
|
||||||
} else if (optimization == "1" || optimization == "intel") {
|
} else if (optimization == "1" || optimization == "intel") {
|
||||||
asmOptimization = AsmOptimization::ASM_INTEL;
|
asmOptimization = AsmOptimization::ASM_INTEL;
|
||||||
} else if (optimization == "2" || optimization == "ryzen") {
|
} else if (optimization == "2" || optimization == "ryzen") {
|
||||||
|
|
|
@ -48,7 +48,7 @@ CpuImpl::CpuImpl()
|
||||||
, m_sockets(1)
|
, m_sockets(1)
|
||||||
, m_totalCores(0)
|
, m_totalCores(0)
|
||||||
, m_totalThreads(0)
|
, m_totalThreads(0)
|
||||||
, m_asmOptimization(AsmOptimization::ASM_NONE)
|
, m_asmOptimization(AsmOptimization::ASM_OFF)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,9 +73,9 @@ Options:\n"
|
||||||
-k, --keepalive send keepalived for prevent timeout (need pool support)\n\
|
-k, --keepalive send keepalived for prevent timeout (need pool support)\n\
|
||||||
-r, --retries=N number of times to retry before switch to backup server (default: 5)\n\
|
-r, --retries=N number of times to retry before switch to backup server (default: 5)\n\
|
||||||
-R, --retry-pause=N time to pause between retries (default: 5)\n\
|
-R, --retry-pause=N time to pause between retries (default: 5)\n\
|
||||||
--pow-variant=V specificy the PoW variat to use: -> auto (default), 0 (v0), 1 (v1, aka cnv7), 2(v2, aka cnv8), ipbc (tube), alloy, xtl (including autodetect for v5)\n\
|
--pow-variant=V specificy the PoW variat to use: -> 'auto' (default), '0' (v0), '1' (v1, aka cnv7), '2' (v2, aka cnv8), 'ipbc' (tube), 'alloy', 'xtl' (including autodetect for v5)\n\
|
||||||
for further help see: https://github.com/Bendr0id/xmrigCC/wiki/Coin-configurations\n\
|
for further help see: https://github.com/Bendr0id/xmrigCC/wiki/Coin-configurations\n\
|
||||||
--asm-optimization=V specificy the ASM optimization to use: -> 'auto' (default), 'intel', 'ryzen', 'none' \n\
|
--asm-optimization=V specificy the ASM optimization to use: -> 'auto' (default), 'intel', 'ryzen', 'off' \n\
|
||||||
--multihash-factor=N number of hash blocks to process at a time (don't set or 0 enables automatic selection of optimal number of hash blocks)\n\
|
--multihash-factor=N number of hash blocks to process at a time (don't set or 0 enables automatic selection of optimal number of hash blocks)\n\
|
||||||
--multihash-thread-mask=MASK limits multihash to given threads (mask), (default: all threads)\n\
|
--multihash-thread-mask=MASK limits multihash to given threads (mask), (default: all threads)\n\
|
||||||
--cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1\n\
|
--cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1\n\
|
||||||
|
@ -298,7 +298,7 @@ constexpr static const char *asm_optimization_names[] = {
|
||||||
"auto",
|
"auto",
|
||||||
"intel",
|
"intel",
|
||||||
"ryzen",
|
"ryzen",
|
||||||
"none"
|
"off"
|
||||||
};
|
};
|
||||||
|
|
||||||
Options *Options::parse(int argc, char **argv)
|
Options *Options::parse(int argc, char **argv)
|
||||||
|
@ -1082,6 +1082,11 @@ bool Options::parseAsmOptimization(const char *asmOptimization)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i == ARRAY_SIZE(asm_optimization_names) - 1 && (!strcmp(asmOptimization, "none") || !strcmp(asmOptimization, "0"))) {
|
||||||
|
m_asmOptimization = ASM_OFF;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (i == ARRAY_SIZE(asm_optimization_names) - 1) {
|
if (i == ARRAY_SIZE(asm_optimization_names) - 1) {
|
||||||
showUsage(1);
|
showUsage(1);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -64,7 +64,7 @@ static void print_cpu()
|
||||||
Cpu::sockets(),
|
Cpu::sockets(),
|
||||||
Cpu::isX64() ? "\x1B[01;32m" : "\x1B[01;31m-",
|
Cpu::isX64() ? "\x1B[01;32m" : "\x1B[01;31m-",
|
||||||
Cpu::hasAES() ? "\x1B[01;32m" : "\x1B[01;31m-",
|
Cpu::hasAES() ? "\x1B[01;32m" : "\x1B[01;31m-",
|
||||||
Options::i()->asmOptimization() != AsmOptimization::ASM_NONE ? "\x1B[01;32m" : "\x1B[01;31m",
|
Options::i()->asmOptimization() != AsmOptimization::ASM_OFF ? "\x1B[01;32m" : "\x1B[01;31m",
|
||||||
getAsmOptimizationName(Options::i()->asmOptimization()).c_str());
|
getAsmOptimizationName(Options::i()->asmOptimization()).c_str());
|
||||||
# ifndef XMRIG_NO_LIBCPUID
|
# ifndef XMRIG_NO_LIBCPUID
|
||||||
Log::i()->text("\x1B[01;32m * \x1B[01;37mCPU L2/L3: %.1f MB/%.1f MB", Cpu::l2() / 1024.0, Cpu::l3() / 1024.0);
|
Log::i()->text("\x1B[01;32m * \x1B[01;37mCPU L2/L3: %.1f MB/%.1f MB", Cpu::l2() / 1024.0, Cpu::l3() / 1024.0);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"multihash-thread-mask" : null, // for multihash-factors>0 only, limits multihash to given threads (mask), mask "0x3" means run multihash on thread 0 and 1 only (default: all threads)
|
"multihash-thread-mask" : null, // for multihash-factors>0 only, limits multihash to given threads (mask), mask "0x3" means run multihash on thread 0 and 1 only (default: all threads)
|
||||||
"pow-variant" : "auto", // specificy the PoW variat to use: -> auto (default), 0 (v0), 1 (v1, aka monerov7, aeonv7), 2 (v2, aka monerov8), tube (ipbc), alloy, xtl (including autodetect for v5), msr, xhv, rto
|
"pow-variant" : "auto", // specificy the PoW variat to use: -> auto (default), 0 (v0), 1 (v1, aka monerov7, aeonv7), 2 (v2, aka monerov8), tube (ipbc), alloy, xtl (including autodetect for v5), msr, xhv, rto
|
||||||
// for further help see: https://github.com/Bendr0id/xmrigCC/wiki/Coin-configurations
|
// for further help see: https://github.com/Bendr0id/xmrigCC/wiki/Coin-configurations
|
||||||
"asm-optimization" : "auto", // specificy the ASM optimization to use: -> auto (default), intel, ryzen, none
|
"asm-optimization" : "auto", // specificy the ASM optimization to use: -> auto (default), intel, ryzen, off
|
||||||
"background": false, // true to run the miner in the background (Windows only, for *nix plase use screen/tmux or systemd service instead)
|
"background": false, // true to run the miner in the background (Windows only, for *nix plase use screen/tmux or systemd service instead)
|
||||||
"colors": true, // false to disable colored output
|
"colors": true, // false to disable colored output
|
||||||
"cpu-affinity": null, // set process affinity to CPU core(s), mask "0x3" for cores 0 and 1
|
"cpu-affinity": null, // set process affinity to CPU core(s), mask "0x3" for cores 0 and 1
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
"multihash-factor": 0, // number of hash blocks to process at a time (not set or 0 enables automatic selection of optimal number of hash blocks)
|
"multihash-factor": 0, // number of hash blocks to process at a time (not set or 0 enables automatic selection of optimal number of hash blocks)
|
||||||
"multihash-thread-mask" : null, // for multihash-factors>0 only, limits multihash to given threads (mask), mask "0x3" means run multihash on thread 0 and 1 only (default: all threads)
|
"multihash-thread-mask" : null, // for multihash-factors>0 only, limits multihash to given threads (mask), mask "0x3" means run multihash on thread 0 and 1 only (default: all threads)
|
||||||
"pow-variant" : "auto", // specificy the PoW variat to use: -> auto (default), 0 (v0), 1 (v1, aka monerov7, aeonv7), 2 (v2, aka monerov8), tube (ipbc), alloy, xtl (including autodetect for v5), msr, xhv, rto
|
"pow-variant" : "auto", // specificy the PoW variat to use: -> auto (default), 0 (v0), 1 (v1, aka monerov7, aeonv7), 2 (v2, aka monerov8), tube (ipbc), alloy, xtl (including autodetect for v5), msr, xhv, rto
|
||||||
// for further help see: https://github.com/Bendr0id/xmrigCC/wiki/Coin-configurations
|
// for further help see: https://github.com/Bendr0id/xmrigCC/wiki/Coin-configurations
|
||||||
"asm-optimization" : "auto", // specificy the ASM optimization to use: -> auto (default), intel, ryzen, none
|
"asm-optimization" : "auto", // specificy the ASM optimization to use: -> auto (default), intel, ryzen, off
|
||||||
"background": false, // true to run the miner in the background (Windows only, for *nix plase use screen/tmux or systemd service instead)
|
"background": false, // true to run the miner in the background (Windows only, for *nix plase use screen/tmux or systemd service instead)
|
||||||
"colors": true, // false to disable colored output
|
"colors": true, // false to disable colored output
|
||||||
"cpu-affinity": null, // set process affinity to CPU core(s), mask "0x3" for cores 0 and 1
|
"cpu-affinity": null, // set process affinity to CPU core(s), mask "0x3" for cores 0 and 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue