|
JOCL v2.6.0-rc-20250722
JOCL, OpenCL® API Binding for Java (public API).
|
An utility for synchronizing multiple concurrent CLCommandQueues.
More...
Public Member Functions | |
| MultiQueueBarrier (final int queueCount) | |
| Creates a new MultiQueueBarrier with the given queueCount. More... | |
| MultiQueueBarrier (final CLCommandQueue... allowedQueues) | |
| Creates a new MultiQueueBarrier for the given queues. More... | |
| MultiQueueBarrier | waitFor (final CLCommandQueue queue) |
Blocks the current Thread until all commands on the CLCommandQueue finished excecution. More... | |
| MultiQueueBarrier | waitFor (final CLCommandQueue queue, final CLEventList events) |
Blocks the current Thread until the given events on the CLCommandQueue occurred. More... | |
| MultiQueueBarrier | await () throws InterruptedException |
Blocks until all Threads which called waitFor continue execution. More... | |
| boolean | await (final long timeout, final TimeUnit unit) throws InterruptedException |
| void | resetBarrier () |
| Resets this barrier and unblocks all waiting threads. More... | |
| long | getCount () |
| Returns the current number of events which must occure before this barrier unblocks the waiting threads. More... | |
An utility for synchronizing multiple concurrent CLCommandQueues.
This Barrier can be reused after it has been broken.
Definition at line 44 of file MultiQueueBarrier.java.
| com.jogamp.opencl.util.MultiQueueBarrier.MultiQueueBarrier | ( | final int | queueCount | ) |
Creates a new MultiQueueBarrier with the given queueCount.
It is recommented to use MultiQueueBarrier(CLCommandQueue... allowedQueues) if possible which restricts the set of allowed queues for the barrier.
Definition at line 55 of file MultiQueueBarrier.java.
| com.jogamp.opencl.util.MultiQueueBarrier.MultiQueueBarrier | ( | final CLCommandQueue... | allowedQueues | ) |
Creates a new MultiQueueBarrier for the given queues.
Definition at line 67 of file MultiQueueBarrier.java.
| MultiQueueBarrier com.jogamp.opencl.util.MultiQueueBarrier.await | ( | ) | throws InterruptedException |
Blocks until all Threads which called waitFor continue execution.
This method blocks only once, all subsequent calls are ignored.
Definition at line 116 of file MultiQueueBarrier.java.
| boolean com.jogamp.opencl.util.MultiQueueBarrier.await | ( | final long | timeout, |
| final TimeUnit | unit | ||
| ) | throws InterruptedException |
| timeout | the maximum time to wait |
| unit | the time unit of the timeout argument |
Definition at line 127 of file MultiQueueBarrier.java.
| long com.jogamp.opencl.util.MultiQueueBarrier.getCount | ( | ) |
Returns the current number of events which must occure before this barrier unblocks the waiting threads.
This method is typically used for debugging and testing purposes.
Definition at line 159 of file MultiQueueBarrier.java.
| void com.jogamp.opencl.util.MultiQueueBarrier.resetBarrier | ( | ) |
Resets this barrier and unblocks all waiting threads.
Definition at line 136 of file MultiQueueBarrier.java.
| MultiQueueBarrier com.jogamp.opencl.util.MultiQueueBarrier.waitFor | ( | final CLCommandQueue | queue | ) |
Blocks the current Thread until all commands on the CLCommandQueue finished excecution.
This method may be invoked concurrently without synchronization on the MultiQueueBarrier object as long each Thread passes a distinct CLCommandQueue as parameter to this method.
Definition at line 86 of file MultiQueueBarrier.java.
| MultiQueueBarrier com.jogamp.opencl.util.MultiQueueBarrier.waitFor | ( | final CLCommandQueue | queue, |
| final CLEventList | events | ||
| ) |
Blocks the current Thread until the given events on the CLCommandQueue occurred.
This method may be invoked concurrently without synchronization on the MultiQueueBarrier object as long each Thread passes a distinct CLCommandQueue as parameter to this method.
Definition at line 101 of file MultiQueueBarrier.java.