walberla::gpu::FieldAccessor< T > Class Template Reference

#include <FieldAccessor.h>

Public Types

enum  IndexingScheme {
  FZYX, FZY, FZ, F,
  ZYXF, ZYX, ZY, Z
}
 

Public Member Functions

 FieldAccessor (char *ptr, uint_t xOffset, uint_t yOffset, uint_t zOffset, uint_t fOffset, IndexingScheme indexingScheme)
 
__device__ void set (uint3 blockIdx, uint3 threadIdx)
 
__device__ uint_t getLinearIndex (uint3 blockIdx, uint3 threadIdx, uint3 gridDim, uint3 blockDim)
 
__device__ __forceinline__ bool isValidPosition ()
 
__device__ T & get ()
 
__device__ T & get (int f)
 
__device__ T & getNeighbor (int cx, int cy, int cz) const
 
__device__ T & getNeighbor (int cx, int cy, int cz, int cf)
 

Protected Attributes

char * ptr_
 
uint_t xOffset_
 
uint_t yOffset_
 
uint_t zOffset_
 
uint_t fOffset_
 
IndexingScheme indexingScheme_
 

Member Enumeration Documentation

◆ IndexingScheme

Enumerator
FZYX 
FZY 
FZ 
ZYXF 
ZYX 
ZY 

Constructor & Destructor Documentation

◆ FieldAccessor()

template<typename T >
walberla::gpu::FieldAccessor< T >::FieldAccessor ( char *  ptr,
uint_t  xOffset,
uint_t  yOffset,
uint_t  zOffset,
uint_t  fOffset,
IndexingScheme  indexingScheme 
)
inline

Member Function Documentation

◆ get() [1/2]

template<typename T >
__device__ T& walberla::gpu::FieldAccessor< T >::get ( )
inline

◆ get() [2/2]

template<typename T >
__device__ T& walberla::gpu::FieldAccessor< T >::get ( int  f)
inline

◆ getLinearIndex()

template<typename T >
__device__ uint_t walberla::gpu::FieldAccessor< T >::getLinearIndex ( uint3  blockIdx,
uint3  threadIdx,
uint3  gridDim,
uint3  blockDim 
)
inline

◆ getNeighbor() [1/2]

template<typename T >
__device__ T& walberla::gpu::FieldAccessor< T >::getNeighbor ( int  cx,
int  cy,
int  cz 
) const
inline

◆ getNeighbor() [2/2]

template<typename T >
__device__ T& walberla::gpu::FieldAccessor< T >::getNeighbor ( int  cx,
int  cy,
int  cz,
int  cf 
)
inline

◆ isValidPosition()

template<typename T >
__device__ __forceinline__ bool walberla::gpu::FieldAccessor< T >::isValidPosition ( )
inline

◆ set()

template<typename T >
__device__ void walberla::gpu::FieldAccessor< T >::set ( uint3  blockIdx,
uint3  threadIdx 
)
inline

Member Data Documentation

◆ fOffset_

template<typename T >
uint_t walberla::gpu::FieldAccessor< T >::fOffset_
protected

◆ indexingScheme_

template<typename T >
IndexingScheme walberla::gpu::FieldAccessor< T >::indexingScheme_
protected

◆ ptr_

template<typename T >
char* walberla::gpu::FieldAccessor< T >::ptr_
protected

◆ xOffset_

template<typename T >
uint_t walberla::gpu::FieldAccessor< T >::xOffset_
protected

◆ yOffset_

template<typename T >
uint_t walberla::gpu::FieldAccessor< T >::yOffset_
protected

◆ zOffset_

template<typename T >
uint_t walberla::gpu::FieldAccessor< T >::zOffset_
protected

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