OpenCL-Docs
OpenCL-Docs copied to clipboard
remove unavoidable error conditions
Philosophically, it should be possible for a well-written OpenCL program to execute without generating any OpenCL errors. This means that no error conditions should be "unavoidable", where the only way to determine if an operation will be successful is to try making an API call and then check the returned error code.
This issue is to document places in the OpenCL spec where there are currently "unavoidable" error conditions and to document how to remove them. This will likely need to be done in a minor OpenCL API revision, since it is a change to specified behavior.
clGetPlatformIDsreturnsCL_PLATFORM_NOT_FOUND_KHRif thecl_khr_icdextension is supported and zero platforms are available.- Why couldn't this just return
CL_SUCCESSandnum_platformsequal to zero, instead?
- Why couldn't this just return
clGetDeviceIDsreturnsCL_DEVICE_NOT_FOUNDif no devices in the platform match the requested device type.- This is true even for
CL_DEVICE_TYPE_ALL. - Why couldn't this just return
CL_SUCCESSandnum_devicesequal to zero, instead?
- This is true even for