Calculates the iterator offsets. These are different from the original offsets because they define the stride from the end of the last element in the previous dimension to the first element on the next dimension.
| 110 | /// the stride from the end of the last element in the previous dimension |
| 111 | /// to the first element on the next dimension. |
| 112 | static dim4 calcIteratorStrides(const dim4& dims, |
| 113 | const dim4& stride) noexcept { |
| 114 | return dim4(stride[0], stride[1] - (stride[0] * dims[0]), |
| 115 | stride[2] - (stride[1] * dims[1]), |
| 116 | stride[3] - (stride[2] * dims[2])); |
| 117 | } |
| 118 | }; |
| 119 | |
| 120 | template<typename T> |