diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2018-02-21 21:31:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-21 21:31:20 +0000 |
commit | cba86718e05384aa7bc4e4b916cf3b3c942b126a (patch) | |
tree | f08c352ae4261825dca47635c88b8e4a08d67bb7 /xmrstak/backend/amd/jconf.cpp | |
parent | f785481bb7c1fb887a65a0b19c3e453904bb5474 (diff) | |
parent | cff6b6cbfbb3da44d85753885466de5122e20472 (diff) | |
download | xmr-stak-cba86718e05384aa7bc4e4b916cf3b3c942b126a.zip xmr-stak-cba86718e05384aa7bc4e4b916cf3b3c942b126a.tar.gz |
Merge pull request #613 from psychocrypt/topic-compatibilityModeAmd
add OpenCL compatibility mode
Diffstat (limited to 'xmrstak/backend/amd/jconf.cpp')
-rw-r--r-- | xmrstak/backend/amd/jconf.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xmrstak/backend/amd/jconf.cpp b/xmrstak/backend/amd/jconf.cpp index 22381e1..93ba709 100644 --- a/xmrstak/backend/amd/jconf.cpp +++ b/xmrstak/backend/amd/jconf.cpp @@ -106,15 +106,17 @@ bool jconf::GetThreadConfig(size_t id, thd_cfg &cfg) if(!oThdConf.IsObject()) return false; - const Value *idx, *intensity, *w_size, *aff, *stridedIndex, *memChunk; + const Value *idx, *intensity, *w_size, *aff, *stridedIndex, *memChunk, *compMode; idx = GetObjectMember(oThdConf, "index"); intensity = GetObjectMember(oThdConf, "intensity"); w_size = GetObjectMember(oThdConf, "worksize"); aff = GetObjectMember(oThdConf, "affine_to_cpu"); stridedIndex = GetObjectMember(oThdConf, "strided_index"); memChunk = GetObjectMember(oThdConf, "mem_chunk"); + compMode = GetObjectMember(oThdConf, "comp_mode"); - if(idx == nullptr || intensity == nullptr || w_size == nullptr || aff == nullptr || stridedIndex == nullptr || memChunk == nullptr) + if(idx == nullptr || intensity == nullptr || w_size == nullptr || aff == nullptr || memChunk == nullptr || + stridedIndex == nullptr || compMode == nullptr) return false; if(!idx->IsUint64() || !intensity->IsUint64() || !w_size->IsUint64()) @@ -148,9 +150,13 @@ bool jconf::GetThreadConfig(size_t id, thd_cfg &cfg) return false; } + if(!compMode->IsBool()) + return false; + cfg.index = idx->GetUint64(); cfg.w_size = w_size->GetUint64(); cfg.intensity = intensity->GetUint64(); + cfg.compMode = compMode->GetBool(); if(aff->IsNumber()) cfg.cpu_aff = aff->GetInt64(); |