public abstract class DSPartitionedStencil extends DSStencil
Modifier and Type | Field and Description |
---|---|
protected int |
headerLength |
protected RegularISPartitioning |
partitioning |
protected int[] |
partitioningDimensionsArray |
protected int |
partitionListBytesLength |
dimensionality, space
Constructor and Description |
---|
DSPartitionedStencil(RegularISPartitioning partitioning) |
Modifier and Type | Method and Description |
---|---|
protected byte |
chooseBytesPerValue()
determine how many bytes to use per offset when representing the
stencil as an array of bytes.
|
abstract void |
clear()
Clear this stencil of all elements.
|
protected abstract long |
getIndexedOffset(int index)
Return the partition offset corresponding to the given index.
|
IndexSpaceID |
getPartitionDimensions()
Returns the dimensions of an element as an IndexSpaceID.
|
int[] |
getPartitionDimensionsArray()
Returns the dimensions of an element as an int array.
|
int[] |
getPartitioningDimensions()
Return an array of integers indicating the dimensions of the
partitioning.
|
byte[] |
getPartitionListBytes(byte[] bytes)
Fill the given array with a representation of the partition list.
|
int |
getPartitionListBytesLength()
Return the number of bytes used by the last call to
getPartitionListBytes().
|
boolean |
inPartitioningBounds(IndexSpaceID pid)
Return true if the argument represents a partition coordinate that is
within the bounds of the stencil partitioning.
|
boolean |
inPartitioningBounds(int[] coords)
Return true if the argument represents a partition coordinate that is
within the bounds of the stencil partitioning.
|
long |
partitionVolume()
Return the volume of a single element in the stencil partitioning.
|
protected abstract void |
setElementFromOffset(int offset)
Set the element corresponding to the 1D offset to be active.
|
byte[] |
setPartitionListFromBytes(byte[] bytes)
Set the partition list according to the data found in the
given array of bytes.
|
java.lang.String |
toString()
Return a String representing the object.
|
java.lang.String |
toString(java.lang.String indent) |
long |
volume()
Computes the volume of the stencil partitioning space.
|
dim, get, getIndexedBounds, getIndexedBounds, getSpaceBounds, set, setElement, size
protected int[] partitioningDimensionsArray
protected RegularISPartitioning partitioning
protected int partitionListBytesLength
protected int headerLength
public DSPartitionedStencil(RegularISPartitioning partitioning)
public byte[] getPartitionListBytes(byte[] bytes)
public byte[] setPartitionListFromBytes(byte[] bytes)
public int getPartitionListBytesLength()
protected byte chooseBytesPerValue()
protected abstract long getIndexedOffset(int index)
protected abstract void setElementFromOffset(int offset)
public abstract void clear()
public IndexSpaceID getPartitionDimensions()
public int[] getPartitionDimensionsArray()
public int[] getPartitioningDimensions()
public final boolean inPartitioningBounds(IndexSpaceID pid)
public final boolean inPartitioningBounds(int[] coords)
public long volume()
public long partitionVolume()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String indent)