|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.opencl.util.MultiQueueBarrier
public class MultiQueueBarrier
An utility for synchronizing multiple concurrent CLCommandQueue
s.
This Barrier can be reused after it has been broken.
Constructor Summary | |
---|---|
MultiQueueBarrier(CLCommandQueue... allowedQueues)
Creates a new MultiQueueBarrier for the given queues. |
|
MultiQueueBarrier(int queueCount)
Creates a new MultiQueueBarrier with the given queueCount. |
Method Summary | |
---|---|
MultiQueueBarrier |
await()
Blocks until all Threads which called waitFor(com.jogamp.opencl.CLCommandQueue)
continue execution. |
boolean |
await(long timeout,
TimeUnit unit)
|
long |
getCount()
Returns the current number of events which must occure before this barrier unblocks the waiting threads. |
void |
resetBarrier()
Resets this barrier and unblocks all waiting threads. |
MultiQueueBarrier |
waitFor(CLCommandQueue queue)
Blocks the current Thread until all commands on the CLCommandQueue finished excecution. |
MultiQueueBarrier |
waitFor(CLCommandQueue queue,
CLEventList events)
Blocks the current Thread until the given events on the CLCommandQueue occurred. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiQueueBarrier(int queueCount)
MultiQueueBarrier(CLCommandQueue... allowedQueues)
if possible
which restricts the set of allowed queues for the barrier.
public MultiQueueBarrier(CLCommandQueue... allowedQueues)
Method Detail |
---|
public MultiQueueBarrier waitFor(CLCommandQueue queue)
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.
public MultiQueueBarrier waitFor(CLCommandQueue queue, CLEventList events)
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.
public MultiQueueBarrier await() throws InterruptedException
waitFor(com.jogamp.opencl.CLCommandQueue)
continue execution.
This method blocks only once, all subsequent calls are ignored.
InterruptedException
public boolean await(long timeout, TimeUnit unit) throws InterruptedException
timeout
- the maximum time to waitunit
- the time unit of the timeout
argument
InterruptedException
await()
public void resetBarrier()
public long getCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |