public class RegularISPartitioning extends ISPartitioning
Modifier and Type | Field and Description |
---|---|
protected long[] |
axisWeights |
protected AxisOrdering |
ordering |
protected int[] |
tempCoords |
dimensionality, partitioningBounds, partitioningLowerBounds, partitioningShape, partitioningUpperBounds, partitioningVolume, partitionShape, spaceBounds, spaceLowerBounds, spaceShape, spaceUpperBounds
Constructor and Description |
---|
RegularISPartitioning(IndexSpaceID partitioningShape,
ISBounds spaceBounds)
Create a regular partition over space, given the desired block size for
each partition.
|
RegularISPartitioning(IndexSpaceID partitioningShape,
ISBounds spaceBounds,
AxisOrdering ordering)
Create a regular partition over space, given the shape of each partition,
not the dimensions of the partitioning Space.
|
RegularISPartitioning(ISBounds partitioningBounds,
ISBounds spaceBounds)
Create a regular partition over space, given the desired partitioning space
|
RegularISPartitioning(ISBounds partitioningBounds,
ISBounds spaceBounds,
AxisOrdering ordering)
Create a regular partition over space, given the desired partitioning space
and an AxisOrdering
|
Modifier and Type | Method and Description |
---|---|
long |
containingOffset(IndexSpaceID id)
Map the index space id onto the partitioning space and return the 1D
offset of the containing partition.
|
long |
elementOffset(IndexSpaceID id)
Return the 1D offset of the element specified by the id.
|
int |
getContainingPartitionBoundary(IndexSpaceID id,
int axis,
boolean upper)
If upper is true, return the upper value of the specified axis
of the partition containing the id, otherwise, return the lower value.
|
ISBounds |
getContainingPartitionBounds(IndexSpaceID id)
Return the bounds of the partition that contains the given id.
|
ISBounds |
getContainingPartitionBounds(IndexSpaceID id,
ISBounds bounds)
Sets the ISBounds argument to the bounds of the partition in the data space
that contains the given id, specified in the data space.
|
ISBounds |
getGeometricBounds()
add by xuan
|
ISBounds |
getIndexedBounds(ISBounds bounds,
IndexSpaceID partitioningIndex)
Sets the argument ISBounds to the space bounds corresponding to the
partition defined by the partitioning ID and returns the bounds as well.
|
ISBounds |
getOffsetBounds(ISBounds bounds,
long offset)
Sets the argument ISBounds to the bounds corresponding to the partition
offset.
|
IndexSpaceID |
getOffsetID(IndexSpaceID id,
long offset)
Sets the argument ISID to the value corresponding to the 1D partition offset.
|
IndexSpaceID |
getOffsetID(long offset)
Returns a new ISID corresponding to the 1D partition offset.
|
int |
getPartitionBoundary(IndexSpaceID partitionID,
int axis,
boolean upper)
If upper is true, return the upper value of the specified axis
of the partition specified by the partition id, otherwise, return the lower value.
|
int |
getPartitionIndex(IndexSpaceID dataPoint)
return the partition index (1D order position of the partitions).
|
ISBoundsIterator |
getPartitionIterator() |
ISBoundsIterator |
getPartitionIterator(ISBounds subSpace)
Create and return an iterator over the partitions that cover the
data space bounds defined by the parameter.
|
ISBoundsIterator |
getPartitionIterator(ISBounds subSpace,
ISBoundsIterator iter) |
static void |
main(java.lang.String[] argv) |
IndexSpaceID |
map(IndexSpaceID dataPoint)
Map the id onto the partitioning.
|
IndexSpaceID |
map(IndexSpaceID s,
IndexSpaceID d)
Map the first argument onto the partitioning, placing the result
in the second argument.
|
ISBounds |
map(ISBounds bounds)
Map the bounds onto the partitioning, returning a new ISBounds.
|
ISBounds |
mapToSpace(IndexSpaceID partitionID)
map partition ID to space ISBounds
|
ISBounds |
mapToSpace(ISBounds partitionBounds)
map a partition ISBounds to space ISBounds
|
ISBounds[] |
mapToSpaceParts(ISBounds spaceBnds)
Map a bounds in space to the set of spatial bounds that represent
the pieces of the bounds that are each only in exactly one partition.
|
long |
partitionOffset(IndexSpaceID partitionId)
Map the partitioning space id to its 1D offset.
|
RegularISPartitioning |
project(int axis) |
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.
|
dim, getISIterator, getPartitioningBounds, getPartitioningDimensions, getPartitioningShape, getPartitioningShape, getSpaceBounds, inBounds, inBounds, partitionVolume, setPartitioning, setPartitionShape, setSpaceBounds, volume
protected long[] axisWeights
protected int[] tempCoords
protected AxisOrdering ordering
public RegularISPartitioning(ISBounds partitioningBounds, ISBounds spaceBounds)
partitioningBounds
- spaceBounds
- public RegularISPartitioning(ISBounds partitioningBounds, ISBounds spaceBounds, AxisOrdering ordering)
partitioningBounds
- spaceBounds
- ordering
- public RegularISPartitioning(IndexSpaceID partitioningShape, ISBounds spaceBounds)
partitionSize
- spaceBounds
- public RegularISPartitioning(IndexSpaceID partitioningShape, ISBounds spaceBounds, AxisOrdering ordering)
partitioningBounds
- spaceBounds
- ordering
- public RegularISPartitioning project(int axis)
public final IndexSpaceID map(IndexSpaceID dataPoint)
map
in class ISPartitioning
dataPoint
- - ISID in data spacepublic final IndexSpaceID map(IndexSpaceID s, IndexSpaceID d)
public final ISBounds map(ISBounds bounds)
map
in class ISPartitioning
bounds
- - bounds in data spacepublic final long containingOffset(IndexSpaceID id)
public final long elementOffset(IndexSpaceID id)
public ISBounds getGeometricBounds()
public ISBounds mapToSpace(ISBounds partitionBounds)
public ISBounds mapToSpace(IndexSpaceID partitionID)
public ISBounds[] mapToSpaceParts(ISBounds spaceBnds)
ISBounds:
- spaceBnds -- portion of space domain to be mappedpublic final int getPartitionBoundary(IndexSpaceID partitionID, int axis, boolean upper)
public final int getContainingPartitionBoundary(IndexSpaceID id, int axis, boolean upper)
public final ISBounds getContainingPartitionBounds(IndexSpaceID id)
public int getPartitionIndex(IndexSpaceID dataPoint)
public final ISBounds getContainingPartitionBounds(IndexSpaceID id, ISBounds bounds)
public ISBoundsIterator getPartitionIterator()
public ISBoundsIterator getPartitionIterator(ISBounds subSpace)
ISPartitioning
getPartitionIterator
in class ISPartitioning
subSpace
- - region of data spacepublic ISBoundsIterator getPartitionIterator(ISBounds subSpace, ISBoundsIterator iter)
public ISBounds getIndexedBounds(ISBounds bounds, IndexSpaceID partitioningIndex)
getIndexedBounds
in class ISPartitioning
public ISBounds getOffsetBounds(ISBounds bounds, long offset)
public IndexSpaceID getOffsetID(long offset)
public IndexSpaceID getOffsetID(IndexSpaceID id, long offset)
public final long partitionOffset(IndexSpaceID partitionId)
public java.lang.String toString()
toString
in class ISPartitioning
public java.lang.String toString(java.lang.String indent)
toString
in class ISPartitioning
public static void main(java.lang.String[] argv)