6#include "memory/byte.hpp"
8#include "platform/constexpr.hpp"
22REXLIB_CONSTEXPR
auto dynamic_extent = std::numeric_limits<std::size_t>::max();
33template <
typename T, std::
size_t S>
37 static REXLIB_CONST_CONSTEXPR std::size_t size =
S;
73 static REXLIB_CONST_CONSTEXPR
T* data =
nullptr;
74 static REXLIB_CONST_CONSTEXPR std::size_t size = 0;
97template <
typename T, std::
size_t Extent = dynamic_extent>
104 using value_type =
typename std::remove_cv<element_type>::type;
105 using size_type = std::size_t;
106 using difference_type = std::ptrdiff_t;
112 using reverse_iterator = std::reverse_iterator<iterator>;
114 static constexpr size_type extent =
Extent;
140 template <std::
size_t Extent2>
151 template <std::
size_t Extent2>
Macro definitions for supported attributes.
#define REXLIB_NODISCARD
Indicates that the return value should be used.
Definition attributes.hpp:76
Container for multidimensional numeric data.
Definition array.hpp:31
Represents a non-owning area of contiguous memory.
Definition span.hpp:99
REXLIB_CONSTEXPR iterator end() const noexcept
Get an iterator to the past-the-end item.
REXLIB_CONSTEXPR span(pointer first, pointer last)
Construct from a pointer pair.
REXLIB_CONSTEXPR reverse_iterator rend() const noexcept
Get a reverse iterator to the before-first item.
REXLIB_CONSTEXPR reference back() const noexcept
Obtain a reference to the last object.
REXLIB_CONSTEXPR span(const span< value_type, Extent2 > &other)
Construct span from another span.
REXLIB_CONSTEXPR pointer data() const noexcept
Get a pointer to the referenced data.
REXLIB_CONSTEXPR size_type size() const noexcept
Get the number of referenced objects.
REXLIB_CONSTEXPR size_type size_bytes() const noexcept
Get the size in bytes of the referenced objects.
REXLIB_CONSTEXPR reverse_iterator rbegin() const noexcept
Get a reverse iterator to the last item.
REXLIB_CONSTEXPR iterator begin() const noexcept
Get an iterator to the first item.
REXLIB_CONSTEXPR span(pointer ptr, size_type count)
Construct from a pointer and size.
REXLIB_CONSTEXPR span(const span< const value_type, Extent2 > &other)
Construct span from another span.
REXLIB_CONSTEXPR reference front() const noexcept
Obtain a reference to the first object.
REXLIB_NODISCARD REXLIB_CONSTEXPR bool empty() const noexcept
Check if no objects are references.
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
REXLIB_CONSTEXPR auto dynamic_extent
Constant representing dynamic size of an array.
Definition span.hpp:22
byte * as_bytes(T *ptr) noexcept
View an object as the bytes it is stored in.
Storage for the span object.
Definition span.hpp:35