DataBTree(H5header h5, long rootNodeAddress, int[] varShape, int[] storageSize) throws IOException { this.h5 = h5; this.raf = h5.raf; this.rootNodeAddress = rootNodeAddress; this.tiling = new Tiling(varShape, storageSize); this.ndimStorage = storageSize.length; wantType = 1; }
/** * Get order based on which tile the pt belongs to * @param pt index point * @return order number based on which tile the pt belongs to */ public int order(int[] pt) { int[] tile = tile(pt); int order = 0; int useRank = Math.min(rank, pt.length); // eg varlen (datatype 9) has mismatch for (int i = 0; i < useRank; i++) order += stride[i] * tile[i]; return order; }
DataChunk entry = myEntries.get(currentEntry + 1); // look at the next one if (debugChunkOrder) System.out.printf(" Entry=%d: Tile ending order= %d%n", currentEntry, tiling.order(entry.offset)); if ((wantOrigin == null) || tiling.compare(wantOrigin, entry.offset) < 0) break; for (currentEntry = 0; currentEntry < nentries; currentEntry++) { if (debugChunkOrder) System.out.printf(" Entry=%d: Tile order %d-%d%n", currentEntry, tiling.order(offset[currentEntry]), tiling.order(offset[currentEntry + 1])); if ((wantOrigin == null) || tiling.compare(wantOrigin, offset[currentEntry + 1]) < 0) { currentNode = new Node(childPointer[currentEntry], this.address); if (debugChunkOrder) System.out.printf("Level %d use entry= %d%n", level, currentEntry);
DataChunk entry = myEntries.get(currentEntry + 1); // look at the next one if (debugChunkOrder) System.out.printf(" Entry=%d: Tile ending order= %d%n", currentEntry, tiling.order(entry.offset)); if ((wantOrigin == null) || tiling.compare(wantOrigin, entry.offset) < 0) break; Misc.showInts(offset[currentEntry]), tiling.order(offset[currentEntry]), tiling.order(offset[currentEntry + 1])); if ((wantOrigin == null) || tiling.compare(wantOrigin, offset[currentEntry + 1]) < 0) { currentNode = new Node(childPointer[currentEntry], this.address); if (debugChunkOrder) System.out.printf("Level %d use entry= %d%n", level, currentEntry);
DataBTree(H5header h5, long rootNodeAddress, int[] varShape, int[] storageSize, MemTracker memTracker) throws IOException { this.h5 = h5; this.raf = h5.raf; this.rootNodeAddress = rootNodeAddress; this.tiling = new Tiling(varShape, storageSize); this.ndimStorage = storageSize.length; this.memTracker = memTracker; wantType = 1; }
/** * Get order based on which tile the pt belongs to * @param pt index point * @return order number based on which tile the pt belongs to */ public int order(int[] pt) { int[] tile = tile(pt); int order = 0; int useRank = Math.min(rank, pt.length); // eg varlen (datatype 9) has mismatch for (int i = 0; i < useRank; i++) order += stride[i] * tile[i]; return order; }
void first(int[] wantOrigin) throws IOException { if (level == 0) { currentEntry = 0; /* note nentries-1 - assume dont skip the last one for (currentEntry = 0; currentEntry < nentries-1; currentEntry++) { DataChunk entry = myEntries.get(currentEntry + 1); if ((wantOrigin == null) || tiling.compare(wantOrigin, entry.offset) < 0) break; // LOOK ?? } */ } else { currentNode = null; for (currentEntry = 0; currentEntry < nentries; currentEntry++) { if ((wantOrigin == null) || tiling.compare(wantOrigin, offset[currentEntry + 1]) < 0) { currentNode = new Node(childPointer[currentEntry], this.address); currentNode.first(wantOrigin); break; } } // heres the case where its the last entry we want; the tiling.compare() above may fail if (currentNode == null) { currentEntry = nentries - 1; currentNode = new Node(childPointer[currentEntry], this.address); currentNode.first(wantOrigin); } } //if (currentEntry >= nentries) // System.out.println("hah"); assert (nentries == 0) || (currentEntry < nentries) : currentEntry + " >= " + nentries; }
DataBTree(H5header h5, long rootNodeAddress, int[] varShape, int[] storageSize, MemTracker memTracker) throws IOException { this.h5 = h5; this.rootNodeAddress = rootNodeAddress; this.tiling = new Tiling(varShape, storageSize); this.ndimStorage = storageSize.length; this.memTracker = memTracker; wantType = 1; }
/** * Get order based on which tile the pt belongs to * @param pt index point * @return order number based on which tile the pt belongs to */ public int order(int[] pt) { int[] tile = tile(pt); int order = 0; int useRank = Math.min(rank, pt.length); // eg varlen (datatype 9) has mismatch for (int i = 0; i < useRank; i++) order += stride[i] * tile[i]; return order; }