Region stores a set of coordinates. More...
#include <region.h>
Classes | |
| class | Iterator |
| class | StreakIterator |
Public Types | |
| typedef std::pair< int, int > | IntPair |
| typedef SuperVector< IntPair > | VecType |
Public Member Functions | |
| Region () | |
| template<class ITERATOR1 , class ITERATOR2 > | |
| Region (const ITERATOR1 &start, const ITERATOR2 &end) | |
| template<class ITERATOR1 , class ITERATOR2 > | |
| void | load (const ITERATOR1 &start, const ITERATOR2 &end) |
| void | clear () |
| const CoordBox< DIM > & | boundingBox () const |
| const long & | size () const |
| const unsigned | numStreaks () const |
| Region | expand (const unsigned &width=1) const |
| template<typename TOPOLOGY > | |
| Region | expandWithTopology (const unsigned &width, const Coord< DIM > &dimensions, TOPOLOGY) const |
| does the same as expand, but will wrap overlap at edges correctly. | |
| bool | operator== (const Region< DIM > &other) const |
| bool | count (const Streak< DIM > &s) const |
| bool | count (const Coord< DIM > &c) const |
| template<typename ADDEND > | |
| void | insert (const ADDEND &a) |
| Region & | operator<< (const Streak< DIM > &s) |
| Region & | operator<< (const Coord< DIM > &c) |
| Region & | operator<< (CoordBox< DIM > box) |
| Region & | operator>> (const Streak< DIM > &s) |
| Region & | operator>> (const Coord< DIM > &c) |
| void | operator-= (const Region &other) |
| Region | operator- (const Region &other) const |
| void | operator&= (const Region &other) |
| Region | operator& (const Region &other) const |
| void | operator+= (const Region &other) |
| Region | operator+ (const Region &other) const |
| SuperVector< Streak< DIM > > | toVector () const |
| std::string | toString () const |
| bool | empty () const |
| StreakIterator | beginStreak () const |
| StreakIterator | endStreak () const |
| Iterator | begin () const |
| Iterator | end () const |
Private Member Functions | |
| void | determineGeometry () const |
| void | resetGeometryCache () const |
| Streak< DIM > | trimStreak (const Streak< DIM > &s, const Coord< DIM > &dimensions) const |
| template<typename TOPOLOGY > | |
| void | splitStreak (const Streak< DIM > &streak, Region *target, const Coord< DIM > &dimensions) const |
| template<typename TOPOLOGY > | |
| void | normalizeStreak (const Streak< DIM > &streak, Region *target, const Coord< DIM > &dimensions) const |
Private Attributes | |
| VecType | indices [DIM] |
| CoordBox< DIM > | myBoundingBox |
| long | mySize |
| bool | geometryCacheTainted |
Friends | |
| class | RegionLookupHelper |
| class | RegionInsertHelper |
| class | RegionRemoveHelper |
| class | RegionTest |
Region stores a set of coordinates.
It performs a run-length coding. Instead of storing complete Streak objects, these objects get split up and are stored implicitly in the hierarchical indices vectors.
| typedef std::pair<int, int> LibGeoDecomp::Region< DIM >::IntPair |
| typedef SuperVector<IntPair> LibGeoDecomp::Region< DIM >::VecType |
| LibGeoDecomp::Region< DIM >::Region | ( | ) | [inline] |
| LibGeoDecomp::Region< DIM >::Region | ( | const ITERATOR1 & | start, | |
| const ITERATOR2 & | end | |||
| ) | [inline] |
References LibGeoDecomp::Region< DIM >::load().
| Iterator LibGeoDecomp::Region< DIM >::begin | ( | void | ) | const [inline] |
References LibGeoDecomp::Region< DIM >::beginStreak().
Referenced by LibGeoDecomp::TestSteerer< DIM >::nextStep(), and CoordEnumerationBronze::performance().
| StreakIterator LibGeoDecomp::Region< DIM >::beginStreak | ( | ) | const [inline] |
Referenced by LibGeoDecomp::Region< DIM >::begin(), LibGeoDecomp::Region< DIM >::determineGeometry(), LibGeoDecomp::Region< DIM >::expand(), LibGeoDecomp::Region< DIM >::expandWithTopology(), LibGeoDecomp::HiParSimulator::GridVecConv::gridToVector(), LibGeoDecomp::Region< DIM >::operator&(), LibGeoDecomp::Region< DIM >::operator+=(), LibGeoDecomp::Region< DIM >::operator-=(), LibGeoDecomp::DisplacedGrid< CELL, BufferTopology >::paste(), LibGeoDecomp::DisplacedGrid< CELL, BufferTopology >::pasteGridBase(), CoordEnumerationGold::performance(), LibGeoDecomp::MPIIO< CELL_TYPE, TOPOLOGY >::readRegion(), LibGeoDecomp::MPILayer::recvUnregisteredRegion(), LibGeoDecomp::MPILayer::sendUnregisteredRegion(), LibGeoDecomp::Region< DIM >::toVector(), LibGeoDecomp::HiParSimulator::VanillaStepper< CELL_TYPE >::update(), LibGeoDecomp::StripingSimulator< CELL_TYPE >::updateRegion(), LibGeoDecomp::HiParSimulator::GridVecConv::vectorToGrid(), LibGeoDecomp::MPIIO< CELL_TYPE, TOPOLOGY >::writeRegion(), and LibGeoDecomp::BOVWriter< CELL_TYPE, SELECTOR_TYPE >::writeRegion().
| const CoordBox<DIM>& LibGeoDecomp::Region< DIM >::boundingBox | ( | ) | const [inline] |
| void LibGeoDecomp::Region< DIM >::clear | ( | ) | [inline] |
| bool LibGeoDecomp::Region< DIM >::count | ( | const Streak< DIM > & | s | ) | const [inline] |
Referenced by RegionCount::performance().
| bool LibGeoDecomp::Region< DIM >::count | ( | const Coord< DIM > & | c | ) | const [inline] |
| void LibGeoDecomp::Region< DIM >::determineGeometry | ( | ) | const [inline, private] |
References LibGeoDecomp::Region< DIM >::beginStreak(), LibGeoDecomp::Region< DIM >::empty(), LibGeoDecomp::Region< DIM >::endStreak(), LibGeoDecomp::Region< DIM >::myBoundingBox, LibGeoDecomp::Region< DIM >::mySize, and LibGeoDecomp::Streak< DIM >::origin.
Referenced by LibGeoDecomp::Region< DIM >::resetGeometryCache().
| bool LibGeoDecomp::Region< DIM >::empty | ( | void | ) | const [inline] |
References LibGeoDecomp::Region< DIM >::indices, and LibGeoDecomp::Region< DIM >::size().
Referenced by LibGeoDecomp::Region< DIM >::determineGeometry(), and LibGeoDecomp::Region< DIM >::operator>>().
| Iterator LibGeoDecomp::Region< DIM >::end | ( | void | ) | const [inline] |
References LibGeoDecomp::Region< DIM >::endStreak().
Referenced by LibGeoDecomp::TestSteerer< DIM >::nextStep(), and CoordEnumerationBronze::performance().
| StreakIterator LibGeoDecomp::Region< DIM >::endStreak | ( | ) | const [inline] |
Referenced by LibGeoDecomp::Region< DIM >::determineGeometry(), LibGeoDecomp::Region< DIM >::end(), LibGeoDecomp::Region< DIM >::expand(), LibGeoDecomp::Region< DIM >::expandWithTopology(), LibGeoDecomp::HiParSimulator::GridVecConv::gridToVector(), LibGeoDecomp::Region< DIM >::operator&(), LibGeoDecomp::Region< DIM >::operator+=(), LibGeoDecomp::Region< DIM >::operator-=(), LibGeoDecomp::DisplacedGrid< CELL, BufferTopology >::paste(), LibGeoDecomp::DisplacedGrid< CELL, BufferTopology >::pasteGridBase(), CoordEnumerationGold::performance(), LibGeoDecomp::MPIIO< CELL_TYPE, TOPOLOGY >::readRegion(), LibGeoDecomp::MPILayer::recvUnregisteredRegion(), LibGeoDecomp::MPILayer::sendUnregisteredRegion(), LibGeoDecomp::Region< DIM >::toVector(), LibGeoDecomp::HiParSimulator::VanillaStepper< CELL_TYPE >::update(), LibGeoDecomp::StripingSimulator< CELL_TYPE >::updateRegion(), LibGeoDecomp::HiParSimulator::GridVecConv::vectorToGrid(), LibGeoDecomp::MPIIO< CELL_TYPE, TOPOLOGY >::writeRegion(), and LibGeoDecomp::BOVWriter< CELL_TYPE, SELECTOR_TYPE >::writeRegion().
| Region LibGeoDecomp::Region< DIM >::expand | ( | const unsigned & | width = 1 |
) | const [inline] |
| Region LibGeoDecomp::Region< DIM >::expandWithTopology | ( | const unsigned & | width, | |
| const Coord< DIM > & | dimensions, | |||
| TOPOLOGY | ||||
| ) | const [inline] |
does the same as expand, but will wrap overlap at edges correctly.
The instance of the TOPOLOGY is actually unused, but without it g++ would complain...
References LibGeoDecomp::CoordBox< DIM >::begin(), LibGeoDecomp::Region< DIM >::beginStreak(), LibGeoDecomp::CoordBox< DIM >::end(), LibGeoDecomp::Region< DIM >::endStreak(), LibGeoDecomp::Streak< DIM >::endX, LibGeoDecomp::Streak< DIM >::origin, and LibGeoDecomp::Region< DIM >::trimStreak().
Referenced by LibGeoDecomp::HiParSimulator::PartitionManager< DIM, Topology >::fillOwnRegion(), and LibGeoDecomp::HiParSimulator::PartitionManager< DIM, Topology >::fillRegion().
| void LibGeoDecomp::Region< DIM >::insert | ( | const ADDEND & | a | ) | [inline] |
| void LibGeoDecomp::Region< DIM >::load | ( | const ITERATOR1 & | start, | |
| const ITERATOR2 & | end | |||
| ) | [inline] |
Referenced by LibGeoDecomp::MPILayer::recvRegion(), and LibGeoDecomp::Region< DIM >::Region().
| void LibGeoDecomp::Region< DIM >::normalizeStreak | ( | const Streak< DIM > & | streak, | |
| Region< DIM > * | target, | |||
| const Coord< DIM > & | dimensions | |||
| ) | const [inline, private] |
| const unsigned LibGeoDecomp::Region< DIM >::numStreaks | ( | ) | const [inline] |
References LibGeoDecomp::Region< DIM >::indices.
Referenced by LibGeoDecomp::MPILayer::sendRegion(), and LibGeoDecomp::Region< DIM >::toVector().
| Region LibGeoDecomp::Region< DIM >::operator& | ( | const Region< DIM > & | other | ) | const [inline] |
| void LibGeoDecomp::Region< DIM >::operator&= | ( | const Region< DIM > & | other | ) | [inline] |
| Region LibGeoDecomp::Region< DIM >::operator+ | ( | const Region< DIM > & | other | ) | const [inline] |
| void LibGeoDecomp::Region< DIM >::operator+= | ( | const Region< DIM > & | other | ) | [inline] |
| Region LibGeoDecomp::Region< DIM >::operator- | ( | const Region< DIM > & | other | ) | const [inline] |
| void LibGeoDecomp::Region< DIM >::operator-= | ( | const Region< DIM > & | other | ) | [inline] |
| Region& LibGeoDecomp::Region< DIM >::operator<< | ( | const Streak< DIM > & | s | ) | [inline] |
| Region& LibGeoDecomp::Region< DIM >::operator<< | ( | const Coord< DIM > & | c | ) | [inline] |
| Region& LibGeoDecomp::Region< DIM >::operator<< | ( | CoordBox< DIM > | box | ) | [inline] |
| bool LibGeoDecomp::Region< DIM >::operator== | ( | const Region< DIM > & | other | ) | const [inline] |
References LibGeoDecomp::Region< DIM >::indices.
| Region& LibGeoDecomp::Region< DIM >::operator>> | ( | const Coord< DIM > & | c | ) | [inline] |
| Region& LibGeoDecomp::Region< DIM >::operator>> | ( | const Streak< DIM > & | s | ) | [inline] |
| void LibGeoDecomp::Region< DIM >::resetGeometryCache | ( | ) | const [inline, private] |
| const long& LibGeoDecomp::Region< DIM >::size | ( | void | ) | const [inline] |
References LibGeoDecomp::Region< DIM >::geometryCacheTainted, LibGeoDecomp::Region< DIM >::mySize, and LibGeoDecomp::Region< DIM >::resetGeometryCache().
Referenced by LibGeoDecomp::Region< DIM >::empty(), LibGeoDecomp::HiParSimulator::GridVecConv::gridToVector(), and LibGeoDecomp::HiParSimulator::GridVecConv::vectorToGrid().
| void LibGeoDecomp::Region< DIM >::splitStreak | ( | const Streak< DIM > & | streak, | |
| Region< DIM > * | target, | |||
| const Coord< DIM > & | dimensions | |||
| ) | const [inline, private] |
References LibGeoDecomp::Streak< DIM >::endX, and LibGeoDecomp::Streak< DIM >::origin.
| std::string LibGeoDecomp::Region< DIM >::toString | ( | ) | const [inline] |
References LibGeoDecomp::Region< DIM >::indices.
| SuperVector<Streak<DIM> > LibGeoDecomp::Region< DIM >::toVector | ( | ) | const [inline] |
| Streak<DIM> LibGeoDecomp::Region< DIM >::trimStreak | ( | const Streak< DIM > & | s, | |
| const Coord< DIM > & | dimensions | |||
| ) | const [inline, private] |
References LibGeoDecomp::Streak< DIM >::endX, and LibGeoDecomp::Streak< DIM >::origin.
Referenced by LibGeoDecomp::Region< DIM >::expandWithTopology().
friend class RegionInsertHelper [friend] |
friend class RegionLookupHelper [friend] |
friend class RegionRemoveHelper [friend] |
friend class RegionTest [friend] |
bool LibGeoDecomp::Region< DIM >::geometryCacheTainted [mutable, private] |
VecType LibGeoDecomp::Region< DIM >::indices[DIM] [private] |
Referenced by LibGeoDecomp::Region< DIM >::clear(), LibGeoDecomp::Region< DIM >::empty(), LibGeoDecomp::Region< DIM >::numStreaks(), LibGeoDecomp::RegionRemoveHelper< 0 >::operator()(), LibGeoDecomp::RegionRemoveHelper< DIM >::operator()(), LibGeoDecomp::RegionInsertHelper< 0 >::operator()(), LibGeoDecomp::RegionInsertHelper< DIM >::operator()(), LibGeoDecomp::RegionLookupHelper< 0 >::operator()(), LibGeoDecomp::RegionLookupHelper< DIM >::operator()(), LibGeoDecomp::Region< DIM >::operator==(), and LibGeoDecomp::Region< DIM >::toString().
CoordBox<DIM> LibGeoDecomp::Region< DIM >::myBoundingBox [mutable, private] |
long LibGeoDecomp::Region< DIM >::mySize [mutable, private] |
1.7.1