public class DSBlockStencil extends DSPartitionedStencil
| Modifier and Type | Field and Description |
|---|---|
protected int |
dataBytesUsed |
protected DataBlock[] |
inStencil |
protected int |
lastActiveOffset |
protected int |
lastIndexRequested |
protected RecordDescriptor |
recordDescriptor |
protected int |
size |
protected Datum |
tempDatum |
headerLength, partitioning, partitioningDimensionsArray, partitionListBytesLengthdimensionality, space| Constructor and Description |
|---|
DSBlockStencil(RegularISPartitioning partitioning,
RecordDescriptor recordDescriptor)
Construct a stencil that identifies areas of interest using a partitioning.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear this stencil of all elements.
|
boolean |
get(IndexSpaceID id)
Return true if the given id maps to an active stencil element, false otherwise.
|
byte[] |
getData(byte[] data)
Fill the given byte array with the data contained in the active elements
of this stencil.
|
DataBlock |
getDataBlock(IndexSpaceID id)
Return true if the given id maps to an active stencil element, false otherwise.
|
int |
getDataBytesUsed()
Return the number of bytes actually used in the last call to getData().
|
DataBlock |
getIndexedBlock(int index)
Return the DataBlock corresponding to the specified stencil element.
|
DataBlock |
getIndexedBlockAndBounds(ISBounds stencilBounds,
int index)
Return the DataBlock corresponding to the specified stencil element.
|
ISBounds |
getIndexedBounds(ISBounds stencilBounds,
int index)
Sets the argument ISBounds to the bounds of the specified stencil element.
|
protected long |
getIndexedOffset(int index)
Return the partition offset corresponding to the given index.
|
int |
getStorageType() |
static void |
main(java.lang.String[] argv) |
boolean |
set(IndexSpaceID id)
Set the stencil element containing the id to "active".
|
boolean |
set(IndexSpaceID id,
DataBlock block)
Set the stencil element containing the id to "active", associating the
given DataBlock with that element.
|
void |
setData(byte[] data)
Populate the active elements (Datablocks) of this stencil with the
data found in the given array.
|
void |
setDoubleAMRData(byte[] data)
Populate the active elements (Datablocks) of this stencil with the
data found in the given array.
|
boolean |
setElement(IndexSpaceID pid)
Set the stencil element with index corresponding to id to "active.
|
boolean |
setElement(IndexSpaceID pid,
DataBlock block)
Set the stencil element with index corresponding to id to "active",
associating the given DataBlock with that element.
|
protected void |
setElementFromOffset(int offset)
Set the element corresponding to the 1D offset to be active.
|
void |
setShortData(byte[] data)
Populate the active elements (Datablocks) of this stencil with the
data found in the given array.
|
int |
size()
return number of active elements contained by this stencil
|
java.lang.String |
toString()
Return a String representing the object.
|
java.lang.String |
toString(java.lang.String indent) |
chooseBytesPerValue, getPartitionDimensions, getPartitionDimensionsArray, getPartitioningDimensions, getPartitionListBytes, getPartitionListBytesLength, inPartitioningBounds, inPartitioningBounds, partitionVolume, setPartitionListFromBytes, volumedim, getIndexedBounds, getSpaceBoundsprotected DataBlock[] inStencil
protected RecordDescriptor recordDescriptor
protected int size
protected int lastIndexRequested
protected int lastActiveOffset
protected int dataBytesUsed
protected Datum tempDatum
public DSBlockStencil(RegularISPartitioning partitioning, RecordDescriptor recordDescriptor)
public byte[] getData(byte[] data)
public int getDataBytesUsed()
public void setData(byte[] data)
public void setDoubleAMRData(byte[] data)
public void setShortData(byte[] data)
public int getStorageType()
public boolean set(IndexSpaceID id)
public boolean setElement(IndexSpaceID pid)
setElement in class DSStencilpublic boolean set(IndexSpaceID id, DataBlock block)
public boolean setElement(IndexSpaceID pid, DataBlock block)
public boolean get(IndexSpaceID id)
public DataBlock getDataBlock(IndexSpaceID id)
public ISBounds getIndexedBounds(ISBounds stencilBounds, int index)
getIndexedBounds in class DSStencilpublic DataBlock getIndexedBlock(int index)
public DataBlock getIndexedBlockAndBounds(ISBounds stencilBounds, int index)
protected final long getIndexedOffset(int index)
getIndexedOffset in class DSPartitionedStencilprotected void setElementFromOffset(int offset)
setElementFromOffset in class DSPartitionedStencilpublic int size()
public void clear()
clear in class DSPartitionedStencilpublic java.lang.String toString()
toString in class DSPartitionedStencilpublic java.lang.String toString(java.lang.String indent)
toString in class DSPartitionedStencilpublic static void main(java.lang.String[] argv)