Template Class data_view

Class Documentation

template<class DataType>
class legion::core::data_view

implementation if lpe array-view is not available a reference-counting view into a raw array, implements most of the required things for a standard stl container

Template Parameters
  • DataType: the value-type of the target_array

Public Types

using value_type = DataType
using iterator = DataType*
using ptr_type = DataType*
using const_ptr_type = const DataType*
using size_type = std::size_t
using const_value_type = const DataType
using const_iterator = const DataType*

Public Functions

inline explicit data_view(nullptr_t)
inline explicit data_view(ptr_type ptr, size_type size, size_type offset = 0, bool take_ownership = false)
inline data_view(const data_view &other)
inline data_view(data_view &&other) noexcept
inline data_view &operator=(const data_view &other)
inline data_view &operator=(data_view &&other) noexcept
inline ~data_view()
inline value_type at(size_type idx) const

gets the value at index idx checks if the index is valid before returning and throws and std::out_of_range exception if it is not


the value at idx

  • idx: the index to query

inline value_type &operator[](size_type idx)

gets the value at index idx


the value at idx

  • idx: the index to query

inline value_type operator[](size_type idx) const

const version of above


value_type& operator[](size_type)

inline iterator begin()
inline iterator end()
inline ptr_type data()
inline const_iterator begin() const
inline const_iterator end() const
inline const_ptr_type data() const
inline size_type size() const noexcept

gets the size of the target array-view

inline size_type max_size() const noexcept

gets the max size this container could grow to. since the container is non resizable same as size()