summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/cryptonight.hpp
diff options
context:
space:
mode:
authorpsychocrypt <psychocryptHPC@gmail.com>2018-03-27 20:54:47 +0200
committerpsychocrypt <psychocryptHPC@gmail.com>2018-03-27 21:17:36 +0200
commit5a2c4444a4e2b5ddc5e5dbf98990dcad45e32fe8 (patch)
tree8185467fb893d95a9e3ada6a19d77973432c3e24 /xmrstak/backend/cryptonight.hpp
parent09a5dcce2c51d87d77244970d2c09bea3207da7a (diff)
downloadxmr-stak-5a2c4444a4e2b5ddc5e5dbf98990dcad45e32fe8.zip
xmr-stak-5a2c4444a4e2b5ddc5e5dbf98990dcad45e32fe8.tar.gz
POW AEON v7
- add new pow for AEON - fix missing cryptonight-heavy selection for multi hashes
Diffstat (limited to 'xmrstak/backend/cryptonight.hpp')
-rw-r--r--xmrstak/backend/cryptonight.hpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/xmrstak/backend/cryptonight.hpp b/xmrstak/backend/cryptonight.hpp
index fe10a9f..538f1d8 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,6 +41,9 @@ 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)
{
@@ -53,6 +57,8 @@ inline size_t cn_select_memory(xmrstak_algo algo)
return CRYPTONIGHT_MEMORY;
case cryptonight_heavy:
return CRYPTONIGHT_HEAVY_MEMORY;
+ case cryptonight_aeon:
+ return CRYPTONIGHT_LITE_MEMORY;
default:
return 0;
}
@@ -73,6 +79,9 @@ 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)
@@ -85,6 +94,8 @@ inline size_t cn_select_mask(xmrstak_algo algo)
return CRYPTONIGHT_MASK;
case cryptonight_heavy:
return CRYPTONIGHT_HEAVY_MASK;
+ case cryptonight_aeon:
+ return CRYPTONIGHT_LITE_MASK;
default:
return 0;
}
@@ -105,6 +116,9 @@ 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)
@@ -117,6 +131,8 @@ inline size_t cn_select_iter(xmrstak_algo algo)
return CRYPTONIGHT_ITER;
case cryptonight_heavy:
return CRYPTONIGHT_HEAVY_ITER;
+ case cryptonight_aeon:
+ return CRYPTONIGHT_LITE_ITER;
default:
return 0;
}
OpenPOWER on IntegriCloud