diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-12-01 22:37:35 +0100 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-12-02 21:15:35 +0100 |
commit | d10d20f1132a3c5d6dc51ed22a0381e460b579e8 (patch) | |
tree | 12880be38994f39993bfa5e0d6b5c1b4c0312a53 /xmrstak/backend/amd/jconf.cpp | |
parent | 2920e9a3227da307b04ee23ecc5c63ecee4a224c (diff) | |
download | xmr-stak-d10d20f1132a3c5d6dc51ed22a0381e460b579e8.zip xmr-stak-d10d20f1132a3c5d6dc51ed22a0381e460b579e8.tar.gz |
add AMD scratchpad indexing option
Allow to change the indexing used to address the hash scratchpad memory.
- add option `strided_index` for each gpu
Diffstat (limited to 'xmrstak/backend/amd/jconf.cpp')
-rw-r--r-- | xmrstak/backend/amd/jconf.cpp | 9 |
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(); |