summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_copy.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-11-20 15:25:11 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-11-20 15:25:11 (GMT)
commita56c3f0bc49c401213917a93742255eddb13c5f6 (patch)
tree21635c0519736c2e1134d354f4a0f65a774e73c8 /tools/h5repack/h5repack_copy.c
parent98f3bca75e1608438408d6af4655bf98651f89a1 (diff)
downloadhdf5-a56c3f0bc49c401213917a93742255eddb13c5f6.zip
hdf5-a56c3f0bc49c401213917a93742255eddb13c5f6.tar.gz
hdf5-a56c3f0bc49c401213917a93742255eddb13c5f6.tar.bz2
[svn-r12950]
do not call H5Ocopy only when there is a user request for filters/layout
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r--tools/h5repack/h5repack_copy.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 76129ad..8c67c5d 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -317,8 +317,6 @@ int do_copy_objects(hid_t fidin,
void *buf=NULL; /* buffer for raw data */
void *sm_buf=NULL; /* buffer for raw data */
unsigned i;
- int nfilters; /* number of filters in DCPL */
- H5D_layout_t layout;
#if defined(H5REPACK_GETTIME)
time_t start_time, finish_time, time_secs;
#endif
@@ -376,37 +374,14 @@ int do_copy_objects(hid_t fidin,
*-------------------------------------------------------------------------
*/
case H5G_DATASET:
-
-/*-------------------------------------------------------------------------
- * early check for filters or a non default layout
- *-------------------------------------------------------------------------
- */
- if ((dset_in=H5Dopen(fidin,travt->objs[i].name))<0)
- goto error;
- if ((dcpl_id=H5Dget_create_plist(dset_in))<0)
- goto error;
-
- /* get information about input filters */
- if ((nfilters = H5Pget_nfilters(dcpl_id))<0)
- goto error;
- if ((layout = H5Pget_layout(dcpl_id))<0)
- goto error;
-
- if (H5Dclose(dset_in)<0)
- goto error;
- if (H5Pclose(dcpl_id)<0)
- goto error;
/*-------------------------------------------------------------------------
* check if we should use H5Ocopy or not
- * if the DCPL has filters, we read/write the object
+ * if there is a request for filters/layout, we read/write the object
* otherwise we do a copy using H5Ocopy
*-------------------------------------------------------------------------
*/
- if (nfilters
- /* does the dcpl has filters ? */
- ||
- options->op_tbl->nelems
+ if (options->op_tbl->nelems
/* do we have input request for filter/chunk ? */
||
options->all_filter==1 || options->all_layout==1