edu.unh.sdb.datasource
Class DSThreadedPartitionedStencilIterator

java.lang.Object
  extended by edu.unh.sdb.datasource.DataCollection
      extended by edu.unh.sdb.datasource.DataBlock
          extended by edu.unh.sdb.datasource.BasicBlock
              extended by edu.unh.sdb.datasource.DSPartitionedStencilIterator
                  extended by edu.unh.sdb.datasource.DSThreadedPartitionedStencilIterator
All Implemented Interfaces:
SDBIterator, Indexable

public class DSThreadedPartitionedStencilIterator
extends DSPartitionedStencilIterator


Nested Class Summary
protected  class DSThreadedPartitionedStencilIterator.IOThread
           
 
Field Summary
 
Fields inherited from class edu.unh.sdb.datasource.BasicBlock
leastSignificantAxis, steps
 
Fields inherited from class edu.unh.sdb.datasource.DataCollection
attributeOrder, axisOrdering, axisWeights, bounds, dataOrder, dimensionality, numAttributes, pointOrder, recordDesc
 
Constructor Summary
DSThreadedPartitionedStencilIterator(DSPartitionedStencil stencil, DataSource ds)
           
 
Method Summary
 void datum(Datum dtm, IndexSpaceID did)
          Given an IndexSpaceID, copy the values of the Datum at that position to the argument Datum.
 void datum(Datum dtm, IndexSpaceID did, FieldIDMapper mp)
          Given an IndexSpaceID and FieldIDMapper, copy the values of the Datum at that position to the argument Datum.
 void end()
          Advance the iterator to the last valid value in the iteration.
 void init()
          Perform any necessary initialization, and set the iterator value to the first value in the iteration.
protected  void load(int index)
           
 boolean next()
          Advance the iterator by one step.
 void setDatum(IndexSpaceID isid, Datum d)
          Set the location specified by the IndexSpaceID to the given datum.
 void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds)
          Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds.
 void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds, FieldIDMapper mp)
          Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds.
 boolean valid()
          Return true if the iterator currently has a valid value, false otherwise.
 
Methods inherited from class edu.unh.sdb.datasource.DSPartitionedStencilIterator
getStencil
 
Methods inherited from class edu.unh.sdb.datasource.BasicBlock
copyData, copyData, copyData, datum, datum, datum, datum, datum, datum, getByte, getDouble, getDoubles, getFieldPos, getFloat, getFloats, getInt, getInts, getShort, getShorts, getValues, getValues, psubblock, setAttributeOrderRod, setBytes, setDoubles, setField, setField, setField, setField, setField, setField, setFloats, setFloats, setInts, setRod, setRod, setShorts, setValues, setValues, subblock, subblock, subblock
 
Methods inherited from class edu.unh.sdb.datasource.DataBlock
setByAttribute, setByte, setBytes, setBytesByAttribute, setBytesByPoint, setDouble, setDoubles, setDoublesByAttribute, setDoublesByPoint, setFloat, setFloats, setFloatsByAttribute, setFloatsByPoint, setInt, setInts, setIntsByAttribute, setIntsByPoint, setShort, setShorts, setShortsByAttribute, setShortsByPoint, setValuesByAttribute, setValuesByPoint, toString
 
Methods inherited from class edu.unh.sdb.datasource.DataCollection
byteSize, computeOffset, computeOffset, copyBounds, createDataBlock, createDataBlock, createDataBlock, createDatum, createDatum, createDatum, createDatum, createDatum, createDatum, datum, dim, getAxisOrdering, getAxisWeight, getAxisWeights, getBounds, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytesByAttribute, getBytesByAttribute, getBytesByPoint, getBytesByPoint, getDataOrder, getDimensionsArray, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoublesByAttribute, getDoublesByAttribute, getDoublesByPoint, getDoublesByPoint, getFloats, getFloats, getFloats, getFloats, getFloats, getFloats, getFloatsByAttribute, getFloatsByAttribute, getFloatsByPoint, getFloatsByPoint, getInts, getInts, getInts, getInts, getInts, getInts, getIntsByAttribute, getIntsByAttribute, getIntsByPoint, getIntsByPoint, getLowerBoundsArray, getNumAttributes, getRecordDescriptor, getShorts, getShorts, getShorts, getShorts, getShorts, getShorts, getShortsByAttribute, getShortsByAttribute, getShortsByPoint, getShortsByPoint, getStorageType, getValuesByAttribute, getValuesByPoint, longVolume, setAxisOrdering, setBounds, setRecordDescriptor, size, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, useBytesOnly, volume
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DSThreadedPartitionedStencilIterator

public DSThreadedPartitionedStencilIterator(DSPartitionedStencil stencil,
                                            DataSource ds)
Method Detail

init

public void init()
Perform any necessary initialization, and set the iterator value to the first value in the iteration. If the stencil contains no elements, then the value of this iterator is undefined, but valid() will return false. However, activate() is still called on the underlying datasource.

Specified by:
init in interface SDBIterator
Overrides:
init in class DSPartitionedStencilIterator

next

public boolean next()
Advance the iterator by one step. If the iterator cannot be advanced to produce a valid value, the value of the iterator is undefined, but the next() method will return false, as will a subsequent call to valid().

Specified by:
next in interface SDBIterator
Overrides:
next in class DSPartitionedStencilIterator

valid

public boolean valid()
Return true if the iterator currently has a valid value, false otherwise.

Specified by:
valid in interface SDBIterator
Overrides:
valid in class DSPartitionedStencilIterator

end

public void end()
Advance the iterator to the last valid value in the iteration. (optional operation)

Specified by:
end in interface SDBIterator
Overrides:
end in class DSPartitionedStencilIterator

setDatum

public void setDatum(IndexSpaceID isid,
                     Datum d)
Set the location specified by the IndexSpaceID to the given datum.

Overrides:
setDatum in class BasicBlock

datum

public void datum(Datum dtm,
                  IndexSpaceID did)
Given an IndexSpaceID, copy the values of the Datum at that position to the argument Datum.

Specified by:
datum in interface Indexable
Overrides:
datum in class BasicBlock

datum

public void datum(Datum dtm,
                  IndexSpaceID did,
                  FieldIDMapper mp)
Given an IndexSpaceID and FieldIDMapper, copy the values of the Datum at that position to the argument Datum.

Specified by:
datum in interface Indexable
Overrides:
datum in class BasicBlock

subblock

public void subblock(DataBlock theBlock,
                     ISBounds dstBounds,
                     ISBounds srcBounds)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds.

Specified by:
subblock in interface Indexable
Overrides:
subblock in class BasicBlock

subblock

public void subblock(DataBlock theBlock,
                     ISBounds dstBounds,
                     ISBounds srcBounds,
                     FieldIDMapper mp)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. The FieldIDMapper argument determines the mapping between datums in this DataBlock and datums in the argument DataBlock. It is legal to pass a null for the FieldIDMapper argument which means that all attributes are to be extracted.

Specified by:
subblock in interface Indexable
Overrides:
subblock in class BasicBlock

load

protected void load(int index)