Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
7439189b
Commit
7439189b
authored
Oct 23, 2019
by
peastman
Browse files
Do not register OpenCL platform if no implementations are available
parent
138de127
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
platforms/opencl/src/OpenCLPlatform.cpp
platforms/opencl/src/OpenCLPlatform.cpp
+6
-0
No files found.
platforms/opencl/src/OpenCLPlatform.cpp
View file @
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment