summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_opttable.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-08-17 19:54:42 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-08-17 19:54:42 (GMT)
commit8c0f8b1a959993a1f4b87e61c4b4e57b8f2b11e7 (patch)
treeb5e9b4fecec9b22663c8521103b2f827912038ec /tools/h5repack/h5repack_opttable.c
parentad655bf083814ff768849a994c834b2010d67bda (diff)
downloadhdf5-8c0f8b1a959993a1f4b87e61c4b4e57b8f2b11e7.zip
hdf5-8c0f8b1a959993a1f4b87e61c4b4e57b8f2b11e7.tar.gz
hdf5-8c0f8b1a959993a1f4b87e61c4b4e57b8f2b11e7.tar.bz2
[svn-r9106] Purpose:
bug fix Description: the option CHUNK:NONE (remove chunking ) was not setting the layout to contiguous Solution: Platforms tested: linux solaris AIX Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_opttable.c')
-rw-r--r--tools/h5repack/h5repack_opttable.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c
index cf76e82..d85e1f5 100644
--- a/tools/h5repack/h5repack_opttable.c
+++ b/tools/h5repack/h5repack_opttable.c
@@ -1,4 +1,4 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
@@ -90,10 +90,22 @@ static void aux_tblinsert_layout(pack_opttbl_t *table,
int k;
table->objs[I].layout = pack->layout;
- if (H5D_CHUNKED==pack->layout) {
- table->objs[I].chunk.rank = pack->chunk.rank;
- for (k = 0; k < pack->chunk.rank; k++)
- table->objs[I].chunk.chunk_lengths[k] = pack->chunk.chunk_lengths[k];
+ if (H5D_CHUNKED==pack->layout)
+ {
+ /* -2 means the NONE option, remove chunking
+ and set the layout to contiguous */
+ if (pack->chunk.rank==-2)
+ {
+ table->objs[I].layout = H5D_CONTIGUOUS;
+ table->objs[I].chunk.rank = -2;
+ }
+ /* otherwise set the chunking type */
+ else
+ {
+ table->objs[I].chunk.rank = pack->chunk.rank;
+ for (k = 0; k < pack->chunk.rank; k++)
+ table->objs[I].chunk.chunk_lengths[k] = pack->chunk.chunk_lengths[k];
+ }
}
}