appl.parallel.spmd.split
Class SplitMap2D
java.lang.Object
appl.parallel.spmd.split.AbstractSplitMap
appl.parallel.spmd.split.SplitMap2D
- All Implemented Interfaces:
- SplitMap, Serializable
public class SplitMap2D
- extends AbstractSplitMap
- implements SplitMap
Responsible for splitting a 2D Area (e.g a WritableGrid
) in a 2D
fashion. The splitting is irregular, meaning that the rectangles are not
equally sized, but partitioned according to the given weights.
Splitting is as follows:
1 to 4 Partitions: 1 row
4 to 8 Partitions: 2 rows
9 to 15 Partitions: 3 rows
and so on (depending on the square root of the partititons)
For partitioning the this class strongly depends on SplitMap1DHorizontal
and SplitMap1DVertical
. First the squareroot of the number of
participating resources is taken to determine how many rows should be
created. After this the height of the rows is weighted by adding the weight
of the resources in that horizontal partition. The Grid is then splitted
horizontal. Finally the horizontal partitions are splitted vertical according
to the relative weight to each other. This is only a a virtual split (a map
of a split).
A neighborhood range can be specified to create partitions that overlap each
other. This overlapping can be done in two different ways:
Inboxing(default):
Inboxing means, that the neighborhood area is not part of the calculation
area.
Outboxing:
Outboxing means that the neighborhood area is part of the calculation area.
Note that this may also be applied to three dimensional data structures (a 2D
splitting of a 3D datatype).
- Author:
- Dominik Appl
- See Also:
- Serialized Form
Methods inherited from class appl.parallel.spmd.split.AbstractSplitMap |
getCount, getGlobalBounds, getGlobalCalculationBounds, getIP, getLocalBounds, getLocalCalculationBounds, getLocalNeighborhoodBounds, getNeighborhoodRange, getPartitionBounds, getPartitionCalculationBounds, getPartitionNeighborhoodBounds, init, setIPs, setParameters, setWeights |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface appl.parallel.spmd.split.SplitMap |
getCount, getGlobalBounds, getGlobalCalculationBounds, getIP, getLocalBounds, getLocalCalculationBounds, getLocalNeighborhoodBounds, getNeighborhoodRange, getPartitionBounds, getPartitionCalculationBounds, getPartitionNeighborhoodBounds, setIPs, setParameters, setWeights |
SplitMap2D
public SplitMap2D(int width,
int height,
int neighborhoodRange,
int noOfPartitions,
AbstractSplitMap.NeighborhoodBoxingMode boxingMode)
SplitMap2D
public SplitMap2D()
- needed for serialization
makeMap
public void makeMap()
- Description copied from interface:
SplitMap
- Creates the map
- Specified by:
makeMap
in interface SplitMap
- Specified by:
makeMap
in class AbstractSplitMap
getNeighborsForPosition
public int[] getNeighborsForPosition(int pos)
- Description copied from interface:
SplitMap
- returns an Array of neighbors for that position in the splitmap.
- Specified by:
getNeighborsForPosition
in interface SplitMap
- Specified by:
getNeighborsForPosition
in class AbstractSplitMap
- Parameters:
pos
- position in splitmap
- Returns:
- the array
getDescription
public String getDescription()
- Specified by:
getDescription
in interface SplitMap
- Specified by:
getDescription
in class AbstractSplitMap
- Returns:
- a short description of the type of the Splitting