Block-Structured AMR Software Framework
amrex::Array4< T > Struct Template Reference

#include <AMReX_Array4.H>

Inheritance diagram for amrex::Array4< T >:
amrex::PolymorphicArray4< T >

Public Member Functions

constexpr AMREX_GPU_HOST_DEVICE Array4 () noexcept
 
template<class U = T, std::enable_if_t< std::is_const_v< U >, int > = 0>
constexpr AMREX_GPU_HOST_DEVICE Array4 (Array4< std::remove_const_t< T >> const &rhs) noexcept
 
constexpr AMREX_GPU_HOST_DEVICE Array4 (T *a_p, Dim3 const &a_begin, Dim3 const &a_end, int a_ncomp) noexcept
 
template<class U , std::enable_if_t< std::is_same_v< std::remove_const_t< T >, std::remove_const_t< U >>, int > = 0>
constexpr AMREX_GPU_HOST_DEVICE Array4 (Array4< U > const &rhs, int start_comp) noexcept
 
template<class U , std::enable_if_t< std::is_same_v< std::remove_const_t< T >, std::remove_const_t< U >>, int > = 0>
constexpr AMREX_GPU_HOST_DEVICE Array4 (Array4< U > const &rhs, int start_comp, int num_comps) noexcept
 
AMREX_GPU_HOST_DEVICE operator bool () const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U & operator() (int i, int j, int k) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U & operator() (int i, int j, int k, int n) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T * ptr (int i, int j, int k) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T * ptr (int i, int j, int k, int n) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U & operator() (IntVect const &iv) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U & operator() (IntVect const &iv, int n) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T * ptr (IntVect const &iv) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T * ptr (IntVect const &iv, int n) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U & operator() (Dim3 const &cell) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U & operator() (Dim3 const &cell, int n) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T * ptr (Dim3 const &cell) const noexcept
 
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T * ptr (Dim3 const &cell, int n) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T * dataPtr () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::size_t size () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int nComp () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool contains (int i, int j, int k) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool contains (IntVect const &iv) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool contains (Dim3 const &cell) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE CellData< T > cellData (int i, int j, int k) const noexcept
 

Public Attributes

T *AMREX_RESTRICT p
 
Long jstride = 0
 
Long kstride = 0
 
Long nstride = 0
 
Dim3 begin {1,1,1}
 
Dim3 end {0,0,0}
 
int ncomp =0
 

Constructor & Destructor Documentation

◆ Array4() [1/5]

template<typename T >
constexpr AMREX_GPU_HOST_DEVICE amrex::Array4< T >::Array4 ( )
inlineconstexprnoexcept

◆ Array4() [2/5]

template<typename T >
template<class U = T, std::enable_if_t< std::is_const_v< U >, int > = 0>
constexpr AMREX_GPU_HOST_DEVICE amrex::Array4< T >::Array4 ( Array4< std::remove_const_t< T >> const &  rhs)
inlineconstexprnoexcept

◆ Array4() [3/5]

template<typename T >
constexpr AMREX_GPU_HOST_DEVICE amrex::Array4< T >::Array4 ( T *  a_p,
Dim3 const &  a_begin,
Dim3 const &  a_end,
int  a_ncomp 
)
inlineconstexprnoexcept

◆ Array4() [4/5]

template<typename T >
template<class U , std::enable_if_t< std::is_same_v< std::remove_const_t< T >, std::remove_const_t< U >>, int > = 0>
constexpr AMREX_GPU_HOST_DEVICE amrex::Array4< T >::Array4 ( Array4< U > const &  rhs,
int  start_comp 
)
inlineconstexprnoexcept

◆ Array4() [5/5]

template<typename T >
template<class U , std::enable_if_t< std::is_same_v< std::remove_const_t< T >, std::remove_const_t< U >>, int > = 0>
constexpr AMREX_GPU_HOST_DEVICE amrex::Array4< T >::Array4 ( Array4< U > const &  rhs,
int  start_comp,
int  num_comps 
)
inlineconstexprnoexcept

Member Function Documentation

◆ cellData()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE CellData<T> amrex::Array4< T >::cellData ( int  i,
int  j,
int  k 
) const
inlinenoexcept

◆ contains() [1/3]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::Array4< T >::contains ( Dim3 const &  cell) const
inlinenoexcept

◆ contains() [2/3]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::Array4< T >::contains ( int  i,
int  j,
int  k 
) const
inlinenoexcept

◆ contains() [3/3]

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::Array4< T >::contains ( IntVect const &  iv) const
inlinenoexcept

◆ dataPtr()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T* amrex::Array4< T >::dataPtr ( ) const
inlinenoexcept

◆ nComp()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::Array4< T >::nComp ( ) const
inlinenoexcept

◆ operator bool()

template<typename T >
AMREX_GPU_HOST_DEVICE amrex::Array4< T >::operator bool ( ) const
inlineexplicitnoexcept

◆ operator()() [1/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U& amrex::Array4< T >::operator() ( Dim3 const &  cell) const
inlinenoexcept

◆ operator()() [2/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U& amrex::Array4< T >::operator() ( Dim3 const &  cell,
int  n 
) const
inlinenoexcept

◆ operator()() [3/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U& amrex::Array4< T >::operator() ( int  i,
int  j,
int  k 
) const
inlinenoexcept

◆ operator()() [4/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U& amrex::Array4< T >::operator() ( int  i,
int  j,
int  k,
int  n 
) const
inlinenoexcept

◆ operator()() [5/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U& amrex::Array4< T >::operator() ( IntVect const &  iv) const
inlinenoexcept

◆ operator()() [6/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE U& amrex::Array4< T >::operator() ( IntVect const &  iv,
int  n 
) const
inlinenoexcept

◆ ptr() [1/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T* amrex::Array4< T >::ptr ( Dim3 const &  cell) const
inlinenoexcept

◆ ptr() [2/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T* amrex::Array4< T >::ptr ( Dim3 const &  cell,
int  n 
) const
inlinenoexcept

◆ ptr() [3/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T* amrex::Array4< T >::ptr ( int  i,
int  j,
int  k 
) const
inlinenoexcept

◆ ptr() [4/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T* amrex::Array4< T >::ptr ( int  i,
int  j,
int  k,
int  n 
) const
inlinenoexcept

◆ ptr() [5/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T* amrex::Array4< T >::ptr ( IntVect const &  iv) const
inlinenoexcept

◆ ptr() [6/6]

template<typename T >
template<class U = T, std::enable_if_t<!std::is_void_v< U >, int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T* amrex::Array4< T >::ptr ( IntVect const &  iv,
int  n 
) const
inlinenoexcept

◆ size()

template<typename T >
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE std::size_t amrex::Array4< T >::size ( ) const
inlinenoexcept

Member Data Documentation

◆ begin

template<typename T >
Dim3 amrex::Array4< T >::begin {1,1,1}

◆ end

template<typename T >
Dim3 amrex::Array4< T >::end {0,0,0}

◆ jstride

template<typename T >
Long amrex::Array4< T >::jstride = 0

◆ kstride

template<typename T >
Long amrex::Array4< T >::kstride = 0

◆ ncomp

template<typename T >
int amrex::Array4< T >::ncomp =0

◆ nstride

template<typename T >
Long amrex::Array4< T >::nstride = 0

◆ p

template<typename T >
T* AMREX_RESTRICT amrex::Array4< T >::p

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