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
57a6768e
Commit
57a6768e
authored
Jan 23, 2014
by
peastman
Browse files
Merge pull request #301 from peastman/master
Prevent trying to use the CPU OpenCL device on OS X
parents
274b48ef
ee3fcb01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
platforms/opencl/src/OpenCLContext.cpp
platforms/opencl/src/OpenCLContext.cpp
+2
-2
No files found.
platforms/opencl/src/OpenCLContext.cpp
View file @
57a6768e
...
...
@@ -107,8 +107,8 @@ OpenCLContext::OpenCLContext(const System& system, int platformIndex, int device
if
(
i
!=
deviceIndex
&&
deviceIndex
>=
0
&&
deviceIndex
<
(
int
)
devices
.
size
())
continue
;
if
(
platformVendor
==
"Apple"
&&
devices
[
i
].
getInfo
<
CL_DEVICE_VENDOR
>
()
==
"AMD"
)
continue
;
//
Don't use AMD GPUs on OS X due to serious bug
s.
if
(
platformVendor
==
"Apple"
&&
(
devices
[
i
].
getInfo
<
CL_DEVICE_TYPE
>
()
==
CL_DEVICE_TYPE_CPU
||
devices
[
i
].
getInfo
<
CL_DEVICE_VENDOR
>
()
==
"AMD"
)
)
continue
;
//
The CPU device on OS X won't work correctly, and there are serious bugs using AMD GPU
s.
int
maxSize
=
devices
[
i
].
getInfo
<
CL_DEVICE_MAX_WORK_ITEM_SIZES
>
()[
0
];
int
processingElementsPerComputeUnit
=
8
;
if
(
devices
[
i
].
getInfo
<
CL_DEVICE_TYPE
>
()
!=
CL_DEVICE_TYPE_GPU
)
{
...
...
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