Provided by: opencl-1.2-man-doc_1.0~svn33624-5_all
NAME
clGetDeviceInfo - Get information about an OpenCL device. 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);
PARAMETERS
device May be a device returned by clGetDeviceIDs(3clc) or a sub-device created by clCreateSubDevices(3clc). If device is a sub-device, the specific information for the sub-device will be returned. The information that can be queried using clGetDeviceInfo is specified in the table below. param_value A pointer to memory location where appropriate values for a given param_name as specified in the table below will be returned. If param_value is NULL, it is ignored. param_value_size Specifies the size in bytes of memory pointed to by param_value. This size in bytes must be ≥ size of return type specified in the table below. param_value_size_ret Returns the actual size in bytes of data being queried by param_value. If param_value_size_ret is NULL, it is ignored. param_name An enumeration constant that identifies the device information being queried. It can be one of the values as specified in the table below.
NOTES
CL_DEVICE_PROFILE: 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 EMBEDDED_PROFILE. The compiler must be available for all devices i.e. CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE. If the platform profile returned is EMBEDDED_PROFILE, then devices that are only EMBEDDED_PROFILE are supported. The device queries described the table above should return the same information for a root-level device i.e. a device returned by clGetDeviceIDs(3clc) and any sub-devices created from this device except for the following queries: • CL_DEVICE_GLOBAL_MEM_CACHE_SIZE.RE • CL_DEVICE_BUILT_IN_KERNELS.RE • CL_DEVICE_PARENT_DEVICE.RE • CL_DEVICE_PARTITION_TYPE.RE • CL_DEVICE_REFERENCE_COUNT.RE
ERRORS
clGetDeviceInfo returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns the following: • CL_INVALID_DEVICE if device is not valid. • CL_INVALID_VALUE if param_name is not one of the supported values or if size in bytes specified by param_value_size is less than size of return type as shown in the table above and param_value 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. • CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device. • CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
SPECIFICATION
OpenCL Specification[1]
SEE ALSO
clGetDeviceIDs(3clc), cl_khr_fp64(3clc), constant(3clc), clCreateCommandQueue(3clc), clRetainCommandQueue(3clc), clEnqueueNDRangeKernel(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 page 37, section 4.2 - Querying Devices