summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-30 21:33:11 +0200
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-30 23:46:08 +0200
commitc30c258b91b95021443fdfd40d3075cd259a3cef (patch)
tree8c7d3a0af11ebb984f3e31bb3ec8d92e8357a97d
parent94b7327acc7649db611a315dc75a1ace925cccf4 (diff)
downloadxmr-stak-c30c258b91b95021443fdfd40d3075cd259a3cef.zip
xmr-stak-c30c258b91b95021443fdfd40d3075cd259a3cef.tar.gz
nvidia: fix return value if no device is found
-rw-r--r--xmrstak/backend/amd/autoAdjust.hpp6
-rw-r--r--xmrstak/backend/nvidia/autoAdjust.hpp2
2 files changed, 3 insertions, 5 deletions
diff --git a/xmrstak/backend/amd/autoAdjust.hpp b/xmrstak/backend/amd/autoAdjust.hpp
index c6f2ed7..dac0cfb 100644
--- a/xmrstak/backend/amd/autoAdjust.hpp
+++ b/xmrstak/backend/amd/autoAdjust.hpp
@@ -44,7 +44,6 @@ public:
*/
bool printConfig()
{
-
int platformIndex = getAMDPlatformIdx();
if(platformIndex == -1)
@@ -58,13 +57,12 @@ public:
int deviceCount = devVec.size();
- if(deviceCount == 0)
+ if(deviceCount == 0)
return false;
-
+
generateThreadConfig(platformIndex);
return true;
-
}
private:
diff --git a/xmrstak/backend/nvidia/autoAdjust.hpp b/xmrstak/backend/nvidia/autoAdjust.hpp
index 4f74abf..87787fa 100644
--- a/xmrstak/backend/nvidia/autoAdjust.hpp
+++ b/xmrstak/backend/nvidia/autoAdjust.hpp
@@ -38,7 +38,7 @@ public:
{
int deviceCount = 0;
if(cuda_get_devicecount(&deviceCount) == 0)
- std::exit(0);
+ return false;
// evaluate config parameter for if auto adjustment is needed
// evaluate config parameter for if auto adjustment is needed
for(int i = 0; i < deviceCount; i++)
OpenPOWER on IntegriCloud