Package ucar.nc2.iosp

Class 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 calling program loops over all dataSections that intersect the wanted section.

    Both dataSection and wantSection refer to the variable's overall shape.

    • Constructor Detail

      • 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