|
|
Count the number of non-zero elements in the input. More...
Functions | |
| AFAPI array | count (const array &in, const int dim=-1) |
| C++ Interface for counting non-zero values in an array. More... | |
| template<typename T > | |
| T | count (const array &in) |
| C++ Interface for counting total number of non-zero values in an array. More... | |
| AFAPI af_err | af_count (af_array *out, const af_array in, const int dim) |
| C Interface for counting non-zero values in an array. More... | |
| AFAPI af_err | af_count_all (double *real, double *imag, const af_array in) |
| C Interface for counting total number of non-zero values in an array. More... | |
Count the number of non-zero elements in the input.
Return type is u32 for all input types
This function performs the operation across all batches present in the input simultaneously.
C Interface for counting non-zero values in an array.
| [out] | out | will contain the number of non-zero values in in along dim |
| [in] | in | is the input array |
| [in] | dim | The dimension along which the non-zero values are counted |
C Interface for counting total number of non-zero values in an array.
| [out] | real | will contain the number of non-zero values in in. |
| [out] | imag | is always set to 0. |
| [in] | in | is the input array |
imag is always set to 0. C++ Interface for counting non-zero values in an array.
| [in] | in | is the input array |
| [in] | dim | The dimension along which the the number of non-zero values are counted |
dim dim is -1 by default. -1 denotes the first non-singleton dimension. | T af::count | ( | const array & | in | ) |
C++ Interface for counting total number of non-zero values in an array.
| [in] | in | is the input array |
in