summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/cryptonight.hpp
diff options
context:
space:
mode:
authorpsychocrypt <psychocryptHPC@gmail.com>2018-04-27 21:45:40 +0200
committerpsychocrypt <psychocryptHPC@gmail.com>2018-05-01 09:18:07 +0200
commit624b4ca870ef184fa3947c8368964e89647d9447 (patch)
tree3282b5b36f412381a9c3eec11333ccdc766ef355 /xmrstak/backend/cryptonight.hpp
parent3eaf54b2fad71cad23c304335dc63024d9939171 (diff)
downloadxmr-stak-624b4ca870ef184fa3947c8368964e89647d9447.zip
xmr-stak-624b4ca870ef184fa3947c8368964e89647d9447.tar.gz
support stellite v4 fork
solve #1494 - add algorithm `cryptonight_v7_stellite` (internal named: `cryptonight_stellite`)
Diffstat (limited to 'xmrstak/backend/cryptonight.hpp')
-rw-r--r--xmrstak/backend/cryptonight.hpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/xmrstak/backend/cryptonight.hpp b/xmrstak/backend/cryptonight.hpp
index b175cda..c0ad0cd 100644
--- a/xmrstak/backend/cryptonight.hpp
+++ b/xmrstak/backend/cryptonight.hpp
@@ -11,7 +11,8 @@ enum xmrstak_algo
cryptonight_monero = 3,
cryptonight_heavy = 4,
cryptonight_aeon = 5,
- cryptonight_ipbc = 6 // equal to cryptonight_aeon with a small tweak in the miner code
+ 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
@@ -48,11 +49,15 @@ inline constexpr size_t cn_select_memory<cryptonight_aeon>() { return CRYPTONIGH
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;
@@ -88,10 +93,14 @@ inline constexpr uint32_t cn_select_mask<cryptonight_aeon>() { return CRYPTONIGH
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;
@@ -127,10 +136,14 @@ inline constexpr uint32_t cn_select_iter<cryptonight_aeon>() { return CRYPTONIGH
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;
OpenPOWER on IntegriCloud