Package com.jogamp.opencl
Class CLEvent
- java.lang.Object
-
- com.jogamp.opencl.CLObject
-
- com.jogamp.opencl.CLEvent
-
- All Implemented Interfaces:
AutoCloseable,CLResource
- Direct Known Subclasses:
CLUserEvent
public class CLEvent extends CLObject
Event objects can be used for synchronizing command queues, e.g you can wait until a event occurs or they can also be used to capture profiling information that measure execution time of a command. Profiling of OpenCL commands can be enabled by using aCLCommandQueuecreated withCLCommandQueue.Mode.PROFILING_MODE.- Author:
- Michael Bien, et al.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCLEvent.CommandTypestatic classCLEvent.ExecutionStatusstatic classCLEvent.ProfilingCommand
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()Deprecated.This method is not intended to be called from client code.booleanequals(Object obj)longgetProfilingInfo(CLEvent.ProfilingCommand command)CLEvent.ExecutionStatusgetStatus()Returns the execution status of the command which triggers this event.intgetStatusCode()CLEvent.CommandTypegetType()inthashCode()booleanisComplete()Returns true only ifgetStatus()returnsCLEvent.ExecutionStatus.COMPLETE.booleanisReleased()Returns true ifCLResource.release()has been called.voidregisterCallback(CLEventListener callback)Registers a callback which will be called when the event terminates (COMPLETE or ERROR).voidrelease()Releases the OpenCL resource.StringtoString()-
Methods inherited from class com.jogamp.opencl.CLObject
getContext, getID, getPlatform
-
-
-
-
Method Detail
-
registerCallback
public void registerCallback(CLEventListener callback)
Registers a callback which will be called when the event terminates (COMPLETE or ERROR).
-
release
public void release()
Description copied from interface:CLResourceReleases the OpenCL resource.- Specified by:
releasein interfaceCLResource
-
getStatus
public CLEvent.ExecutionStatus getStatus()
Returns the execution status of the command which triggers this event.
-
isComplete
public boolean isComplete()
Returns true only ifgetStatus()returnsCLEvent.ExecutionStatus.COMPLETE.
-
getStatusCode
public int getStatusCode()
-
getType
public CLEvent.CommandType getType()
-
getProfilingInfo
public long getProfilingInfo(CLEvent.ProfilingCommand command)
-
close
@Deprecated public final void close()
Deprecated.This method is not intended to be called from client code.Implementation detail, satisfyingAutoCloseable. Might be remove as soon we have extension methods, but shall validate with Java 1.5 specs.- Specified by:
closein interfaceAutoCloseable- See Also:
AutoCloseable
-
isReleased
public boolean isReleased()
Description copied from interface:CLResourceReturns true ifCLResource.release()has been called.- Specified by:
isReleasedin interfaceCLResource
-
-