|
|
| array | where (const array &input) |
| indices where nonzero (zero-based indexing) | |
| void | where (array &row, array &column, const array &input) |
row and column indices of nonzero elements in input | |
| unsigned | count (const array &input) |
count nonzero elements in input | |
| array af::where | ( | const array & | input | ) |
| void af::where | ( | array & | row, |
| array & | column, | ||
| const array & | input | ||
| ) |
| unsigned af::count | ( | const array & | input | ) |
count nonzero elements in input
float ha[] = { 0, 1, 0, 3, -3, 0.2, 0 }; array a(7,ha); unsigned nnz = count(a); printf("nonzero: %d\n", nnz); // 'nonzero: 4'
| [in] | input |
input