cuda.bindings._v2.driver.array_get_sparse_properties#
- cuda.bindings._v2.driver.array_get_sparse_properties(intptr_t array)#
Returns the layout properties of a sparse CUDA array.
Returns the layout properties of a sparse CUDA array in
sparse_propertiesIf the CUDA array is not allocated with flagCUDA_ARRAY3D_SPARSECUDA_ERROR_INVALID_VALUEwill be returned. If the returned value inCUDA_ARRAY_SPARSE_PROPERTIES.flagscontainsCU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL, thenCUDA_ARRAY_SPARSE_PROPERTIES.miptailSizerepresents the total size of the array. Otherwise, it will be zero. Also, the returned value inCUDA_ARRAY_SPARSE_PROPERTIES.miptailFirstLevelis always zero. Note that thearraymust have been allocated usingcuArrayCreateorcuArray3DCreate. For CUDA arrays obtained usingcuMipmappedArrayGetLevel,CUDA_ERROR_INVALID_VALUEwill be returned. Instead,cuMipmappedArrayGetSparsePropertiesmust be used to obtain the sparse properties of the entire CUDA mipmapped array to whicharraybelongs to.- Parameters:
array (intptr_t) – CUDA array to get the sparse properties of.
- Returns:
- Pointer to
CUDA_ARRAY_SPARSE_PROPERTIES.
- Return type:
See also
cuArrayGetSparseProperties