|
JOCL v2.6.0-rc-20250722
JOCL, OpenCL® API Binding for Java (public API).
|
A multithreaded, fixed size pool of OpenCL command queues. More...
Classes | |
| enum | FinishAction |
| The action executed after a task completes. More... | |
Public Member Functions | |
| CLCommandQueuePool< C > | switchContext (final CLQueueContextFactory< C > factory) |
| Switches the context of all queues - this operation can be expensive. More... | |
| void | flushQueues () |
Calls CLCommandQueue#flush() on all queues. More... | |
| void | finishQueues () |
Calls CLCommandQueue#finish() on all queues. More... | |
| void | release () |
| Releases all queues. More... | |
| List< CLCommandQueue > | getQueues () |
| Returns the command queues used in this pool. More... | |
| int | getSize () |
| Returns the size of this pool (number of command queues). More... | |
| FinishAction | getFinishAction () |
| boolean | isReleased () |
Returns true if release() has been called. More... | |
| void | setFinishAction (final FinishAction action) |
| Sets the action which is run after every completed task. More... | |
| String | toString () |
| void | release () |
| Releases the OpenCL resource. More... | |
| boolean | isReleased () |
Returns true if release() has been called. More... | |
Static Public Member Functions | |
| static< C extends CLQueueContext > CLCommandQueuePool< C > | create (final CLQueueContextFactory< C > factory, final CLMultiContext mc, final CLCommandQueue.Mode... modes) |
| static< C extends CLQueueContext > CLCommandQueuePool< C > | create (final CLQueueContextFactory< C > factory, final Collection< CLDevice > devices, final CLCommandQueue.Mode... modes) |
| static< C extends CLQueueContext > CLCommandQueuePool< C > | create (final CLQueueContextFactory< C > factory, final Collection< CLCommandQueue > queues) |
A multithreaded, fixed size pool of OpenCL command queues.
It serves as a multiplexer distributing tasks over N queues usually run on N devices. The usage of this pool is similar to ExecutorService but it uses CLTasks instead of Callables and provides a per-queue context for resource sharing across all tasks of one queue.
Definition at line 28 of file CLCommandQueuePool.java.
|
static |
Definition at line 61 of file CLCommandQueuePool.java.
|
static |
Definition at line 73 of file CLCommandQueuePool.java.
|
static |
| void com.jogamp.opencl.util.concurrent.CLCommandQueuePool< C extends CLQueueContext >.finishQueues | ( | ) |
Calls CLCommandQueue#finish() on all queues.
Definition at line 153 of file CLCommandQueuePool.java.
| void com.jogamp.opencl.util.concurrent.CLCommandQueuePool< C extends CLQueueContext >.flushQueues | ( | ) |
Calls CLCommandQueue#flush() on all queues.
Definition at line 144 of file CLCommandQueuePool.java.
| FinishAction com.jogamp.opencl.util.concurrent.CLCommandQueuePool< C extends CLQueueContext >.getFinishAction | ( | ) |
Definition at line 193 of file CLCommandQueuePool.java.
| List< CLCommandQueue > com.jogamp.opencl.util.concurrent.CLCommandQueuePool< C extends CLQueueContext >.getQueues | ( | ) |
Returns the command queues used in this pool.
Definition at line 178 of file CLCommandQueuePool.java.
| int com.jogamp.opencl.util.concurrent.CLCommandQueuePool< C extends CLQueueContext >.getSize | ( | ) |
Returns the size of this pool (number of command queues).
Definition at line 189 of file CLCommandQueuePool.java.
| boolean com.jogamp.opencl.util.concurrent.CLCommandQueuePool< C extends CLQueueContext >.isReleased | ( | ) |
Returns true if release() has been called.
Implements com.jogamp.opencl.CLResource.
Definition at line 198 of file CLCommandQueuePool.java.
| void com.jogamp.opencl.util.concurrent.CLCommandQueuePool< C extends CLQueueContext >.release | ( | ) |
Releases all queues.
Implements com.jogamp.opencl.CLResource.
Definition at line 163 of file CLCommandQueuePool.java.
| void com.jogamp.opencl.util.concurrent.CLCommandQueuePool< C extends CLQueueContext >.setFinishAction | ( | final FinishAction | action | ) |
Sets the action which is run after every completed task.
This is mainly intended for debugging, default value is FinishAction#DO_NOTHING.
Definition at line 206 of file CLCommandQueuePool.java.
| CLCommandQueuePool< C > com.jogamp.opencl.util.concurrent.CLCommandQueuePool< C extends CLQueueContext >.switchContext | ( | final CLQueueContextFactory< C > | factory | ) |
Switches the context of all queues - this operation can be expensive.
Blocks until all tasks finish and sets up a new context for all queues.
Definition at line 131 of file CLCommandQueuePool.java.
| String com.jogamp.opencl.util.concurrent.CLCommandQueuePool< C extends CLQueueContext >.toString | ( | ) |
Definition at line 211 of file CLCommandQueuePool.java.