Show / Hide Table of Contents

    Class CudaMipmappedArray

    A mipmapped Cuda array

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

    Constructors

    | Improve this Doc View Source

    CudaMipmappedArray(CUArrayFormat, SizeT, SizeT, SizeT, CudaMipmappedArrayNumChannels, CUDAArray3DFlags, UInt32)

    Creates a CUDA mipmapped array according to descriptor.

    Width, Height, and Depth are the width, height, and depth of the CUDA array (in elements); the following types of CUDA arrays can be allocated:

    – A 1D mipmapped array is allocated if Height and Depth extents are both zero.

    – A 2D mipmapped array is allocated if only Depth extent is zero.

    – A 3D mipmapped array is allocated if all three extents are non-zero.

    – A 1D layered CUDA mipmapped array is allocated if only Height is zero and the Layered flag is set. Each layer is a 1D array. The number of layers is determined by the depth extent. – A 2D layered CUDA mipmapped array is allocated if all three extents are non-zero and the Layered flag is set. Each layer is a 2D array. The number of layers is determined by the depth extent. – A cubemap CUDA mipmapped array is allocated if all three extents are non-zero and the Cubemap flag is set. Width must be equal to Height, and Depth must be six. A cubemap is a special type of 2D layered CUDA array, where the six layers represent the six faces of a cube. The order of the six layers in memory is the same as that listed in CUarray_cubemap_face. – A cubemap layered CUDA mipmapped array is allocated if all three extents are non-zero, and both, Cubemap and Layered flags are set. Width must be equal to Height, and Depth must be a multiple of six. A cubemap layered CUDA array is a special type of 2D layered CUDA array that consists of a collection of cubemaps. The first six layers represent the first cubemap, the next six layers form the second cubemap, and so on.

    Declaration
    public CudaMipmappedArray(CUArrayFormat format, SizeT width, SizeT height, SizeT depth, CudaMipmappedArrayNumChannels numChannels, CUDAArray3DFlags flags, uint numMipmapLevels)
    Parameters
    Type Name Description
    CUArrayFormat format

    Array format

    SizeT width

    Array width. See general description.

    SizeT height

    Array height. See general description.

    SizeT depth

    Array depth or layer count. See general description.

    CudaMipmappedArrayNumChannels numChannels

    number of channels

    CUDAArray3DFlags flags

    Flags may be set to:

    – Layered to enable creation of layered CUDA mipmapped arrays. If this flag is set, Depth specifies the number of layers, not the depth of a 3D array.

    – Cubemap to enable creation of mipmapped cubemaps. If this flag is set, Width must be equal to Height, and Depth must be six. If the CUDA_ARRAY3D_LAYERED flag is also set, then Depth must be a multiple of six.

    – TextureGather to indicate that the CUDA mipmapped array will be used for texture gather. Texture gather can only be performed on 2D CUDA mipmapped arrays.

    System.UInt32 numMipmapLevels

    Number of mipmap levels. This value is clamped to the range [1, 1 + floor(log2(max(width, height, depth)))]

    | Improve this Doc View Source

    CudaMipmappedArray(CUDAArray3DDescriptor, UInt32)

    Creates a CUDA mipmapped array according to descriptor.

    Width, Height, and Depth are the width, height, and depth of the CUDA array (in elements); the following types of CUDA arrays can be allocated:

    – A 1D mipmapped array is allocated if Height and Depth extents are both zero.

    – A 2D mipmapped array is allocated if only Depth extent is zero.

    – A 3D mipmapped array is allocated if all three extents are non-zero.

    – A 1D layered CUDA mipmapped array is allocated if only Height is zero and the Layered flag is set. Each layer is a 1D array. The number of layers is determined by the depth extent.

    – A 2D layered CUDA mipmapped array is allocated if all three extents are non-zero and the Layered flag is set. Each layer is a 2D array. The number of layers is determined by the depth extent.

    – A cubemap CUDA mipmapped array is allocated if all three extents are non-zero and the Cubemap flag is set. Width must be equal to Height, and Depth must be six. A cubemap is a special type of 2D layered CUDA array, where the six layers represent the six faces of a cube. The order of the six layers in memory is the same as that listed in CUarray_cubemap_face.

    – A cubemap layered CUDA mipmapped array is allocated if all three extents are non-zero, and both, Cubemap and Layered flags are set. Width must be equal to Height, and Depth must be a multiple of six. A cubemap layered CUDA array is a special type of 2D layered CUDA array that consists of a collection of cubemaps. The first six layers represent the first cubemap, the next six layers form the second cubemap, and so on.

    Flags may be set to:

    – Layered to enable creation of layered CUDA mipmapped arrays. If this flag is set, Depth specifies the number of layers, not the depth of a 3D array.

    – Cubemap to enable creation of mipmapped cubemaps. If this flag is set, Width must be equal to Height, and Depth must be six. If the CUDA_ARRAY3D_LAYERED flag is also set, then Depth must be a multiple of six.

    – TextureGather to indicate that the CUDA mipmapped array will be used for texture gather. Texture gather can only be performed on 2D CUDA mipmapped arrays.

    Declaration
    public CudaMipmappedArray(CUDAArray3DDescriptor descriptor, uint numMipmapLevels)
    Parameters
    Type Name Description
    CUDAArray3DDescriptor descriptor

    mipmapped array descriptor

    System.UInt32 numMipmapLevels

    Number of mipmap levels. This value is clamped to the range [1, 1 + floor(log2(max(width, height, depth)))]

    | Improve this Doc View Source

    CudaMipmappedArray(CUmipmappedArray, CUArrayFormat, CudaMipmappedArrayNumChannels)

    Creates a CUDA mipmapped array from an existing mipmap array handle.

    Declaration
    public CudaMipmappedArray(CUmipmappedArray handle, CUArrayFormat format, CudaMipmappedArrayNumChannels numChannels)
    Parameters
    Type Name Description
    CUmipmappedArray handle

    handle to wrap

    CUArrayFormat format

    Array format of the wrapped array. Cannot be gathered through CUDA API.

    CudaMipmappedArrayNumChannels numChannels

    Number of channels of wrapped array.

    Properties

    | Improve this Doc View Source

    Array3DDescriptor

    Returns the wrapped CUDAArray3DDescriptor

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

    CUMipmappedArray

    Returns the wrapped CUmipmappedArray

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

    Depth

    Returns the Depth of the array

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

    Flags

    Returns the array creation flags

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

    Format

    Returns the array format

    Declaration
    public CUArrayFormat Format { get; }
    Property Value
    Type Description
    CUArrayFormat
    | 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

    NumChannels

    Returns number of channels

    Declaration
    public uint NumChannels { get; }
    Property Value
    Type Description
    System.UInt32
    | Improve this Doc View Source

    Width

    Returns the array width in elements

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

    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

    GetLevelAsArray1D(UInt32)

    Returns a CUDA array that represents a single mipmap level of the CUDA mipmapped array.

    Declaration
    public CudaArray1D GetLevelAsArray1D(uint level)
    Parameters
    Type Name Description
    System.UInt32 level

    Mipmap level

    Returns
    Type Description
    CudaArray1D
    | Improve this Doc View Source

    GetLevelAsArray2D(UInt32)

    Returns a CUDA array that represents a single mipmap level of the CUDA mipmapped array.

    Declaration
    public CudaArray2D GetLevelAsArray2D(uint level)
    Parameters
    Type Name Description
    System.UInt32 level

    Mipmap level

    Returns
    Type Description
    CudaArray2D
    | Improve this Doc View Source

    GetLevelAsArray3D(UInt32)

    Returns a CUDA array that represents a single mipmap level of the CUDA mipmapped array.

    Declaration
    public CudaArray3D GetLevelAsArray3D(uint level)
    Parameters
    Type Name Description
    System.UInt32 level

    Mipmap level

    Returns
    Type Description
    CudaArray3D
    | Improve this Doc View Source

    GetLevelAsCUArray(UInt32)

    Returns a CUDA array that represents a single mipmap level of the CUDA mipmapped array.

    Declaration
    public CUarray GetLevelAsCUArray(uint level)
    Parameters
    Type Name Description
    System.UInt32 level

    Mipmap level

    Returns
    Type Description
    CUarray

    Implements

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