Skip to main content

cuArrayGetSparseProperties

Function cuArrayGetSparseProperties 

Source
pub unsafe extern "C" fn cuArrayGetSparseProperties(
    sparseProperties: *mut CUDA_ARRAY_SPARSE_PROPERTIES,
    array: CUarray,
) -> CUresult
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 CUDA_ARRAY3D_SPARSE cudaError_enum::CUDA_ERROR_INVALID_VALUE will be returned.

If the returned value in CUDA_ARRAY_SPARSE_PROPERTIES::flags contains CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL, then CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize represents the total size of the array. Otherwise, it will be zero. Also, the returned value in CUDA_ARRAY_SPARSE_PROPERTIES::miptailFirstLevel is always zero. Note that the array must have been allocated using cuArrayCreate or cuArray3DCreate. For CUDA arrays obtained using cuMipmappedArrayGetLevel, cudaError_enum::CUDA_ERROR_INVALID_VALUE will be returned. Instead, cuMipmappedArrayGetSparseProperties must be used to obtain the sparse properties of the entire CUDA mipmapped array to which array belongs to.

§Parameters

  • sparseProperties: Pointer to CUDA_ARRAY_SPARSE_PROPERTIES.
  • array: CUDA array to get the sparse properties of.

§Return value

See also: cuMipmappedArrayGetSparseProperties, cuMemMapArrayAsync.