Class TempLat::LayoutStructGlobal
template <size_t _NDim>
ClassList > TempLat > LayoutStructGlobal
A class which holds some memory informations. More...
#include <layoutstructglobal.h>
Public Static Attributes
| Type | Name |
|---|---|
| constexpr size_t | NDim = \_NDim |
Public Functions
| Type | Name |
|---|---|
| LayoutStructGlobal (const device::IdxArray< NDim > & initNGrid) |
|
| DEVICE_INLINE_FUNCTION device::IdxArray< NDim > & | getGlobalSizes () |
| DEVICE_INLINE_FUNCTION const device::IdxArray< NDim > & | getGlobalSizes () const |
| DEVICE_INLINE_FUNCTION T | getMaxRadius () const returns the largest possible distance from the origin. |
| 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 | setSignConversionMidpoint (const device::IdxArray< NDim > & newMidpoint) |
| 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-layoutstructglobal
Public Static Attributes Documentation
variable NDim
Public Functions Documentation
function LayoutStructGlobal
inline TempLat::LayoutStructGlobal::LayoutStructGlobal (
const device::IdxArray< NDim > & initNGrid
)
function getGlobalSizes [1/2]
inline DEVICE_INLINE_FUNCTION device::IdxArray< NDim > & TempLat::LayoutStructGlobal::getGlobalSizes ()
function getGlobalSizes [2/2]
inline DEVICE_INLINE_FUNCTION const device::IdxArray< NDim > & TempLat::LayoutStructGlobal::getGlobalSizes () const
function getMaxRadius
returns the largest possible distance from the origin.
template<typename T>
inline DEVICE_INLINE_FUNCTION T TempLat::LayoutStructGlobal::getMaxRadius () 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::LayoutStructGlobal::memoryIndexToSpatialCoordinate (
device::Idx index,
device::Idx dimension
) const
function setSignConversionMidpoint
inline void TempLat::LayoutStructGlobal::setSignConversionMidpoint (
const device::IdxArray< NDim > & newMidpoint
)
function spatialCoordinateToMemoryIndex
Inverse of memoryIndexToSpatialCoordinate: get memory from position.
inline DEVICE_INLINE_FUNCTION device::Idx TempLat::LayoutStructGlobal::spatialCoordinateToMemoryIndex (
device::Idx position,
device::Idx dimension
) const
Friends Documentation
friend LayoutStruct< NDim >
friend operator<<
inline std::ostream & TempLat::LayoutStructGlobal::operator<< (
std::ostream & ostream,
const LayoutStructGlobal & ls
)
friend operator==
template<size_t d2>
inline bool TempLat::LayoutStructGlobal::operator== (
const LayoutStructGlobal < NDim > & a,
const LayoutStructGlobal < d2 > & b
)
The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/lattice/memory/memorylayouts/layoutstructglobal.h