RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
Public Types | Public Member Functions | Protected Attributes | List of all members
RAJA::internal::ViewBase< ValueType, PointerType, LayoutType > Class Template Reference

#include <TypedViewBase.hpp>

Inheritance diagram for RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >:
RAJA::internal::TypedViewBase< ValueType, PointerType, LayoutType, camp::list< IndexTypes... > >

Public Types

using value_type = ValueType
 
using pointer_type = PointerType
 
using layout_type = LayoutType
 
using linear_index_type = typename layout_type::IndexLinear
 
using nc_value_type = typename std::remove_const< value_type >::type
 
using nc_pointer_type = typename std::add_pointer< typename std::remove_const< typename std::remove_pointer< pointer_type >::type >::type >::type
 
using Self = ViewBase< value_type, pointer_type, layout_type >
 
using NonConstView = ViewBase< nc_value_type, nc_pointer_type, layout_type >
 
using shifted_layout_type = typename add_offset< layout_type >::type
 
using ShiftedView = ViewBase< value_type, pointer_type, shifted_layout_type >
 

Public Member Functions

constexpr ViewBase ()=default
 
constexpr RAJA_INLINE ViewBase (ViewBase const &)=default
 
constexpr RAJA_INLINE ViewBase (ViewBase &&)=default
 
constexpr RAJA_INLINE ViewBaseoperator= (ViewBase const &)=default
 
constexpr RAJA_INLINE ViewBaseoperator= (ViewBase &&)=default
 
RAJA_HOST_DEVICE constexpr RAJA_INLINE ViewBase (pointer_type data, layout_type &&layout)
 
template<typename... Args>
RAJA_HOST_DEVICE constexpr RAJA_INLINE ViewBase (pointer_type data, Args... dim_sizes)
 
template<bool IsConstView = std::is_const<value_type>::value>
RAJA_HOST_DEVICE constexpr RAJA_INLINE ViewBase (typename std::enable_if< IsConstView, NonConstView >::type const &rhs)
 
RAJA_HOST_DEVICE constexpr RAJA_INLINE void set_data (PointerType data_ptr)
 
RAJA_HOST_DEVICE constexpr RAJA_INLINE pointer_type const & get_data () const
 
RAJA_HOST_DEVICE constexpr RAJA_INLINE layout_type const & get_layout () const
 
RAJA_HOST_DEVICE constexpr RAJA_INLINE linear_index_type size () const
 
template<camp::idx_t DIM>
RAJA_HOST_DEVICE constexpr RAJA_INLINE linear_index_type get_dim_size () const
 
template<typename... Args>
RAJA_HOST_DEVICE constexpr RAJA_INLINE view_return_type_t< value_type, pointer_type, linear_index_type, layout_type, Args... > operator() (Args... args) const
 
template<typename... Args>
RAJA_HOST_DEVICE constexpr RAJA_INLINE view_return_type_t< value_type, pointer_type, linear_index_type, layout_type, Args... > operator[] (Args... args) const
 
template<size_t n_dims = layout_type::n_dims, typename IdxLin = linear_index_type>
RAJA_HOST_DEVICE constexpr RAJA_INLINE ShiftedView shift (const std::array< IdxLin, n_dims > &shift)
 

Protected Attributes

pointer_type m_data
 
layout_type const m_layout
 

Member Typedef Documentation

◆ value_type

template<typename ValueType , typename PointerType , typename LayoutType >
using RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::value_type = ValueType

◆ pointer_type

template<typename ValueType , typename PointerType , typename LayoutType >
using RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::pointer_type = PointerType

◆ layout_type

template<typename ValueType , typename PointerType , typename LayoutType >
using RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::layout_type = LayoutType

◆ linear_index_type

template<typename ValueType , typename PointerType , typename LayoutType >
using RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::linear_index_type = typename layout_type::IndexLinear

◆ nc_value_type

template<typename ValueType , typename PointerType , typename LayoutType >
using RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::nc_value_type = typename std::remove_const<value_type>::type

◆ nc_pointer_type

template<typename ValueType , typename PointerType , typename LayoutType >
using RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::nc_pointer_type = typename std::add_pointer<typename std::remove_const< typename std::remove_pointer<pointer_type>::type>::type>::type

◆ Self

template<typename ValueType , typename PointerType , typename LayoutType >
using RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::Self = ViewBase<value_type, pointer_type, layout_type>

◆ NonConstView

template<typename ValueType , typename PointerType , typename LayoutType >
using RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::NonConstView = ViewBase<nc_value_type, nc_pointer_type, layout_type>

◆ shifted_layout_type

template<typename ValueType , typename PointerType , typename LayoutType >
using RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::shifted_layout_type = typename add_offset<layout_type>::type

◆ ShiftedView

template<typename ValueType , typename PointerType , typename LayoutType >
using RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::ShiftedView = ViewBase<value_type, pointer_type, shifted_layout_type>

Constructor & Destructor Documentation

◆ ViewBase() [1/6]

template<typename ValueType , typename PointerType , typename LayoutType >
constexpr RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::ViewBase ( )
constexprdefault

◆ ViewBase() [2/6]

template<typename ValueType , typename PointerType , typename LayoutType >
constexpr RAJA_INLINE RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::ViewBase ( ViewBase< ValueType, PointerType, LayoutType > const &  )
constexprdefault

◆ ViewBase() [3/6]

template<typename ValueType , typename PointerType , typename LayoutType >
constexpr RAJA_INLINE RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::ViewBase ( ViewBase< ValueType, PointerType, LayoutType > &&  )
constexprdefault

◆ ViewBase() [4/6]

template<typename ValueType , typename PointerType , typename LayoutType >
RAJA_HOST_DEVICE constexpr RAJA_INLINE RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::ViewBase ( pointer_type  data,
layout_type &&  layout 
)
inlineconstexpr

◆ ViewBase() [5/6]

template<typename ValueType , typename PointerType , typename LayoutType >
template<typename... Args>
RAJA_HOST_DEVICE constexpr RAJA_INLINE RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::ViewBase ( pointer_type  data,
Args...  dim_sizes 
)
inlineconstexpr

◆ ViewBase() [6/6]

template<typename ValueType , typename PointerType , typename LayoutType >
template<bool IsConstView = std::is_const<value_type>::value>
RAJA_HOST_DEVICE constexpr RAJA_INLINE RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::ViewBase ( typename std::enable_if< IsConstView, NonConstView >::type const &  rhs)
inlineconstexpr

Member Function Documentation

◆ operator=() [1/2]

template<typename ValueType , typename PointerType , typename LayoutType >
constexpr RAJA_INLINE ViewBase& RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::operator= ( ViewBase< ValueType, PointerType, LayoutType > const &  )
constexprdefault

◆ operator=() [2/2]

template<typename ValueType , typename PointerType , typename LayoutType >
constexpr RAJA_INLINE ViewBase& RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::operator= ( ViewBase< ValueType, PointerType, LayoutType > &&  )
constexprdefault

◆ set_data()

template<typename ValueType , typename PointerType , typename LayoutType >
RAJA_HOST_DEVICE constexpr RAJA_INLINE void RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::set_data ( PointerType  data_ptr)
inlineconstexpr

◆ get_data()

template<typename ValueType , typename PointerType , typename LayoutType >
RAJA_HOST_DEVICE constexpr RAJA_INLINE pointer_type const& RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::get_data ( ) const
inlineconstexpr

◆ get_layout()

template<typename ValueType , typename PointerType , typename LayoutType >
RAJA_HOST_DEVICE constexpr RAJA_INLINE layout_type const& RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::get_layout ( ) const
inlineconstexpr

◆ size()

template<typename ValueType , typename PointerType , typename LayoutType >
RAJA_HOST_DEVICE constexpr RAJA_INLINE linear_index_type RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::size ( ) const
inlineconstexpr

◆ get_dim_size()

template<typename ValueType , typename PointerType , typename LayoutType >
template<camp::idx_t DIM>
RAJA_HOST_DEVICE constexpr RAJA_INLINE linear_index_type RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::get_dim_size ( ) const
inlineconstexpr

◆ operator()()

template<typename ValueType , typename PointerType , typename LayoutType >
template<typename... Args>
RAJA_HOST_DEVICE constexpr RAJA_INLINE view_return_type_t<value_type, pointer_type, linear_index_type, layout_type, Args...> RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::operator() ( Args...  args) const
inlineconstexpr

◆ operator[]()

template<typename ValueType , typename PointerType , typename LayoutType >
template<typename... Args>
RAJA_HOST_DEVICE constexpr RAJA_INLINE view_return_type_t<value_type, pointer_type, linear_index_type, layout_type, Args...> RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::operator[] ( Args...  args) const
inlineconstexpr

◆ shift()

template<typename ValueType , typename PointerType , typename LayoutType >
template<size_t n_dims = layout_type::n_dims, typename IdxLin = linear_index_type>
RAJA_HOST_DEVICE constexpr RAJA_INLINE ShiftedView RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::shift ( const std::array< IdxLin, n_dims > &  shift)
inlineconstexpr

Member Data Documentation

◆ m_data

template<typename ValueType , typename PointerType , typename LayoutType >
pointer_type RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::m_data
protected

◆ m_layout

template<typename ValueType , typename PointerType , typename LayoutType >
layout_type const RAJA::internal::ViewBase< ValueType, PointerType, LayoutType >::m_layout
protected

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