CLGETCOMMANDQUEUEINF(3clc)
π CLGETCOMMANDQUEUEINF π
okay bestie, welcome to the clGetCommandQueueInfo page from the OpenCL Manual (that's the 3clc manual, for the record) β and babes, this one is literally just "tell me stuff about my command-queue". no cap.
πΈ NAME πΈ
clGetCommandQueueInfo β ask questions about a command-queue and get answers. it's giving β¨information retrievalβ¨.
cl_int clGetCommandQueueInfo(cl_command_queue command_queue,
cl_command_queue_info param_name,
size_t param_value_size, void *param_value,
size_t *param_value_size_ret);
π PARAMETERS π
command_queueβ the command-queue we're snooping on, aka the one being queried πparam_nameβ which lil fact do you wanna know? this tells us the information to query.param_value_sizeβ the size, in bytes, of the memory thatparam_valueis pointing at. this size must be β₯ the size of the return type (the table below spills all the tea on return types). but lowkey ifparam_valueisNULL, then it's just ignored, periodt.param_valueβ a pointer to memory where the answer you asked for gets dropped. ifparam_valueisNULL, it is ignored πparam_value_size_retβ returns the actual size in bytes of the data being queried viaparam_value. ifparam_value_size_retisNULL, it is ignored.
the full list of supported param_name values and what clGetCommandQueueInfo hands back in param_value is right here in the table, bestie β¬οΈ
π¦ the table, but make it a list π¦
CL_QUEUE_CONTEXT- Return type:
cl_context - Returns the context that was specified when the command-queue is created. π«Ά
- Return type:
CL_QUEUE_DEVICE- Return type:
cl_device_id - Returns the device that was specified when the command-queue is created. β¨
- Return type:
CL_QUEUE_REFERENCE_COUNT- Return type:
cl_uint - Returns the command-queue reference count.
- Return type:
okay so 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. so likeβ¦ use it for the leak-hunting and nothing else, mwah π
CL_QUEUE_PROPERTIES- Return type:
cl_command_queue_properties - Returns the currently specified properties for the command-queue. these properties are specified by the
propertiesargument inclCreateCommandQueue(3clc).
- Return type:
β NOTES β
so here's a lil situation that can happen, and it's giving chaos: it is possible that a device(s) becomes unavailable after a context and command-queues that use this device(s) have been created, and after commands have been queued to command-queues. in that case, the behavior of OpenCL API calls that use this context (and command-queues) are considered to be implementation-defined. π
the user callback function, if specified, when the context is created, can be used to record appropriate information in the errinfo, private_info arguments passed to the callback function when the device becomes unavailable. so like, set up that callback, bestie, i'm begging π«Ά
π ERRORS π
Returns CL_SUCCESS if the function is executed successfully. otherwise, it returns the following:
- Returns
CL_INVALID_COMMAND_QUEUEifcommand_queueis not a valid command-queue. π© - Returns
CL_INVALID_VALUEifparam_nameis not one of the supported values, or if the size in bytes specified byparam_value_sizeis less than the size of the return type andparam_valueis not aNULLvalue. CL_OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device. π΅CL_OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host. π§
π SPECIFICATION π
OpenCL Specification[1] β yeah that's it, that's the section, she's short and iconic.
π SEE ALSO π
go read those too, iykyk π
π AUTHORS π
The Khronos Group β the actual icons behind all this β¨
π 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 following condition: the above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials.
π₯ NOTES (the footnote kind, not the section kind) π₯
- OpenCL Specification β page 63, section 5.1 - Command Queues π
and that's the whole page, bestie!! this lil drop came from The Khronos Group, dated 01/14/2021, and it lives in the CLGETCOMMANDQUEUEINF(3clc) manual πβ¨π slay responsibly, go query your queues, ily π¦πΈπ«Ά
π¦ where this page comes from
- ubuntu jammy: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- ubuntu noble: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms