43 using reference =
typename std::iterator_traits<pointer>::reference;
52 template <
typename ContiguousIterator>
54 : ptr_(&(*first)), n_(n) {}
56 template <
typename ContiguousIterator>
57 constexpr
global_span(ContiguousIterator first, ContiguousIterator last)
58 : ptr_(&(*first)), n_(last - first) {}
68 : ptr_(s.data()), n_(s.size()) { static_assert(
sizeof(U) ==
sizeof(T)); }
93 constexpr
bool empty() const noexcept {
return n_ == 0; }
96 assert(offset + count <= n_);
97 return this_t{ptr_ + offset, count};
105 template <
typename T>
110 template <
typename T>
115 template <
typename T>
120 template <
typename T>
Global span to represent a view of a global memory range.
Definition: global_span.hpp:33
constexpr const_iterator cend() const noexcept
Definition: global_span.hpp:80
constexpr global_span(R &&r)
Definition: global_span.hpp:61
constexpr global_span() noexcept
Definition: global_span.hpp:50
constexpr iterator begin() const noexcept
Definition: global_span.hpp:76
constexpr const_iterator cbegin() const noexcept
Definition: global_span.hpp:79
ori::global_ptr< element_type > pointer
Definition: global_span.hpp:40
constexpr reverse_iterator rbegin() const noexcept
Definition: global_span.hpp:82
typename std::iterator_traits< pointer >::reference reference
Definition: global_span.hpp:43
constexpr const_reverse_iterator crend() const noexcept
Definition: global_span.hpp:86
std::size_t size_type
Definition: global_span.hpp:39
constexpr global_span(ContiguousIterator first, ContiguousIterator last)
Definition: global_span.hpp:57
T element_type
Definition: global_span.hpp:37
constexpr global_span(ContiguousIterator first, size_type n)
Definition: global_span.hpp:53
constexpr reference operator[](size_type i) const
Definition: global_span.hpp:88
constexpr const_reverse_iterator crbegin() const noexcept
Definition: global_span.hpp:85
constexpr size_type size() const noexcept
Definition: global_span.hpp:74
std::reverse_iterator< iterator > reverse_iterator
Definition: global_span.hpp:47
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: global_span.hpp:48
std::remove_cv_t< element_type > value_type
Definition: global_span.hpp:38
constexpr bool empty() const noexcept
Definition: global_span.hpp:93
typename std::iterator_traits< const_pointer >::reference const_reference
Definition: global_span.hpp:44
constexpr global_span(const global_span< U > &s) noexcept
Definition: global_span.hpp:67
constexpr this_t & operator=(const this_t &other) noexcept=default
constexpr iterator end() const noexcept
Definition: global_span.hpp:77
constexpr reference front() const
Definition: global_span.hpp:90
constexpr reference back() const
Definition: global_span.hpp:91
constexpr this_t subspan(size_type offset, size_type count) const
Definition: global_span.hpp:95
constexpr global_span(const this_t &other) noexcept=default
typename std::iterator_traits< pointer >::difference_type difference_type
Definition: global_span.hpp:42
constexpr pointer data() const noexcept
Definition: global_span.hpp:73
constexpr reverse_iterator rend() const noexcept
Definition: global_span.hpp:83
ori::global_ptr< std::add_const_t< element_type > > const_pointer
Definition: global_span.hpp:41
constexpr bool is_global_ptr_v
Definition: global_ptr.hpp:411
Definition: allocator.hpp:16
global_reverse_iterator< global_iterator< T, Mode > > make_reverse_iterator(ori::global_ptr< T > gptr, Mode mode)
Make a reverse iterator for global memory.
Definition: global_iterator.hpp:333
constexpr auto begin(const checkout_span< T, Mode > &cs) noexcept
Definition: checkout_span.hpp:183
constexpr auto data(const checkout_span< T, Mode > &cs) noexcept
Definition: checkout_span.hpp:173
constexpr auto size(const checkout_span< T, Mode > &cs) noexcept
Definition: checkout_span.hpp:178
constexpr auto end(const checkout_span< T, Mode > &cs) noexcept
Definition: checkout_span.hpp:188