Show / Hide Table of Contents

    Class NPPNativeMethods.NPPi.MemAlloc

    Image-Memory Allocation

    ImageAllocator methods for 2D arrays of data. The allocators have width and height parameters to specify the size of the image data being allocated. They return a pointer to the newly created memory and return the numbers of bytes between successive lines.

    If the memory allocation failed due to lack of free device memory or device memory fragmentation the routine returns 0.

    All allocators return memory with line strides that are beneficial for performance. It is not mandatory to use these allocators. Any valid CUDA device-memory pointers can be used by the NPP primitives and there are no restrictions on line strides.

    Inheritance
    System.Object
    NPPNativeMethods.NPPi.MemAlloc
    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.NPP
    Assembly: NPP.dll
    Syntax
    public static class MemAlloc

    Methods

    nppiFree(CUdeviceptr)

    Free method for any 2D allocated memory.

    This method should be used to free memory allocated with any of the nppiMalloc_<modifier> methods.

    Declaration
    public static void nppiFree(CUdeviceptr pData)
    Parameters
    Type Name Description
    CUdeviceptr pData

    A pointer to memory allocated using nppiMalloc_<modifier>.

    nppiMalloc_16s_C1(Int32, Int32, ref Int32)

    16-bit signed image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16s_C1(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_16s_C2(Int32, Int32, ref Int32)

    2 channel 16-bit signed image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16s_C2(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_16s_C4(Int32, Int32, ref Int32)

    4 channel 16-bit signed image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16s_C4(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_16sc_C1(Int32, Int32, ref Int32)

    1 channel 16-bit signed complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16sc_C1(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_16sc_C2(Int32, Int32, ref Int32)

    2 channel 16-bit signed complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16sc_C2(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_16sc_C3(Int32, Int32, ref Int32)

    3 channel 16-bit signed complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16sc_C3(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_16sc_C4(Int32, Int32, ref Int32)

    4 channel 16-bit signed complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16sc_C4(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_16u_C1(Int32, Int32, ref Int32)

    16-bit unsigned image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16u_C1(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_16u_C2(Int32, Int32, ref Int32)

    2 channel 16-bit unsigned image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16u_C2(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_16u_C3(Int32, Int32, ref Int32)

    3 channel 16-bit unsigned image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16u_C3(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_16u_C4(Int32, Int32, ref Int32)

    4 channel 16-bit unsigned image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_16u_C4(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32f_C1(Int32, Int32, ref Int32)

    32-bit floating point image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32f_C1(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32f_C2(Int32, Int32, ref Int32)

    2 channel 32-bit floating point image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32f_C2(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32f_C3(Int32, Int32, ref Int32)

    3 channel 32-bit floating point image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32f_C3(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32f_C4(Int32, Int32, ref Int32)

    4 channel 32-bit floating point image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32f_C4(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32fc_C1(Int32, Int32, ref Int32)

    32-bit float complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32fc_C1(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32fc_C2(Int32, Int32, ref Int32)

    2 channel 32-bit float complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32fc_C2(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32fc_C3(Int32, Int32, ref Int32)

    3 channel 32-bit float complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32fc_C3(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32fc_C4(Int32, Int32, ref Int32)

    4 channel 32-bit float complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32fc_C4(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32s_C1(Int32, Int32, ref Int32)

    32-bit signed image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32s_C1(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32s_C3(Int32, Int32, ref Int32)

    3 channel 32-bit signed image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32s_C3(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32s_C4(Int32, Int32, ref Int32)

    4 channel 32-bit signed image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32s_C4(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32sc_C1(Int32, Int32, ref Int32)

    32-bit integer complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32sc_C1(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32sc_C2(Int32, Int32, ref Int32)

    2 channel 32-bit integer complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32sc_C2(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32sc_C3(Int32, Int32, ref Int32)

    3 channel 32-bit integer complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32sc_C3(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_32sc_C4(Int32, Int32, ref Int32)

    4 channel 32-bit integer complex image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_32sc_C4(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_8u_C1(Int32, Int32, ref Int32)

    8-bit unsigned image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_8u_C1(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_8u_C2(Int32, Int32, ref Int32)

    2 channel 8-bit unsigned image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_8u_C2(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_8u_C3(Int32, Int32, ref Int32)

    3 channel 8-bit unsigned image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_8u_C3(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

    nppiMalloc_8u_C4(Int32, Int32, ref Int32)

    4 channel 8-bit unsigned image memory allocator.

    Declaration
    public static CUdeviceptr nppiMalloc_8u_C4(int nWidthPixels, int nHeightPixels, ref int pStepBytes)
    Parameters
    Type Name Description
    System.Int32 nWidthPixels

    Image width.

    System.Int32 nHeightPixels

    Image height.

    System.Int32 pStepBytes

    Line Step.

    Returns
    Type Description
    CUdeviceptr

    Pointer to new image data.

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