Show / Hide Table of Contents

    Class CudaGraphicsInteropResourceCollection

    Groupes several wrapped CUgraphicsResources together, so that the map() call to the CUDA API can be efficiently on all resources together.

    Inheritance
    System.Object
    CudaGraphicsInteropResourceCollection
    Implements
    System.Collections.Generic.ICollection<ICudaGraphicsInteropResource>
    System.Collections.Generic.IEnumerable<ICudaGraphicsInteropResource>
    System.Collections.IEnumerable
    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 CudaGraphicsInteropResourceCollection : ICollection<ICudaGraphicsInteropResource>, IEnumerable<ICudaGraphicsInteropResource>, IEnumerable, IDisposable

    Constructors

    | Improve this Doc View Source

    CudaGraphicsInteropResourceCollection()

    Creates a new CudaGraphicsInteropResourceCollection

    Declaration
    public CudaGraphicsInteropResourceCollection()

    Properties

    | Improve this Doc View Source

    Count

    Returns the number of resources in the collection

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Item[Int32]

    Returns the ICudaGraphicsInteropResource at index index.

    Declaration
    public ICudaGraphicsInteropResource this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    ICudaGraphicsInteropResource

    Methods

    | Improve this Doc View Source

    Add(ICudaGraphicsInteropResource)

    Adds a new resource to the collection

    Declaration
    public void Add(ICudaGraphicsInteropResource item)
    Parameters
    Type Name Description
    ICudaGraphicsInteropResource item
    | Improve this Doc View Source

    Clear()

    Removes all resources in the collection, an disposes every element.

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

    Contains(ICudaGraphicsInteropResource)

    Returns true, if the given resource is part of the collection

    Declaration
    public bool Contains(ICudaGraphicsInteropResource item)
    Parameters
    Type Name Description
    ICudaGraphicsInteropResource item
    Returns
    Type Description
    System.Boolean
    | 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

    Finalize()

    For dispose

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

    MapAllResources()

    Maps all graphics resources for access by CUDA.

    The resources may be accessed by CUDA until they are unmapped. The graphics API from which the resource was registered should not access any resources while they are mapped by CUDA. If an application does so, the results are undefined.

    This function provides the synchronization guarantee that any graphics calls issued before MapAllResources() will complete before any subsequent CUDA work issued in stream begins.

    If any of the resources is presently mapped for access by CUDA then ErrorAlreadyMapped exception is thrown.

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

    MapAllResources(CUstream)

    Maps all graphics resources for access by CUDA.

    The resources may be accessed by CUDA until they are unmapped. The graphics API from which the resource was registered should not access any resources while they are mapped by CUDA. If an application does so, the results are undefined.

    This function provides the synchronization guarantee that any graphics calls issued before MapAllResources() will complete before any subsequent CUDA work issued in stream begins.

    If any of the resources is presently mapped for access by CUDA then ErrorAlreadyMapped exception is thrown.

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

    Remove(ICudaGraphicsInteropResource)

    Removes a resource from the collection. The resource is not disposed.

    Declaration
    public bool Remove(ICudaGraphicsInteropResource item)
    Parameters
    Type Name Description
    ICudaGraphicsInteropResource item
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    UnmapAllResources()

    Maps all graphics resources for access by CUDA.

    The resources may be accessed by CUDA until they are unmapped. The graphics API from which the resource was registered should not access any resources while they are mapped by CUDA. If an application does so, the results are undefined.

    This function provides the synchronization guarantee that any graphics calls issued before MapAllResources() will complete before any subsequent CUDA work issued in stream begins.

    If any of the resources is presently mapped for access by CUDA then ErrorAlreadyMapped exception is thrown.

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

    UnmapAllResources(CUstream)

    Unmaps all graphics resources.

    Once unmapped, the resources may not be accessed by CUDA until they are mapped again.

    This function provides the synchronization guarantee that any CUDA work issued in stream before UnmapAllResources() will complete before any subsequently issued graphics work begins.

    If any of the resources are not presently mapped for access by CUDA then ErrorNotMapped exception is thrown.

    Declaration
    public void UnmapAllResources(CUstream stream)
    Parameters
    Type Name Description
    CUstream stream

    Explicit Interface Implementations

    | Improve this Doc View Source

    ICollection<ICudaGraphicsInteropResource>.CopyTo(ICudaGraphicsInteropResource[], Int32)

    Throws NotImplementedException.

    Declaration
    void ICollection<ICudaGraphicsInteropResource>.CopyTo(ICudaGraphicsInteropResource[] array, int arrayIndex)
    Parameters
    Type Name Description
    ICudaGraphicsInteropResource[] array
    System.Int32 arrayIndex
    | Improve this Doc View Source

    ICollection<ICudaGraphicsInteropResource>.IsReadOnly

    Declaration
    bool ICollection<ICudaGraphicsInteropResource>.IsReadOnly { get; }
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IEnumerable<ICudaGraphicsInteropResource>.GetEnumerator()

    Declaration
    IEnumerator<ICudaGraphicsInteropResource> IEnumerable<ICudaGraphicsInteropResource>.GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<ICudaGraphicsInteropResource>
    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Implements

    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    System.IDisposable
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX