Global span to represent a view of a global memory range. More...
#include <global_span.hpp>
Public Types | |
using | element_type = T |
using | value_type = std::remove_cv_t< element_type > |
using | size_type = std::size_t |
using | pointer = ori::global_ptr< element_type > |
using | const_pointer = ori::global_ptr< std::add_const_t< element_type > > |
using | difference_type = typename std::iterator_traits< pointer >::difference_type |
using | reference = typename std::iterator_traits< pointer >::reference |
using | const_reference = typename std::iterator_traits< const_pointer >::reference |
using | iterator = pointer |
using | const_iterator = const_pointer |
using | reverse_iterator = std::reverse_iterator< iterator > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
Public Member Functions | |
constexpr | global_span () noexcept |
template<typename ContiguousIterator > | |
constexpr | global_span (ContiguousIterator first, size_type n) |
template<typename ContiguousIterator > | |
constexpr | global_span (ContiguousIterator first, ContiguousIterator last) |
template<typename R > | |
constexpr | global_span (R &&r) |
template<typename U > | |
constexpr | global_span (const global_span< U > &s) noexcept |
constexpr | global_span (const this_t &other) noexcept=default |
constexpr this_t & | operator= (const this_t &other) noexcept=default |
constexpr pointer | data () const noexcept |
constexpr size_type | size () const noexcept |
constexpr iterator | begin () const noexcept |
constexpr iterator | end () const noexcept |
constexpr const_iterator | cbegin () const noexcept |
constexpr const_iterator | cend () const noexcept |
constexpr reverse_iterator | rbegin () const noexcept |
constexpr reverse_iterator | rend () const noexcept |
constexpr const_reverse_iterator | crbegin () const noexcept |
constexpr const_reverse_iterator | crend () const noexcept |
constexpr reference | operator[] (size_type i) const |
constexpr reference | front () const |
constexpr reference | back () const |
constexpr bool | empty () const noexcept |
constexpr this_t | subspan (size_type offset, size_type count) const |
Global span to represent a view of a global memory range.
A global span is a view of a global memory range.
Similar to std::span
(C++20), a global span does not hold any ownership for the range. Because of this, ityr::global_span
will frequently appear in Itoyori programs, as it can be copied across different parallel tasks without copying the actual data stored in global memory.
Example:
using ityr::global_span< T >::const_iterator = const_pointer |
using ityr::global_span< T >::const_pointer = ori::global_ptr<std::add_const_t<element_type> > |
using ityr::global_span< T >::const_reference = typename std::iterator_traits<const_pointer>::reference |
using ityr::global_span< T >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
using ityr::global_span< T >::difference_type = typename std::iterator_traits<pointer>::difference_type |
using ityr::global_span< T >::element_type = T |
using ityr::global_span< T >::iterator = pointer |
using ityr::global_span< T >::pointer = ori::global_ptr<element_type> |
using ityr::global_span< T >::reference = typename std::iterator_traits<pointer>::reference |
using ityr::global_span< T >::reverse_iterator = std::reverse_iterator<iterator> |
using ityr::global_span< T >::size_type = std::size_t |
using ityr::global_span< T >::value_type = std::remove_cv_t<element_type> |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexprnoexcept |
|
constexprdefaultnoexcept |
|
inlineconstexpr |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
constexprdefaultnoexcept |
|
inlineconstexpr |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexpr |