Memory Management
[CUDA Runtime API]


Functions

cudaError_t cudaFree (void *devPtr)
 Frees memory on the device.
cudaError_t cudaFreeArray (struct cudaArray *array)
 Frees an array on the device.
cudaError_t cudaFreeHost (void *ptr)
 Frees page-locked memory.
cudaError_t cudaGetSymbolAddress (void **devPtr, const char *symbol)
 Finds the address associated with a CUDA symbol.
cudaError_t cudaGetSymbolSize (size_t *size, const char *symbol)
 Finds the size of the object associated with a CUDA symbol.
cudaError_t cudaHostAlloc (void **ptr, size_t size, unsigned int flags)
 Allocates page-locked memory on the host.
cudaError_t cudaHostGetDevicePointer (void **pDevice, void *pHost, unsigned int flags)
 Passes back device pointer of mapped host memory allocated by cudaHostAlloc().
cudaError_t cudaHostGetFlags (unsigned int *pFlags, void *pHost)
 Passes back flags used to allocate pinned host memory allocated by cudaHostAlloc().
cudaError_t cudaMalloc (void **devPtr, size_t size)
 Allocate memory on the device.
cudaError_t cudaMalloc3D (struct cudaPitchedPtr *pitchedDevPtr, struct cudaExtent extent)
 Allocates logical 1D, 2D, or 3D memory objects on the device.
cudaError_t cudaMalloc3DArray (struct cudaArray **arrayPtr, const struct cudaChannelFormatDesc *desc, struct cudaExtent extent, unsigned int flags)
 Allocate an array on the device.
cudaError_t cudaMallocArray (struct cudaArray **arrayPtr, const struct cudaChannelFormatDesc *desc, size_t width, size_t height, unsigned int flags)
 Allocate an array on the device.
cudaError_t cudaMallocHost (void **ptr, size_t size)
 Allocates page-locked memory on the host.
cudaError_t cudaMallocPitch (void **devPtr, size_t *pitch, size_t width, size_t height)
 Allocates pitched memory on the device.
cudaError_t cudaMemcpy (void *dst, const void *src, size_t count, enum cudaMemcpyKind kind)
 Copies data between host and device.
cudaError_t cudaMemcpy2D (void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind)
 Copies data between host and device.
cudaError_t cudaMemcpy2DArrayToArray (struct cudaArray *dst, size_t wOffsetDst, size_t hOffsetDst, const struct cudaArray *src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, enum cudaMemcpyKind kind)
 Copies data between host and device.
cudaError_t cudaMemcpy2DAsync (void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream)
 Copies data between host and device.
cudaError_t cudaMemcpy2DFromArray (void *dst, size_t dpitch, const struct cudaArray *src, size_t wOffset, size_t hOffset, size_t width, size_t height, enum cudaMemcpyKind kind)
 Copies data between host and device.
cudaError_t cudaMemcpy2DFromArrayAsync (void *dst, size_t dpitch, const struct cudaArray *src, size_t wOffset, size_t hOffset, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream)
 Copies data between host and device.
cudaError_t cudaMemcpy2DToArray (struct cudaArray *dst, size_t wOffset, size_t hOffset, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind)
 Copies data between host and device.
cudaError_t cudaMemcpy2DToArrayAsync (struct cudaArray *dst, size_t wOffset, size_t hOffset, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream)
 Copies data between host and device.
cudaError_t cudaMemcpy3D (const struct cudaMemcpy3DParms *p)
 Copies data between 3D objects.
cudaError_t cudaMemcpy3DAsync (const struct cudaMemcpy3DParms *p, cudaStream_t stream)
 Copies data between 3D objects.
cudaError_t cudaMemcpyArrayToArray (struct cudaArray *dst, size_t wOffsetDst, size_t hOffsetDst, const struct cudaArray *src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, enum cudaMemcpyKind kind)
 Copies data between host and device.
cudaError_t cudaMemcpyAsync (void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream)
 Copies data between host and device.
cudaError_t cudaMemcpyFromArray (void *dst, const struct cudaArray *src, size_t wOffset, size_t hOffset, size_t count, enum cudaMemcpyKind kind)
 Copies data between host and device.
cudaError_t cudaMemcpyFromArrayAsync (void *dst, const struct cudaArray *src, size_t wOffset, size_t hOffset, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream)
 Copies data between host and device.
cudaError_t cudaMemcpyFromSymbol (void *dst, const char *symbol, size_t count, size_t offset, enum cudaMemcpyKind kind)
 Copies data from the given symbol on the device.
cudaError_t cudaMemcpyFromSymbolAsync (void *dst, const char *symbol, size_t count, size_t offset, enum cudaMemcpyKind kind, cudaStream_t stream)
 Copies data from the given symbol on the device.
cudaError_t cudaMemcpyToArray (struct cudaArray *dst, size_t wOffset, size_t hOffset, const void *src, size_t count, enum cudaMemcpyKind kind)
 Copies data between host and device.
cudaError_t cudaMemcpyToArrayAsync (struct cudaArray *dst, size_t wOffset, size_t hOffset, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream)
 Copies data between host and device.
cudaError_t cudaMemcpyToSymbol (const char *symbol, const void *src, size_t count, size_t offset, enum cudaMemcpyKind kind)
 Copies data to the given symbol on the device.
cudaError_t cudaMemcpyToSymbolAsync (const char *symbol, const void *src, size_t count, size_t offset, enum cudaMemcpyKind kind, cudaStream_t stream)
 Copies data to the given symbol on the device.
cudaError_t cudaMemGetInfo (size_t *free, size_t *total)
 Gets free and total device memory.
cudaError_t cudaMemset (void *devPtr, int value, size_t count)
 Initializes or sets device memory to a value.
cudaError_t cudaMemset2D (void *devPtr, size_t pitch, int value, size_t width, size_t height)
 Initializes or sets device memory to a value.
cudaError_t cudaMemset3D (struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent)
 Initializes or sets device memory to a value.
struct cudaExtent make_cudaExtent (size_t w, size_t h, size_t d)
 Returns a cudaExtent based on input parameters.
struct cudaPitchedPtr make_cudaPitchedPtr (void *d, size_t p, size_t xsz, size_t ysz)
 Returns a cudaPitchedPtr based on input parameters.
struct cudaPos make_cudaPos (size_t x, size_t y, size_t z)
 Returns a cudaPos based on input parameters.

Detailed Description

This section describes the memory management functions of the CUDA runtime application programming interface.

Generated by Doxygen for NVIDIA CUDA Library  NVIDIA