ArrayFire: where
Locate the indices of the non-zero values in an array. More...
Functions | |
| AFAPI array | where (const array &in) |
| C++ Interface to locate the indices of the non-zero values in an array. More... | |
| AFAPI af_err | af_where (af_array *idx, const af_array in) |
| C Interface to locate the indices of the non-zero values in an array. More... | |
Locate the indices of the non-zero values in an array.
Output type is u32.
The locations are provided by flattening the input into a linear array.
◆ af_where()
C Interface to locate the indices of the non-zero values in an array.
- Parameters
-
[out] idx linear indices where inis non-zero[in] in input array
- Returns
- AF_SUCCESS, if function returns successfully, else an af_err code is given
C++ Interface to locate the indices of the non-zero values in an array.
- Parameters
- Returns
- linear indices where
inis non-zero