public class LayoutRegular extends java.lang.Object implements Layout
Layout.Chunk
Constructor and Description |
---|
LayoutRegular(long startPos,
int elemSize,
int[] varShape,
Section wantSection)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getElemSize()
Get size of each element in bytes.
|
long |
getTotalNelems()
Get total number of elements in the wanted subset.
|
boolean |
hasNext()
Is there more to do
|
Layout.Chunk |
next()
Get the next chunk
|
public LayoutRegular(long startPos, int elemSize, int[] varShape, @Nullable Section wantSection) throws InvalidRangeException
startPos
- starting address of the entire data array.elemSize
- size of an element in bytes.varShape
- shape of the entire data array.wantSection
- the wanted section of data, contains a List of Range objects.InvalidRangeException
- if ranges are misformedpublic int getElemSize()
Layout
getElemSize
in interface Layout
public long getTotalNelems()
Layout
getTotalNelems
in interface Layout
public boolean hasNext()
Layout
public Layout.Chunk next()
Layout