Class TempLat::LayoutStructLocal
template <size_t _NDim>
ClassList > TempLat > LayoutStructLocal
A class which localSizes: the local size in each dimension. localStart: the coordinate of the first entry in local memory, in the global coordinate space. More...
#include <layoutstructlocal.h>
Public Static Attributes
| Type | Name |
|---|---|
| constexpr size_t | NDim = \_NDim |
Public Functions
| Type | Name |
|---|---|
| LayoutStructLocal (const device::IdxArray< NDim > & initNGrid, const device::Idx nGhosts) |
|
| DEVICE_INLINE_FUNCTION LayoutStructGlobal< NDim > & | getGlobal () |
| DEVICE_INLINE_FUNCTION const LayoutStructGlobal< NDim > & | getGlobal () const |
| DEVICE_INLINE_FUNCTION device::IdxArray< NDim > & | getLocalSizes () |
| DEVICE_INLINE_FUNCTION const device::IdxArray< NDim > & | getLocalSizes () const |
| DEVICE_INLINE_FUNCTION device::IdxArray< NDim > & | getLocalStarts () |
| DEVICE_INLINE_FUNCTION const device::IdxArray< NDim > & | getLocalStarts () const |
| device::Idx | getNGhosts () const |
| const device::array< device::IdxArray< 2 >, NDim > & | getPadding () const |
| DEVICE_INLINE_FUNCTION device::Idx | memoryIndexToSpatialCoordinate (device::Idx index, device::Idx dimension) const For both configuration and fourier space, the index values are not the same as coordinate values. Assuming periodic boundary conditions, we get that always c = i > half ? i - N : i; Don't mix up the arguments! Does not do transposition, so input pre-transposed dimension! |
| void | setLocalSizes (const device::IdxArray< NDim > & input) |
| void | setLocalStarts (const device::IdxArray< NDim > & input) |
| void | setNGhosts (device::Idx nGhosts) |
| void | setPadding (const device::array< device::IdxArray< 2 >, NDim > & padding) |
| DEVICE_INLINE_FUNCTION device::Idx | spatialCoordinateToMemoryIndex (device::Idx position, device::Idx dimension) const Inverse of memoryIndexToSpatialCoordinate: get memory from position. |
Detailed Description
Unit test: ctest -R test-layoutstructlocal
Public Static Attributes Documentation
variable NDim
Public Functions Documentation
function LayoutStructLocal
inline TempLat::LayoutStructLocal::LayoutStructLocal (
const device::IdxArray< NDim > & initNGrid,
const device::Idx nGhosts
)
function getGlobal [1/2]
inline DEVICE_INLINE_FUNCTION LayoutStructGlobal < NDim > & TempLat::LayoutStructLocal::getGlobal ()
function getGlobal [2/2]
inline DEVICE_INLINE_FUNCTION const LayoutStructGlobal < NDim > & TempLat::LayoutStructLocal::getGlobal () const
function getLocalSizes [1/2]
inline DEVICE_INLINE_FUNCTION device::IdxArray< NDim > & TempLat::LayoutStructLocal::getLocalSizes ()
function getLocalSizes [2/2]
inline DEVICE_INLINE_FUNCTION const device::IdxArray< NDim > & TempLat::LayoutStructLocal::getLocalSizes () const
function getLocalStarts [1/2]
inline DEVICE_INLINE_FUNCTION device::IdxArray< NDim > & TempLat::LayoutStructLocal::getLocalStarts ()
function getLocalStarts [2/2]
inline DEVICE_INLINE_FUNCTION const device::IdxArray< NDim > & TempLat::LayoutStructLocal::getLocalStarts () const
function getNGhosts
function getPadding
inline const device::array< device::IdxArray< 2 >, NDim > & TempLat::LayoutStructLocal::getPadding () const
function memoryIndexToSpatialCoordinate
For both configuration and fourier space, the index values are not the same as coordinate values. Assuming periodic boundary conditions, we get that always c = i > half ? i - N : i; Don't mix up the arguments! Does not do transposition, so input pre-transposed dimension!
inline DEVICE_INLINE_FUNCTION device::Idx TempLat::LayoutStructLocal::memoryIndexToSpatialCoordinate (
device::Idx index,
device::Idx dimension
) const
function setLocalSizes
function setLocalStarts
function setNGhosts
function setPadding
inline void TempLat::LayoutStructLocal::setPadding (
const device::array< device::IdxArray< 2 >, NDim > & padding
)
function spatialCoordinateToMemoryIndex
Inverse of memoryIndexToSpatialCoordinate: get memory from position.
inline DEVICE_INLINE_FUNCTION device::Idx TempLat::LayoutStructLocal::spatialCoordinateToMemoryIndex (
device::Idx position,
device::Idx dimension
) const
Friends Documentation
friend operator<<
inline std::ostream & TempLat::LayoutStructLocal::operator<< (
std::ostream & ostream,
const LayoutStructLocal & ls
)
friend operator==
template<size_t d2>
inline bool TempLat::LayoutStructLocal::operator== (
const LayoutStructLocal < NDim > & a,
const LayoutStructLocal < d2 > & b
)
The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/lattice/memory/memorylayouts/layoutstructlocal.h