MoneroOcean / xmrig

Monero (rx/0, rx/wow, rx/loki, defyx, rx/arq, rx/sfx, rx/keva, cn/0, cn/1, cn/2, cn/r, cn/fast, cn/half, cn/xao, cn/rto, cn/rwz, cn/zls, cn/double, cn/gpu, cn-lite/0, cn-lite/1, cn-heavy/0, cn-heavy/tube, cn-heavy/xhv, cn-pico, cn-pico/tlo, argon2/chukwa, argon2/wrkz, astrobwt) CPU/GPU miner
https://moneroocean.stream
GNU General Public License v3.0
274 stars 84 forks source link

Fixup switch warning; Use count_limit2; Benchmark ghostrider before flex #142

Closed Spudz76 closed 4 months ago

Spudz76 commented 4 months ago

Fix spam during compilation:

/usr/src/xmrig/src/backend/cpu/platform/BasicCpuInfo.cpp: In member function ‘virtual xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const xmrig::Algorithm&, uint32_t) const’:
/usr/src/xmrig/src/backend/cpu/platform/BasicCpuInfo.cpp:393:12: warning: enumeration value ‘INVALID’ not handled in switch [-Wswitch]
  393 |     switch (algorithm.id()) {
      |            ^
/usr/src/xmrig/src/backend/cpu/platform/BasicCpuInfo.cpp:393:12: warning: enumeration value ‘CN_0’ not handled in switch [-Wswitch]
/usr/src/xmrig/src/backend/cpu/platform/BasicCpuInfo.cpp:393:12: warning: enumeration value ‘CN_1’ not handled in switch [-Wswitch]
/usr/src/xmrig/src/backend/cpu/platform/BasicCpuInfo.cpp:393:12: warning: enumeration value ‘CN_2’ not handled in switch [-Wswitch]
/usr/src/xmrig/src/backend/cpu/platform/BasicCpuInfo.cpp:393:12: warning: enumeration value ‘CN_R’ not handled in switch [-Wswitch]
/usr/src/xmrig/src/backend/cpu/platform/BasicCpuInfo.cpp:393:12: warning: enumeration value ‘CN_FAST’ not handled in switch [-Wswitch]
...

Also use count_limit2 like everything else does, and do ghostrider before flex in benchmarking (in case the subalgo optimization test/selections matter).

MoneroOcean commented 4 months ago

Thank you!