| 474 | } |
| 475 | |
| 476 | std::vector<std::size_t> shape::multi(std::size_t idx) const |
| 477 | { |
| 478 | assert(idx < elements()); |
| 479 | std::vector<std::size_t> indices(lens().size()); |
| 480 | multi_copy(idx, indices.data(), indices.data() + lens().size()); |
| 481 | return indices; |
| 482 | } |
| 483 | |
| 484 | void shape::multi_copy(std::size_t idx, std::size_t* start, const std::size_t* end) const |
| 485 | { |