Skip to main content

cudaFreeArray

Function cudaFreeArray 

Source
pub unsafe extern "C" fn cudaFreeArray(
    array: cudaArray_t,
) -> cudaError_t
Expand description

Frees an array on the device.

Frees the CUDA array array, which must have been returned by a previous call to cudaMallocArray. If devPtr is 0, no operation is performed.

Note that this function may also return error codes from previous, asynchronous launches.

Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.

Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.

§Parameters

  • array: Pointer to array to free

§Return value

See also: cudaMalloc, cudaMallocPitch, cudaFree, cudaMallocArray, cudaMallocHost (C API), cudaFreeHost, cudaHostAlloc, cuArrayDestroy.