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

clGetCommandQueueInfo - Query information about a command-queue.

Authors

TheKhronosGroup

Errors

       Returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns the following:

       •    Returns CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.

       •    Returns 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 and param_value is not a NULL value.

       •   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

       clGetCommandQueueInfo - Query information about a command-queue.

       cl_intclGetCommandQueueInfo(cl_command_queuecommand_queue,cl_command_queue_infoparam_name,size_tparam_value_size,void*param_value,size_t*param_value_size_ret);

Notes

        1. OpenCL Specification
           page 63, section 5.1 - Command Queues

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

Parameters

command_queue
           Specifies the command-queue being queried.

       param_name
           Specifies the information to query.

       param_value_size
           Specifies the size in bytes of memory pointed to by param_value. This size must be ≥ size of return
           type as described in the table below. If param_value is NULL, it is ignored.

       param_value
           A pointer to memory where the appropriate result being queried is returned. If param_value is NULL,
           it is ignored.

       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

           The list of supported param_name values and the information returned in param_value by
           clGetCommandQueueInfo is described in the table below.
           ┌──────────────────────────┬───────────────────────────────────────┐
           │ cl_command_queue_infoReturnTypeandInformationreturned  │
           │                          │ inparam_value                        │
           ├──────────────────────────┼───────────────────────────────────────┤
           │ CL_QUEUE_CONTEXT         │ Return type: cl_context               │
           │                          │                                       │
           │                          │ Return the context specified when the │
           │                          │ command-queue is created.             │
           ├──────────────────────────┼───────────────────────────────────────┤
           │ CL_QUEUE_DEVICE          │ Return type: cl_device_id             │
           │                          │                                       │
           │                          │ Return the device specified when the  │
           │                          │ command-queue is created.             │
           ├──────────────────────────┼───────────────────────────────────────┤
           │ CL_QUEUE_REFERENCE_COUNT │ Return type: cl_uint                  │
           │                          │                                       │
           │                          │ Return the command-queue reference    │
           │                          │ count.                                │
           │                          │                                       │
           │                          │ CL_QUEUE_REFERENCE_COUNT should be    │
           │                          │ considered immediately stale. It is   │
           │                          │ unsuitable for general use in         │
           │                          │ applications. This feature is         │
           │                          │ provided for identifying memory       │
           │                          │ leaks.                                │
           ├──────────────────────────┼───────────────────────────────────────┤
           │ CL_QUEUE_PROPERTIES      │ Return type:                          │
           │                          │ cl_command_queue_properties           │
           │                          │                                       │
           │                          │ Return the currently specified        │
           │                          │ properties for the command-queue.     │
           │                          │ These properties are specified by the │
           │                          │ properties argument in                │
           │                          │ clCreateCommandQueue(3clc).           │
           └──────────────────────────┴───────────────────────────────────────┘

See Also

clCreateCommandQueue(3clc), clReleaseCommandQueue(3clc), clRetainCommandQueue(3clc)

Specification

OpenCLSpecification[1]

See Also