Function rcudnn::cudaMalloc [−][src]
Expand description
\brief Allocate memory on the device
Allocates \p size bytes of linear memory on the device and returns in \p *devPtr a pointer to the allocated memory. The allocated memory is suitably aligned for any kind of variable. The memory is not cleared. ::cudaMalloc() returns ::cudaErrorMemoryAllocation 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 - Pointer to allocated device memory \param size - Requested allocation size in bytes
\return ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorMemoryAllocation \notefnerr \note_init_rt \note_callback
\sa ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray, ::cudaMalloc3D, ::cudaMalloc3DArray, \ref ::cudaMallocHost(void**, size_t) “cudaMallocHost (C API)”, ::cudaFreeHost, ::cudaHostAlloc, ::cuMemAlloc