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

LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY > Class Template Reference

A multi-dimensional regular grid. More...

#include <grid.h>

Inherits GridBase< CELL_TYPE, TOPOLOGY::DIM >.

Collaboration diagram for LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
boost::detail::multi_array::sub_array
< CELL_TYPE, DIM-1 > 
SliceRef
typedef
boost::detail::multi_array::const_sub_array
< CELL_TYPE, 1 > 
ConstSliceRef
typedef boost::multi_array
< CELL_TYPE, DIM,
LibFlatArray::aligned_allocator
< CELL_TYPE, 64 > > 
CellMatrix
typedef CellMatrix::index Index
typedef TOPOLOGY Topology
typedef CELL_TYPE Cell
typedef CoordMap< CELL_TYPE,
Grid< CELL_TYPE, TOPOLOGY > > 
CoordMapType

Public Member Functions

 Grid (const Coord< DIM > &dim=Coord< DIM >(), const CELL_TYPE &defaultCell=CELL_TYPE(), const CELL_TYPE &edgeCell=CELL_TYPE())
 Grid (const GridBase< CELL_TYPE, DIM > &base)
Gridoperator= (const Grid &other)
void resize (const Coord< DIM > &newDim)
CoordMapType getNeighborhood (const Coord< DIM > &center) const
 returns a map that is referenced by relative coordinates from the originating coordinate coord.
CELL_TYPE & getEdgeCell ()
const CELL_TYPE & getEdgeCell () const
CELL_TYPE * baseAddress ()
const CELL_TYPE * baseAddress () const
CELL_TYPE & operator[] (const Coord< DIM > &coord)
const CELL_TYPE & operator[] (const Coord< DIM > &coord) const
const ConstSliceRef operator[] (const Index y) const
 WARNING: this operator doesn't honor topology properties.
SliceRef operator[] (const Index y)
 WARNING: this operator doesn't honor topology properties.
bool operator== (const Grid &other) const
bool operator== (const GridBase< CELL_TYPE, TOPOLOGY::DIM > &other) const
bool operator!= (const Grid &other) const
bool operator!= (const GridBase< CELL_TYPE, TOPOLOGY::DIM > &other) const
virtual void set (const Coord< DIM > &coord, const CELL_TYPE &cell)
virtual void set (const Streak< DIM > &streak, const CELL_TYPE *cells)
virtual CELL_TYPE get (const Coord< DIM > &coord) const
virtual void get (const Streak< DIM > &streak, CELL_TYPE *cells) const
virtual void setEdge (const CELL_TYPE &cell)
virtual const CELL_TYPE & getEdge () const
void fill (const CoordBox< DIM > &box, const CELL_TYPE &cell)
const Coord< DIM > & getDimensions () const
std::string toString () const
virtual CoordBox< DIMboundingBox () const

Static Public Attributes

static const int DIM = TOPOLOGY::DIM

Protected Member Functions

void saveMemberImplementation (char *target, const Selector< CELL_TYPE > &selector, const Region< DIM > &region) const
void loadMemberImplementation (const char *source, const Selector< CELL_TYPE > &selector, const Region< DIM > &region)

Private Attributes

Coord< DIMdimensions
CellMatrix cellMatrix
CELL_TYPE edgeCell

Friends

class GridTest
class ParallelStripingSimulatorTest

Detailed Description

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

A multi-dimensional regular grid.


Member Typedef Documentation

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
typedef CELL_TYPE LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::Cell
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
typedef boost::multi_array< CELL_TYPE, DIM, LibFlatArray::aligned_allocator<CELL_TYPE, 64> > LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::CellMatrix
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
typedef boost::detail::multi_array::const_sub_array<CELL_TYPE, 1> LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::ConstSliceRef
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
typedef CoordMap<CELL_TYPE, Grid<CELL_TYPE, TOPOLOGY> > LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::CoordMapType
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
typedef CellMatrix::index LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::Index
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
typedef boost::detail::multi_array::sub_array<CELL_TYPE, DIM - 1> LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::SliceRef
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
typedef TOPOLOGY LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::Topology

Constructor & Destructor Documentation

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::Grid ( const Coord< DIM > &  dim = Coord<DIM>(),
const CELL_TYPE &  defaultCell = CELL_TYPE(),
const CELL_TYPE &  edgeCell = CELL_TYPE() 
) [inline, explicit]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::Grid ( const GridBase< CELL_TYPE, DIM > &  base  )  [inline, explicit]

Member Function Documentation

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
CELL_TYPE* LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::baseAddress (  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
const CELL_TYPE* LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::baseAddress (  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
virtual CoordBox<DIM> LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::boundingBox (  )  const [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
void LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::fill ( const CoordBox< DIM > &  box,
const CELL_TYPE &  cell 
) [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
virtual void LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::get ( const Streak< DIM > &  streak,
CELL_TYPE *  cells 
) const [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
virtual CELL_TYPE LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::get ( const Coord< DIM > &  coord  )  const [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
const Coord<DIM>& LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::getDimensions (  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
virtual const CELL_TYPE& LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::getEdge (  )  const [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
const CELL_TYPE& LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::getEdgeCell (  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
CELL_TYPE& LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::getEdgeCell (  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
CoordMapType LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::getNeighborhood ( const Coord< DIM > &  center  )  const [inline]

returns a map that is referenced by relative coordinates from the originating coordinate coord.

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
void LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::loadMemberImplementation ( const char *  source,
const Selector< CELL_TYPE > &  selector,
const Region< DIM > &  region 
) [inline, protected, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
bool LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::operator!= ( const Grid< CELL_TYPE, TOPOLOGY > &  other  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
bool LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::operator!= ( const GridBase< CELL_TYPE, TOPOLOGY::DIM > &  other  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
Grid& LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::operator= ( const Grid< CELL_TYPE, TOPOLOGY > &  other  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
bool LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::operator== ( const Grid< CELL_TYPE, TOPOLOGY > &  other  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
bool LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::operator== ( const GridBase< CELL_TYPE, TOPOLOGY::DIM > &  other  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
SliceRef LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::operator[] ( const Index  y  )  [inline]

WARNING: this operator doesn't honor topology properties.

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
const CELL_TYPE& LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::operator[] ( const Coord< DIM > &  coord  )  const [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
const ConstSliceRef LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::operator[] ( const Index  y  )  const [inline]

WARNING: this operator doesn't honor topology properties.

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
CELL_TYPE& LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::operator[] ( const Coord< DIM > &  coord  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
void LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::resize ( const Coord< DIM > &  newDim  )  [inline]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
void LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::saveMemberImplementation ( char *  target,
const Selector< CELL_TYPE > &  selector,
const Region< DIM > &  region 
) const [inline, protected, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
virtual void LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::set ( const Streak< DIM > &  streak,
const CELL_TYPE *  cells 
) [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
virtual void LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::set ( const Coord< DIM > &  coord,
const CELL_TYPE &  cell 
) [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
virtual void LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::setEdge ( const CELL_TYPE &  cell  )  [inline, virtual]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
std::string LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::toString (  )  const [inline]

Friends And Related Function Documentation

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
friend class GridTest [friend]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
friend class ParallelStripingSimulatorTest [friend]

Member Data Documentation

template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
CellMatrix LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::cellMatrix [private]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
const int LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::DIM = TOPOLOGY::DIM [static]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
Coord<DIM> LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::dimensions [private]
template<typename CELL_TYPE, typename TOPOLOGY = Topologies::Cube<2>::Topology>
CELL_TYPE LibGeoDecomp::Grid< CELL_TYPE, TOPOLOGY >::edgeCell [private]

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