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() {
return false;
#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;
}
......
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