28 static_assert(!std::is_function_v<T>);
64 std::reverse_iterator<iterator>;
74 template <
typename It>
86 template <
typename It>
98 template <
typename Range>
125 return std::reverse_iterator{
_ptr +
_size};
130 return std::reverse_iterator{
_ptr};
193template <
typename Range>
196template <
typename It>
199template <
typename It>
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
A span modeled after C++20's std::span.
Definition span.hpp:52
constexpr reverse_iterator rbegin() const noexcept
Get a reverse iterator pointing to the first element of the reversed span.
Definition span.hpp:124
std::reverse_iterator< iterator > reverse_iterator
The type of a reverse iterator to a single elements in the span.
Definition span.hpp:63
constexpr Span() noexcept
Default constructor for an empty span. The pointer is set to nullptr and the size to 0.
Definition span.hpp:67
constexpr Span(Range &&range)
Constructs a span that is a view over the range range. The resulting span has data() == std::data(ran...
Definition span.hpp:99
T * pointer
The type of a pointer to a single elements in the span.
Definition span.hpp:58
constexpr reference front() const noexcept
Access the first element of the span.
Definition span.hpp:134
constexpr iterator end() const noexcept
Get iterator pointing past the last element of the span.
Definition span.hpp:119
constexpr reverse_iterator rend() const noexcept
Get a reverse iterator pointing to the last element of the reversed span.
Definition span.hpp:129
pointer _ptr
Pointer to the data referred to by Span.
Definition span.hpp:187
std::remove_cv_t< T > value_type
Value type; i.e. T with volatile and const qualifiers removed.
Definition span.hpp:55
constexpr pointer data() const noexcept
Get access to the underlying memory.
Definition span.hpp:105
size_type _size
Number of elements of type T referred to by Span.
Definition span.hpp:188
constexpr size_type size_bytes() const noexcept
Return the number of bytes occupied by the elements in the Span.
Definition span.hpp:158
constexpr bool empty() const noexcept
Check if the Span is empty.
Definition span.hpp:165
constexpr iterator begin() const noexcept
Get iterator pointing to the first element of the span.
Definition span.hpp:112
constexpr Span(It first, size_type size)
Constructor for a span from an iterator of type It and a size.
Definition span.hpp:75
constexpr size_type size() const noexcept
Returns the number of elements in the Span.
Definition span.hpp:151
constexpr Span last(size_type count) const
Obtain a span that is a view over the last count elements of the span.
Definition span.hpp:175
constexpr reference back() const noexcept
Access the last element of the span.
Definition span.hpp:139
T element_type
Element type; i.e. T.
Definition span.hpp:54
constexpr Span(It first, It last)
Constructs a span that is a view over the range [first, last); the resulting span has data() == kampi...
Definition span.hpp:87
constexpr Span first(size_type count) const
Obtain a span that is a view over the first count elements of the span.
Definition span.hpp:170
constexpr Span subspan(size_type offset, size_type count) const
Obtain a span that is a view over the span elements in the range [offset, offset + count).
Definition span.hpp:182
constexpr reference operator[](size_type idx) const noexcept
Access the element at index idx.
Definition span.hpp:144
pointer iterator
The type of an iterator to a single elements in the span.
Definition span.hpp:62
std::ptrdiff_t difference_type
The type used for the difference between two elements in the span.
Definition span.hpp:57
T & reference
The type of a reference to a single elements in the span.
Definition span.hpp:60
Internal namespace marking the code that is not user-facing.
Definition collectives_helpers.hpp:20
constexpr T * to_address(T *p) noexcept
Obtain the address represented by p. Modelled after C++20's std::to_address. See https://en....
Definition span.hpp:27