I am writing an openCL program in mid-2012 13 "macbook pro with the following features:
Processor: 2.9 GHz Intel Core i7
Graphics: Intel HD Graphics 4000
In my program, I do the following to check how many devices I have:
cl_platform_id platform;
err = clGetPlatformIDs(1, &platform, NULL);
cl_uint gpuCount;
err = clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, NULL, &gpuCount);
cl_uint cpuCount;
err |= clGetDeviceIDs(platform, CL_DEVICE_TYPE_CPU, 0, NULL, &cpuCount);
std::cout<<"NUM CPUS: "<<cpuCount<<" NUM GPUS: "<<gpuCount<<std::endl;
After execution, my program states that I have only one CPU and zero GPUs .
How can it be? OpenCL not compatible with Intel HD Graphics 4000? And I thought my computer has a dual core processor. So there should not be 2 processors and 1 GPU?
Or am I just getting the data wrong?
EDIT. . Mavericks ( Mountain Lion), openCL .