Package com.jme3.opencl
Class Event
java.lang.Object
com.jme3.opencl.AbstractOpenCLObject
com.jme3.opencl.Event
- All Implemented Interfaces:
OpenCLObject
- Direct Known Subclasses:
LwjglEvent
Wrapper for an OpenCL Event object.
Events are returned from kernel launches and all asynchronous operations.
They allow us to test whether an action has completed and block until the operation
is done.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jme3.opencl.OpenCLObject
OpenCLObject.ObjectReleaser -
Field Summary
Fields inherited from class com.jme3.opencl.AbstractOpenCLObject
releaser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanTests if the action is completed.register()Registers this object for automatic releasing on garbage collection.abstract voidWaits until the action has finished (blocking).Methods inherited from class com.jme3.opencl.AbstractOpenCLObject
finalize, getReleaser, release
-
Constructor Details
-
Event
-
-
Method Details
-
register
Description copied from interface:OpenCLObjectRegisters this object for automatic releasing on garbage collection. By default, OpenCLObjects are not registered in theOpenCLObjectManager, you have to release it manually by callingOpenCLObject.release(). Without registering or releasing, a memory leak might occur.
Returnsthisto allow calls likeBuffer buffer = clContext.createBuffer(1024).register();.- Specified by:
registerin interfaceOpenCLObject- Overrides:
registerin classAbstractOpenCLObject- Returns:
this
-
waitForFinished
public abstract void waitForFinished()Waits until the action has finished (blocking). This automatically releases the event. -
isCompleted
public abstract boolean isCompleted()Tests if the action is completed. If the action is completed, the event is released.- Returns:
trueif the action is completed
-