public void deflate(Formatter f, DataBTree btree) throws IOException { int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); total += dc.size; count++; } }
void setOwner(Variable owner) { this.owner = owner; if (btree != null) btree.setOwner(owner); }
/** * Constructor. * This is for HDF5 chunked data storage. The data is read by chunk, for efficency. * * @param vinfo the vinfo object for this variable * @param dtype type of data. may be different from v2. * @param wantSection the wanted section of data, contains a List of Range objects, must be complete * @throws InvalidRangeException if section invalid for this variable * @throws java.io.IOException on io error */ H5tiledLayout(H5header.Vinfo vinfo, DataType dtype, Section wantSection) throws InvalidRangeException, IOException { assert vinfo.isChunked; assert vinfo.btree != null; // we have to translate the want section into the same rank as the storageSize, in order to be able to call // Section.intersect(). It appears that storageSize (actually msl.chunkSize) may have an extra dimension, reletive // to the Variable. if ((dtype == DataType.CHAR) && (wantSection.getRank() < vinfo.storageSize.length)) this.want = new Section(wantSection).appendRange(1); else this.want = wantSection; // one less chunk dimension, except in the case of char int nChunkDims = (dtype == DataType.CHAR) ? vinfo.storageSize.length : vinfo.storageSize.length - 1; this.chunkSize = new int[nChunkDims]; System.arraycopy(vinfo.storageSize, 0, chunkSize, 0, nChunkDims); this.elemSize = vinfo.storageSize[vinfo.storageSize.length - 1]; // last one is always the elements size if (debug) System.out.println(" H5tiledLayout: " + this); // create the data chunk iterator LayoutTiled.DataChunkIterator iter = vinfo.btree.getDataChunkIteratorNoFilter(this.want, nChunkDims); delegate = new LayoutTiled(iter, chunkSize, elemSize, this.want); }
vinfo.btree = new DataBTree(this, dataAddress, v.getShape(), vinfo.storageSize, memTracker);
LayoutTiled.DataChunkIterator iter = vinfo.btree.getDataChunkIteratorNoFilter(this.want, nChunkDims); delegate = new LayoutTiled(iter, chunkSize, elemSize, this.want);
vinfo.btree = new DataBTree(this, dataAddress, v.getShape(), vinfo.storageSize);
public long[] countStorageSize(H5header.Vinfo vinfo, Size size, Formatter f) throws IOException { long[] result = new long[2]; DataBTree btree = vinfo.btree; if (btree == null) { if (f != null) f.format("btree is null%n"); return result; } if (vinfo.useFillValue) { if (f != null) f.format("useFillValue - no data is stored%n"); return result; } int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); if (f != null) f.format(" %s%n", dc); total += dc.size; count++; } result[0] = total; result[1] = count; return result; }
void setOwner(Variable owner) { this.owner = owner; if (btree != null) btree.setOwner(owner); }
LayoutTiled.DataChunkIterator iter = vinfo.btree.getDataChunkIteratorNoFilter(this.want, nChunkDims); delegate = new LayoutTiled(iter, chunkSize, elemSize, this.want);
vinfo.btree = new DataBTree(this, dataAddress, v.getShape(), vinfo.storageSize, memTracker);
public void deflate(Formatter f, DataBTree btree) throws IOException { int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); total += dc.size; count++; } }
void setOwner(Variable owner) { this.owner = owner; if (btree != null) btree.setOwner(owner); }
public void deflate(Formatter f, DataBTree btree) throws IOException { int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); total += dc.size; count++; } }
public long[] countStorageSize(Formatter f) throws IOException { long[] result = new long[2]; if (btree == null) { if (f != null) f.format("btree is null%n"); return result; } if (useFillValue) { if (f != null) f.format("useFillValue - no data is stored%n"); return result; } int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); if (f != null) f.format(" %s%n", dc); total += dc.size; count++; } result[0] = total; result[1] = count; return result; }
public long[] countStorageSize(H5header.Vinfo vinfo, Size size, Formatter f) throws IOException { long[] result = new long[2]; DataBTree btree = vinfo.btree; if (btree == null) { if (f != null) f.format("btree is null%n"); return result; } if (vinfo.useFillValue) { if (f != null) f.format("useFillValue - no data is stored%n"); return result; } int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); if (f != null) f.format(" %s%n", dc); total += dc.size; count++; } result[0] = total; result[1] = count; return result; }
public long[] countStorageSize(Formatter f) throws IOException { long[] result = new long[2]; if (btree == null) { if (f != null) f.format("btree is null%n"); return result; } if (useFillValue) { if (f != null) f.format("useFillValue - no data is stored%n"); return result; } int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); if (f != null) f.format(" %s%n", dc); total += dc.size; count++; } result[0] = total; result[1] = count; return result; }
public long[] countStorageSize(Formatter f) throws IOException { long[] result = new long[2]; if (btree == null) { if (f != null) f.format("btree is null%n"); return result; } if (useFillValue) { if (f != null) f.format("useFillValue - no data is stored%n"); return result; } int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); if (f != null) f.format(" %s%n", dc); total += dc.size; count++; } result[0] = total; result[1] = count; return result; }
public long[] countStorageSize(H5header.Vinfo vinfo, Size size, Formatter f) throws IOException { long[] result = new long[2]; DataBTree btree = vinfo.btree; if (btree == null) { if (f != null) f.format("btree is null%n"); return result; } if (vinfo.useFillValue) { if (f != null) f.format("useFillValue - no data is stored%n"); return result; } int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); if (f != null) f.format(" %s%n", dc); total += dc.size; count++; } result[0] = total; result[1] = count; return result; }
private void countStorageSize(H5header.Vinfo vinfo, Size size) throws IOException { DataBTree btree = vinfo.btree; if (btree == null || vinfo.useFillValue) { size.storage = 0; size.count = 0; return; // 0 storage } int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); total += dc.size; count++; } size.storage = total; size.count = count; }
private void countStorageSize(H5header.Vinfo vinfo, Size size) throws IOException { DataBTree btree = vinfo.btree; if (btree == null || vinfo.useFillValue) { size.storage = 0; size.count = 0; return; // 0 storage } int count = 0; long total = 0; DataBTree.DataChunkIterator iter = btree.getDataChunkIteratorFilter(null); while (iter.hasNext()) { DataBTree.DataChunk dc = iter.next(); total += dc.size; count++; } size.storage = total; size.count = count; }