Class CLNativeEventDispatcher

java.lang.Object
foundry.veil.api.opencl.event.CLNativeEventDispatcher
All Implemented Interfaces:
CLEventDispatcher

@Internal public class CLNativeEventDispatcher extends Object implements CLEventDispatcher
Uses the native OpenCL event callback system to listen to events. Only supported on OpenCL 1.1 and above.
  • Constructor Details

    • CLNativeEventDispatcher

      public CLNativeEventDispatcher()
  • Method Details

    • listen

      public void listen(long event, long eventStatus, @NotNull @NotNull Runnable callback) throws CLException
      Description copied from interface: CLEventDispatcher
      Listens to the specific event and event status. Use CLEventDispatcher.listen(long, Runnable) if unsure what status to listen for.
      Specified by:
      listen in interface CLEventDispatcher
      Parameters:
      event - The event to listen to. This is a pointer to an event provided by an OpenCL function.
      eventStatus - The event status to listen for. One of CL10.CL_COMPLETE, CL10.CL_RUNNING, CL10.CL_SUBMITTED, or CL10.CL_QUEUED
      callback - The callback to fire when the event fires
      Throws:
      CLException - If the event is invalid