diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-02-27 12:50:38 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-02-27 12:50:38 (GMT) |
commit | 7462a7ef1c3542b8812c8da86e79b15ce22d21cb (patch) | |
tree | 7f231cb842e7d2f17f25d6b84c7a0fa07c0496dc /tools/h5repack/h5repacktst.c | |
parent | 7b7f0eafc57c083298d87a09df70a33f93e4760d (diff) | |
download | hdf5-7462a7ef1c3542b8812c8da86e79b15ce22d21cb.zip hdf5-7462a7ef1c3542b8812c8da86e79b15ce22d21cb.tar.gz hdf5-7462a7ef1c3542b8812c8da86e79b15ce22d21cb.tar.bz2 |
[svn-r26329] Merge of r26069, r26070, and r26072 from the features/autotools_rework
branch.
Removed the configure option that allows selective disabling of individual
internal filters (fletcher32, shuffle, etc.).
This feature mucked up the code with a lot of #ifdefs, saved very little space,
and was not scalable to a general scheme for library size reduction. We've
decided to remove the feature while we investigate a more general scheme for
decreasing the library size.
Part of: HDFFV-9086
Tested on: h5committest
Diffstat (limited to 'tools/h5repack/h5repacktst.c')
-rw-r--r-- | tools/h5repack/h5repacktst.c | 107 |
1 files changed, 11 insertions, 96 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index 5ec9a8d..0353955 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -445,8 +445,6 @@ int main (void) TESTING(" addding shuffle filter"); -#ifdef H5_HAVE_FILTER_SHUFFLE - /*------------------------------------------------------------------------- * test an individual object option *------------------------------------------------------------------------- @@ -468,9 +466,6 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif /*------------------------------------------------------------------------- * test all objects option @@ -479,8 +474,6 @@ int main (void) TESTING(" addding shuffle filter to all"); -#ifdef H5_HAVE_FILTER_SHUFFLE - /* fs_type = H5F_FILE_SPACE_ALL_PERSIST; fs_size = 1 */ if (h5repack_init (&pack_options, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0) GOERROR; @@ -498,13 +491,9 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif - TESTING(" adding checksum filter"); -#ifdef H5_HAVE_FILTER_FLETCHER32 + TESTING(" adding checksum filter"); /*------------------------------------------------------------------------- * test an individual object option @@ -527,9 +516,6 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif /*------------------------------------------------------------------------- * test all objects option @@ -539,8 +525,6 @@ int main (void) TESTING(" adding checksum filter to all"); -#ifdef H5_HAVE_FILTER_FLETCHER32 - if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("FLET",&pack_options) < 0) @@ -557,9 +541,6 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif TESTING(" filter queue fletcher, shuffle, deflate, szip"); @@ -573,16 +554,10 @@ int main (void) GOERROR; if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options) < 0) GOERROR; - -#if defined (H5_HAVE_FILTER_FLETCHER32) if (h5repack_addfilter("dset1:FLET",&pack_options) < 0) GOERROR; -#endif - -#ifdef H5_HAVE_FILTER_SHUFFLE if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0) GOERROR; -#endif #if defined (H5_HAVE_FILTER_SZIP) if (szip_can_encode) { @@ -1039,7 +1014,6 @@ int main (void) TESTING(" copy of shuffle filter"); -#ifdef H5_HAVE_FILTER_SHUFFLE if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0) @@ -1052,13 +1026,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif + TESTING(" removing shuffle filter"); -#ifdef H5_HAVE_FILTER_SHUFFLE if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_shuffle:NONE",&pack_options) < 0) @@ -1073,13 +1044,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif + TESTING(" copy of fletcher filter"); -#ifdef H5_HAVE_FILTER_FLETCHER32 if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0) @@ -1092,13 +1060,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif + TESTING(" removing fletcher filter"); -#ifdef H5_HAVE_FILTER_FLETCHER32 if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options) < 0) @@ -1113,14 +1078,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif TESTING(" copy of nbit filter"); -#ifdef H5_HAVE_FILTER_NBIT if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0) @@ -1133,13 +1094,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif + TESTING(" removing nbit filter"); -#ifdef H5_HAVE_FILTER_NBIT if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_nbit:NONE",&pack_options) < 0) @@ -1154,14 +1112,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif TESTING(" adding nbit filter"); -#ifdef H5_HAVE_FILTER_NBIT if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_int31:NBIT",&pack_options) < 0) @@ -1176,14 +1130,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif TESTING(" copy of scaleoffset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0) @@ -1196,13 +1146,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif + TESTING(" removing scaleoffset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options) < 0) @@ -1217,14 +1164,10 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif TESTING(" adding scaleoffset filter"); -#ifdef H5_HAVE_FILTER_SCALEOFFSET if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options) < 0) @@ -1239,10 +1182,6 @@ int main (void) GOERROR; PASSED(); -#else - SKIPPED(); -#endif - /*------------------------------------------------------------------------- @@ -1258,9 +1197,7 @@ int main (void) TESTING(" filter conversion from deflate to szip"); -#if defined (H5_HAVE_FILTER_SZIP) \ - && defined (H5_HAVE_FILTER_DEFLATE) \ - && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) +#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) if (szip_can_encode) { /* fs_type = H5F_FILE_SPACE_VFD; fs_size = 4 */ @@ -1287,9 +1224,7 @@ int main (void) TESTING(" filter conversion from szip to deflate"); -#if defined (H5_HAVE_FILTER_SZIP) \ - && defined (H5_HAVE_FILTER_DEFLATE) \ - && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) +#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) if (szip_can_encode) { if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) @@ -1321,8 +1256,7 @@ int main (void) TESTING(" removing all filters"); -#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \ - && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) +#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0) GOERROR; @@ -2347,13 +2281,12 @@ int make_shuffle(hid_t loc_id) * shuffle *------------------------------------------------------------------------- */ -#if defined (H5_HAVE_FILTER_SHUFFLE) + /* set the shuffle filter */ if (H5Pset_shuffle(dcpl) < 0) goto out; if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0) goto out; -#endif /*------------------------------------------------------------------------- @@ -2414,7 +2347,7 @@ int make_fletcher32(hid_t loc_id) * fletcher32 *------------------------------------------------------------------------- */ -#if defined (H5_HAVE_FILTER_FLETCHER32) + /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0) goto out; @@ -2423,7 +2356,6 @@ int make_fletcher32(hid_t loc_id) goto out; if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0) goto out; -#endif /*------------------------------------------------------------------------- * close space and dcpl @@ -2488,7 +2420,6 @@ int make_nbit(hid_t loc_id) goto out; } -#if defined H5_HAVE_FILTER_NBIT /* remove the filters from the dcpl */ if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0) { @@ -2522,7 +2453,6 @@ int make_nbit(hid_t loc_id) goto out; } H5Dclose(dsid); -#endif /*------------------------------------------------------------------------- * close @@ -2584,7 +2514,6 @@ int make_scaleoffset(hid_t loc_id) dtid = H5Tcopy(H5T_NATIVE_INT); -#if defined (H5_HAVE_FILTER_SCALEOFFSET) /* remove the filters from the dcpl */ if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0) { H5Tclose(dtid); @@ -2613,7 +2542,6 @@ int make_scaleoffset(hid_t loc_id) } H5Tclose(dtid); H5Dclose(dsid); -#endif /*------------------------------------------------------------------------- * close space and dcpl @@ -2647,10 +2575,8 @@ int make_all_filters(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ hid_t sid; /* dataspace ID */ -#if defined (H5_HAVE_FILTER_NBIT) hid_t dtid; hid_t dsid; -#endif /* H5_HAVE_FILTER_NBIT */ #if defined (H5_HAVE_FILTER_SZIP) unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK; unsigned szip_pixels_per_block=8; @@ -2680,17 +2606,13 @@ int make_all_filters(hid_t loc_id) if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0) goto out; -#if defined (H5_HAVE_FILTER_SHUFFLE) /* set the shuffle filter */ if (H5Pset_shuffle(dcpl) < 0) goto out; -#endif -#if defined (H5_HAVE_FILTER_FLETCHER32) /* set the checksum filter */ if (H5Pset_fletcher32(dcpl) < 0) goto out; -#endif #if defined (H5_HAVE_FILTER_SZIP) if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) @@ -2716,7 +2638,6 @@ int make_all_filters(hid_t loc_id) if (make_dset(loc_id,"dset_all",sid,dcpl,buf) < 0) goto out; -#if defined (H5_HAVE_FILTER_FLETCHER32) /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0) goto out; @@ -2725,7 +2646,6 @@ int make_all_filters(hid_t loc_id) goto out; if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0) goto out; -#endif /* Make sure encoding is enabled */ @@ -2747,7 +2667,6 @@ int make_all_filters(hid_t loc_id) #endif -#if defined (H5_HAVE_FILTER_SHUFFLE) /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0) goto out; @@ -2756,7 +2675,6 @@ int make_all_filters(hid_t loc_id) goto out; if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0) goto out; -#endif #if defined (H5_HAVE_FILTER_DEFLATE) @@ -2772,7 +2690,6 @@ int make_all_filters(hid_t loc_id) -#if defined (H5_HAVE_FILTER_NBIT) /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0) goto out; @@ -2793,8 +2710,6 @@ int make_all_filters(hid_t loc_id) return -1; if(H5Dclose(dsid) < 0) return -1; -#endif - if(H5Sclose(sid) < 0) goto out; |