summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/amd/autoAdjust.hpp
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-10-27 20:37:12 +0100
committerGitHub <noreply@github.com>2017-10-27 20:37:12 +0100
commitc192b97b67bf648540bf058f21b7873bfe886a82 (patch)
treefe71edd305f523021c9038dab5595551c7e4c7e2 /xmrstak/backend/amd/autoAdjust.hpp
parent91b307859ea97cc1abdb17da01b94919d3521803 (diff)
parent0117ed609e69af977fabaf9c28bbf8cf1300ee89 (diff)
downloadxmr-stak-c192b97b67bf648540bf058f21b7873bfe886a82.zip
xmr-stak-c192b97b67bf648540bf058f21b7873bfe886a82.tar.gz
Merge pull request #67 from psychocrypt/topic-aeon2
add Aeon support
Diffstat (limited to 'xmrstak/backend/amd/autoAdjust.hpp')
-rw-r--r--xmrstak/backend/amd/autoAdjust.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/xmrstak/backend/amd/autoAdjust.hpp b/xmrstak/backend/amd/autoAdjust.hpp
index 2a22a08..87e6299 100644
--- a/xmrstak/backend/amd/autoAdjust.hpp
+++ b/xmrstak/backend/amd/autoAdjust.hpp
@@ -8,6 +8,8 @@
#include "xmrstak/misc/console.hpp"
#include "xmrstak/misc/configEditor.hpp"
#include "xmrstak/params.hpp"
+#include "xmrstak/backend/cryptonight.hpp"
+#include "xmrstak/jconf.hpp"
#include <vector>
#include <cstdio>
@@ -81,6 +83,16 @@ private:
constexpr size_t byteToMiB = 1024u * 1024u;
+ size_t hashMemSize;
+ if(::jconf::inst()->IsCurrencyMonero())
+ {
+ hashMemSize = MONERO_MEMORY;
+ }
+ else
+ {
+ hashMemSize = AEON_MEMORY;
+ }
+
std::string conf;
int i = 0;
for(auto& ctx : devVec)
@@ -88,7 +100,7 @@ private:
// keep 64MiB memory free (value is randomly chosen)
size_t availableMem = ctx.freeMem - (64u * 1024 * 1024);
// 224byte extra memory is used per thread for meta data
- size_t perThread = (size_t(1u)<<21) + 224u;
+ size_t perThread = hashMemSize + 224u;
size_t max_intensity = availableMem / perThread;
// 1000 is a magic selected limit \todo select max intensity depending of the gpu type
size_t possibleIntensity = std::min( size_t(1000u) , max_intensity );
OpenPOWER on IntegriCloud