Template Class data_view¶
Defined in File data_view.hpp
Class Documentation¶
-
template<class
DataType
>
classlegion::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
size_type
= std::size_t¶
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
()¶
-
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
- Return
the value at idx
- Parameters
idx
: the index to query
-
inline value_type &
operator[]
(size_type idx)¶ gets the value at index idx
- Return
the value at idx
- Parameters
idx
: the index to query
-
inline value_type
operator[]
(size_type idx) const¶ const version of above
- See
value_type& operator[](size_type)
-
inline const_iterator
begin
() const¶
-
inline const_iterator
end
() const¶
-
inline const_ptr_type
data
() const¶