Public Types | Public Member Functions | Static Public Attributes | Private Attributes

LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE > Class Template Reference

provides access to neighboring cells in a grid via relative coordinates. More...

#include <coordmap.h>

Collaboration diagram for LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef CELL_TYPE Cell

Public Member Functions

 CoordMap (const Coord< DIM > &origin, const GRID_TYPE *grid)
const CELL_TYPE & operator[] (const Coord< DIM > &relCoord) const
 This operator doesn't implement out-of-bounds-checking.
template<int X, int Y, int Z>
const CELL_TYPE & operator[] (FixedCoord< X, Y, Z > relCoord) const
std::string toString () const

Static Public Attributes

static const int DIM = GRID_TYPE::DIM

Private Attributes

Coord< DIMorigin
const GRID_TYPE * grid

Detailed Description

template<typename CELL_TYPE, typename GRID_TYPE = Grid<CELL_TYPE, Topologies::Cube<2>::Topology>>
class LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >

provides access to neighboring cells in a grid via relative coordinates.

Slow!


Member Typedef Documentation

template<typename CELL_TYPE , typename GRID_TYPE = Grid<CELL_TYPE, Topologies::Cube<2>::Topology>>
typedef CELL_TYPE LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >::Cell

Constructor & Destructor Documentation

template<typename CELL_TYPE , typename GRID_TYPE = Grid<CELL_TYPE, Topologies::Cube<2>::Topology>>
LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >::CoordMap ( const Coord< DIM > &  origin,
const GRID_TYPE *  grid 
) [inline]

Member Function Documentation

template<typename CELL_TYPE , typename GRID_TYPE = Grid<CELL_TYPE, Topologies::Cube<2>::Topology>>
const CELL_TYPE& LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >::operator[] ( const Coord< DIM > &  relCoord  )  const [inline]

This operator doesn't implement out-of-bounds-checking.

This isn't a bug, it's a feature. It allows us to remain independent of the currently used neighborhood definition and it is unlikely to lead to errors as the Grid itself implements range checks.

References LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >::grid, and LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >::origin.

template<typename CELL_TYPE , typename GRID_TYPE = Grid<CELL_TYPE, Topologies::Cube<2>::Topology>>
template<int X, int Y, int Z>
const CELL_TYPE& LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >::operator[] ( FixedCoord< X, Y, Z >  relCoord  )  const [inline]
template<typename CELL_TYPE , typename GRID_TYPE = Grid<CELL_TYPE, Topologies::Cube<2>::Topology>>
std::string LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >::toString (  )  const [inline]

Member Data Documentation

template<typename CELL_TYPE , typename GRID_TYPE = Grid<CELL_TYPE, Topologies::Cube<2>::Topology>>
const int LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >::DIM = GRID_TYPE::DIM [static]
template<typename CELL_TYPE , typename GRID_TYPE = Grid<CELL_TYPE, Topologies::Cube<2>::Topology>>
const GRID_TYPE* LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >::grid [private]
template<typename CELL_TYPE , typename GRID_TYPE = Grid<CELL_TYPE, Topologies::Cube<2>::Topology>>
Coord<DIM> LibGeoDecomp::CoordMap< CELL_TYPE, GRID_TYPE >::origin [private]

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