Show / Hide Table of Contents

    Class CudaArray2D

    A two dimensional CUDA array

    Inheritance
    System.Object
    CudaArray2D
    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 CudaArray2D : IDisposable

    Constructors

    | Improve this Doc View Source

    CudaArray2D(CUarray)

    Creates a new CUDA array from an existing CUarray. The CUarray won't be destroyed when disposing. Array properties are obtained by cuArrayGetDescriptor

    Declaration
    public CudaArray2D(CUarray cuArray)
    Parameters
    Type Name Description
    CUarray cuArray
    | Improve this Doc View Source

    CudaArray2D(CUarray, Boolean)

    Creates a new CUDA array from an existing CUarray. Array properties are obtained by cuArrayGetDescriptor

    Declaration
    public CudaArray2D(CUarray cuArray, bool isOwner)
    Parameters
    Type Name Description
    CUarray cuArray
    System.Boolean isOwner

    The cuArray will be destroyed while disposing if the CudaArray is the owner

    | Improve this Doc View Source

    CudaArray2D(CUArrayFormat, SizeT, SizeT, CudaArray2DNumChannels)

    Creates a new CUDA array.

    Declaration
    public CudaArray2D(CUArrayFormat format, SizeT width, SizeT height, CudaArray2DNumChannels numChannels)
    Parameters
    Type Name Description
    CUArrayFormat format
    SizeT width

    In elements

    SizeT height

    In elements

    CudaArray2DNumChannels numChannels

    Properties

    | Improve this Doc View Source

    ArrayDescriptor

    Returns the wrapped CUDAArrayDescriptor

    Declaration
    public CUDAArrayDescriptor ArrayDescriptor { get; }
    Property Value
    Type Description
    CUDAArrayDescriptor
    | Improve this Doc View Source

    CUArray

    Returns the wrapped CUarray

    Declaration
    public CUarray CUArray { get; }
    Property Value
    Type Description
    CUarray
    | Improve this Doc View Source

    Height

    Returns the Height of the array

    Declaration
    public SizeT Height { get; }
    Property Value
    Type Description
    SizeT
    | Improve this Doc View Source

    IsOwner

    If the wrapper class instance is the owner of a CUDA handle, it will be destroyed while disposing.

    Declaration
    public bool IsOwner { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Width

    Returns the array width in elements

    Declaration
    public SizeT Width { get; }
    Property Value
    Type Description
    SizeT
    | Improve this Doc View Source

    WidthInBytes

    Returns the array width in bytes

    Declaration
    public SizeT WidthInBytes { get; }
    Property Value
    Type Description
    SizeT

    Methods

    | Improve this Doc View Source

    CopyData(CUDAMemCpy2D)

    A raw data copy method

    Declaration
    public void CopyData(CUDAMemCpy2D aCopyParameters)
    Parameters
    Type Name Description
    CUDAMemCpy2D aCopyParameters

    2D copy paramters

    | Improve this Doc View Source

    CopyDataUnaligned(CUDAMemCpy2D)

    A raw unaligned copy method

    Declaration
    public void CopyDataUnaligned(CUDAMemCpy2D aCopyParameters)
    Parameters
    Type Name Description
    CUDAMemCpy2D aCopyParameters
    | Improve this Doc View Source

    CopyFromArrayToThis(CudaArray2D)

    Copy array to array

    Declaration
    public void CopyFromArrayToThis(CudaArray2D aSourceArray)
    Parameters
    Type Name Description
    CudaArray2D aSourceArray
    | Improve this Doc View Source

    CopyFromDeviceToThis<T>(CudaPitchedDeviceVariable<T>)

    Copy from a pitched device variable to this array

    Declaration
    public void CopyFromDeviceToThis<T>(CudaPitchedDeviceVariable<T> aDeviceVariable)
        where T : struct
    Parameters
    Type Name Description
    CudaPitchedDeviceVariable<T> aDeviceVariable

    Source

    Type Parameters
    Name Description
    T

    device variable base type

    | Improve this Doc View Source

    CopyFromHostToThis(IntPtr, SizeT)

    Copy from Host to this array

    Declaration
    public void CopyFromHostToThis(IntPtr aHostSrc, SizeT aElementSizeInBytes)
    Parameters
    Type Name Description
    System.IntPtr aHostSrc

    Source

    SizeT aElementSizeInBytes
    | Improve this Doc View Source

    CopyFromHostToThis<T>(T[])

    Copy from Host to this array

    Declaration
    public void CopyFromHostToThis<T>(T[] aHostSrc)
        where T : struct
    Parameters
    Type Name Description
    T[] aHostSrc

    Source

    Type Parameters
    Name Description
    T

    Host array base type

    | Improve this Doc View Source

    CopyFromThisToArray(CudaArray2D)

    Copy array to array

    Declaration
    public void CopyFromThisToArray(CudaArray2D aDestArray)
    Parameters
    Type Name Description
    CudaArray2D aDestArray
    | Improve this Doc View Source

    CopyFromThisToDevice<T>(CudaPitchedDeviceVariable<T>)

    Copy from this array to a pitched device variable

    Declaration
    public void CopyFromThisToDevice<T>(CudaPitchedDeviceVariable<T> aDeviceVariable)
        where T : struct
    Parameters
    Type Name Description
    CudaPitchedDeviceVariable<T> aDeviceVariable

    Destination

    Type Parameters
    Name Description
    T

    device variable base type

    | Improve this Doc View Source

    CopyFromThisToHost(IntPtr, SizeT)

    Copy data from this array to host

    Declaration
    public void CopyFromThisToHost(IntPtr aHostDest, SizeT aElementSizeInBytes)
    Parameters
    Type Name Description
    System.IntPtr aHostDest

    IntPtr to destination in host memory

    SizeT aElementSizeInBytes
    | Improve this Doc View Source

    CopyFromThisToHost<T>(T[])

    Copy data from this array to host

    Declaration
    public void CopyFromThisToHost<T>(T[] aHostDest)
        where T : struct
    Parameters
    Type Name Description
    T[] aHostDest

    Destination

    Type Parameters
    Name Description
    T

    Host array base type

    | 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()

    Implements

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