"platforms/cpu/tests/TestCpuEwald.cpp" did not exist on "3bcd80b397b7ea640fc0444b428933f20d62dbbb"
Unverified Commit 7a02c59b authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2441 from peastman/clplatform

Do not register OpenCL platform if no implementations are available
parents 138de127 7439189b
...@@ -141,6 +141,12 @@ bool OpenCLPlatform::isPlatformSupported() { ...@@ -141,6 +141,12 @@ bool OpenCLPlatform::isPlatformSupported() {
return false; return false;
#endif #endif
// Make sure at least one OpenCL implementation is installed.
std::vector<cl::Platform> platforms;
cl::Platform::get(&platforms);
if (platforms.size() == 0)
return false;
return true; return true;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment