table of contents
CLGETCONTEXTINFO(3clc) | OpenCL Manual | CLGETCONTEXTINFO(3clc) |
NAME¶
clGetContextInfo - 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);
PARAMETERS¶
context
param_name
cl_context_info | Return Type | Information returned in param_value |
CL_CONTEXT_REFERENCE_COUNT | cl_uint | Return the context reference 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. |
CL_CONTEXT_NUM_DEVICES | cl_uint | Return the number of devices in context. |
CL_CONTEXT_DEVICES | cl_device_id[] | Return the list of devices in context. |
CL_CONTEXT_PROPERTIES | cl_context_- properties[] | Return the properties argument specified in clCreateContext(3clc) or clCreateContextFromType(3clc). If the properties argument specified in clCreateContext(3clc) or clCreateContextFromType(3clc) used to create context is not NULL, the implementation must return the values specified in the properties argument. properties argument specified in clCreateContext(3clc) or clCreateContextFromType(3clc) used to create context is NULL, the implementation may return either a param_value_size_ret of 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 param_value points to. |
CL_CONTEXT_D3D10_PREFER_- SHARED_RESOURCES_KHR | cl_bool | If the cl_khr_d3d10_sharing(3clc) extension is enabled, returns CL_TRUE if Direct3D 10 resources created as shared by setting MiscFlags to include D3D10_RESOURCE_MISC_SHARED will perform faster when shared with OpenCL, compared with resources which have not set this flag. Otherwise returns CL_FALSE. |
CL_CONTEXT_D3D11_PREFER_- SHARED_RESOURCES_KHR | cl_bool | If the cl_khr_d3d11_sharing extension is supported, Returns CL_TRUE if Direct3D 11 resources created as shared by setting MiscFlags to include D3D11_RESOURCE_MISC_SHARED will perform faster when shared with OpenCL, compared with resources which have not set this flag. Otherwise returns CL_FALSE. |
param_value
param_value_size
param_value_size_ret
ERRORS¶
Returns CL_SUCCESS if the function executed successfully, or one of the errors below:
SPECIFICATION¶
OpenCL Specification[1]
SEE ALSO¶
clGetDeviceInfo(3clc)
AUTHORS¶
The Khronos Group
COPYRIGHT¶
Copyright © 2007-2011 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to the
condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.
NOTES¶
- 1.
- OpenCL Specification
01/14/2021 | The Khronos Group |