diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2018-03-29 20:50:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-29 20:50:57 +0100 |
commit | ef87d28da53ce40d79e053668dbddab82ef997b0 (patch) | |
tree | 33a06f0238cb643f4618cf9e8024a07649695d5b /xmrstak/backend/cryptonight.hpp | |
parent | 89d319a8920ee91f0b8c05000bfc7d155b90bcb0 (diff) | |
parent | 0c48570ac662662fc9e808c0efe042f843fd6b23 (diff) | |
download | xmr-stak-ef87d28da53ce40d79e053668dbddab82ef997b0.zip xmr-stak-ef87d28da53ce40d79e053668dbddab82ef997b0.tar.gz |
Merge pull request #1236 from psychocrypt/topic-powAeonv7
POW AEON v7
Diffstat (limited to 'xmrstak/backend/cryptonight.hpp')
-rw-r--r-- | xmrstak/backend/cryptonight.hpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/xmrstak/backend/cryptonight.hpp b/xmrstak/backend/cryptonight.hpp index fe10a9f..8a8e259 100644 --- a/xmrstak/backend/cryptonight.hpp +++ b/xmrstak/backend/cryptonight.hpp @@ -9,7 +9,8 @@ enum xmrstak_algo cryptonight = 1, cryptonight_lite = 2, cryptonight_monero = 3, - cryptonight_heavy = 4 + cryptonight_heavy = 4, + cryptonight_aeon = 5 }; // define aeon settings @@ -40,17 +41,20 @@ inline constexpr size_t cn_select_memory<cryptonight_monero>() { return CRYPTONI template<> inline constexpr size_t cn_select_memory<cryptonight_heavy>() { return CRYPTONIGHT_HEAVY_MEMORY; } +template<> +inline constexpr size_t cn_select_memory<cryptonight_aeon>() { return CRYPTONIGHT_LITE_MEMORY; } + inline size_t cn_select_memory(xmrstak_algo algo) { switch(algo) { + case cryptonight_monero: case cryptonight: - return CRYPTONIGHT_MEMORY; + return CRYPTONIGHT_MEMORY; + case cryptonight_aeon: case cryptonight_lite: return CRYPTONIGHT_LITE_MEMORY; - case cryptonight_monero: - return CRYPTONIGHT_MEMORY; case cryptonight_heavy: return CRYPTONIGHT_HEAVY_MEMORY; default: @@ -73,16 +77,19 @@ inline constexpr uint32_t cn_select_mask<cryptonight_monero>() { return CRYPTONI template<> inline constexpr uint32_t cn_select_mask<cryptonight_heavy>() { return CRYPTONIGHT_HEAVY_MASK; } +template<> +inline constexpr uint32_t cn_select_mask<cryptonight_aeon>() { return CRYPTONIGHT_LITE_MASK; } + inline size_t cn_select_mask(xmrstak_algo algo) { switch(algo) { + case cryptonight_monero: case cryptonight: return CRYPTONIGHT_MASK; + case cryptonight_aeon: case cryptonight_lite: return CRYPTONIGHT_LITE_MASK; - case cryptonight_monero: - return CRYPTONIGHT_MASK; case cryptonight_heavy: return CRYPTONIGHT_HEAVY_MASK; default: @@ -105,16 +112,19 @@ inline constexpr uint32_t cn_select_iter<cryptonight_monero>() { return CRYPTONI template<> inline constexpr uint32_t cn_select_iter<cryptonight_heavy>() { return CRYPTONIGHT_HEAVY_ITER; } +template<> +inline constexpr uint32_t cn_select_iter<cryptonight_aeon>() { return CRYPTONIGHT_LITE_ITER; } + inline size_t cn_select_iter(xmrstak_algo algo) { switch(algo) { + case cryptonight_monero: case cryptonight: return CRYPTONIGHT_ITER; + case cryptonight_aeon: case cryptonight_lite: return CRYPTONIGHT_LITE_ITER; - case cryptonight_monero: - return CRYPTONIGHT_ITER; case cryptonight_heavy: return CRYPTONIGHT_HEAVY_ITER; default: |