Package com.jogamp.opencl
Class CLEventList
- java.lang.Object
-
- com.jogamp.opencl.CLEventList
-
- All Implemented Interfaces:
AutoCloseable
,CLResource
,AutoCloseable
,Iterable<CLEvent>
public final class CLEventList extends Object implements CLResource, AutoCloseable, Iterable<CLEvent>
Fixed size list for storing CLEvents.- Author:
- Michael Bien, et al.
-
-
Constructor Summary
Constructors Constructor Description CLEventList(int capacity)
CLEventList(CachedBufferFactory factory, int capacity)
CLEventList(CachedBufferFactory factory, CLEvent... events)
CLEventList(CLEvent... events)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
capacity()
Returns the maximum size of this list.void
close()
Deprecated.userelease()
instead.CLEvent
getEvent(int index)
boolean
isReleased()
Returns true ifCLResource.release()
has been called.Iterator<CLEvent>
iterator()
void
release()
Releases all CLEvents in this list.int
size()
Returns the current size of this list.String
toString()
void
waitForEvent(int index)
Waits for the event with the given index in this list to occur.void
waitForEvents()
Waits for all events in this list to occur.void
waitForEvents(int start, int range)
Waits for all events of the specified region in this list to occur.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
CLEventList
public CLEventList(int capacity)
-
CLEventList
public CLEventList(CLEvent... events)
-
CLEventList
public CLEventList(CachedBufferFactory factory, int capacity)
-
CLEventList
public CLEventList(CachedBufferFactory factory, CLEvent... events)
-
-
Method Detail
-
waitForEvents
public void waitForEvents()
Waits for all events in this list to occur. If this list is empty this method won't do anything.
-
waitForEvents
public void waitForEvents(int start, int range)
Waits for all events of the specified region in this list to occur. Will throw IndexOutOfBoundsException if indices are out of bounds.
-
waitForEvent
public void waitForEvent(int index)
Waits for the event with the given index in this list to occur.
-
release
public void release()
Releases all CLEvents in this list.- Specified by:
release
in interfaceCLResource
-
close
@Deprecated public final void close()
Deprecated.userelease()
instead.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceAutoCloseable
-
getEvent
public CLEvent getEvent(int index)
-
size
public int size()
Returns the current size of this list.
-
capacity
public int capacity()
Returns the maximum size of this list.
-
isReleased
public boolean isReleased()
Description copied from interface:CLResource
Returns true ifCLResource.release()
has been called.- Specified by:
isReleased
in interfaceCLResource
-
-