logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

clGetDeviceInfo - Get information about an OpenCL device.

Authors

TheKhronosGroup

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.

Name

       clGetDeviceInfo - Get information about an OpenCL device.

       cl_intclGetDeviceInfo(cl_device_iddevice,cl_device_infoparam_name,size_tparam_value_size,void*param_value,size_t*param_value_size_ret);

Notes

        1. OpenCL Specification
           page 37, section 4.2 - Querying Devices

The Khronos Group                                  11/18/2024                              CLGETDEVICEINFO(3clc)

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.

See Also

clGetDeviceIDs(3clc), cl_khr_fp64(3clc), constant(3clc), clCreateCommandQueue(3clc),
       clRetainCommandQueue(3clc), clEnqueueNDRangeKernel(3clc)

Specification

OpenCLSpecification[1]

See Also