diff options
Diffstat (limited to 'xmrstak/backend/cryptonight.hpp')
-rw-r--r-- | xmrstak/backend/cryptonight.hpp | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/xmrstak/backend/cryptonight.hpp b/xmrstak/backend/cryptonight.hpp index 8a8e259..633ddf4 100644 --- a/xmrstak/backend/cryptonight.hpp +++ b/xmrstak/backend/cryptonight.hpp @@ -3,14 +3,16 @@ #include <inttypes.h> #include <type_traits> -enum xmrstak_algo +enum xmrstak_algo { invalid_algo = 0, cryptonight = 1, cryptonight_lite = 2, cryptonight_monero = 3, cryptonight_heavy = 4, - cryptonight_aeon = 5 + cryptonight_aeon = 5, + cryptonight_ipbc = 6, // equal to cryptonight_aeon with a small tweak in the miner code + cryptonight_stellite = 7 //equal to cryptonight_monero but with one tiny change }; // define aeon settings @@ -44,14 +46,22 @@ inline constexpr size_t cn_select_memory<cryptonight_heavy>() { return CRYPTONIG template<> inline constexpr size_t cn_select_memory<cryptonight_aeon>() { return CRYPTONIGHT_LITE_MEMORY; } +template<> +inline constexpr size_t cn_select_memory<cryptonight_ipbc>() { return CRYPTONIGHT_LITE_MEMORY; } + +template<> +inline constexpr size_t cn_select_memory<cryptonight_stellite>() { return CRYPTONIGHT_MEMORY; } + inline size_t cn_select_memory(xmrstak_algo algo) { switch(algo) { + case cryptonight_stellite: case cryptonight_monero: case cryptonight: - return CRYPTONIGHT_MEMORY; + return CRYPTONIGHT_MEMORY; + case cryptonight_ipbc: case cryptonight_aeon: case cryptonight_lite: return CRYPTONIGHT_LITE_MEMORY; @@ -80,13 +90,21 @@ inline constexpr uint32_t cn_select_mask<cryptonight_heavy>() { return CRYPTONIG template<> inline constexpr uint32_t cn_select_mask<cryptonight_aeon>() { return CRYPTONIGHT_LITE_MASK; } +template<> +inline constexpr uint32_t cn_select_mask<cryptonight_ipbc>() { return CRYPTONIGHT_LITE_MASK; } + +template<> +inline constexpr uint32_t cn_select_mask<cryptonight_stellite>() { return CRYPTONIGHT_MASK; } + inline size_t cn_select_mask(xmrstak_algo algo) { switch(algo) { + case cryptonight_stellite: case cryptonight_monero: case cryptonight: return CRYPTONIGHT_MASK; + case cryptonight_ipbc: case cryptonight_aeon: case cryptonight_lite: return CRYPTONIGHT_LITE_MASK; @@ -115,13 +133,21 @@ inline constexpr uint32_t cn_select_iter<cryptonight_heavy>() { return CRYPTONIG template<> inline constexpr uint32_t cn_select_iter<cryptonight_aeon>() { return CRYPTONIGHT_LITE_ITER; } +template<> +inline constexpr uint32_t cn_select_iter<cryptonight_ipbc>() { return CRYPTONIGHT_LITE_ITER; } + +template<> +inline constexpr uint32_t cn_select_iter<cryptonight_stellite>() { return CRYPTONIGHT_ITER; } + inline size_t cn_select_iter(xmrstak_algo algo) { switch(algo) { + case cryptonight_stellite: case cryptonight_monero: case cryptonight: return CRYPTONIGHT_ITER; + case cryptonight_ipbc: case cryptonight_aeon: case cryptonight_lite: return CRYPTONIGHT_LITE_ITER; |