Do more. Code less. Free software for GPU computing.
<scroll to top>

Count_ptr

Device pointer interface: Find the number of non zero elements.

Parameters:
[out]countScalar and on host
[in]numelThe number of elements in the vector.
[in]matThe input 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.
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.

Function Documentation

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.

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.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines