Query information about a context.
cl_int clGetContextInfo(cl_context context, cl_context_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
Specifies the OpenCL context being queried.
An enumeration constant that specifies the information to query. The valid values for
cl_context_info Return Type Information returned in param_value
contextreference count. The reference count returned should be considered immediately stale. It is unsuitable for general use in applications. This feature is provided for identifying memory leaks.
Return the number of devices in
Return the list of devices in
propertiesargument specified in
clCreateContextFromTypeused to create
contextis NULL, the implementation may return either a
param_value_size_retof 0, i.e. there is no context property value to be returned or can return a context property value of 0 (where 0 is used to terminate the context properties list) in the memory that
cl_khr_d3d10_sharingextension is enabled, returns
CL_TRUEif Direct3D 10 resources created as shared by setting
D3D10_RESOURCE_MISC_SHAREDwill perform faster when shared with OpenCL, compared with resources which have not set this flag. Otherwise returns
cl_khr_d3d11_sharingextension is enabled, returns
CL_TRUEif Direct3D 11 resources created as shared by setting
D3D11_RESOURCE_MISC_SHAREDwill perform faster when shared with OpenCL, compared with resources which have not set this flag. Otherwise returns
A pointer to memory where the appropriate result being queried is returned. If
param_valueis NULL, it is ignored.
Specifies the size in bytes of memory pointed to by
param_value. This size must be greater than or equal to the size of return type as described in the table above.
Returns the actual size in bytes of data being queried by
param_value_size_retis NULL, it is ignored.
CL_SUCCESS if the function executed successfully, or one of the errors below:
contextis not a valid context.
param_nameis not one of the supported values or if size in bytes specified by
param_value_sizeis < size of return type as specified in the table above and
param_valueis not a
CL_OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.
CL_OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.