'\" t .\" Title: clGetDeviceInfo .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "CLGETDEVICEINFO" "3clc" "01/14/2021" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" clGetDeviceInfo \- Get information about an OpenCL device\&. .SH "" .HP \w'cl_int\ clGetDeviceInfo('u .BI "cl_int clGetDeviceInfo(cl_device_id\ " "device" ", cl_device_info\ " "param_name" ", size_t\ " "param_value_size" ", void\ *" "param_value" ", size_t\ *" "param_value_size_ret" ");" .SH "PARAMETERS" .PP \fIdevice\fR .RS 4 May be a device returned by \fBclGetDeviceIDs\fR(3clc) or a sub\-device created by \fBclCreateSubDevices\fR(3clc)\&. If \fIdevice\fR is a sub\-device, the specific information for the sub\-device will be returned\&. The information that can be queried using \fBclGetDeviceInfo\fR is specified in the table below\&. .RE .PP \fIparam_value\fR .RS 4 A pointer to memory location where appropriate values for a given \fIparam_name\fR as specified in the table below will be returned\&. If \fIparam_value\fR is NULL, it is ignored\&. .RE .PP \fIparam_value_size\fR .RS 4 Specifies the size in bytes of memory pointed to by \fIparam_value\fR\&. This size in bytes must be ≥ size of return type specified in the table below\&. .RE .PP \fIparam_value_size_ret\fR .RS 4 Returns the actual size in bytes of data being queried by \fIparam_value\fR\&. If \fIparam_value_size_ret\fR is NULL, it is ignored\&. .RE .PP \fIparam_name\fR .RS 4 An enumeration constant that identifies the device information being queried\&. It can be one of the values as specified in the table below\&. .RE .PP .RS 4 .TS allbox tab(:); lB lB lB. T{ cl_device_info T}:T{ Return Type T}:T{ Description T} .T& l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l. T{ \fBCL_DEVICE_ADDRESS_BITS\fR T}:T{ cl_uint T}:T{ The default compute device address space size specified as an unsigned integer value in bits\&. Currently supported values are 32 or 64 bits\&. T} T{ \fBCL_DEVICE_AVAILABLE\fR T}:T{ cl_bool T}:T{ Is \fBCL_TRUE\fR if the device is available and \fBCL_FALSE\fR if the device is not available\&. T} T{ \fBCL_DEVICE_BUILT_IN_KERNELS\fR T}:T{ char[] T}:T{ A semi\-colon separated list of built\-in kernels supported by the device\&. An empty string is returned if no built\-in kernels are supported by the device\&. T} T{ \fBCL_DEVICE_COMPILER_AVAILABLE\fR T}:T{ cl_bool T}:T{ Is \fBCL_FALSE\fR if the implementation does not have a compiler available to compile the program source\&. Is \fBCL_TRUE\fR if the compiler is available\&. This can be \fBCL_FALSE\fR for the embedded platform profile only\&. T} T{ \fBCL_DEVICE_DOUBLE_FP_CONFIG\fR T}:T{ cl_device_\- .sp fp_config T}:T{ Describes double precision floating\-point capability of the OpenCL device\&. This is a bit\-field that describes one or more of the following values: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_DENORM\fR \- denorms are supported\&..RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_INF_NAN\fR \- INF and NaNs are supported\&..RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_ROUND_TO_NEAREST\fR \- round to nearest even rounding mode supported\&..RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_ROUND_TO_ZERO\fR \- round to zero rounding mode supported\&..RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_ROUND_TO_INF\fR \- round to positive and negative infinity rounding modes supported\&..RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCP_FP_FMA\fR \- IEEE754\-2008 fused multiply\-add is supported\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_SOFT_FLOAT\fR \- Basic floating\-point operations (such as addition, subtraction, multiplication) are implemented in software\&..RE .sp Double precision is an optional feature so the mandated minimum double precision floating\-point capability is 0\&. .sp If double precision is supported by the device, then the minimum double precision floatingpoint capability must be: \fBCL_FP_FMA\fR | \fBCL_FP_ROUND_TO_NEAREST\fR | \fBCL_FP_ROUND_TO_ZERO\fR | \fBCL_FP_ROUND_TO_INF\fR | \fBCL_FP_INF_NAN\fR | \fBCL_FP_DENORM\fR\&. T} T{ \fBCL_DEVICE_ENDIAN_LITTLE\fR T}:T{ cl_bool T}:T{ Is \fBCL_TRUE\fR if the OpenCL device is a little endian device and \fBCL_FALSE\fR otherwise\&. T} T{ \fBCL_DEVICE_ERROR_CORRECTION_SUPPORT\fR T}:T{ Return type: cl_bool T}:T{ Is \fBCL_TRUE\fR if the device implements error correction for all accesses to compute device memory (global and constant)\&. Is \fBCL_FALSE\fR if the device does not implement such error correction\&. T} T{ \fBCL_DEVICE_EXECUTION_CAPABILITIES\fR T}:T{ cl_device_\- .sp exec_capabilities T}:T{ Describes the execution capabilities of the device\&. This is a bit\-field that describes one or more of the following values: \fBCL_EXEC_KERNEL\fR \- The OpenCL device can execute OpenCL kernels\&. .sp \fBCL_EXEC_NATIVE_KERNEL\fR \- The OpenCL device can execute native kernels\&. .sp The mandated minimum capability is \fBCL_EXEC_KERNEL\fR\&. T} T{ \fBCL_DEVICE_EXTENSIONS\fR T}:T{ char[] T}:T{ Returns a space separated list of extension names (the extension names themselves do not contain any spaces) supported by the device\&. The list of extension names returned can be vendor supported extension names and one or more of the following Khronos approved extension names: .sp .if n \{\ .RS 4 .\} .nf \fBcl_khr_int64_base_atomics\fR(3clc) \fBcl_khr_int64_extended_atomics\fR(3clc) \fBcl_khr_fp16\fR(3clc) \fBcl_khr_gl_sharing\fR(3clc) \fBcl_khr_gl_event\fR(3clc) \fBcl_khr_d3d10_sharing\fR(3clc) \fBcl_khr_dx9_media_sharing\fR(3clc) \fBcl_khr_d3d11_sharing\fR(3clc) .fi .if n \{\ .RE .\} .sp T}:T{ The following approved Khronos extension names must be returned by all device that support OpenCL C 1\&.2: .sp .if n \{\ .RS 4 .\} .nf cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_fp64 (for backward compatibility if double precision is supported) .fi .if n \{\ .RE .\} .sp Please refer to the OpenCL 1\&.2 Extension Specification for a detailed description of these extensions\&. T} T{ \fBCL_DEVICE_GLOBAL_MEM_CACHE_SIZE\fR T}:T{ cl_ulong T}:T{ Size of global memory cache in bytes\&. T} T{ \fBCL_DEVICE_GLOBAL_MEM_CACHE_TYPE\fR T}:T{ cl_device_mem\- .sp _cache_type T}:T{ Type of global memory cache supported\&. Valid values are: \fBCL_NONE\fR, \fBCL_READ_ONLY_CACHE\fR, and \fBCL_READ_WRITE_CACHE\fR\&. T} T{ \fBCL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE\fR T}:T{ cl_uint T}:T{ Size of global memory cache line in bytes\&. T} T{ \fBCL_DEVICE_GLOBAL_MEM_SIZE\fR T}:T{ cl_ulong T}:T{ Size of global device memory in bytes\&. T} T{ \fBCL_DEVICE_HALF_FP_CONFIG\fR T}:T{ cl_device_\- .sp fp_config T}:T{ Describes the OPTIONAL half precision floating\-point capability of the OpenCL device\&. This is a bit\-field that describes one or more of the following values: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_DENORM\fR \- denorms are supported\&..RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_INF_NAN\fR \- INF and NaNs are supported\&..RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_ROUND_TO_NEAREST\fR \- round to nearest even rounding mode supported\&..RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_ROUND_TO_ZERO\fR \- round to zero rounding mode supported\&..RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_ROUND_TO_INF\fR \- round to +ve and \-ve infinity rounding modes supported\&..RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCP_FP_FMA\fR \- IEEE754\-2008 fused multiply\-add is supported\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_FP_SOFT_FLOAT\fR \- Basic floating\-point operations (such as addition, subtraction, multiplication) are implemented in software\&..RE .sp The required minimum half precision floating\-point capability as implemented by this extension is \fBCL_FP_ROUND_TO_ZERO\fR or \fBCL_FP_ROUND_TO_INF\fR | \fBCL_FP_INF_NAN\fR\&. T} T{ \fBCL_DEVICE_HOST_UNIFIED_MEMORY\fR T}:T{ cl_bool T}:T{ Is \fBCL_TRUE\fR if the device and the host have a unified memory subsystem and is \fBCL_FALSE\fR otherwise\&. T} T{ \fBCL_DEVICE_IMAGE_SUPPORT\fR T}:T{ cl_bool T}:T{ Is \fBCL_TRUE\fR if images are supported by the OpenCL device and \fBCL_FALSE\fR otherwise\&. T} T{ \fBCL_DEVICE_IMAGE2D_MAX_HEIGHT\fR T}:T{ size_t T}:T{ Max height of 2D image in pixels\&. The minimum value is 8192 if \fBCL_DEVICE_IMAGE_SUPPORT\fR is \fBCL_TRUE\fR\&. T} T{ \fBCL_DEVICE_IMAGE2D_MAX_WIDTH\fR T}:T{ size_t T}:T{ Max width of 2D image or 1D image not created from a buffer object in pixels\&. The minimum value is 8192 if \fBCL_DEVICE_IMAGE_SUPPORT\fR is \fBCL_TRUE\fR\&. T} T{ \fBCL_DEVICE_IMAGE3D_MAX_DEPTH\fR T}:T{ size_t T}:T{ Max depth of 3D image in pixels\&. The minimum value is 2048 if \fBCL_DEVICE_IMAGE_SUPPORT\fR is \fBCL_TRUE\fR\&. T} T{ \fBCL_DEVICE_IMAGE3D_MAX_HEIGHT\fR T}:T{ size_t T}:T{ Max height of 3D image in pixels\&. The minimum value is 2048 if \fBCL_DEVICE_IMAGE_SUPPORT\fR is \fBCL_TRUE\fR\&. T} T{ \fBCL_DEVICE_IMAGE3D_MAX_WIDTH\fR T}:T{ size_t T}:T{ Max width of 3D image in pixels\&. The minimum value is 2048 if \fBCL_DEVICE_IMAGE_SUPPORT\fR is \fBCL_TRUE\fR\&. T} T{ \fBCL_DEVICE_IMAGE_MAX_BUFFER_SIZE\fR T}:T{ size_t T}:T{ Max number of pixels for a 1D image created from a buffer object\&. The minimum value is 65536 if \fBCL_DEVICE_IMAGE_SUPPORT\fR is \fBCL_TRUE\fR\&. T} T{ \fBCL_DEVICE_IMAGE_MAX_ARRAY_SIZE\fR T}:T{ size_t T}:T{ Max number of images in a 1D or 2D image array\&. The minimum value is 2048 if \fBCL_DEVICE_IMAGE_SUPPORT\fR is \fBCL_TRUE\fR T} T{ \fBCL_DEVICE_LINKER_AVAILABLE\fR T}:T{ cl_bool T}:T{ Is \fBCL_FALSE\fR if the implementation does not have a linker available\&. Is \fBCL_TRUE\fR if the linker is available\&. This can be \fBCL_FALSE for the embedded platform profile only\&. This must be \fR\fB\fBCL_TRUE\fR\fR\fB if \fR\fB\fBCL_DEVICE_COMPILER_AVAILABLE\fR\fR\fB is CL_TRUE\fR T} T{ \fBCL_DEVICE_LOCAL_MEM_SIZE\fR T}:T{ cl_ulong T}:T{ Size of local memory arena in bytes\&. The minimum value is 32 KB for devices that are not of type \fBCL_DEVICE_TYPE_CUSTOM\fR\&. T} T{ \fBCL_DEVICE_LOCAL_MEM_TYPE\fR T}:T{ cl_device_\- .sp local_mem_type T}:T{ Type of local memory supported\&. This can be set to \fBCL_LOCAL\fR implying dedicated local memory storage such as SRAM, or \fBCL_GLOBAL\fR\&. For custom devices, \fBCL_NONE\fR can also be returned indicating no local memory support\&. T} T{ \fBCL_DEVICE_MAX_CLOCK_FREQUENCY\fR T}:T{ cl_uint T}:T{ Maximum configured clock frequency of the device in MHz\&. T} T{ \fBCL_DEVICE_MAX_COMPUTE_UNITS\fR T}:T{ cl_uint T}:T{ The number of parallel compute units on the OpenCL device\&. A work\-group executes on a single compute unit\&. The minimum value is 1\&. T} T{ \fBCL_DEVICE_MAX_CONSTANT_ARGS\fR T}:T{ cl_uint T}:T{ Max number of arguments declared with the \fBconstant\fR(3clc) qualifier in a kernel\&. The minimum value is 8 for devices that are not of type \fBCL_DEVICE_TYPE_CUSTOM\fR\&. T} T{ \fBCL_DEVICE_MAX_CONSTANT_BUFFER_SIZE\fR T}:T{ cl_ulong T}:T{ Max size in bytes of a constant buffer allocation\&. The minimum value is 64 KB for devices that are not of type \fBCL_DEVICE_TYPE_CUSTOM\fR\&. T} T{ \fBCL_DEVICE_MAX_MEM_ALLOC_SIZE\fR T}:T{ cl_ulong T}:T{ Max size of memory object allocation in bytes\&. The minimum value is max (1/4th of \fBCL_DEVICE_GLOBAL_MEM_SIZE\fR, 128*1024*1024) for devices that are not of type \fBCL_DEVICE_TYPE_CUSTOM\fR\&. T} T{ \fBCL_DEVICE_MAX_PARAMETER_SIZE\fR T}:T{ size_t T}:T{ Max size in bytes of the arguments that can be passed to a kernel\&. The minimum value is 1024 for devices that are not of type \fBCL_DEVICE_TYPE_CUSTOM\fR\&. For this minimum value, only a maximum of 128 arguments can be passed to a kernel\&. T} T{ \fBCL_DEVICE_MAX_READ_IMAGE_ARGS\fR T}:T{ cl_uint T}:T{ Max number of simultaneous image objects that can be read by a kernel\&. The minimum value is 128 if \fBCL_DEVICE_IMAGE_SUPPORT\fR is \fBCL_TRUE\fR\&. T} T{ \fBCL_DEVICE_MAX_SAMPLERS\fR T}:T{ cl_uint T}:T{ Maximum number of samplers that can be used in a kernel\&. The minimum value is 16 if \fBCL_DEVICE_IMAGE_SUPPORT\fR is \fBCL_TRUE\fR\&. (Also see \fBsampler_t\fR(3clc)\&.) T} T{ \fBCL_DEVICE_MAX_WORK_GROUP_SIZE\fR T}:T{ size_t T}:T{ Maximum number of work\-items in a work\-group executing a kernel on a single compute unit, using the data parallel execution model\&. (Refer to \fBclEnqueueNDRangeKernel\fR(3clc))\&. The minimum value is 1\&. T} T{ \fBCL_DEVICE_MAX_WORK_ITEM_DIMENSIONS\fR T}:T{ cl_uint T}:T{ Maximum dimensions that specify the global and local work\-item IDs used by the data parallel execution model\&. (Refer to \fBclEnqueueNDRangeKernel\fR(3clc))\&. The minimum value is 3 for devices that are not of type \fBCL_DEVICE_TYPE_CUSTOM\fR\&. T} T{ \fBCL_DEVICE_MAX_WORK_ITEM_SIZES\fR T}:T{ size_t[] T}:T{ Maximum number of work\-items that can be specified in each dimension of the work\-group to \fBclEnqueueNDRangeKernel\fR(3clc)\&. .sp Returns \fIn\fR size_t entries, where \fIn\fR is the value returned by the query for \fBCL_DEVICE_MAX_WORK_ITEM_DIMENSIONS\fR\&. .sp The minimum value is (1, 1, 1) for devices that are not of type \fBCL_DEVICE_TYPE_CUSTOM\fR\&. T} T{ \fBCL_DEVICE_MAX_WRITE_IMAGE_ARGS\fR T}:T{ cl_uint T}:T{ Max number of simultaneous image objects that can be written to by a kernel\&. The minimum value is 8 if \fBCL_DEVICE_IMAGE_SUPPORT\fR is \fBCL_TRUE\fR\&. T} T{ \fBCL_DEVICE_MEM_BASE_ADDR_ALIGN\fR T}:T{ cl_uint T}:T{ The minimum value is the size (in bits) of the largest OpenCL built\-in data type supported by the device (\fBlong16\fR in FULL profile, \fBlong16\fR or \fBint16\fR in EMBEDDED profile) for devices that are not of type \fBCL_DEVICE_TYPE_CUSTOM\fR\&. T} T{ \fBCL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE\fR T}:T{ cl_uint T}:T{ Deprecated in OpenCL 1\&.2\&. The smallest alignment in bytes which can be used for any data type\&. T} T{ \fBCL_DEVICE_NAME\fR T}:T{ char[] T}:T{ Device name string\&. T} T{ \fBCL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR\fR \fBCL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT\fR .sp \fBCL_DEVICE_NATIVE_VECTOR_WIDTH_INT\fR .sp \fBCL_DEVICE_NATIVE_VECTOR_WIDTH_LONG\fR .sp \fBCL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT\fR .sp \fBCL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE\fR .sp \fBCL_DEVICE_NATIVE_VECTOR_WIDTH_HALF\fR T}:T{ cl_uint T}:T{ Returns the native ISA vector width\&. The vector width is defined as the number of scalar elements that can be stored in the vector\&. .sp If double precision is not supported, \fBCL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE\fR must return 0\&. .sp If the \fBcl_khr_fp16\fR(3clc) extension is not supported, \fBCL_DEVICE_NATIVE_VECTOR_WIDTH_HALF\fR must return 0\&. T} T{ \fBCL_DEVICE_OPENCL_C_VERSION\fR T}:T{ char[] T}:T{ OpenCL C version string\&. Returns the highest OpenCL C version supported by the compiler for this device that is not of type \fBCL_DEVICE_TYPE_CUSTOM\fR\&. This version string has the following format: .sp \fI OpenCLC \fR .sp The \fImajor_version\&.minor_version\fR value returned must be 1\&.2 if \fBCL_DEVICE_VERSION\fR is OpenCL 1\&.2\&. .sp The \fImajor_version\&.minor_version\fR value returned must be 1\&.1 if \fBCL_DEVICE_VERSION\fR is OpenCL 1\&.1\&. T} T{ \fBCL_DEVICE_PARENT_DEVICE\fR T}:T{ cl_device_id T}:T{ Returns the cl_device_id of the parent device to which this sub\-device belongs\&. If device is a root\-level device, a NULL value is returned\&. T} T{ \fBCL_DEVICE_PARTITION_MAX_SUB_DEVICES\fR T}:T{ cl_uint T}:T{ Returns the maximum number of sub\-devices that can be created when a device is partitioned\&. The value returned cannot exceed \fBCL_DEVICE_MAX_COMPUTE_UNITS\fR\&. T} T{ \fBCL_DEVICE_PARTITION_PROPERTIES\fR T}:T{ cl_device_partit\- .sp ion_property[] T}:T{ Returns the list of partition types supported by device\&. This is an array of \fIcl_device_partition_property\fR values drawn from the following list: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_PARTITION_EQUALLY\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_PARTITION_BY_COUNTS\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN\fR.RE .sp If the device does not support any partition types, a value of 0 will be returned\&. T} T{ \fBCL_DEVICE_PARTITION_AFFINITY_DOMAIN\fR T}:T{ cl_device_aff\- .sp inity_domain T}:T{ Returns the list of supported affinity domains for partitioning the device using \fBCL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN\fR\&. This is a bit\-field that describes one or more of the following values: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_AFFINITY_DOMAIN_NUMA\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_AFFINITY_DOMAIN_L4_CACHE\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_AFFINITY_DOMAIN_L3_CACHE\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_AFFINITY_DOMAIN_L2_CACHE\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_AFFINITY_DOMAIN_L1_CACHE\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE\fR.RE .sp If the device does not support any affinity domains, a value of 0 will be returned\&. T} T{ \fBCL_DEVICE_PARTITION_TYPE\fR T}:T{ cl_device_part\- .sp ition_property[] T}:T{ Returns the properties argument specified in \fBclCreateSubDevices\fR(3clc) if \fIdevice\fR is a subdevice\&. Otherwise the implementation may either return a \fIparam_value_size_ret\fR of 0 i\&.e\&. there is no partition type associated with \fIdevice\fR or can return a property value of 0 (where 0 is used to terminate the partition property list) in the memory that \fIparam_value\fR points to\&. T} T{ \fBCL_DEVICE_PLATFORM\fR T}:T{ cl_platform_id T}:T{ The platform associated with this device\&. T} T{ \fBCL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR\fR \fBCL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT\fR .sp \fBCL_DEVICE_PREFERRED_VECTOR_WIDTH_INT\fR .sp \fBCL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG\fR .sp \fBCL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT\fR .sp \fBCL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE\fR .sp \fBCL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF\fR T}:T{ cl_uint T}:T{ Preferred native vector width size for built\-in scalar types that can be put into vectors\&. The vector width is defined as the number of scalar elements that can be stored in the vector\&. .sp If double precision is not supported, \fBCL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE\fR must return 0\&. .sp If the \fBcl_khr_fp16\fR(3clc) extension is not supported, \fBCL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF\fR must return 0\&. T} T{ \fBCL_DEVICE_PRINTF_BUFFER_SIZE\fR T}:T{ size_t T}:T{ Maximum size of the internal buffer that holds the output of \fBprintfFunction\fR(3clc) calls from a kernel\&. The minimum value for the FULL profile is 1 MB\&. T} T{ \fBCL_DEVICE_PREFERRED_INTEROP_USER_SYNC\fR T}:T{ cl_bool T}:T{ Is \fBCL_TRUE\fR if the device\*(Aqs preference is for the user to be responsible for synchronization, when sharing memory objects between OpenCL and other APIs such as DirectX, \fBCL_FALSE\fR if the device / implementation has a performant path for performing synchronization of memory object shared between OpenCL and other APIs such as DirectX T} T{ \fBCL_DEVICE_PROFILE\fR T}:T{ char[] T}:T{ OpenCL profile string\&. Returns the profile name supported by the device (see note)\&. The profile name returned can be one of the following strings: .sp FULL_PROFILE \- if the device supports the OpenCL specification (functionality defined as part of the core specification and does not require any extensions to be supported)\&. .sp EMBEDDED_PROFILE \- if the device supports the OpenCL embedded profile\&. T} T{ \fBCL_DEVICE_PROFILING_TIMER_RESOLUTION\fR T}:T{ size_t T}:T{ Describes the resolution of device timer\&. This is measured in nanoseconds\&. T} T{ \fBCL_DEVICE_QUEUE_PROPERTIES\fR T}:T{ cl_command_\- .sp queue_properties T}:T{ Describes the command\-queue properties supported by the device\&. This is a bit\-field that describes one or more of the following values: .sp \fBCL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE\fR .sp \fBCL_QUEUE_PROFILING_ENABLE\fR .sp These properties are described in the table for \fBclCreateCommandQueue\fR(3clc)\&. The mandated minimum capability is \fBCL_QUEUE_PROFILING_ENABLE\fR\&. T} T{ \fBCL_DEVICE_REFERENCE_COUNT\fR T}:T{ cl_uint T}:T{ Returns the device reference count\&. If the device is a root\-level device, a reference count of one is returned\&. T} T{ \fBCL_DEVICE_SINGLE_FP_CONFIG\fR T}:T{ cl_device_\- .sp fp_config T}:T{ Describes single precision floating\-point capability of the device\&. This is a bit\-field that describes one or more of the following values: .sp \fBCL_FP_DENORM\fR \- denorms are supported .sp \fBCL_FP_INF_NAN\fR \- INF and quiet NaNs are supported .sp \fBCL_FP_ROUND_TO_NEAREST\fR \- round to nearest even rounding mode supported .sp \fBCL_FP_ROUND_TO_ZERO\fR \- round to zero rounding mode supported .sp \fBCL_FP_ROUND_TO_INF\fR \- round to +ve and \-ve infinity rounding modes supported .sp \fBCL_FP_FMA\fR \- IEEE754\-2008 fused multiply\-add is supported .sp \fBCL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT\fR \- divide and sqrt are correctly rounded as defined by the IEEE754 specification\&. .sp \fBCL_FP_SOFT_FLOAT\fR \- Basic floating\-point operations (such as addition, subtraction, multiplication) are implemented in software\&. .sp The mandated minimum floating\-point capability for devices that are not of type \fBCL_DEVICE_TYPE_CUSTOM\fR is \fBCL_FP_ROUND_TO_NEAREST\fR | \fBCL_FP_INF_NAN\fR\&. T} T{ \fBCL_DEVICE_TYPE\fR T}:T{ cl_device_type T}:T{ The OpenCL device type\&. Currently supported values are one of or a combination of: \fBCL_DEVICE_TYPE_CPU\fR, \fBCL_DEVICE_TYPE_GPU\fR, \fBCL_DEVICE_TYPE_ACCELERATOR\fR, \fBCL_DEVICE_TYPE_DEFAULT\fR, a combination of the above types, or \fBCL_DEVICE_TYPE_CUSTOM\fR\&. T} T{ \fBCL_DEVICE_VENDOR\fR T}:T{ char[] T}:T{ Vendor name string\&. T} T{ \fBCL_DEVICE_VENDOR_ID\fR T}:T{ cl_uint T}:T{ A unique device vendor identifier\&. An example of a unique device identifier could be the PCIe ID\&. T} T{ \fBCL_DEVICE_VERSION\fR T}:T{ char[] T}:T{ OpenCL version string\&. Returns the OpenCL version supported by the device\&. This version string has the following format: .sp \fI OpenCL \fR .sp The \fImajor_version\&.minor_version\fR value returned will be 1\&.1\&. T} T{ \fBCL_DRIVER_VERSION\fR T}:T{ char[] T}:T{ OpenCL software driver version string in the form \fImajor_number\&.minor_number\fR\&. T} .TE .sp 1 .RE .SH "NOTES" .PP \fBCL_DEVICE_PROFILE\fR: The platform profile returns the profile that is implemented by the OpenCL framework\&. If the platform profile returned is FULL_PROFILE, the OpenCL framework will support devices that are FULL_PROFILE and may also support devices that are \fBEMBEDDED_PROFILE\fR\&. The compiler must be available for all devices i\&.e\&. \fBCL_DEVICE_COMPILER_AVAILABLE\fR is \fBCL_TRUE\fR\&. If the platform profile returned is \fBEMBEDDED_PROFILE\fR, then devices that are only \fBEMBEDDED_PROFILE\fR are supported\&. .PP The device queries described the table above should return the same information for a root\-level device i\&.e\&. a device returned by \fBclGetDeviceIDs\fR(3clc) and any sub\-devices created from this device except for the following queries: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_GLOBAL_MEM_CACHE_SIZE\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_BUILT_IN_KERNELS\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_PARENT_DEVICE\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_PARTITION_TYPE\fR.RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBCL_DEVICE_REFERENCE_COUNT\fR.RE .sp .SH "ERRORS" .PP \fBclGetDeviceInfo\fR returns CL_SUCCESS if the function is executed successfully\&. Otherwise, it returns the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_DEVICE if \fIdevice\fR is not valid\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_VALUE if \fIparam_name\fR is not one of the supported values or if size in bytes specified by \fIparam_value_size\fR is less than size of return type as shown in the table above and \fIparam_value\fR is not a NULL value or if param_name is a value that is available as an extension and the corresponding extension is not supported by the device\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host\&. .RE .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBclGetDeviceIDs\fR(3clc), \fBcl_khr_fp64\fR(3clc), \fBconstant\fR(3clc), \fBclCreateCommandQueue\fR(3clc), \fBclRetainCommandQueue\fR(3clc), \fBclEnqueueNDRangeKernel\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br 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. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 37, section 4.2 - Querying Devices .RE