diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-26 23:09:14 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-26 23:09:14 +0200 |
commit | b685c90fc2d9d76017565d84a73b92a64ca4843c (patch) | |
tree | b4cdf2191c4e11f00af708569cacacc36223dddc /xmrstak/backend/cpu | |
parent | 712f7b7bdb02d05aaffc5f70817aeb1edd17a2b3 (diff) | |
download | xmr-stak-b685c90fc2d9d76017565d84a73b92a64ca4843c.zip xmr-stak-b685c90fc2d9d76017565d84a73b92a64ca4843c.tar.gz |
thread affinity for non cpu backends
This is a follow up of #43 and use the some mechanism to set the thread affinity for
non cpu backends correct.
- use cpu affinity workflow for nvidia and amd
- cpu: move messages of thread spawning before thread creation
Diffstat (limited to 'xmrstak/backend/cpu')
-rw-r--r-- | xmrstak/backend/cpu/minethd.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmrstak/backend/cpu/minethd.cpp b/xmrstak/backend/cpu/minethd.cpp index 9f18416..ca6d321 100644 --- a/xmrstak/backend/cpu/minethd.cpp +++ b/xmrstak/backend/cpu/minethd.cpp @@ -259,10 +259,6 @@ std::vector<iBackend*> minethd::thread_starter(uint32_t threadOffset, miner_work { jconf::inst()->GetThreadConfig(i, cfg); - // \todo need thread offset - minethd* thd = new minethd(pWork, i + threadOffset, cfg.bDoubleMode, cfg.bNoPrefetch, cfg.iCpuAff); - pvThreads.push_back(thd); - if(cfg.iCpuAff >= 0) { #if defined(__APPLE__) @@ -273,8 +269,12 @@ std::vector<iBackend*> minethd::thread_starter(uint32_t threadOffset, miner_work } else printer::inst()->print_msg(L1, "Starting %s thread, no affinity.", cfg.bDoubleMode ? "double" : "single"); + + // \todo need thread offset + minethd* thd = new minethd(pWork, i + threadOffset, cfg.bDoubleMode, cfg.bNoPrefetch, cfg.iCpuAff); + pvThreads.push_back(thd); } - + return pvThreads; } |