From b685c90fc2d9d76017565d84a73b92a64ca4843c Mon Sep 17 00:00:00 2001 From: psychocrypt Date: Thu, 26 Oct 2017 23:09:14 +0200 Subject: 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 --- xmrstak/backend/cpu/minethd.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xmrstak/backend/cpu/minethd.cpp') 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 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 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; } -- cgit v1.1