summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/cryptonight.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'xmrstak/backend/cryptonight.hpp')
-rw-r--r--xmrstak/backend/cryptonight.hpp26
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:
OpenPOWER on IntegriCloud