| 350 | |
| 351 | template<typename T> |
| 352 | inline void applyShifts(std::array<int, 4> &shifts, nonstd::span<T> dims) { |
| 353 | std::array<T, 4> out; |
| 354 | for (size_t i = 0; i < shifts.size(); i++) { out[i] = dims[shifts[i]]; } |
| 355 | std::copy(begin(out), std::end(out), std::begin(dims)); |
| 356 | } |
| 357 | |
| 358 | template<typename ArrayT> |
| 359 | inline std::array<int, 4> compressArray(ArrayT dims) { |