public IndexChunker.Chunk next() { if (chunk == null) { chunk = new IndexChunker.Chunk(0, nelems, startDestElem); } else { dataIndex.incr(); resultIndex.incr(); } // Set the current element's index from the start of the data array chunk.setSrcElem(startSrcElem + dataIndex.currentElement()); // Set the current element's index from the start of the result array chunk.setDestElem(startDestElem + resultIndex.currentElement()); if (debugNext) System.out.println(" chunk: " + chunk); if (debugDetail) { System.out.println(" dataIndex: " + dataIndex); System.out.println(" wantIndex: " + resultIndex); } done += nelems; return chunk; }
public IndexChunker.Chunk next() { if (chunk == null) { chunk = new IndexChunker.Chunk(0, nelems, startDestElem); } else { dataIndex.incr(); resultIndex.incr(); } // Set the current element's index from the start of the data array chunk.setSrcElem(startSrcElem + dataIndex.currentElement()); // Set the current element's index from the start of the result array chunk.setDestElem(startDestElem + resultIndex.currentElement()); if (debugNext) System.out.println(" chunk: " + chunk); if (debugDetail) { System.out.println(" dataIndex: " + dataIndex); System.out.println(" wantIndex: " + resultIndex); } done += nelems; return chunk; }
public IndexChunker.Chunk next() { if (chunk == null) { chunk = new IndexChunker.Chunk(0, nelems, startDestElem); } else { dataIndex.incr(); resultIndex.incr(); } // Set the current element's index from the start of the data array chunk.setSrcElem(startSrcElem + dataIndex.currentElement()); // Set the current element's index from the start of the result array chunk.setDestElem(startDestElem + resultIndex.currentElement()); if (debugNext) System.out.println(" chunk: " + chunk); if (debugDetail) { System.out.println(" dataIndex: " + dataIndex); System.out.println(" wantIndex: " + resultIndex); } done += nelems; return chunk; }
/** * Get the next chunk * @return the next chunk */ public Chunk next() { if (chunk == null) { chunk = new Chunk(start, nelems, 0); } else { chunkIndex.incr(); // increment one element, which represents one chunk = nelems * sizeElem chunk.incrDestElem(nelems); // always read nelems at a time } // Get the current element's index from the start of the file chunk.setSrcElem(start + chunkIndex.currentElement()); if (debugNext) System.out.println(" next chunk: " + chunk); done += nelems; return chunk; }
/** * Get the next chunk * @return the next chunk */ public Chunk next() { if (chunk == null) { chunk = new Chunk(start, nelems, 0); } else { chunkIndex.incr(); // increment one element, which represents one chunk = nelems * sizeElem chunk.incrDestElem(nelems); // always read nelems at a time } // Get the current element's index from the start of the file chunk.setSrcElem(start + chunkIndex.currentElement()); if (debugNext) System.out.println(" next chunk: " + chunk); done += nelems; return chunk; }
/** * Get the next chunk * @return the next chunk */ public Chunk next() { if (chunk == null) { chunk = new Chunk(start, nelems, 0); } else { chunkIndex.incr(); // increment one element, which represents one chunk = nelems * sizeElem chunk.incrDestElem(nelems); // always read nelems at a time } // Get the current element's index from the start of the file chunk.setSrcElem(start + chunkIndex.currentElement()); if (debugNext) System.out.println(" next chunk: " + chunk); done += nelems; return chunk; }
private IndexChunker.Chunk nextInner(boolean first, int nelems) { if (first) { chunkInner.setNelems(nelems); chunkInner.setDestElem( chunkOuter.getDestElem()); needInner = chunkOuter.getNelems(); doneInner = 0; } else { chunkInner.incrDestElem( chunkInner.getNelems()); // increment using last chunks' value nelems = getMaxElem( chunkOuter.getSrcElem() + doneInner); nelems = Math.min(nelems, needInner); chunkInner.setNelems(nelems); // set this chunk's value } chunkInner.setSrcElem( chunkOuter.getSrcElem() + doneInner); chunkInner.setSrcPos( getFilePos( chunkOuter.getSrcElem() + doneInner)); return chunkInner; }
private IndexChunker.Chunk nextInner(boolean first, int nelems) { if (first) { chunkInner.setNelems(nelems); chunkInner.setDestElem( chunkOuter.getDestElem()); needInner = chunkOuter.getNelems(); doneInner = 0; } else { chunkInner.incrDestElem( chunkInner.getNelems()); // increment using last chunks' value nelems = getMaxElem( chunkOuter.getSrcElem() + doneInner); nelems = Math.min(nelems, needInner); chunkInner.setNelems(nelems); // set this chunk's value } chunkInner.setSrcElem( chunkOuter.getSrcElem() + doneInner); chunkInner.setSrcPos( getFilePos( chunkOuter.getSrcElem() + doneInner)); return chunkInner; }
private IndexChunker.Chunk nextInner(boolean first, int nelems) { if (first) { chunkInner.setNelems(nelems); chunkInner.setDestElem( chunkOuter.getDestElem()); needInner = chunkOuter.getNelems(); doneInner = 0; } else { chunkInner.incrDestElem( chunkInner.getNelems()); // increment using last chunks' value nelems = getMaxElem( chunkOuter.getSrcElem() + doneInner); nelems = Math.min(nelems, needInner); chunkInner.setNelems(nelems); // set this chunk's value } chunkInner.setSrcElem( chunkOuter.getSrcElem() + doneInner); chunkInner.setSrcPos( getFilePos( chunkOuter.getSrcElem() + doneInner)); return chunkInner; }