hey
i have wrote a program that take device information, but problem is when i use
CL_DEVICE_TYPE_GPU everything is all right but when i want to use
CL_DEVICE_TYPE_CPU something wrong?

it some of it:

err = clGetPlatformIDs(1, &platforms, NULL);
if(err < 0) {
perror("Couldn't find any platforms");
exit(1);
}
err = clGetDeviceIDs(platforms, device_type , 0, NULL, &num_devices);
if(err < 0) {
perror("Couldn't find any devices");
exit(1);
}
if device_type== CL_DEVICE_TYPE_CPU it exit;
it is weird, how comes it find GPU device but not CPU device???