org.jocl.utils
Class Events

java.lang.Object
  extended by org.jocl.utils.Events

public class Events
extends java.lang.Object

Utility methods related to events.


Method Summary
static double computeExecutionTimeMs(org.jocl.cl_event event)
          Compute the execution time for the given event, in milliseconds.
static void release(org.jocl.cl_event... events)
          Release each of the given events if it is not null.
static void release(java.lang.Iterable<org.jocl.cl_event> events)
          Release each of the given events if it is not null.
static void waitFor(org.jocl.cl_event... events)
          Wait for the given events if they are not null.
static void waitFor(java.lang.Iterable<org.jocl.cl_event> events)
          Wait for the given events if they are not null.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

computeExecutionTimeMs

public static double computeExecutionTimeMs(org.jocl.cl_event event)
Compute the execution time for the given event, in milliseconds. This may only be called if the event is associated with a command queue for which profiling is enabled.

Parameters:
event - The event
Returns:
The execution time, in milliseconds

waitFor

public static void waitFor(org.jocl.cl_event... events)
Wait for the given events if they are not null.

Parameters:
events - The events to wait for

waitFor

public static void waitFor(java.lang.Iterable<org.jocl.cl_event> events)
Wait for the given events if they are not null.

Parameters:
events - The events to wait for

release

public static void release(org.jocl.cl_event... events)
Release each of the given events if it is not null.

Parameters:
events - The events to release

release

public static void release(java.lang.Iterable<org.jocl.cl_event> events)
Release each of the given events if it is not null.

Parameters:
events - The events to release