9#include "subscript_tags.hpp"
12#include "../platform/attributes.hpp"
13#include "../platform/cpp_explicit.hpp"
48 REXLIB_NO_EXPLICIT REXLIB_CONSTEXPR
55 REXLIB_NO_EXPLICIT REXLIB_CONSTEXPR
64 REXLIB_NO_EXPLICIT REXLIB_CONSTEXPR
73 REXLIB_NO_EXPLICIT REXLIB_CONSTEXPR
113 template <typename T>
114 friend std::basic_ostream<T>& operator<<(
115 std::basic_ostream<T>& os,
119 os <<
"dynamic_subscript(";
131 using storage_type = std::array<std::ptrdiff_t, 3>;
138 :
public std::logic_error
141 using std::logic_error::logic_error;
165#include "dynamic_subscript.inl"
Container for multidimensional numeric data.
Definition array.hpp:31
Definition dynamic_subscript.hpp:139
Class describing a runtime defined subscript.
Definition dynamic_subscript.hpp:30
REXLIB_NO_EXPLICIT REXLIB_CONSTEXPR dynamic_subscript(new_axis_tag) noexcept
Construct a dynamic_subscript holding a new_axis_tag.
std::ptrdiff_t get_index() const
Get the index.
subscript_type
Enumeration holding the types this object can hold.
Definition dynamic_subscript.hpp:37
REXLIB_NO_EXPLICIT REXLIB_CONSTEXPR dynamic_subscript(ellipsis_tag) noexcept
Construct a dynamic_subscript holding an ellipsis_tag.
REXLIB_NO_EXPLICIT REXLIB_CONSTEXPR dynamic_subscript(std::ptrdiff_t index) noexcept
Construct a dynamic_subscript holding an index.
REXLIB_CONSTEXPR subscript_type get_subscript_type() const noexcept
Get the subscript type held by this object.
slice get_slice() const
Get the slice.
REXLIB_NO_EXPLICIT REXLIB_CONSTEXPR dynamic_subscript(const slice &slice) noexcept
Construct a dynamic_subscript holding a slice.
Class representing an slice of an array.
Definition slice.hpp:22
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
REXLIB_CONSTEXPR ellipsis_tag ellipsis() noexcept
Construct an ellipsis_tag.
REXLIB_CONSTEXPR new_axis_tag new_axis() noexcept
Construct a new_axis_tag.
REXLIB_CONSTEXPR auto visit(F &&func, const dynamic_subscript &subscript)
Invoke the provided function with the value held by the dynamic subscript.
Tag to express the consumption of an arbitrary amount of axes until no slack is left on the right-han...
Definition subscript_tags.hpp:22
Tag to express the creation a new axis of size one.
Definition subscript_tags.hpp:58