Stride Tools#
-
template<typename T>
struct formatter<librapid::Stride<T>> : public fmt::formatter<librapid::Shape> - #include <strideTools.hpp>
Public Functions
-
template<typename FormatContext>
inline auto format(const librapid::Stride<T> &stride, FormatContext &ctx)
-
template<typename FormatContext>
-
namespace librapid
-
template<typename ShapeType_>
class Stride - #include <strideTools.hpp>
A Stride is a vector of integers that describes the distance between elements in each dimension of an ArrayContainer object. This can be used to access elements in a non-trivial order, or to access a sub-array of an ArrayContainer object. The Stride class inherits from the Shape class.
See also
- Template Parameters
Public Types
-
using ShapeType = ShapeType_
-
using IndexType = typename std::decay_t<decltype(std::declval<ShapeType>()[0])>
Public Functions
-
Stride() = default
-
Stride(const ShapeType &shape)
-
Stride(const Stride &other) = default
-
Stride(Stride &&other) noexcept = default
-
auto operator[](size_t index) const -> IndexType
-
auto operator[](size_t index) -> IndexType&
-
inline auto ndim() const
-
auto data() const -> const ShapeType&
-
auto data() -> ShapeType&
Public Static Attributes
-
static constexpr size_t MaxDimensions = ShapeType::MaxDimensions
Protected Attributes
-
ShapeType m_data
-
namespace typetraits
-
template<typename ShapeType_>