A high-performance general-purpose compute library

Returns the number of non zero elements in the sparse array. More...

Functions

AFAPI dim_t sparseGetNNZ (const array in)
 
AFAPI af_err af_sparse_get_nnz (dim_t *out, const af_array in)
 

Detailed Description

Returns the number of non zero elements in the sparse array.

This is always equal to the size of the values array.


Function Documentation

◆ af_sparse_get_nnz()

AFAPI af_err af_sparse_get_nnz ( dim_t out,
const af_array  in 
)
Parameters
[out]outthe number of non-zero elements of the sparse array
[in]inis the input sparse matrix
Returns
AF_SUCCESS if the execution completes properly

◆ sparseGetNNZ()

AFAPI dim_t sparseGetNNZ ( const array  in)
Parameters
[in]inis the input sparse matrix
Returns
the number of non-zero elements of the sparse array