public abstract class ISPartitioning
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
dimensionality |
protected ISBounds |
partitioningBounds |
protected int[] |
partitioningLowerBounds |
protected int[] |
partitioningShape |
protected int[] |
partitioningUpperBounds |
protected int |
partitioningVolume |
protected int[] |
partitionShape |
protected ISBounds |
spaceBounds |
protected int[] |
spaceLowerBounds |
protected int[] |
spaceShape |
protected int[] |
spaceUpperBounds |
Constructor and Description |
---|
ISPartitioning(IndexSpaceID partitionShape,
ISBounds spaceBnds)
The first argument specifies the shape of each partition, not the
dimensions of the partitioning space.
|
ISPartitioning(int[] partitioningDims,
ISBounds spaceBnds)
Create an ISPartitioning
|
ISPartitioning(ISBounds partitioningBnds,
ISBounds spaceBnds)
Create an ISPartitioning from a Bounds describing the partitioning and a
Bounds describing the data space.
|
Modifier and Type | Method and Description |
---|---|
int |
dim() |
abstract ISBounds |
getIndexedBounds(ISBounds bounds,
IndexSpaceID partitioningIndex)
Sets the argument ISBounds to the bounds corresponding to the partition ID.
|
ISIterator |
getISIterator()
Return in IndexSpace iterator over the partitions
|
ISBounds |
getPartitioningBounds() |
int[] |
getPartitioningDimensions(int[] dimensions)
Return the dimensions of the partitioning and fill in those dimensions
in the passed argument.
|
int[] |
getPartitioningShape()
Return the dimensions of the partitioning
|
int[] |
getPartitioningShape(int[] dimensions)
Return the dimensions of the partitioning and fill in those dimensions
in the passed argument.
|
abstract ISBoundsIterator |
getPartitionIterator(ISBounds subSpace)
Create and return an iterator over the partitions that cover the
data space bounds defined by the parameter.
|
ISBounds |
getSpaceBounds()
Return the bounds of the data space underlying the partitioning
|
boolean |
inBounds(IndexSpaceID pid)
Return true if the argument represents a partition coordinate that is
within the bounds of this partitioning.
|
boolean |
inBounds(int[] coords)
Return true if the argument represents a partition coordinate that is
within the bounds of this partitioning.
|
abstract IndexSpaceID |
map(IndexSpaceID dataISID)
Map a position in the data space to the partition that contains it.
|
abstract ISBounds |
map(ISBounds dataBounds)
Map a bounds in the data space to the bounds in the partitioning space
that contains the data bounds.
|
long |
partitionVolume()
Return the volume of a single complete partition.
|
protected void |
setPartitioning(ISBounds partitioningBnds)
Define the partitioning from an ISBounds.
|
protected void |
setPartitionShape(IndexSpaceID shapeOfEachPartition)
Define the partitioning by defining the shape of each partition
|
protected void |
setSpaceBounds(ISBounds spaceBnds)
Define the space bounds for the partitioning.
|
java.lang.String |
toString()
Return a String representing the object.
|
java.lang.String |
toString(java.lang.String indent)
Return a String representing the object indented by the argument string.
|
long |
volume()
Return the total number of partitions.
|
protected int dimensionality
protected ISBounds partitioningBounds
protected int partitioningVolume
protected int[] partitioningLowerBounds
protected int[] partitioningUpperBounds
protected int[] partitioningShape
protected int[] partitionShape
protected ISBounds spaceBounds
protected int[] spaceLowerBounds
protected int[] spaceUpperBounds
protected int[] spaceShape
public ISPartitioning(ISBounds partitioningBnds, ISBounds spaceBnds)
partitioningBounds
- spaceBounds
- public ISPartitioning(IndexSpaceID partitionShape, ISBounds spaceBnds)
public ISPartitioning(int[] partitioningDims, ISBounds spaceBnds)
partitioningDims
- - the number of partitions in each dimension.
So [8, 6, 5] means there are 8x6x5 partitionsspaceBounds
- - the data space bounds over which the partitioning occurs.protected void setSpaceBounds(ISBounds spaceBnds)
protected void setPartitioning(ISBounds partitioningBnds)
protected void setPartitionShape(IndexSpaceID shapeOfEachPartition)
public final int dim()
public ISBounds getPartitioningBounds()
public final boolean inBounds(IndexSpaceID pid)
public final boolean inBounds(int[] coords)
public int[] getPartitioningDimensions(int[] dimensions)
dimensions
- -- if not null, fill in with partitioning dimensionspublic int[] getPartitioningShape()
public int[] getPartitioningShape(int[] dimensions)
dimensions
- -- if not null, fill in with partitioning dimensionspublic ISBounds getSpaceBounds()
public abstract ISBoundsIterator getPartitionIterator(ISBounds subSpace)
subSpace
- - region of data spacepublic ISIterator getISIterator()
public abstract IndexSpaceID map(IndexSpaceID dataISID)
dataISID
- - ISID in data spacepublic abstract ISBounds map(ISBounds dataBounds)
dataBounds
- - bounds in data spacepublic abstract ISBounds getIndexedBounds(ISBounds bounds, IndexSpaceID partitioningIndex)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String indent)
public long volume()
public long partitionVolume()