Public Types | Public Member Functions | Private Attributes

LibGeoDecomp::LinePointerNeighborhood< CELL, STENCIL, BOUNDARY_WEST, BOUNDARY_EAST, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH > Class Template Reference

gives cells access to their neighboring cells in a given stencil shape. More...

#include <linepointerneighborhood.h>

Inherits West< CELL, STENCIL, BOUNDARY_WEST >, East< CELL, STENCIL, BOUNDARY_EAST >, Top< CELL, STENCIL, BOUNDARY_TOP >, Bottom< CELL, STENCIL, BOUNDARY_BOTTOM >, North< CELL, STENCIL, BOUNDARY_NORTH >, and South< CELL, STENCIL, BOUNDARY_SOUTH >.

Collaboration diagram for LibGeoDecomp::LinePointerNeighborhood< CELL, STENCIL, BOUNDARY_WEST, BOUNDARY_EAST, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef CELL Cell

Public Member Functions

 LinePointerNeighborhood (const CELL **lines, long *offset)
template<int X, int Y, int Z>
const CELL & access (FixedCoord< X, Y, Z >, const CELL **lines) const
template<int X, int Y, int Z>
const CELL & operator[] (FixedCoord< X, Y, Z >) const

Private Attributes

const CELL ** lines
long * offset

Detailed Description

template<typename CELL, class STENCIL, bool BOUNDARY_WEST, bool BOUNDARY_EAST, bool BOUNDARY_TOP, bool BOUNDARY_BOTTOM, bool BOUNDARY_SOUTH, bool BOUNDARY_NORTH>
class LibGeoDecomp::LinePointerNeighborhood< CELL, STENCIL, BOUNDARY_WEST, BOUNDARY_EAST, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH >

gives cells access to their neighboring cells in a given stencil shape.

It is meant as a low-overhead replacement for CoordMap. The flags are used in template specializations to cover those cases in which accesses to neighboring cells need to be rerouted. In essence, we go through the pain of having such many parameters to resolve runtime conditionals for range checking at compile time.

BOUNDARY_WEST: X == -1 -> use WEST pointers = X >= 0 -> use center pointers + X

BOUNDARY_EAST: X == 1 -> use EAST pointers X <= 0 -> use center pointers + X

BOUNDARY_TOP: Y == -1 -> use TOP pointer (don't set this on a torus, as its not needed!) Y >= 0 -> use center pointers + X


Member Typedef Documentation

template<typename CELL , class STENCIL , bool BOUNDARY_WEST, bool BOUNDARY_EAST, bool BOUNDARY_TOP, bool BOUNDARY_BOTTOM, bool BOUNDARY_SOUTH, bool BOUNDARY_NORTH>
typedef CELL LibGeoDecomp::LinePointerNeighborhood< CELL, STENCIL, BOUNDARY_WEST, BOUNDARY_EAST, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH >::Cell

Constructor & Destructor Documentation

template<typename CELL , class STENCIL , bool BOUNDARY_WEST, bool BOUNDARY_EAST, bool BOUNDARY_TOP, bool BOUNDARY_BOTTOM, bool BOUNDARY_SOUTH, bool BOUNDARY_NORTH>
LibGeoDecomp::LinePointerNeighborhood< CELL, STENCIL, BOUNDARY_WEST, BOUNDARY_EAST, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH >::LinePointerNeighborhood ( const CELL **  lines,
long *  offset 
) [inline]

Member Function Documentation

template<typename CELL , class STENCIL , bool BOUNDARY_WEST, bool BOUNDARY_EAST, bool BOUNDARY_TOP, bool BOUNDARY_BOTTOM, bool BOUNDARY_SOUTH, bool BOUNDARY_NORTH>
template<int X, int Y, int Z>
const CELL& LibGeoDecomp::LinePointerNeighborhood< CELL, STENCIL, BOUNDARY_WEST, BOUNDARY_EAST, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH >::access ( FixedCoord< X, Y, Z >  ,
const CELL **  lines 
) const [inline]
template<typename CELL , class STENCIL , bool BOUNDARY_WEST, bool BOUNDARY_EAST, bool BOUNDARY_TOP, bool BOUNDARY_BOTTOM, bool BOUNDARY_SOUTH, bool BOUNDARY_NORTH>
template<int X, int Y, int Z>
const CELL& LibGeoDecomp::LinePointerNeighborhood< CELL, STENCIL, BOUNDARY_WEST, BOUNDARY_EAST, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH >::operator[] ( FixedCoord< X, Y, Z >   )  const [inline]

Member Data Documentation

template<typename CELL , class STENCIL , bool BOUNDARY_WEST, bool BOUNDARY_EAST, bool BOUNDARY_TOP, bool BOUNDARY_BOTTOM, bool BOUNDARY_SOUTH, bool BOUNDARY_NORTH>
const CELL** LibGeoDecomp::LinePointerNeighborhood< CELL, STENCIL, BOUNDARY_WEST, BOUNDARY_EAST, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH >::lines [private]
template<typename CELL , class STENCIL , bool BOUNDARY_WEST, bool BOUNDARY_EAST, bool BOUNDARY_TOP, bool BOUNDARY_BOTTOM, bool BOUNDARY_SOUTH, bool BOUNDARY_NORTH>
long* LibGeoDecomp::LinePointerNeighborhood< CELL, STENCIL, BOUNDARY_WEST, BOUNDARY_EAST, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH >::offset [private]

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