Class NPPNativeMethods.NPPs.MemAlloc
Signal-allocator methods for allocating 1D arrays of data in device memory. All allocators have size parameters to specify the size of the signal (1D array) being allocated.
The allocator methods return a pointer to the newly allocated memory of appropriate type. If device-memory allocation is not possible due to resource constaints the allocators return 0 (i.e. NULL pointer).
All signal allocators allocate memory aligned such that it is beneficial to the performance of the majority of the signal-processing primitives. It is no mandatory however to use these allocators. Any valid CUDA device-memory pointers can be passed to NPP primitives.
Inheritance
Inherited Members
Namespace: ManagedCuda.NPP
Assembly: NPP.dll
Syntax
public static class MemAlloc
Methods
nppsFree(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 nppsFree(CUdeviceptr pValues)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | pValues | A pointer to memory allocated using nppiMalloc_<modifier>. |
nppsMalloc_16s(Int32)
16-bit signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_16s(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of shorts in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_16sc(Int32)
16-bit complex-value signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_16sc(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of 16-bit complex numbers in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_16u(Int32)
16-bit unsigned signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_16u(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of unsigned shorts in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_32f(Int32)
32-bit float signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_32f(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of floats in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_32fc(Int32)
32-bit complex float signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_32fc(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of complex float values in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_32s(Int32)
32-bit integer signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_32s(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of ints in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_32sc(Int32)
32-bit complex integer signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_32sc(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of complex integner values in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_32u(Int32)
32-bit unsigned signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_32u(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of unsigned ints in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_64f(Int32)
64-bit float (double) signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_64f(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of doubles in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_64fc(Int32)
64-bit complex complex signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_64fc(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of complex double valuess in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_64s(Int32)
64-bit long integer signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_64s(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of long ints in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_64sc(Int32)
64-bit complex long integer signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_64sc(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of complex long int values in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_8s(Int32)
8-bit signed signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_8s(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of (signed) chars in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |
nppsMalloc_8u(Int32)
8-bit unsigned signal allocator.
Declaration
public static CUdeviceptr nppsMalloc_8u(int nSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nSize | Number of unsigned chars in the new signal. |
Returns
Type | Description |
---|---|
CUdeviceptr | A pointer to the new signal. 0 (NULL-pointer) indicates that an error occurred during allocation. |