public class CLEvent extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CLEvent.CommandExecutionStatus
Values for CL_EVENT_COMMAND_EXECUTION_STATUS
|
static class |
CLEvent.CommandType
Values for CL_EVENT_COMMAND_TYPE
|
static interface |
CLEvent.EventCallback |
| Modifier and Type | Field and Description |
|---|---|
static CLEvent |
FIRE_AND_FORGET
Pass this to special value to any method that expects a variable number of events to wait for and that returns an event, to completely avoid returning the completion event (will return null instead of the event).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Underyling implementation pointer-based equality test
|
CLEvent.CommandExecutionStatus |
getCommandExecutionStatus()
Return the execution status of the command identified by event.
|
int |
getCommandExecutionStatusValue()
Return the execution status of the command identified by event.
|
CLEvent.CommandType |
getCommandType()
Return the command associated with event.
|
static <E extends TypedPointer,A extends com.nativelibs4java.opencl.CLAbstractEntity> |
getEntities(A[] objects,
Pointer<E> out) |
long |
getProfilingCommandEnd()
A 64-bit value that describes the current device time counter in nanoseconds when the command identified by event has finished execution on the device.
|
long |
getProfilingCommandQueued()
A 64-bit value that describes the current device time counter in nanoseconds when the command identified by event is enqueued in a command-queue by the host.
|
long |
getProfilingCommandStart()
A 64-bit value that describes the current device time counter in nanoseconds when the command identified by event starts execution on the device.
|
long |
getProfilingCommandSubmit()
A 64-bit value that describes the current device time counter in nanoseconds when the command identified by event that has been enqueued is submitted by the host to the device associated with the command- queue.
|
CLQueue |
getQueue() |
int |
hashCode()
Underyling implementation pointer-based hashCode computation
|
void |
invokeUponCompletion(Runnable action)
Invoke an action in a separate thread only after completion of the command associated with this event.
|
static void |
invokeUponCompletion(Runnable action,
CLEvent... eventsToWaitFor)
Invoke an action in a separate thread only after completion of all of the commands associated with the specified events.
|
void |
release()
Manual release of the OpenCL resources represented by this object.
|
void |
setCallback(int commandExecStatus,
CLEvent.EventCallback callback)
Calls clSetEventCallback.
|
void |
setCompletionCallback(CLEvent.EventCallback callback)
Registers a user callback function for the completion execution status (CL_COMPLETE).
|
String |
toString() |
void |
waitFor()
Wait for this event, blocking the caller thread independently of any queue until all of the command associated with this events completes.
|
static void |
waitFor(CLEvent... eventsToWaitFor)
Calls clWaitForEvents.
|
public static final CLEvent FIRE_AND_FORGET
public void setCompletionCallback(CLEvent.EventCallback callback)
callback - UnsupportedOperationException - in OpenCL 1.0public void setCallback(int commandExecStatus, CLEvent.EventCallback callback)
commandExecStatus - specifies the command execution status for which the callback is registered. The command execution callback values for which a callback can be registered are: CL_COMPLETE. There is no guarantee that the callback functions registered for various execution status values for an event will be called in the exact order that the execution status of a command changes.callback - UnsupportedOperationException - in OpenCL 1.0public void waitFor()
public static void waitFor(CLEvent... eventsToWaitFor)
eventsToWaitFor - List of events which completion is to be waited forpublic void invokeUponCompletion(Runnable action)
action - an action to be ranIllegalArgumentException - if action is nullpublic static void invokeUponCompletion(Runnable action, CLEvent... eventsToWaitFor)
action - an action to be raneventsToWaitFor - list of events which commands's completion should be waited for before the action is ranIllegalArgumentException - if action is nullpublic CLEvent.CommandExecutionStatus getCommandExecutionStatus()
CLException - is the execution status denotes an errorpublic int getCommandExecutionStatusValue()
CLException - is the execution status denotes an errorpublic CLEvent.CommandType getCommandType()
public long getProfilingCommandQueued()
public long getProfilingCommandSubmit()
public long getProfilingCommandStart()
public long getProfilingCommandEnd()
public void release()
public static <E extends TypedPointer,A extends com.nativelibs4java.opencl.CLAbstractEntity> Pointer<E> getEntities(A[] objects, Pointer<E> out)
public int hashCode()
Copyright © 2009-2015. All Rights Reserved.