go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itk::OpenCLCommandQueue Class Reference

#include <itkOpenCLCommandQueue.h>

Detailed Description

The OpenCLCommandQueue class represents an OpenCL a command-queue on a specific device and valid OpenCLContext.

OpenCL objects such as OpenCLBuffer, OpenCLProgram and OpenCLKernel objects are created using a OpenCLContext. Operations on these objects are performed using a command-queue. The command-queue can be used to queue a set of operations (referred to as commands) in order. Having multiple command-queues allows applications to queue multiple independent commands without requiring synchronization. Note that this should work as long as these objects are not being shared. Sharing of objects across multiple command-queues will require the application to perform appropriate synchronization. Commands are added to the command-queue by calling methods on OpenCLContext, OpenCLBuffer, OpenCLImage, OpenCLKernel. These methods use OpenCLContext::GetCommandQueue() as the command destination. OpenCLContext::SetCommandQueue() can be used to alter the destination queue.

See also
OpenCLContext, OpenCLBuffer, OpenCLImage, OpenCLKernel

Definition at line 51 of file itkOpenCLCommandQueue.h.

Public Types

using Self = OpenCLCommandQueue
 

Public Member Functions

OpenCLContextGetContext () const
 
cl_command_queue GetQueueId () const
 
bool IsNull () const
 
bool IsOutOfOrder () const
 
bool IsProfilingEnabled () const
 
 OpenCLCommandQueue ()
 
 OpenCLCommandQueue (const OpenCLCommandQueue &other)
 
 OpenCLCommandQueue (OpenCLContext *context, cl_command_queue id)
 
OpenCLCommandQueueoperator= (const OpenCLCommandQueue &other)
 
 ~OpenCLCommandQueue ()
 

Private Attributes

OpenCLContextm_Context
 
cl_command_queue m_Id
 

Member Typedef Documentation

◆ Self

Standard class typedefs.

Definition at line 55 of file itkOpenCLCommandQueue.h.

Constructor & Destructor Documentation

◆ OpenCLCommandQueue() [1/3]

itk::OpenCLCommandQueue::OpenCLCommandQueue ( )
inline

Constructs a null OpenCL command queue object.

Definition at line 58 of file itkOpenCLCommandQueue.h.

◆ OpenCLCommandQueue() [2/3]

itk::OpenCLCommandQueue::OpenCLCommandQueue ( OpenCLContext * context,
cl_command_queue id )
inline

Constructs an OpenCL command queue object based on the supplied native OpenCL id, and associates it with context. This class will take over ownership of id and release it in the destructor.

Definition at line 66 of file itkOpenCLCommandQueue.h.

◆ OpenCLCommandQueue() [3/3]

itk::OpenCLCommandQueue::OpenCLCommandQueue ( const OpenCLCommandQueue & other)

Constructs a copy of other.

◆ ~OpenCLCommandQueue()

itk::OpenCLCommandQueue::~OpenCLCommandQueue ( )

Releases this OpenCL command queue. If this object is the last reference, the queue will be destroyed.

Member Function Documentation

◆ GetContext()

OpenCLContext * itk::OpenCLCommandQueue::GetContext ( ) const
inline

Returns the OpenCL context that created this queue object.

Definition at line 110 of file itkOpenCLCommandQueue.h.

◆ GetQueueId()

cl_command_queue itk::OpenCLCommandQueue::GetQueueId ( ) const
inline

Returns the native OpenCL command queue identifier for this object.

Definition at line 103 of file itkOpenCLCommandQueue.h.

◆ IsNull()

bool itk::OpenCLCommandQueue::IsNull ( ) const
inline

Returns true if this OpenCL command queue is null.

Definition at line 84 of file itkOpenCLCommandQueue.h.

◆ IsOutOfOrder()

bool itk::OpenCLCommandQueue::IsOutOfOrder ( ) const

Returns true if this command queue executes commands out of order, otherwise false if commands are executed in order.

◆ IsProfilingEnabled()

bool itk::OpenCLCommandQueue::IsProfilingEnabled ( ) const

Returns true if this command queue will perform profiling on commands; false otherwise. Profiling information is made available when a OpenCLEvent finishes execution.

See also
OpenCLEvent::GetFinishTime()

◆ operator=()

OpenCLCommandQueue & itk::OpenCLCommandQueue::operator= ( const OpenCLCommandQueue & other)

Assigns other to this object.

Field Documentation

◆ m_Context

OpenCLContext* itk::OpenCLCommandQueue::m_Context
private

Definition at line 116 of file itkOpenCLCommandQueue.h.

◆ m_Id

cl_command_queue itk::OpenCLCommandQueue::m_Id
private

Definition at line 117 of file itkOpenCLCommandQueue.h.



Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo