diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-04-07 18:21:47 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-04-07 18:21:47 (GMT) |
commit | e5c94192d730bb6cb23e4960c8f0c3165d8518ec (patch) | |
tree | 85be5f5fd523abf0b312ecd050b66524996e68e0 /src/H5Dlayout.c | |
parent | f2c3407eb6b429346b623276ed0833e3a5cec1c8 (diff) | |
download | hdf5-e5c94192d730bb6cb23e4960c8f0c3165d8518ec.zip hdf5-e5c94192d730bb6cb23e4960c8f0c3165d8518ec.tar.gz hdf5-e5c94192d730bb6cb23e4960c8f0c3165d8518ec.tar.bz2 |
[svn-r29659] Added fixed array chunk indexing from revise_chunks.
Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1
Autotools serial w/ Java, Fortran, & C++
Diffstat (limited to 'src/H5Dlayout.c')
-rw-r--r-- | src/H5Dlayout.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index c213140..bf99b9d 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -101,6 +101,10 @@ H5D__layout_set_io_ops(const H5D_t *dataset) dataset->shared->layout.storage.u.chunk.ops = H5D_COPS_BTREE; break; + case H5D_CHUNK_IDX_FARRAY: + dataset->shared->layout.storage.u.chunk.ops = H5D_COPS_FARRAY; + break; + case H5D_CHUNK_IDX_EARRAY: dataset->shared->layout.storage.u.chunk.ops = H5D_COPS_EARRAY; break; @@ -213,6 +217,11 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ case H5D_CHUNK_IDX_BTREE: HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, 0, "v1 B-tree index type found for layout message >v3") + case H5D_CHUNK_IDX_FARRAY: + /* Fixed array creation parameters */ + ret_value += H5D_FARRAY_CREATE_PARAM_SIZE; + break; + case H5D_CHUNK_IDX_EARRAY: /* Extensible array creation parameters */ ret_value += H5D_EARRAY_CREATE_PARAM_SIZE; @@ -336,10 +345,13 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace max. dimensions") /* Spin through the max. dimensions, looking for unlimited dimensions */ - for(u = 0; u < ndims; u++) + for(u = 0; u < ndims; u++) { if(max_dims[u] == H5S_UNLIMITED) unlim_count++; + } /* end for */ + /* Chunked datasets with unlimited dimension(s) */ + if(unlim_count) { /* dataset with unlimited dimension(s) must be chunked */ if(1 == unlim_count) { /* Chunked dataset with only 1 unlimited dimension */ /* Set the chunk index type to an extensible array */ layout->u.chunk.idx_type = H5D_CHUNK_IDX_EARRAY; @@ -356,7 +368,7 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, layout->u.chunk.u.earray.cparam.data_blk_min_elmts = H5D_EARRAY_DATA_BLK_MIN_ELMTS; layout->u.chunk.u.earray.cparam.max_dblk_page_nelmts_bits = H5D_EARRAY_MAX_DBLOCK_PAGE_NELMTS_BITS; } /* end if */ - else { + else { /* Chunked dataset with > 1 unlimited dimensions */ /* Set the chunk index type to v2 B-tree */ layout->u.chunk.idx_type = H5D_CHUNK_IDX_BT2; layout->storage.u.chunk.idx_type = H5D_CHUNK_IDX_BT2; @@ -370,6 +382,19 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, layout->u.chunk.u.btree2.cparam.split_percent = H5D_BT2_SPLIT_PERC; layout->u.chunk.u.btree2.cparam.merge_percent = H5D_BT2_MERGE_PERC; } /* end else */ + } /* end if */ + else { + /* Set the chunk index type to Fixed Array */ + layout->u.chunk.idx_type = H5D_CHUNK_IDX_FARRAY; + layout->storage.u.chunk.idx_type = H5D_CHUNK_IDX_FARRAY; + layout->storage.u.chunk.ops = H5D_COPS_FARRAY; + + /* Set the fixed array creation parameters */ + /* (use hard-coded defaults for now, until we give applications + * control over this with a property list - QAK) + */ + layout->u.chunk.u.farray.cparam.max_dblk_page_nelmts_bits = H5D_FARRAY_MAX_DBLK_PAGE_NELMTS_BITS; + } /* end else */ } /* end if */ } /* end if */ |