| 322 | } |
| 323 | |
| 324 | af_err af_create_indexers(af_index_t** indexers) { |
| 325 | try { |
| 326 | auto* out = new af_index_t[AF_MAX_DIMS]; |
| 327 | for (int i = 0; i < AF_MAX_DIMS; ++i) { |
| 328 | out[i].idx.seq = af_span; |
| 329 | out[i].isSeq = true; |
| 330 | out[i].isBatch = false; |
| 331 | } |
| 332 | std::swap(*indexers, out); |
| 333 | } |
| 334 | CATCHALL; |
| 335 | return AF_SUCCESS; |
| 336 | } |
| 337 | |
| 338 | af_err af_set_array_indexer(af_index_t* indexer, const af_array idx, |
| 339 | const dim_t dim) { |