We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98843e0 commit 2d2b269Copy full SHA for 2d2b269
src/opencl/openclwrapper.cpp
@@ -2573,11 +2573,13 @@ ds_device OpenclDevice::getDeviceSelection() {
2573
bestDeviceIdx = d;
2574
}
2575
2576
- tprintf("[DS] Selected Device[%i]: \"%s\" (%s)\n", bestDeviceIdx + 1,
2577
- profile->devices[bestDeviceIdx].oclDeviceName,
2578
- profile->devices[bestDeviceIdx].type == DS_DEVICE_OPENCL_DEVICE
+ if (bestDeviceIdx >= 0) {
+ tprintf("[DS] Selected Device[%i]: \"%s\" (%s)\n", bestDeviceIdx + 1,
+ profile->devices[bestDeviceIdx].oclDeviceName,
2579
+ profile->devices[bestDeviceIdx].type == DS_DEVICE_OPENCL_DEVICE
2580
? "OpenCL"
2581
: "Native");
2582
+ }
2583
// cleanup
2584
// TODO: call destructor for profile object?
2585
0 commit comments