diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-01-08 15:53:32 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-01-08 15:53:32 (GMT) |
commit | be7ebb248fbe7d887b44b4aecbfe80f2517d53b1 (patch) | |
tree | df693260fe94f6a8d47968d4cbac66a9476ba841 /tools/h5repack/h5repack_copy.c | |
parent | feaa5bb9d54017961e325f4bc2c366fc023c2443 (diff) | |
download | hdf5-be7ebb248fbe7d887b44b4aecbfe80f2517d53b1.zip hdf5-be7ebb248fbe7d887b44b4aecbfe80f2517d53b1.tar.gz hdf5-be7ebb248fbe7d887b44b4aecbfe80f2517d53b1.tar.bz2 |
[svn-r8040] Purpose:
bug fix, code improvment
Description:
fixed a bug in the parse of chunking function
added some auxiliary functions to avoid repeated parts of the code in several places
Solution:
Platforms tested:
linux
solaris
AIX
Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r-- | tools/h5repack/h5repack_copy.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index 2d6752b..3ca7c11 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -231,6 +231,9 @@ int do_copy_file(hid_t fidin, if ((msize=H5Tget_size(mtype_id))==0) goto error; + if (options->verbose) + print_filters(dcpl_id); + /*------------------------------------------------------------------------- * object references are a special case @@ -243,6 +246,7 @@ int do_copy_file(hid_t fidin, /* the information about the object to be filtered/"layouted" */ pack_info_t obj; + init_packobject(&obj); /* get the storage size of the input dataset */ dsize_in=H5Dget_storage_size(dset_in); @@ -278,6 +282,13 @@ int do_copy_file(hid_t fidin, */ if (filter_this(travt->objs[i].name,options,&obj)) { + /* filters require CHUNK layout; if we do not have one define a default */ + if (obj.chunk.rank==0) + { + obj.chunk.rank=rank; + for (j=0; j<rank; j++) + obj.chunk.chunk_lengths[j] = dims[j] / 2; + } if (apply_filters(dcpl_id,H5Tget_size(mtype_id),options,&obj)<0) continue; } |