Show / Hide Table of Contents

    Class CudaEvent

    Wrapps a CUevent handle.

    Inheritance
    System.Object
    CudaEvent
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ManagedCuda
    Assembly: ManagedCuda.dll
    Syntax
    public class CudaEvent : IDisposable

    Constructors

    | Improve this Doc View Source

    CudaEvent()

    Creates a new Event using Default

    Declaration
    public CudaEvent()
    | Improve this Doc View Source

    CudaEvent(CUEventFlags)

    Creates a new Event

    Declaration
    public CudaEvent(CUEventFlags flags)
    Parameters
    Type Name Description
    CUEventFlags flags

    Parameters for event creation

    Properties

    | Improve this Doc View Source

    Event

    returns the wrapped CUevent handle

    Declaration
    public CUevent Event { get; set; }
    Property Value
    Type Description
    CUevent

    Methods

    | Improve this Doc View Source

    Dispose()

    Dispose

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Dispose(Boolean)

    For IDisposable

    Declaration
    protected virtual void Dispose(bool fDisposing)
    Parameters
    Type Name Description
    System.Boolean fDisposing
    | Improve this Doc View Source

    ElapsedTime(CudaEvent, CudaEvent)

    Computes the elapsed time between two events (in milliseconds with a resolution of around 0.5 microseconds). If either event has not been recorded yet, this function throws ErrorNotReady. If either event has been recorded with a non-zero stream, the result is undefined.

    Declaration
    public static float ElapsedTime(CudaEvent eventStart, CudaEvent eventEnd)
    Parameters
    Type Name Description
    CudaEvent eventStart
    CudaEvent eventEnd
    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    Finalize()

    For dispose

    Declaration
    protected void Finalize()
    | Improve this Doc View Source

    Query()

    Returns true if the event has actually been recorded, or false if not. If Record() has not been called on this event, the function throws ErrorInvalidValue.

    Declaration
    public bool Query()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Record()

    Records an event. If stream is non-zero, the event is recorded after all preceding operations in the stream have been completed; otherwise, it is recorded after all preceding operations in the CUDA context have been completed. Since operation is asynchronous, Query() and/or Synchronize() must be used to determine when the event has actually been recorded.

    If Record() has previously been called and the event has not been recorded yet, this function throws ErrorInvalidValue.

    Declaration
    public void Record()
    | Improve this Doc View Source

    Record(CUstream)

    Records an event. If stream is non-zero, the event is recorded after all preceding operations in the stream have been completed; otherwise, it is recorded after all preceding operations in the CUDA context have been completed. Since operation is asynchronous, Query() and/or Synchronize() must be used to determine when the event has actually been recorded.

    If Record() has previously been called and the event has not been recorded yet, this function throws ErrorInvalidValue.

    Declaration
    public void Record(CUstream stream)
    Parameters
    Type Name Description
    CUstream stream
    | Improve this Doc View Source

    Synchronize()

    Waits until the event has actually been recorded. If Record() has been called on this event, the function returns ErrorInvalidValue. Waiting for an event that was created with the BlockingSync flag will cause the calling CPU thread to block until the event has actually been recorded.

    If Record() has previously been called and the event has not been recorded yet, this function throws ErrorInvalidValue.

    Declaration
    public void Synchronize()

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX