ucar.nc2.iosp
Class IndexChunkerTiled
java.lang.Object
ucar.nc2.iosp.IndexChunkerTiled
public class IndexChunkerTiled
- extends Object
Assume that the data is stored divided into sections, described by dataSection. All the data within a dataSection is
stored contiguously, in a regular layout. Assume dataSection strides must be = 1, that is, the stored data is not strided.
The user asks for some section, wantSection (may have strides).
For each dataSection that intersects wantSection, a IndexChunkerTiled is created, which
figures out the optimal access pattern, based on reading contiguous runs of data. Each
IndexChunkerTiled handles only one dataSection. Typically the cllaing program loops over
all dataSections that intersect the wanted section.
Both dataSection and wantSection refer to the variable's overall shape.
- Since:
- Jan 9, 2008
- Author:
- caron
IndexChunkerTiled
public IndexChunkerTiled(Section dataSection,
Section wantSection)
throws InvalidRangeException
- Constructor.
Assume varSection.intersects(wantSection).
- Parameters:
dataSection
- the section of data we actually have. must have all ranges with stride = 1.wantSection
- the wanted section of data, it will be intersected with dataSection.
dataSection.intersects(wantSection) must be true
- Throws:
InvalidRangeException
- if ranges are malformed
getTotalNelems
public long getTotalNelems()
hasNext
public boolean hasNext()
next
public IndexChunker.Chunk next()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.