Interface CLEventDispatcher

All Known Implementing Classes:
CLLegacyEventDispatcher, CLNativeEventDispatcher

public interface CLEventDispatcher
Provides low-level access to event subscriptions. This allows a callback to be fired when OpenCL fires an event.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    listen(long event, long eventStatus, @NotNull Runnable callback)
    Listens to the specific event and event status.
    default void
    listen(long event, @NotNull Runnable callback)
    Listens to the specific event and event status.
  • Method Details

    • listen

      default void listen(long event, @NotNull @NotNull Runnable callback) throws CLException
      Listens to the specific event and event status.
      Parameters:
      event - The event to listen to. This is a pointer to an event provided by an OpenCL function.
      callback - The callback to fire when the event fires
      Throws:
      CLException - If the event is invalid
    • listen

      void listen(long event, long eventStatus, @NotNull @NotNull Runnable callback) throws CLException
      Listens to the specific event and event status. Use listen(long, Runnable) if unsure what status to listen for.
      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