CLGETCOMMANDQUEUEINF(3clc)

πŸ“¦
version 1.0~svn33624 Β· 3 versions
, in ubuntu jammy, ubuntu noble

πŸ’– 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 that param_value is pointing at. this size must be β‰₯ the size of the return type (the table below spills all the tea on return types). but lowkey if param_value is NULL, then it's just ignored, periodt.
  • param_value β€” a pointer to memory where the answer you asked for gets dropped. if param_value is NULL, it is ignored πŸ™ˆ
  • param_value_size_ret β€” returns the actual size in bytes of the data being queried via param_value. if param_value_size_ret is NULL, 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. 🫢
  • CL_QUEUE_DEVICE
    • Return type: cl_device_id
    • Returns the device that was specified when the command-queue is created. ✨
  • CL_QUEUE_REFERENCE_COUNT
    • Return type: cl_uint
    • Returns the command-queue reference count.
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 properties argument in clCreateCommandQueue(3clc).

⭐ 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_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 the size in bytes specified by param_value_size is less than the size of the 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. 🧚

πŸ‘‘ 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 Β© 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) πŸ”₯

  1. 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