Function rcudnn_sys::cudaMalloc
[−]
[src]
pub unsafe extern "C" fn cudaMalloc(
devPtr: *mut *mut c_void,
size: usize
) -> cudaError_t
\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, ::cudaErrorMemoryAllocation
\sa ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray, ::cudaMalloc3D, ::cudaMalloc3DArray, \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", ::cudaFreeHost, ::cudaHostAlloc