- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
I am new to OpenCL and trying to setup the environment for CPU debugging. I followed the steps in the Intel OpenCL documents. After the CPU kernel debugger was enabled, I found that CPU device became unavailable for creating context.
CPU is: i7-6770HQ,
Device Driver is: 7.0.0.2567
OpenCL version is: OpenCL C 2.0
Device version is: OpenCL 2.1 (Build 10)
Visual Studio: 15.9.1
The code related to create context is:
vector<Platform> platforms;
cl_int err;
err = Platform::get(&platforms);
if (err != CL_SUCCESS) {
cerr << "Unable to get platforms." << endl;
return -1;
}
vector<Device> devices;
err = platform[0].getDevices(CL_DEVICE_TYPE_CPU, &devices);
if (err != CL_SUCCESS)
{
std::cerr << "Unable to get devices. Error Code: " << err << std::endl;
return -1;
}
cl_context_properties properties[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(platforms[0]()), 0 };
Context context(devices, properties, NULL, NULL, &err);
if (err != CL_SUCCESS)
{
std::cerr << "Error Creating Context. Error Code: " << err << std::endl;
int i;
cin >> i;
return -1;
}
Thank you very much
Link Copied

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page