| 28 | } |
| 29 | |
| 30 | int64_t checked_product(std::initializer_list<int64_t> dims) { |
| 31 | int64_t result = 1; |
| 32 | for (const int64_t dim : dims) { |
| 33 | result *= dim; |
| 34 | } |
| 35 | return result; |
| 36 | } |
| 37 | |
| 38 | int64_t reflect_index(int64_t index, int64_t length) { |
| 39 | while (index < 0 || index >= length) { |
no outgoing calls
no test coverage detected