summaryrefslogtreecommitdiffstats
path: root/backend/BackendConnector.cpp
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-24 21:32:09 +0200
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-30 23:46:08 +0200
commit2c5c6f382a74538ceb028a61e49ebd01447efaa4 (patch)
tree719e773fa3e8afc0fb4248aaeaa6812e75561fe3 /backend/BackendConnector.cpp
parent47a9063e270bc6c8bc766560b1c304f1ba8bf9c4 (diff)
downloadxmr-stak-2c5c6f382a74538ceb028a61e49ebd01447efaa4.zip
xmr-stak-2c5c6f382a74538ceb028a61e49ebd01447efaa4.tar.gz
add option to disable CPU backend
Diffstat (limited to 'backend/BackendConnector.cpp')
-rw-r--r--backend/BackendConnector.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/backend/BackendConnector.cpp b/backend/BackendConnector.cpp
index bb03e69..6abc379 100644
--- a/backend/BackendConnector.cpp
+++ b/backend/BackendConnector.cpp
@@ -62,11 +62,6 @@ std::vector<IBackend*>* BackendConnector::thread_starter(miner_work& pWork)
std::vector<IBackend*>* pvThreads = new std::vector<IBackend*>;
- auto cpuThreads = cpu::minethd::thread_starter(static_cast<uint32_t>(pvThreads->size()), pWork);
- pvThreads->insert(std::end(*pvThreads), std::begin(cpuThreads), std::end(cpuThreads));
- if(cpuThreads.size() == 0)
- printer::inst()->print_msg(L0, "WARNING: backend CPU disabled.");
-
#ifndef CONF_NO_CUDA
Plugin nvidiaPlugin("NVIDIA", "libxmrstak_cuda_backend");
std::vector<IBackend*>* nvidiaThreads = nvidiaPlugin.startBackend(static_cast<uint32_t>(pvThreads->size()), pWork);
@@ -82,6 +77,13 @@ std::vector<IBackend*>* BackendConnector::thread_starter(miner_work& pWork)
if(amdThreads->size() == 0)
printer::inst()->print_msg(L0, "WARNING: backend AMD disabled.");
#endif
+
+#ifndef CONF_NO_CPU
+ auto cpuThreads = cpu::minethd::thread_starter(static_cast<uint32_t>(pvThreads->size()), pWork);
+ pvThreads->insert(std::end(*pvThreads), std::begin(cpuThreads), std::end(cpuThreads));
+ if(cpuThreads.size() == 0)
+ printer::inst()->print_msg(L0, "WARNING: backend CPU disabled.");
+#endif
GlobalStates::iThreadCount = pvThreads->size();
return pvThreads;
OpenPOWER on IntegriCloud