#include <SpatialPartition.h>
Public Types | |
enum | { uniform = false } |
enum | { gridded = true } |
enum | { tile = false } |
enum | { general = false } |
enum | { dimensions = 1 } |
typedef DefaultSPmapper | DefaultMapper_t |
typedef ReferenceLayout | Layout_t |
typedef Interval< 1 > | Domain_t |
typedef Node< Domain_t > | Value_t |
typedef std::vector< Value_t * > | List_t |
typedef SpatialPartition < ReferenceLayout > | This_t |
typedef GuardLayers< 1 > | GuardLayers_t |
typedef ReferenceLayout | RefLayout_t |
Public Member Functions | |
SpatialPartition (const RefLayout_t &layout) | |
SpatialPartition (const This_t &sp) | |
This_t & | operator= (const This_t &sp) |
~SpatialPartition () | |
int | maxSize () const |
Loc< 1 > | blocks () const |
int | context () const |
bool | hasGuards () const |
bool | hasCustomEdgeGuards () const |
bool | hasInternalGuards () const |
bool | hasExternalGuards () const |
GuardLayers_t | internalGuards () const |
GuardLayers_t | externalGuards () const |
const RefLayout_t & | reference () const |
template<class D , class Dom > | |
int | partition (const D &domain, std::vector< Node< Dom > * > &all, const ContextMapper< 1 > &cmapper) const |
template<class D , class Dom > | |
int | partition (const D &domain, std::vector< Node< Dom > * > &all) const |
template<class Out > | |
void | print (Out &o) const |
This partitioner will generate initially empty patches, and so is only useful if it is asked to partition an empty global domain. It is primarily used in situations where you need a second layout to have the same number of patches as a reference domain, with the same memory affinity for each patch. The size of the new patches, and their dimension, can be different than for the reference layout.
The template parameter of SpatialLayout is the type of reference layout; an instance of an object of this type must be provided in the constructor, for later use in the "partition" method. This can be any layout-like type that follows the normal layout interface rules.
The main interface to SpatialPartition is via its "partition" method, where it is provided the layout object that will get new domains after they are created and assigned to contexts, plus the global domain to partition. The global domain to partition in this case should be an empty domain, if it is not it is an error. For this partitioner, the generated domains will have the same dimensionality as the provided layout (but not necessarily the same dimensionality as the reference layout). "partition" will go through the patches of the reference layout, and generate the same number of patches for the layout being partitioned. The generated patches will have empty domains and no guard cells. They will have the same memory affinity as the corresponding patches in the reference domain.
typedef DefaultSPmapper SpatialPartition< ReferenceLayout >::DefaultMapper_t |
typedef ReferenceLayout SpatialPartition< ReferenceLayout >::Layout_t |
typedef Interval<1> SpatialPartition< ReferenceLayout >::Domain_t |
typedef Node<Domain_t> SpatialPartition< ReferenceLayout >::Value_t |
typedef std::vector<Value_t *> SpatialPartition< ReferenceLayout >::List_t |
typedef SpatialPartition<ReferenceLayout> SpatialPartition< ReferenceLayout >::This_t |
typedef GuardLayers<1> SpatialPartition< ReferenceLayout >::GuardLayers_t |
typedef ReferenceLayout SpatialPartition< ReferenceLayout >::RefLayout_t |
SpatialPartition< ReferenceLayout >::SpatialPartition | ( | const RefLayout_t & | layout | ) | [inline] |
SpatialPartition< ReferenceLayout >::SpatialPartition | ( | const This_t & | sp | ) | [inline] |
SpatialPartition< ReferenceLayout >::~SpatialPartition | ( | ) | [inline] |
This_t& SpatialPartition< ReferenceLayout >::operator= | ( | const This_t & | sp | ) | [inline] |
int SpatialPartition< ReferenceLayout >::maxSize | ( | ) | const [inline] |
Loc<1> SpatialPartition< ReferenceLayout >::blocks | ( | ) | const [inline] |
References SpatialPartition< ReferenceLayout >::maxSize().
int SpatialPartition< ReferenceLayout >::context | ( | ) | const [inline] |
bool SpatialPartition< ReferenceLayout >::hasGuards | ( | ) | const [inline] |
bool SpatialPartition< ReferenceLayout >::hasCustomEdgeGuards | ( | ) | const [inline] |
bool SpatialPartition< ReferenceLayout >::hasInternalGuards | ( | ) | const [inline] |
bool SpatialPartition< ReferenceLayout >::hasExternalGuards | ( | ) | const [inline] |
GuardLayers_t SpatialPartition< ReferenceLayout >::internalGuards | ( | ) | const [inline] |
GuardLayers_t SpatialPartition< ReferenceLayout >::externalGuards | ( | ) | const [inline] |
const RefLayout_t& SpatialPartition< ReferenceLayout >::reference | ( | ) | const [inline] |
int SpatialPartition< ReferenceLayout >::partition | ( | const D & | domain, | |
std::vector< Node< Dom > * > & | all, | |||
const ContextMapper< 1 > & | cmapper | |||
) | const [inline] |
int SpatialPartition< ReferenceLayout >::partition | ( | const D & | domain, | |
std::vector< Node< Dom > * > & | all | |||
) | const [inline] |
References all(), and SpatialPartition< ReferenceLayout >::partition().
void SpatialPartition< ReferenceLayout >::print | ( | Out & | o | ) | const [inline] |