diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-26 20:58:27 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-27 20:13:19 +0200 |
commit | 12802f12e30f57c2a9eefca2c1a5955275c95127 (patch) | |
tree | a10bced239ecd012ceeed593571a3fb8bccee9cb /xmrstak/backend/nvidia/minethd.cpp | |
parent | 41451d91e8e50f2b6c4b07630987dbc5a58aecb9 (diff) | |
download | xmr-stak-12802f12e30f57c2a9eefca2c1a5955275c95127.zip xmr-stak-12802f12e30f57c2a9eefca2c1a5955275c95127.tar.gz |
rename `xmr` to `monero`
- rename all `xmr` to `monero`
- be insensitive while check for set currency
- add function to compate two strings insensitive
Diffstat (limited to 'xmrstak/backend/nvidia/minethd.cpp')
-rw-r--r-- | xmrstak/backend/nvidia/minethd.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/xmrstak/backend/nvidia/minethd.cpp b/xmrstak/backend/nvidia/minethd.cpp index 237dcaf..0bc6214 100644 --- a/xmrstak/backend/nvidia/minethd.cpp +++ b/xmrstak/backend/nvidia/minethd.cpp @@ -32,7 +32,8 @@ #include "xmrstak/jconf.hpp" #include "xmrstak/misc/environment.hpp" #include "xmrstak/backend/cpu/hwlocMemory.hpp" -#include "../cryptonight.hpp" +#include "xmrstak/backend/cryptonight.hpp" +#include "xmrstak/misc/utility.hpp" #include <assert.h> #include <cmath> @@ -209,7 +210,7 @@ void minethd::work_main() uint64_t iCount = 0; cryptonight_ctx* cpu_ctx; cpu_ctx = cpu::minethd::minethd_alloc_ctx(); - cn_hash_fun hash_fun = cpu::minethd::func_selector(::jconf::inst()->HaveHardwareAes(), true /*bNoPrefetch*/, ::jconf::inst()->IsCurrencyXMR()); + cn_hash_fun hash_fun = cpu::minethd::func_selector(::jconf::inst()->HaveHardwareAes(), true /*bNoPrefetch*/, ::jconf::inst()->IsCurrencyMonero()); uint32_t iNonce; globalStates::inst().iConsumeCnt++; @@ -220,8 +221,8 @@ void minethd::work_main() std::exit(0); } - bool useXMR = ::jconf::inst()->GetCurrency().compare("xmr") == 0; - bool useAEON = ::jconf::inst()->GetCurrency().compare("aeon") == 0; + bool mineMonero = strcmp_i(::jconf::inst()->GetCurrency(), "monero"); + bool useAEON = strcmp_i(::jconf::inst()->GetCurrency(), "aeon"); while (bQuit == 0) { @@ -260,16 +261,16 @@ void minethd::work_main() uint32_t foundCount; cryptonight_extra_cpu_prepare(&ctx, iNonce); -#ifndef CONF_NO_XMR - if(useXMR) +#ifndef CONF_NO_MONERO + if(mineMonero) { - cryptonight_core_cpu_hash<XMR_ITER, XMR_MASK, 19>(&ctx); + cryptonight_core_cpu_hash<MONERO_ITER, MONERO_MASK, 19>(&ctx); } #endif #ifndef CONF_NO_AEON if(useAEON) { - cryptonight_core_cpu_hash<XMR_ITER, XMR_MASK, 18>(&ctx); + cryptonight_core_cpu_hash<MONERO_ITER, MONERO_MASK, 18>(&ctx); } #endif cryptonight_extra_cpu_final(&ctx, iNonce, oWork.iTarget, &foundCount, foundNonce); |