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
06a2c7c8
Commit
06a2c7c8
authored
Jan 30, 2020
by
peastman
Browse files
OpenCLDeviceQuery handles platforms with no devices
parent
260627de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
platforms/opencl/tests/TestOpenCLDeviceQuery.cpp
platforms/opencl/tests/TestOpenCLDeviceQuery.cpp
+7
-1
No files found.
platforms/opencl/tests/TestOpenCLDeviceQuery.cpp
View file @
06a2c7c8
...
@@ -47,7 +47,13 @@ int main() {
...
@@ -47,7 +47,13 @@ int main() {
for
(
int
j
=
0
;
j
<
platforms
.
size
();
j
++
)
{
for
(
int
j
=
0
;
j
<
platforms
.
size
();
j
++
)
{
vector
<
cl
::
Device
>
devices
;
vector
<
cl
::
Device
>
devices
;
platforms
[
j
].
getDevices
(
CL_DEVICE_TYPE_ALL
,
&
devices
);
try
{
platforms
[
j
].
getDevices
(
CL_DEVICE_TYPE_ALL
,
&
devices
);
}
catch
(...)
{
// There are no devices available for this platform.
continue
;
}
for
(
int
i
=
0
;
i
<
devices
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
devices
.
size
();
i
++
)
{
cl
::
Device
d
=
devices
[
i
];
cl
::
Device
d
=
devices
[
i
];
...
...
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