Low-Level Abstraction of Memory Access
llama::SubView< TStoredParentView > Struct Template Reference

#include <View.hpp>

Public Types

using StoredParentView = TStoredParentView
 
using ParentView = std::remove_const_t< std::remove_reference_t< StoredParentView > >
 type of the parent view More...
 
using Mapping = typename ParentView::Mapping
 
using ArrayExtents = typename ParentView::ArrayExtents
 
using ArrayIndex = typename ParentView::ArrayIndex
 
using BlobType = typename ParentView::BlobType
 
using RecordDim = typename ParentView::RecordDim
 
using Accessor = typename ParentView::Accessor
 
using iterator = typename ParentView::iterator
 
using const_iterator = typename ParentView::const_iterator
 

Public Member Functions

 SubView (ArrayIndex offset)
 Creates a SubView given an offset. The parent view is default constructed. More...
 
template<typename StoredParentViewFwd >
 SubView (StoredParentViewFwd &&parentView, ArrayIndex offset)
 Creates a SubView given a parent View and offset. More...
 
auto mapping () -> Mapping &
 
auto mapping () const -> const Mapping &
 
auto accessor () -> Accessor &
 
auto accessor () const -> const Accessor &
 
auto extents () const -> ArrayExtents
 
auto operator() (ArrayIndex ai) const -> decltype(auto)
 Same as View::operator()(ArrayIndex), but shifted by the offset of this SubView. More...
 
auto operator() (ArrayIndex ai) -> decltype(auto)
 
template<typename... Indices>
auto operator() (Indices... indices) const -> decltype(auto)
 Same as corresponding operator in View, but shifted by the offset of this SubView. More...
 
template<typename... Indices>
auto operator() (Indices... indices) -> decltype(auto)
 
template<std::size_t... Coords>
auto operator() (RecordCoord< Coords... > rc={}) const -> decltype(auto)
 
template<std::size_t... Coords>
auto operator() (RecordCoord< Coords... > rc={}) -> decltype(auto)
 
auto blobs () -> Array< BlobType, Mapping::blobCount > &
 
auto blobs () const -> const Array< BlobType, Mapping::blobCount > &
 

Public Attributes

StoredParentView parentView
 
const ArrayIndex offset
 

Detailed Description

template<typename TStoredParentView>
struct llama::SubView< TStoredParentView >

Like a View, but array indices are shifted.

Template Parameters
TStoredParentViewType of the underlying view. May be cv qualified and/or a reference type.

Definition at line 721 of file View.hpp.

Member Typedef Documentation

◆ Accessor

template<typename TStoredParentView >
using llama::SubView< TStoredParentView >::Accessor = typename ParentView::Accessor

Definition at line 731 of file View.hpp.

◆ ArrayExtents

template<typename TStoredParentView >
using llama::SubView< TStoredParentView >::ArrayExtents = typename ParentView::ArrayExtents

Definition at line 727 of file View.hpp.

◆ ArrayIndex

template<typename TStoredParentView >
using llama::SubView< TStoredParentView >::ArrayIndex = typename ParentView::ArrayIndex

Definition at line 728 of file View.hpp.

◆ BlobType

template<typename TStoredParentView >
using llama::SubView< TStoredParentView >::BlobType = typename ParentView::BlobType

Definition at line 729 of file View.hpp.

◆ const_iterator

template<typename TStoredParentView >
using llama::SubView< TStoredParentView >::const_iterator = typename ParentView::const_iterator

Definition at line 733 of file View.hpp.

◆ iterator

template<typename TStoredParentView >
using llama::SubView< TStoredParentView >::iterator = typename ParentView::iterator

Definition at line 732 of file View.hpp.

◆ Mapping

template<typename TStoredParentView >
using llama::SubView< TStoredParentView >::Mapping = typename ParentView::Mapping

Definition at line 726 of file View.hpp.

◆ ParentView

template<typename TStoredParentView >
using llama::SubView< TStoredParentView >::ParentView = std::remove_const_t<std::remove_reference_t<StoredParentView> >

type of the parent view

Definition at line 724 of file View.hpp.

◆ RecordDim

template<typename TStoredParentView >
using llama::SubView< TStoredParentView >::RecordDim = typename ParentView::RecordDim

Definition at line 730 of file View.hpp.

◆ StoredParentView

template<typename TStoredParentView >
using llama::SubView< TStoredParentView >::StoredParentView = TStoredParentView

Definition at line 723 of file View.hpp.

Constructor & Destructor Documentation

◆ SubView() [1/2]

template<typename TStoredParentView >
llama::SubView< TStoredParentView >::SubView ( ArrayIndex  offset)
inlineexplicit

Creates a SubView given an offset. The parent view is default constructed.

Definition at line 740 of file View.hpp.

◆ SubView() [2/2]

template<typename TStoredParentView >
template<typename StoredParentViewFwd >
llama::SubView< TStoredParentView >::SubView ( StoredParentViewFwd &&  parentView,
ArrayIndex  offset 
)
inline

Creates a SubView given a parent View and offset.

Definition at line 746 of file View.hpp.

Member Function Documentation

◆ accessor() [1/2]

template<typename TStoredParentView >
auto llama::SubView< TStoredParentView >::accessor ( ) -> Accessor&
inline

Definition at line 762 of file View.hpp.

◆ accessor() [2/2]

template<typename TStoredParentView >
auto llama::SubView< TStoredParentView >::accessor ( ) const -> const Accessor&
inline

Definition at line 767 of file View.hpp.

◆ blobs() [1/2]

template<typename TStoredParentView >
auto llama::SubView< TStoredParentView >::blobs ( ) -> Array<BlobType, Mapping::blobCount>&
inline

Definition at line 830 of file View.hpp.

◆ blobs() [2/2]

template<typename TStoredParentView >
auto llama::SubView< TStoredParentView >::blobs ( ) const -> const Array<BlobType, Mapping::blobCount>&
inline

Definition at line 835 of file View.hpp.

◆ extents()

template<typename TStoredParentView >
auto llama::SubView< TStoredParentView >::extents ( ) const -> ArrayExtents
inline

Definition at line 772 of file View.hpp.

◆ mapping() [1/2]

template<typename TStoredParentView >
auto llama::SubView< TStoredParentView >::mapping ( ) -> Mapping&
inline

Definition at line 752 of file View.hpp.

◆ mapping() [2/2]

template<typename TStoredParentView >
auto llama::SubView< TStoredParentView >::mapping ( ) const -> const Mapping&
inline

Definition at line 757 of file View.hpp.

◆ operator()() [1/6]

template<typename TStoredParentView >
auto llama::SubView< TStoredParentView >::operator() ( ArrayIndex  ai) -> decltype(auto)
inline

Definition at line 783 of file View.hpp.

◆ operator()() [2/6]

template<typename TStoredParentView >
auto llama::SubView< TStoredParentView >::operator() ( ArrayIndex  ai) const -> decltype(auto)
inline

Same as View::operator()(ArrayIndex), but shifted by the offset of this SubView.

Definition at line 778 of file View.hpp.

◆ operator()() [3/6]

template<typename TStoredParentView >
template<typename... Indices>
auto llama::SubView< TStoredParentView >::operator() ( Indices...  indices) -> decltype(auto)
inline

Definition at line 803 of file View.hpp.

◆ operator()() [4/6]

template<typename TStoredParentView >
template<typename... Indices>
auto llama::SubView< TStoredParentView >::operator() ( Indices...  indices) const -> decltype(auto)
inline

Same as corresponding operator in View, but shifted by the offset of this SubView.

Definition at line 790 of file View.hpp.

◆ operator()() [5/6]

template<typename TStoredParentView >
template<std::size_t... Coords>
auto llama::SubView< TStoredParentView >::operator() ( RecordCoord< Coords... >  rc = {}) -> decltype(auto)
inline

Definition at line 822 of file View.hpp.

◆ operator()() [6/6]

template<typename TStoredParentView >
template<std::size_t... Coords>
auto llama::SubView< TStoredParentView >::operator() ( RecordCoord< Coords... >  rc = {}) const -> decltype(auto)
inline

Definition at line 816 of file View.hpp.

Member Data Documentation

◆ offset

template<typename TStoredParentView >
const ArrayIndex llama::SubView< TStoredParentView >::offset

offset by which this view's ArrayIndex indices are shifted when passed to the parent view.

Definition at line 841 of file View.hpp.

◆ parentView

template<typename TStoredParentView >
StoredParentView llama::SubView< TStoredParentView >::parentView

Definition at line 840 of file View.hpp.


The documentation for this struct was generated from the following file: