summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/amd/autoAdjust.hpp
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-10-24 21:24:37 +0200
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-10-27 20:12:01 +0200
commit2346c8be20939fe9c34cee441ac11644ec43cc58 (patch)
tree5c8c23365a3f1417854f4c5b92ef07e55c077a20 /xmrstak/backend/amd/autoAdjust.hpp
parente0f0ad4d03af36d302485e46e22f47edba96b40d (diff)
downloadxmr-stak-2346c8be20939fe9c34cee441ac11644ec43cc58.zip
xmr-stak-2346c8be20939fe9c34cee441ac11644ec43cc58.tar.gz
add eon support to amd backend
- add compile parameter to support aeon and xmr - update auto suggestion to handle aeon
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..01f279a 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 "../cryptonight.hpp"
+#include "../../jconf.hpp"
#include <vector>
#include <cstdio>
@@ -81,6 +83,16 @@ private:
constexpr size_t byteToMiB = 1024u * 1024u;
+ size_t hashMemSize;
+ if(::jconf::inst()->IsCurrencyXMR())
+ {
+ hashMemSize = XMR_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