Function rcudnn_sys::cudaFree[][src]

pub unsafe extern "C" fn cudaFree(devPtr: *mut c_void) -> cudaError_t
Expand description

\brief Frees memory on the device

Frees the memory space pointed to by \p devPtr, which must have been returned by a previous call to ::cudaMalloc() or ::cudaMallocPitch(). Otherwise, or if ::cudaFree(\p devPtr) has already been called before, an error is returned. If \p devPtr is 0, no operation is performed. ::cudaFree() returns ::cudaErrorValue in case of failure.

The device version of ::cudaFree cannot be used with a \p *devPtr allocated using the host API, and vice versa.

\param devPtr - Device pointer to memory to free

\return ::cudaSuccess, ::cudaErrorInvalidValue \notefnerr \note_init_rt \note_callback

\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaMallocArray, ::cudaFreeArray, \ref ::cudaMallocHost(void**, size_t) “cudaMallocHost (C API)”, ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaHostAlloc, ::cuMemFree