MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / calcIteratorStrides

Method calcIteratorStrides

src/backend/cpu/ParamIterator.hpp:112–117  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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
120template<typename T>

Callers

nothing calls this directly

Calls 1

dim4Class · 0.70

Tested by

no test coverage detected