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
7a02c59b
Unverified
Commit
7a02c59b
authored
Oct 23, 2019
by
peastman
Committed by
GitHub
Oct 23, 2019
Browse files
Merge pull request #2441 from peastman/clplatform
Do not register OpenCL platform if no implementations are available
parents
138de127
7439189b
Changes
1
Show 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 @
7a02c59b
...
...
@@ -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