Loading...
Searching...
No Matches
terra::grid::Grid4DDataVec< ScalarType, VecDim > Struct Template Reference

SoA (Structure-of-Arrays) 4D vector grid data. More...

#include <grid_types.hpp>

Classes

struct  HostMirror
 Host mirror type for I/O. More...
 

Public Types

using value_type = ScalarType
 
using memory_space = typename Grid4DDataScalar< ScalarType >::memory_space
 

Public Member Functions

 Grid4DDataVec ()=default
 
 Grid4DDataVec (const std::string &label, int s0, int s1, int s2, int s3)
 
ScalarType & operator() (int i0, int i1, int i2, int i3, int d) const
 
auto extent (int i) const
 
std::string label () const
 Get the label (derived from first component by stripping "_d0" suffix).
 

Public Attributes

Grid4DDataScalar< ScalarType > comp_ [VecDim]
 

Static Public Attributes

static constexpr int vec_dim = VecDim
 
static constexpr int rank = 5
 

Detailed Description

template<typename ScalarType, int VecDim>
struct terra::grid::Grid4DDataVec< ScalarType, VecDim >

SoA (Structure-of-Arrays) 4D vector grid data.

Stores VecDim separate Grid4DDataScalar views for GPU memory coalescing. Provides the same operator()(sd, x, y, r, d) interface as the former AoS Kokkos::View<ScalarType****[VecDim]>.

Member Typedef Documentation

◆ memory_space

template<typename ScalarType , int VecDim>
using terra::grid::Grid4DDataVec< ScalarType, VecDim >::memory_space = typename Grid4DDataScalar< ScalarType >::memory_space

◆ value_type

template<typename ScalarType , int VecDim>
using terra::grid::Grid4DDataVec< ScalarType, VecDim >::value_type = ScalarType

Constructor & Destructor Documentation

◆ Grid4DDataVec() [1/2]

template<typename ScalarType , int VecDim>
terra::grid::Grid4DDataVec< ScalarType, VecDim >::Grid4DDataVec ( )
default

◆ Grid4DDataVec() [2/2]

template<typename ScalarType , int VecDim>
terra::grid::Grid4DDataVec< ScalarType, VecDim >::Grid4DDataVec ( const std::string &  label,
int  s0,
int  s1,
int  s2,
int  s3 
)
inline

Member Function Documentation

◆ extent()

template<typename ScalarType , int VecDim>
auto terra::grid::Grid4DDataVec< ScalarType, VecDim >::extent ( int  i) const
inline

◆ label()

template<typename ScalarType , int VecDim>
std::string terra::grid::Grid4DDataVec< ScalarType, VecDim >::label ( ) const
inline

Get the label (derived from first component by stripping "_d0" suffix).

◆ operator()()

template<typename ScalarType , int VecDim>
ScalarType & terra::grid::Grid4DDataVec< ScalarType, VecDim >::operator() ( int  i0,
int  i1,
int  i2,
int  i3,
int  d 
) const
inline

Member Data Documentation

◆ comp_

template<typename ScalarType , int VecDim>
Grid4DDataScalar< ScalarType > terra::grid::Grid4DDataVec< ScalarType, VecDim >::comp_[VecDim]

◆ rank

template<typename ScalarType , int VecDim>
constexpr int terra::grid::Grid4DDataVec< ScalarType, VecDim >::rank = 5
staticconstexpr

◆ vec_dim

template<typename ScalarType , int VecDim>
constexpr int terra::grid::Grid4DDataVec< ScalarType, VecDim >::vec_dim = VecDim
staticconstexpr

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