You are here: Symbol Reference > clMtxVec Namespace > Classes > TOpenCLDevice Class > public > TOpenCLDevice.CommandQueue Property
MtxVec VCL
ContentsIndex
PreviousUpNext
TOpenCLDevice.CommandQueue Property

The list of available command queues. There is always at least one queue.

Pascal
property CommandQueue: TOpenCLCommandQueueList;

Each time a function is to be called, the corresponding OpenCL kernels needs to be added to queue associated with the device. This object contains a list of queues to which we can enqueue our Kernels. For some devices only one queue is allowed. By default one queue is created when the object is initialized. Multiple queues can be useful when there is a need to achieve overlap between data copy and data compute. While one queue is running computation on the device, the other can be busy copying data from or to the device. All Kernels enqueued to all command queues on the given device share the TOpenCLCacheCacheof that device. Only one queue can be associated with one thread. 

The associated threads will swift through all code submitting possibly many hundreds of Kernels to the queues and will then block on the line where the resulting data is to be copied from the device until that data will be ready. While debugging however, the queues will block on every breakpoint or step to allow inspection of the data being processed. 

When not debugging the threads will reach end of program long before the actual computation on the device will finish and will wait there for the device finish as well and to return desired results.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!