| 380 | INSTANTIATE(sparse) |
| 381 | |
| 382 | #undef INSTANTIATE |
| 383 | |
| 384 | static array::array_proxy gen_indexing(const array &ref, const index &s0, |
| 385 | const index &s1, const index &s2, |
| 386 | const index &s3, bool linear = false) { |
| 387 | ref.eval(); |
| 388 | af_index_t inds[AF_MAX_DIMS]; |
| 389 | inds[0] = s0.get(); |
| 390 | inds[1] = s1.get(); |
| 391 | inds[2] = s2.get(); |
| 392 | inds[3] = s3.get(); |
| 393 | |
| 394 | return array::array_proxy(const_cast<array &>(ref), inds, linear); |
| 395 | } |
| 396 | |
| 397 | array::array_proxy array::operator()(const index &s0) { |
| 398 | return const_cast<const array *>(this)->operator()(s0); |