5#include <vitrio/array/numerical_type.hpp>
6#include <vitrio/export.hpp>
7#include <vitrio/span.hpp>
57 std::vector<std::
size_t> extents,
58 std::vector<std::ptrdiff_t> strides,
59 std::ptrdiff_t offset,
60 numerical_type data_type
111 friend
bool operator==(
117 lhs.m_offset == rhs.m_offset &&
118 lhs.m_data_type == rhs.m_data_type &&
119 lhs.m_extents == rhs.m_extents &&
120 lhs.m_strides == rhs.m_strides;
123 friend bool operator!=(
128 return !(lhs == rhs);
132 std::vector<std::size_t> m_extents;
133 std::vector<std::ptrdiff_t> m_strides;
134 std::ptrdiff_t m_offset;
135 numerical_type m_data_type;
152array_descriptor make_contiguous_array_descriptor(
153 span<const std::size_t> extents,
154 numerical_type data_type
165bool is_initialized(
const array_descriptor &descriptor)
noexcept;
How a block of memory is read as a multidimensional array.
Definition array_descriptor.hpp:31
span< const std::size_t > get_extents() const noexcept
Get the number of elements along each axis.
span< const std::ptrdiff_t > get_strides() const noexcept
Get the distance between consecutive elements along each axis.
numerical_type get_data_type() const noexcept
Get the type of the elements.
array_descriptor() noexcept
Construct a descriptor that describes nothing.
std::ptrdiff_t get_offset() const noexcept
Get the position of the element at the origin.
A view of a contiguous sequence of elements.
Definition span.hpp:29