public interface LayoutBB extends Layout
int[] read( LayoutBB index, int[] pa) { while (index.hasNext()) { LayoutBB.Chunk chunk = index.next(); IntBuffer buff = chunk.getIntBuffer(); buff.position(chunk.getSrcElem()); int pos = (int) chunk.getDestElem(); for (int i = 0; i < chunk.getNelems(); i++) pa[pos++] = buff.get(); } return pa; }
Modifier and Type | Interface and Description |
---|---|
static interface |
LayoutBB.Chunk
A chunk of data that is contiguous in both the source and destination.
|
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
|
LayoutBB.Chunk |
next()
Get the next chunk
|
long getTotalNelems()
getTotalNelems
in interface Layout
int getElemSize()
getElemSize
in interface Layout
boolean hasNext()
LayoutBB.Chunk next() throws java.io.IOException