the C interface for count More...

All Elements

Parameters
[out]countScalar and on host
[in]numelThe number of elements in the vector.
[in]matThe input stream
afError af_nnz_vector_S (unsigned *count, unsigned numel, const float *mat)
 Number of non zero elements in a single precision stream. More...
 
afError af_nnz_vector_B (unsigned *count, unsigned numel, const bool *mat)
 Number of non zero elements in a boolean (unsigned char) stream. More...
 
afError af_nnz_vector_D (unsigned *count, unsigned numel, const double *mat)
 Number of non zero elements in a double precision stream. More...
 

Along a Dimension

Parameters
[out]countvector and on device
[in]numelThe number of elements in the vector.
[in]matThe input stream
[in]batchThe number of input tiles.
afError af_nnz_S (unsigned *count, unsigned numel, const float *mat, unsigned batch)
 Number of non zero elements in a single precision stream. More...
 
afError af_nnz_B (unsigned *count, unsigned numel, const bool *mat, unsigned batch)
 Number of non zero elements in a boolean (unsigned char) stream. More...
 
afError af_nnz_D (unsigned *count, unsigned numel, const double *mat, unsigned batch)
 Number of non zero elements in a double precision stream. More...
 

Detailed Description

the C interface for count

Returns the number of the non-zero values in an set of elements

Function Documentation

afError af_nnz_vector_S ( unsigned *  count,
unsigned  numel,
const float *  mat 
)

Number of non zero elements in a single precision stream.

afError af_nnz_vector_B ( unsigned *  count,
unsigned  numel,
const bool *  mat 
)

Number of non zero elements in a boolean (unsigned char) stream.

afError af_nnz_vector_D ( unsigned *  count,
unsigned  numel,
const double *  mat 
)

Number of non zero elements in a double precision stream.

afError af_nnz_S ( unsigned *  count,
unsigned  numel,
const float *  mat,
unsigned  batch 
)

Number of non zero elements in a single precision stream.

afError af_nnz_B ( unsigned *  count,
unsigned  numel,
const bool *  mat,
unsigned  batch 
)

Number of non zero elements in a boolean (unsigned char) stream.

afError af_nnz_D ( unsigned *  count,
unsigned  numel,
const double *  mat,
unsigned  batch 
)

Number of non zero elements in a double precision stream.