jcuda.jnpp.utilnpp
Interface Allocator<T extends jcuda.jnpp.types.NppType>

Type Parameters:
T - The data type for this allocator

public interface Allocator<T extends jcuda.jnpp.types.NppType>

Interface for an allocator. An allocator manages all memory operations for an image, be it a CPU (host) or NPP (device) image. Implementations of this interface are defined in the ImageAllocatorsCPU and ImageAllocatorsNPP class.


Method Summary
 void Copy2D(jcuda.jnpp.TypedPointer<T> pDst, long nDstPitch, jcuda.jnpp.TypedPointer<T> pSrc, long nSrcPitch, long nWidth, long nHeight)
          2D copy operation for the specified memory blocks consisting of data with the type that is defined by this allocator.
 void DeviceToHostCopy2D(jcuda.jnpp.TypedPointer<T> pDst, long nDstPitch, jcuda.jnpp.TypedPointer<T> pSrc, long nSrcPitch, long nWidth, long nHeight)
          2D device-to-host copy for the specified memory blocks consisting of data with the type that is defined by this allocator.
 void Free2D(jcuda.jnpp.TypedPointer<T> pPixels)
          Free the given memory
 void HostToDeviceCopy2D(jcuda.jnpp.TypedPointer<T> pDst, long nDstPitch, jcuda.jnpp.TypedPointer<T> pSrc, long nSrcPitch, long nWidth, long nHeight)
          2D host-to-device copy for the specified memory blocks consisting of data with the type that is defined by this allocator.
 jcuda.jnpp.TypedPointer<T> Malloc2D(int nWidth, int nHeight, int[] pPitch)
          Allocate the specified memory block for the data type of this allocator.
 

Method Detail

Malloc2D

jcuda.jnpp.TypedPointer<T> Malloc2D(int nWidth,
                                    int nHeight,
                                    int[] pPitch)
Allocate the specified memory block for the data type of this allocator.

Parameters:
nWidth - The width
nHeight - The height
pPitch - Will contain the pitch
Returns:
The pointer to the memory

Free2D

void Free2D(jcuda.jnpp.TypedPointer<T> pPixels)
Free the given memory

Parameters:
pPixels - The memory

Copy2D

void Copy2D(jcuda.jnpp.TypedPointer<T> pDst,
            long nDstPitch,
            jcuda.jnpp.TypedPointer<T> pSrc,
            long nSrcPitch,
            long nWidth,
            long nHeight)
2D copy operation for the specified memory blocks consisting of data with the type that is defined by this allocator.

Parameters:
pDst - The destination pointer
nDstPitch - The destination pitch
pSrc - The source pointer
nSrcPitch - The source pitch
nWidth - The width
nHeight - The height

HostToDeviceCopy2D

void HostToDeviceCopy2D(jcuda.jnpp.TypedPointer<T> pDst,
                        long nDstPitch,
                        jcuda.jnpp.TypedPointer<T> pSrc,
                        long nSrcPitch,
                        long nWidth,
                        long nHeight)
2D host-to-device copy for the specified memory blocks consisting of data with the type that is defined by this allocator.

Parameters:
pDst - The destination pointer
nDstPitch - The destination pitch
pSrc - The source pointer
nSrcPitch - The source pitch
nWidth - The width
nHeight - The height

DeviceToHostCopy2D

void DeviceToHostCopy2D(jcuda.jnpp.TypedPointer<T> pDst,
                        long nDstPitch,
                        jcuda.jnpp.TypedPointer<T> pSrc,
                        long nSrcPitch,
                        long nWidth,
                        long nHeight)
2D device-to-host copy for the specified memory blocks consisting of data with the type that is defined by this allocator.

Parameters:
pDst - The destination pointer
nDstPitch - The destination pitch
pSrc - The source pointer
nSrcPitch - The source pitch
nWidth - The width
nHeight - The height