lookup values on array based on sequences
More...
|
AFAPI array | lookup (const array &in, const array &idx, const int dim=-1) |
| Lookup the values of input array based on index. More...
|
|
AFAPI void | copy (array &dst, const array &src, const index &idx0, const index &idx1=span, const index &idx2=span, const index &idx3=span) |
| Copy the values of an input array based on index. More...
|
|
AFAPI af_err | af_index (af_array *out, const af_array in, const unsigned ndims, const af_seq *const index) |
| Lookup the values of input array based on sequences. More...
|
|
AFAPI af_err | af_lookup (af_array *out, const af_array in, const af_array indices, const unsigned dim) |
| Lookup the values of input array based on index. More...
|
|
AFAPI af_err | af_index_gen (af_array *out, const af_array in, const dim_t ndims, const af_index_t *indices) |
| Indexing an array using af_seq, or af_array. More...
|
|
lookup values on array based on sequences
Lookup the values of input array based on sequences.
- Parameters
-
[out] | out | output array containing values indexed by the sequences |
[in] | in | is the input array |
[in] | ndims | is the number of sequences provided |
[in] | index | is an array of sequences |
Indexing an array using af_seq, or af_array.
Generalized indexing function that accepts either af_array or af_seq along a dimension to index the input array and create the corresponding output array
- Parameters
-
[out] | out | output array containing values at indexed by the sequences |
[in] | in | is the input array |
[in] | ndims | is the number of af_index_t provided |
[in] | indices | is an array of af_index_t objects |
Lookup the values of input array based on index.
- Parameters
-
[out] | out | output array containing values at locations specified by index |
[in] | in | is input lookup array |
[in] | indices | is lookup indices |
[in] | dim | specifies the dimension for indexing |
Copy the values of an input array based on index.
- Parameters
-
[out] | dst | The destination array |
[in] | src | The source array |
[in] | idx0 | The first index |
[in] | idx1 | The second index (defaults to af::span) |
[in] | idx2 | The third index (defaults to af::span) |
[in] | idx3 | The fourth index (defaults to af::span) |
AFAPI array af::lookup |
( |
const array & |
in, |
|
|
const array & |
idx, |
|
|
const int |
dim = -1 |
|
) |
| |
Lookup the values of input array based on index.
- Parameters
-
[in] | in | is input lookup array |
[in] | idx | is lookup indices |
[in] | dim | specifies the dimension for indexing |
- Returns
- an array containing values at locations specified by
index
- Examples:
- machine_learning/bagging.cpp, and machine_learning/naive_bayes.cpp.