summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/amd/jconf.cpp
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-12-04 15:47:31 +0000
committerGitHub <noreply@github.com>2017-12-04 15:47:31 +0000
commita78b62d19756865879c54eac00c1c3f4d983d3a1 (patch)
treedc5cd5b9f4bd1cb98e51e163b85e78cfad4edc67 /xmrstak/backend/amd/jconf.cpp
parent9c6bb11026de14c1a8d9eaecf5e70517d7a903e5 (diff)
parentcfe64725f063b63eafbeeef7e57cad7448cb3d15 (diff)
downloadxmr-stak-a78b62d19756865879c54eac00c1c3f4d983d3a1.zip
xmr-stak-a78b62d19756865879c54eac00c1c3f4d983d3a1.tar.gz
Merge pull request #315 from psychocrypt/topic-amdScratchpadIndexing
add AMD scratchpad indexing option
Diffstat (limited to 'xmrstak/backend/amd/jconf.cpp')
-rw-r--r--xmrstak/backend/amd/jconf.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmrstak/backend/amd/jconf.cpp b/xmrstak/backend/amd/jconf.cpp
index 0617aeb..07afb19 100644
--- a/xmrstak/backend/amd/jconf.cpp
+++ b/xmrstak/backend/amd/jconf.cpp
@@ -103,13 +103,14 @@ bool jconf::GetThreadConfig(size_t id, thd_cfg &cfg)
if(!oThdConf.IsObject())
return false;
- const Value *idx, *intensity, *w_size, *aff;
+ const Value *idx, *intensity, *w_size, *aff, *stridedIndex;
idx = GetObjectMember(oThdConf, "index");
intensity = GetObjectMember(oThdConf, "intensity");
w_size = GetObjectMember(oThdConf, "worksize");
aff = GetObjectMember(oThdConf, "affine_to_cpu");
+ stridedIndex = GetObjectMember(oThdConf, "strided_index");
- if(idx == nullptr || intensity == nullptr || w_size == nullptr || aff == nullptr)
+ if(idx == nullptr || intensity == nullptr || w_size == nullptr || aff == nullptr || stridedIndex == nullptr)
return false;
if(!idx->IsUint64() || !intensity->IsUint64() || !w_size->IsUint64())
@@ -118,9 +119,13 @@ bool jconf::GetThreadConfig(size_t id, thd_cfg &cfg)
if(!aff->IsUint64() && !aff->IsBool())
return false;
+ if(!stridedIndex->IsBool())
+ return false;
+
cfg.index = idx->GetUint64();
cfg.intensity = intensity->GetUint64();
cfg.w_size = w_size->GetUint64();
+ cfg.stridedIndex = stridedIndex->GetBool();
if(aff->IsNumber())
cfg.cpu_aff = aff->GetInt64();
OpenPOWER on IntegriCloud