Class Cuda.Event

java.lang.Object
ai.rapids.cudf.Cuda.Event
All Implemented Interfaces:
AutoCloseable
Enclosing class:
Cuda

public static final class Cuda.Event extends Object implements AutoCloseable
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create an event that is as fast as possible, timing is disabled and no blockingSync.
    Event(boolean enableTiming, boolean blockingSync)
    Create an event to be used for CUDA synchronization.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    boolean
    Check to see if the event has completed or not.
    void
    Captures the contents of the default stream at the time of this call.
    void
    Captures the contents of stream at the time of this call.
    void
    Block the thread to wait for the event to complete.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Event

      public Event()
      Create an event that is as fast as possible, timing is disabled and no blockingSync.
    • Event

      public Event(boolean enableTiming, boolean blockingSync)
      Create an event to be used for CUDA synchronization.
      Parameters:
      enableTiming - true if the event should record timing information.
      blockingSync - true if event should use blocking synchronization. A host thread that calls sync() to wait on an event created with this flag will block until the event actually completes.
  • Method Details

    • hasCompleted

      public boolean hasCompleted()
      Check to see if the event has completed or not. This is the equivalent of cudaEventQuery.
      Returns:
      true it has completed else false.
    • record

      public void record(Cuda.Stream stream)
      Captures the contents of stream at the time of this call. This event and stream must be on the same device. Calls such as hasCompleted() or Stream.waitEvent() will then examine or wait for completion of the work that was captured. Uses of stream after this call do not modify event.
      Parameters:
      stream - the stream to record the state of.
    • record

      public void record()
      Captures the contents of the default stream at the time of this call.
    • sync

      public void sync()
      Block the thread to wait for the event to complete. Note that this does not follow any of the java threading standards. Interrupt will not work to wake up the thread.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable