otisonoza
otisonoza

Reputation: 1344

OpenCL ambiguous context constructor

I've just started learning OpenCL with the following tutorial: http://simpleopencl.blogspot.hu/2013/06/tutorial-simple-start-with-opencl-and-c.html

I have a problem with the following code:

cl::Device defaultDevice = allDevices[0];
cl::Context context({defaultDevice});

The compiler says: enter image description here

I think the compiler cannot choose between the 2nd and 3rd candidate, but I don't know how to force the compiler to choose the 2nd one.

I use Qt Creator on Windows 7 and AMD SDK.

Upvotes: 2

Views: 348

Answers (1)

Kyle Lutz
Kyle Lutz

Reputation: 8036

Don't use the braces. Just:

cl::Device defaultDevice = allDevices[0];
cl::Context context(defaultDevice);

Upvotes: 2

Related Questions