Multi-dimensional array class. More...
#include <AMReX_TableData.H>
Public Types | |
using | value_type = T |
using | table_type = std::conditional_t< N==1, Table1D< T >, std::conditional_t< N==2, Table2D< T, ORDER >, std::conditional_t< N==3, Table3D< T, ORDER >, Table4D< T, ORDER > > > > |
using | const_table_type = std::conditional_t< N==1, Table1D< T const >, std::conditional_t< N==2, Table2D< T const, ORDER >, std::conditional_t< N==3, Table3D< T const, ORDER >, Table4D< T const, ORDER > > > > |
Public Member Functions | |
TableData () noexcept=default | |
TableData (Arena *ar) noexcept | |
TableData (Array< int, N > const &lo, Array< int, N > const &hi, Arena *ar=nullptr) | |
TableData (TableData< T, N, ORDER > const &)=delete | |
TableData< T, N, ORDER > & | operator= (TableData< T, N, ORDER > const &)=delete |
TableData (TableData< T, N, ORDER > &&rhs) noexcept | |
TableData< T, N, ORDER > & | operator= (TableData< T, N, ORDER > &&rhs) noexcept |
~TableData () noexcept | |
constexpr int | dim () const noexcept |
void | resize (Array< int, N > const &lo, Array< int, N > const &hi, Arena *ar=nullptr) |
Long | size () const noexcept |
Array< int, N > const & | lo () const noexcept |
Array< int, N > const & | hi () const noexcept |
void | clear () noexcept |
void | copy (TableData< T, N, ORDER > const &rhs) noexcept |
table_type | table () noexcept |
const_table_type | table () const noexcept |
const_table_type | const_table () const noexcept |
![]() | |
DataAllocator () noexcept=default | |
DataAllocator (Arena *ar) noexcept | |
void * | alloc (std::size_t sz) const noexcept |
void | free (void *pt) const noexcept |
Arena * | arena () const noexcept |
Private Member Functions | |
void | define () |
Private Attributes | |
T * | m_dptr = nullptr |
Array< int, N > | m_lo |
Array< int, N > | m_hi |
Long | m_truesize = 0L |
bool | m_ptr_owner = false |
Friends | |
template<class U , int M, Order O> | |
class | TableData |
Additional Inherited Members | |
![]() | |
Arena * | m_arena = nullptr |
Multi-dimensional array class.
This class is somewhat similar to FArrayBox/BaseFab. The main difference is the dimension of the array in this class can be 1, 2, 3, or 4, whereas the dimension of FArrayBox/BaseFab is the spatial dimension (AMREX_SPACEDIM) plus a component dimension. Another difference is that this class supports both column-major order (i.e., Fortran order) and row-major order (i.e., C order), whereas FArrayBox/BaseFab is always column-major. Below is an example of using it to store a 3D table of data that is initialized on CPU and is read-only by all GPU threads on the device.
using amrex::TableData< T, N, ORDER >::const_table_type = std::conditional_t<N==1, Table1D<T const>, std::conditional_t<N==2, Table2D<T const, ORDER>, std::conditional_t<N==3, Table3D<T const, ORDER>, Table4D<T const, ORDER> > > > |
using amrex::TableData< T, N, ORDER >::table_type = std::conditional_t<N==1, Table1D<T>, std::conditional_t<N==2, Table2D<T, ORDER>, std::conditional_t<N==3, Table3D<T, ORDER>, Table4D<T, ORDER> > > > |
using amrex::TableData< T, N, ORDER >::value_type = T |
|
defaultnoexcept |
|
explicitnoexcept |
amrex::TableData< T, N, ORDER >::TableData | ( | Array< int, N > const & | lo, |
Array< int, N > const & | hi, | ||
Arena * | ar = nullptr |
||
) |
|
delete |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
private |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
delete |
void amrex::TableData< T, N, ORDER >::resize | ( | Array< int, N > const & | lo, |
Array< int, N > const & | hi, | ||
Arena * | ar = nullptr |
||
) |
|
noexcept |
|
noexcept |
|
noexcept |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |