Skip to main content

cudaArrayGetSparseProperties

Function cudaArrayGetSparseProperties 

Source
pub unsafe extern "C" fn cudaArrayGetSparseProperties(
    sparseProperties: *mut cudaArraySparseProperties,
    array: cudaArray_t,
) -> cudaError_t
Expand description

Returns the layout properties of a sparse CUDA array.

Returns the layout properties of a sparse CUDA array in sparseProperties. If the CUDA array is not allocated with flag cudaArraySparse cudaError_t::CUDA_ERROR_INVALID_VALUE will be returned.

If the returned value in cudaArraySparseProperties::flags contains cudaArraySparsePropertiesSingleMipTail, then cudaArraySparseProperties::miptailSize represents the total size of the array. Otherwise, it will be zero. Also, the returned value in cudaArraySparseProperties::miptailFirstLevel is always zero. Note that the array must have been allocated using cudaMallocArray or cudaMalloc3DArray. For CUDA arrays obtained using cudaMipmappedArrayGetLevel, cudaError_t::CUDA_ERROR_INVALID_VALUE will be returned. Instead, cudaMipmappedArrayGetSparseProperties must be used to obtain the sparse properties of the entire CUDA mipmapped array to which array belongs to.

§Parameters

§Return value

See also: cudaMipmappedArrayGetSparseProperties, cuMemMapArrayAsync.