Obtain the list of platforms available.
cl_int clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms)
The number of
cl_platform_identries that can be added to
platformsis not NULL, the
num_entriesmust be greater than zero.
Returns a list of OpenCL platforms found. The
cl_platform_idvalues returned in
platformscan be used to identify a specific OpenCL platform. If
platformsargument is NULL, this argument is ignored. The number of OpenCL platforms returned is the mininum of the value specified by
num_entriesor the number of OpenCL platforms available.
Returns the number of OpenCL platforms available. If
num_platformsis NULL, this argument is ignored.
CL_SUCCESS if the function is executed successfully.
cl_khr_icd extension is enabled,
CL_SUCCESS if the function is executed successfully and there are a non zero number of platforms available.
Otherwise it returns one of the following errors:
num_entriesis equal to zero and
platformsis not NULL or if both
CL_OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
cl_khr_icdextension is enabled and no platforms are found.