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
8b8defe8
"wrappers/python/vscode:/vscode.git/clone" did not exist on "ac37b2e76cbedb4c233a01809268124be9e4eb0c"
Commit
8b8defe8
authored
Jan 05, 2011
by
Peter Eastman
Browse files
Change to device selection code suggested by Mike Houston
parent
81cc37f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
platforms/opencl/src/OpenCLContext.cpp
platforms/opencl/src/OpenCLContext.cpp
+1
-1
No files found.
platforms/opencl/src/OpenCLContext.cpp
View file @
8b8defe8
...
@@ -61,7 +61,7 @@ OpenCLContext::OpenCLContext(int numParticles, int deviceIndex) : time(0.0), ste
...
@@ -61,7 +61,7 @@ OpenCLContext::OpenCLContext(int numParticles, int deviceIndex) : time(0.0), ste
if
(
deviceIndex
<
0
||
deviceIndex
>=
(
int
)
devices
.
size
())
{
if
(
deviceIndex
<
0
||
deviceIndex
>=
(
int
)
devices
.
size
())
{
// Try to figure out which device is the fastest.
// Try to figure out which device is the fastest.
int
bestSpeed
=
0
;
int
bestSpeed
=
-
1
;
for
(
int
i
=
0
;
i
<
(
int
)
devices
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
(
int
)
devices
.
size
();
i
++
)
{
int
maxSize
=
devices
[
i
].
getInfo
<
CL_DEVICE_MAX_WORK_ITEM_SIZES
>
()[
0
];
int
maxSize
=
devices
[
i
].
getInfo
<
CL_DEVICE_MAX_WORK_ITEM_SIZES
>
()[
0
];
int
processingElementsPerComputeUnit
=
(
devices
[
i
].
getInfo
<
CL_DEVICE_TYPE
>
()
==
CL_DEVICE_TYPE_GPU
?
8
:
1
);
int
processingElementsPerComputeUnit
=
(
devices
[
i
].
getInfo
<
CL_DEVICE_TYPE
>
()
==
CL_DEVICE_TYPE_GPU
?
8
:
1
);
...
...
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