Skip to content

Commit ccc5bc6

Browse files
author
Pieter Hijma
committed
Make the library aware of the device type
Before this change, the first device would get picked.
1 parent 10e8f75 commit ccc5bc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/OpenCL.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ namespace opencl_private {
6767
std::vector<Platform> platforms;
6868
Platform::get(&platforms);
6969

70-
//Platform& platform = getPlatformWithType(deviceType, platforms);
70+
Platform& platform = getPlatformWithType(deviceType, platforms);
7171

7272
cl_context_properties cprops[3] =
73-
{CL_CONTEXT_PLATFORM, (cl_context_properties)(platforms[0])(), 0};
73+
{CL_CONTEXT_PLATFORM, (cl_context_properties)(platform)(), 0};
7474

7575
context = Context(deviceType, cprops);
7676
}

0 commit comments

Comments
 (0)