From a9766db4b97dc24845912f9f9595f91d9fa1dbf7 Mon Sep 17 00:00:00 2001 From: Eugen Wintersberger Date: Thu, 6 Aug 2020 20:50:06 +0200 Subject: [PATCH] re-added old code from first attempt to port the examples Update #318 --- examples/hdfgroup/CMakeLists.txt | 9 + examples/hdfgroup/H5D/CMakeLists.txt | 30 + examples/hdfgroup/H5D/C_sourcefiles.cmake | 25 + examples/hdfgroup/H5D/h5ex_d_alloc.c | 141 ++ examples/hdfgroup/H5D/h5ex_d_alloc.cpp | 126 ++ examples/hdfgroup/H5D/h5ex_d_checksum.c | 197 +++ examples/hdfgroup/H5D/h5ex_d_checksum.cpp | 176 +++ examples/hdfgroup/H5D/h5ex_d_chunk.c | 223 ++++ examples/hdfgroup/H5D/h5ex_d_chunk.cpp | 105 ++ examples/hdfgroup/H5D/h5ex_d_compact.c | 140 ++ examples/hdfgroup/H5D/h5ex_d_compact.cpp | 101 ++ examples/hdfgroup/H5D/h5ex_d_extern.c | 131 ++ examples/hdfgroup/H5D/h5ex_d_fillval.c | 160 +++ examples/hdfgroup/H5D/h5ex_d_fillval.cpp | 124 ++ examples/hdfgroup/H5D/h5ex_d_gzip.c | 181 +++ examples/hdfgroup/H5D/h5ex_d_gzip.cpp | 181 +++ examples/hdfgroup/H5D/h5ex_d_hyper.c | 186 +++ examples/hdfgroup/H5D/h5ex_d_hyper.cpp | 113 ++ examples/hdfgroup/H5D/h5ex_d_nbit.c | 192 +++ examples/hdfgroup/H5D/h5ex_d_rdwr.c | 105 ++ examples/hdfgroup/H5D/h5ex_d_rdwr.cpp | 75 ++ examples/hdfgroup/H5D/h5ex_d_shuffle.c | 207 +++ examples/hdfgroup/H5D/h5ex_d_shuffle.cpp | 132 ++ examples/hdfgroup/H5D/h5ex_d_sofloat.c | 207 +++ examples/hdfgroup/H5D/h5ex_d_soint.c | 181 +++ examples/hdfgroup/H5D/h5ex_d_szip.c | 182 +++ examples/hdfgroup/H5D/h5ex_d_transform.c | 156 +++ examples/hdfgroup/H5D/h5ex_d_transform.cpp | 101 ++ examples/hdfgroup/H5D/h5ex_d_unlimadd.c | 245 ++++ examples/hdfgroup/H5D/h5ex_d_unlimadd.cpp | 133 ++ examples/hdfgroup/H5D/h5ex_d_unlimgzip.c | 305 +++++ examples/hdfgroup/H5D/h5ex_d_unlimmod.c | 219 +++ examples/hdfgroup/H5D/makefile.am | 38 + examples/hdfgroup/H5D/makefile.in | 1073 +++++++++++++++ examples/hdfgroup/H5D/maketestref.sh | 61 + examples/hdfgroup/H5D/matrix.hpp | 99 ++ examples/hdfgroup/H5D/matrix_hdf5.hpp | 79 ++ examples/hdfgroup/H5D/test.sh.in | 122 ++ .../hdfgroup/H5D/testfiles/h5ex_d_alloc.ddl | 24 + .../hdfgroup/H5D/testfiles/h5ex_d_alloc.tst | 15 + .../H5D/testfiles/h5ex_d_checksum.ddl | 191 +++ .../H5D/testfiles/h5ex_d_checksum.tst | 2 + .../hdfgroup/H5D/testfiles/h5ex_d_chunk.ddl | 16 + .../hdfgroup/H5D/testfiles/h5ex_d_chunk.tst | 25 + .../hdfgroup/H5D/testfiles/h5ex_d_compact.ddl | 14 + .../hdfgroup/H5D/testfiles/h5ex_d_compact.tst | 6 + .../hdfgroup/H5D/testfiles/h5ex_d_extern.ddl | 14 + .../hdfgroup/H5D/testfiles/h5ex_d_extern.tst | 6 + .../hdfgroup/H5D/testfiles/h5ex_d_fillval.ddl | 16 + .../hdfgroup/H5D/testfiles/h5ex_d_fillval.tst | 19 + .../hdfgroup/H5D/testfiles/h5ex_d_gzip.ddl | 191 +++ .../hdfgroup/H5D/testfiles/h5ex_d_gzip.tst | 2 + .../hdfgroup/H5D/testfiles/h5ex_d_hyper.ddl | 16 + .../hdfgroup/H5D/testfiles/h5ex_d_hyper.tst | 23 + .../hdfgroup/H5D/testfiles/h5ex_d_nbit.ddl | 191 +++ .../hdfgroup/H5D/testfiles/h5ex_d_nbit.tst | 2 + .../hdfgroup/H5D/testfiles/h5ex_d_rdwr.ddl | 14 + .../hdfgroup/H5D/testfiles/h5ex_d_rdwr.tst | 5 + .../hdfgroup/H5D/testfiles/h5ex_d_shuffle.ddl | 191 +++ .../hdfgroup/H5D/testfiles/h5ex_d_shuffle.tst | 3 + .../hdfgroup/H5D/testfiles/h5ex_d_sofloat.ddl | 326 +++++ .../hdfgroup/H5D/testfiles/h5ex_d_sofloat.tst | 5 + .../hdfgroup/H5D/testfiles/h5ex_d_soint.ddl | 191 +++ .../hdfgroup/H5D/testfiles/h5ex_d_soint.tst | 2 + .../hdfgroup/H5D/testfiles/h5ex_d_szip.ddl | 191 +++ .../hdfgroup/H5D/testfiles/h5ex_d_szip.tst | 2 + .../H5D/testfiles/h5ex_d_transform.ddl | 6 + .../H5D/testfiles/h5ex_d_transform.tst | 17 + .../H5D/testfiles/h5ex_d_unlimadd.ddl | 16 + .../H5D/testfiles/h5ex_d_unlimadd.tst | 13 + .../H5D/testfiles/h5ex_d_unlimgzip.ddl | 16 + .../H5D/testfiles/h5ex_d_unlimgzip.tst | 14 + .../H5D/testfiles/h5ex_d_unlimmod.ddl | 16 + .../H5D/testfiles/h5ex_d_unlimmod.tst | 13 + examples/hdfgroup/H5G/CMakeLists.txt | 28 + examples/hdfgroup/H5G/C_sourcefiles.cmake | 13 + examples/hdfgroup/H5G/h5ex_g_compact.c | 125 ++ examples/hdfgroup/H5G/h5ex_g_compact.cpp | 79 ++ examples/hdfgroup/H5G/h5ex_g_corder.c | 131 ++ examples/hdfgroup/H5G/h5ex_g_corder.cpp | 69 + examples/hdfgroup/H5G/h5ex_g_create.c | 44 + examples/hdfgroup/H5G/h5ex_g_create.cpp | 30 + examples/hdfgroup/H5G/h5ex_g_intermediate.c | 97 ++ examples/hdfgroup/H5G/h5ex_g_intermediate.cpp | 49 + examples/hdfgroup/H5G/h5ex_g_iterate.c | 80 ++ examples/hdfgroup/H5G/h5ex_g_iterate.cpp | 33 + examples/hdfgroup/H5G/h5ex_g_iterate.h5 | Bin 0 -> 2928 bytes examples/hdfgroup/H5G/h5ex_g_phase.c | 131 ++ examples/hdfgroup/H5G/h5ex_g_phase.cpp | 84 ++ examples/hdfgroup/H5G/h5ex_g_traverse.c | 174 +++ examples/hdfgroup/H5G/h5ex_g_traverse.cpp | 45 + examples/hdfgroup/H5G/h5ex_g_traverse.h5 | Bin 0 -> 6312 bytes examples/hdfgroup/H5G/h5ex_g_visit.c | 119 ++ examples/hdfgroup/H5G/h5ex_g_visit.cpp | 52 + examples/hdfgroup/H5G/h5ex_g_visit.h5 | Bin 0 -> 6312 bytes examples/hdfgroup/H5G/makefile.am | 29 + examples/hdfgroup/H5G/makefile.in | 975 ++++++++++++++ examples/hdfgroup/H5G/maketestref.sh | 53 + examples/hdfgroup/H5G/test.sh.in | 197 +++ .../hdfgroup/H5G/testfiles/h5ex_g_compact.tst | 6 + .../H5G/testfiles/h5ex_g_compact1.ddl | 6 + .../H5G/testfiles/h5ex_g_compact2.ddl | 6 + .../hdfgroup/H5G/testfiles/h5ex_g_corder.tst | 13 + .../hdfgroup/H5G/testfiles/h5ex_g_create.ddl | 6 + .../H5G/testfiles/h5ex_g_intermediate.tst | 5 + .../hdfgroup/H5G/testfiles/h5ex_g_iterate.tst | 5 + .../hdfgroup/H5G/testfiles/h5ex_g_phase.tst | 15 + .../H5G/testfiles/h5ex_g_traverse.tst | 32 + .../hdfgroup/H5G/testfiles/h5ex_g_visit.tst | 19 + examples/hdfgroup/H5T/CMakeLists.txt | 11 + examples/hdfgroup/H5T/C_sourcefiles.cmake | 33 + examples/hdfgroup/H5T/h5ex_t_array.c | 173 +++ examples/hdfgroup/H5T/h5ex_t_array.cpp | 97 ++ examples/hdfgroup/H5T/h5ex_t_arrayatt.c | 183 +++ examples/hdfgroup/H5T/h5ex_t_arrayatt.cpp | 85 ++ examples/hdfgroup/H5T/h5ex_t_bit.c | 143 ++ examples/hdfgroup/H5T/h5ex_t_bitatt.c | 153 +++ examples/hdfgroup/H5T/h5ex_t_cmpd.c | 170 +++ examples/hdfgroup/H5T/h5ex_t_cmpd.cpp | 76 ++ examples/hdfgroup/H5T/h5ex_t_cmpdatt.c | 182 +++ examples/hdfgroup/H5T/h5ex_t_commit.c | 119 ++ examples/hdfgroup/H5T/h5ex_t_convert.c | 152 +++ examples/hdfgroup/H5T/h5ex_t_cpxcmpd.c | 351 +++++ examples/hdfgroup/H5T/h5ex_t_cpxcmpdatt.c | 364 +++++ examples/hdfgroup/H5T/h5ex_t_enum.c | 174 +++ examples/hdfgroup/H5T/h5ex_t_enum.cpp | 73 + examples/hdfgroup/H5T/h5ex_t_enumatt.c | 186 +++ examples/hdfgroup/H5T/h5ex_t_float.c | 135 ++ examples/hdfgroup/H5T/h5ex_t_floatatt.c | 145 ++ examples/hdfgroup/H5T/h5ex_t_int.c | 134 ++ examples/hdfgroup/H5T/h5ex_t_intatt.c | 144 ++ examples/hdfgroup/H5T/h5ex_t_objref.c | 167 +++ examples/hdfgroup/H5T/h5ex_t_objrefatt.c | 178 +++ examples/hdfgroup/H5T/h5ex_t_opaque.c | 136 ++ examples/hdfgroup/H5T/h5ex_t_opaqueatt.c | 147 +++ examples/hdfgroup/H5T/h5ex_t_regref.c | 189 +++ examples/hdfgroup/H5T/h5ex_t_regrefatt.c | 200 +++ examples/hdfgroup/H5T/h5ex_t_string.c | 147 +++ examples/hdfgroup/H5T/h5ex_t_stringatt.c | 159 +++ examples/hdfgroup/H5T/h5ex_t_vlen.c | 149 +++ examples/hdfgroup/H5T/h5ex_t_vlenatt.c | 161 +++ examples/hdfgroup/H5T/h5ex_t_vlstring.c | 129 ++ examples/hdfgroup/H5T/h5ex_t_vlstringatt.c | 142 ++ examples/hdfgroup/H5T/makefile.am | 47 + examples/hdfgroup/H5T/makefile.in | 1170 +++++++++++++++++ examples/hdfgroup/H5T/maketestref.sh | 71 + examples/hdfgroup/H5T/measurement.cpp | 67 + examples/hdfgroup/H5T/measurement.hpp | 48 + examples/hdfgroup/H5T/measurement_hdf5.hpp | 70 + examples/hdfgroup/H5T/phase.cpp | 42 + examples/hdfgroup/H5T/phase.hpp | 67 + examples/hdfgroup/H5T/t_array.cpp | 32 + examples/hdfgroup/H5T/t_array.hpp | 89 ++ examples/hdfgroup/H5T/test.sh.in | 142 ++ .../hdfgroup/H5T/testfiles/h5ex_t_array.ddl | 22 + .../hdfgroup/H5T/testfiles/h5ex_t_array.tst | 20 + .../H5T/testfiles/h5ex_t_arrayatt.ddl | 28 + .../H5T/testfiles/h5ex_t_arrayatt.tst | 20 + .../hdfgroup/H5T/testfiles/h5ex_t_bit.ddl | 14 + .../hdfgroup/H5T/testfiles/h5ex_t_bit.tst | 5 + .../hdfgroup/H5T/testfiles/h5ex_t_bitatt.ddl | 20 + .../hdfgroup/H5T/testfiles/h5ex_t_bitatt.tst | 5 + .../hdfgroup/H5T/testfiles/h5ex_t_cmpd.ddl | 44 + .../hdfgroup/H5T/testfiles/h5ex_t_cmpd.tst | 24 + .../hdfgroup/H5T/testfiles/h5ex_t_cmpdatt.ddl | 50 + .../hdfgroup/H5T/testfiles/h5ex_t_cmpdatt.tst | 24 + .../hdfgroup/H5T/testfiles/h5ex_t_commit.ddl | 15 + .../hdfgroup/H5T/testfiles/h5ex_t_commit.tst | 6 + .../hdfgroup/H5T/testfiles/h5ex_t_convert.tst | 24 + .../hdfgroup/H5T/testfiles/h5ex_t_cpxcmpd.ddl | 9 + .../hdfgroup/H5T/testfiles/h5ex_t_cpxcmpd.tst | 13 + .../H5T/testfiles/h5ex_t_cpxcmpdatt.ddl | 9 + .../H5T/testfiles/h5ex_t_cpxcmpdatt.tst | 13 + .../hdfgroup/H5T/testfiles/h5ex_t_enum.ddl | 20 + .../hdfgroup/H5T/testfiles/h5ex_t_enum.tst | 5 + .../hdfgroup/H5T/testfiles/h5ex_t_enumatt.ddl | 26 + .../hdfgroup/H5T/testfiles/h5ex_t_enumatt.tst | 5 + .../hdfgroup/H5T/testfiles/h5ex_t_float.ddl | 14 + .../hdfgroup/H5T/testfiles/h5ex_t_float.tst | 5 + .../H5T/testfiles/h5ex_t_floatatt.ddl | 20 + .../H5T/testfiles/h5ex_t_floatatt.tst | 5 + .../hdfgroup/H5T/testfiles/h5ex_t_int.ddl | 14 + .../hdfgroup/H5T/testfiles/h5ex_t_int.tst | 5 + .../hdfgroup/H5T/testfiles/h5ex_t_intatt.ddl | 20 + .../hdfgroup/H5T/testfiles/h5ex_t_intatt.tst | 5 + .../hdfgroup/H5T/testfiles/h5ex_t_objref.ddl | 19 + .../hdfgroup/H5T/testfiles/h5ex_t_objref.tst | 4 + .../H5T/testfiles/h5ex_t_objrefatt.ddl | 25 + .../H5T/testfiles/h5ex_t_objrefatt.tst | 4 + .../hdfgroup/H5T/testfiles/h5ex_t_opaque.ddl | 14 + .../hdfgroup/H5T/testfiles/h5ex_t_opaque.tst | 5 + .../H5T/testfiles/h5ex_t_opaqueatt.ddl | 20 + .../H5T/testfiles/h5ex_t_opaqueatt.tst | 5 + .../hdfgroup/H5T/testfiles/h5ex_t_regref.ddl | 24 + .../hdfgroup/H5T/testfiles/h5ex_t_regref.tst | 4 + .../H5T/testfiles/h5ex_t_regrefatt.ddl | 31 + .../H5T/testfiles/h5ex_t_regrefatt.tst | 4 + .../hdfgroup/H5T/testfiles/h5ex_t_string.ddl | 16 + .../hdfgroup/H5T/testfiles/h5ex_t_string.tst | 4 + .../H5T/testfiles/h5ex_t_stringatt.ddl | 22 + .../H5T/testfiles/h5ex_t_stringatt.tst | 4 + .../hdfgroup/H5T/testfiles/h5ex_t_vlen.ddl | 11 + .../hdfgroup/H5T/testfiles/h5ex_t_vlen.tst | 4 + .../hdfgroup/H5T/testfiles/h5ex_t_vlenatt.ddl | 17 + .../hdfgroup/H5T/testfiles/h5ex_t_vlenatt.tst | 4 + .../H5T/testfiles/h5ex_t_vlstring.ddl | 16 + .../H5T/testfiles/h5ex_t_vlstring.tst | 4 + .../H5T/testfiles/h5ex_t_vlstringatt.ddl | 22 + .../H5T/testfiles/h5ex_t_vlstringatt.tst | 4 + examples/hdfgroup/Performance/CMakeLists.txt | 68 + .../hdfgroup/Performance/C_sourcefiles.cmake | 8 + examples/hdfgroup/Performance/h5efc.c | 92 ++ examples/hdfgroup/Performance/h5slab.h | 25 + examples/hdfgroup/Performance/h5slabread.c | 48 + examples/hdfgroup/Performance/h5slabwrite.c | 142 ++ examples/hdfgroup/Performance/makefile.am | 17 + 216 files changed, 19053 insertions(+) create mode 100644 examples/hdfgroup/CMakeLists.txt create mode 100644 examples/hdfgroup/H5D/CMakeLists.txt create mode 100644 examples/hdfgroup/H5D/C_sourcefiles.cmake create mode 100644 examples/hdfgroup/H5D/h5ex_d_alloc.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_alloc.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_checksum.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_checksum.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_chunk.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_chunk.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_compact.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_compact.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_extern.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_fillval.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_fillval.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_gzip.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_gzip.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_hyper.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_hyper.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_nbit.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_rdwr.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_rdwr.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_shuffle.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_shuffle.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_sofloat.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_soint.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_szip.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_transform.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_transform.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_unlimadd.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_unlimadd.cpp create mode 100644 examples/hdfgroup/H5D/h5ex_d_unlimgzip.c create mode 100644 examples/hdfgroup/H5D/h5ex_d_unlimmod.c create mode 100644 examples/hdfgroup/H5D/makefile.am create mode 100644 examples/hdfgroup/H5D/makefile.in create mode 100644 examples/hdfgroup/H5D/maketestref.sh create mode 100644 examples/hdfgroup/H5D/matrix.hpp create mode 100644 examples/hdfgroup/H5D/matrix_hdf5.hpp create mode 100644 examples/hdfgroup/H5D/test.sh.in create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_alloc.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_alloc.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_checksum.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_checksum.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_chunk.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_chunk.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_compact.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_compact.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_extern.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_extern.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_fillval.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_fillval.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_gzip.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_gzip.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_hyper.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_hyper.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_nbit.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_nbit.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_rdwr.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_rdwr.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_shuffle.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_shuffle.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_sofloat.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_sofloat.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_soint.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_soint.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_szip.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_szip.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_transform.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_transform.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_unlimadd.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_unlimadd.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_unlimgzip.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_unlimgzip.tst create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_unlimmod.ddl create mode 100644 examples/hdfgroup/H5D/testfiles/h5ex_d_unlimmod.tst create mode 100644 examples/hdfgroup/H5G/CMakeLists.txt create mode 100644 examples/hdfgroup/H5G/C_sourcefiles.cmake create mode 100644 examples/hdfgroup/H5G/h5ex_g_compact.c create mode 100644 examples/hdfgroup/H5G/h5ex_g_compact.cpp create mode 100644 examples/hdfgroup/H5G/h5ex_g_corder.c create mode 100644 examples/hdfgroup/H5G/h5ex_g_corder.cpp create mode 100644 examples/hdfgroup/H5G/h5ex_g_create.c create mode 100644 examples/hdfgroup/H5G/h5ex_g_create.cpp create mode 100644 examples/hdfgroup/H5G/h5ex_g_intermediate.c create mode 100644 examples/hdfgroup/H5G/h5ex_g_intermediate.cpp create mode 100644 examples/hdfgroup/H5G/h5ex_g_iterate.c create mode 100644 examples/hdfgroup/H5G/h5ex_g_iterate.cpp create mode 100644 examples/hdfgroup/H5G/h5ex_g_iterate.h5 create mode 100644 examples/hdfgroup/H5G/h5ex_g_phase.c create mode 100644 examples/hdfgroup/H5G/h5ex_g_phase.cpp create mode 100644 examples/hdfgroup/H5G/h5ex_g_traverse.c create mode 100644 examples/hdfgroup/H5G/h5ex_g_traverse.cpp create mode 100644 examples/hdfgroup/H5G/h5ex_g_traverse.h5 create mode 100644 examples/hdfgroup/H5G/h5ex_g_visit.c create mode 100644 examples/hdfgroup/H5G/h5ex_g_visit.cpp create mode 100644 examples/hdfgroup/H5G/h5ex_g_visit.h5 create mode 100644 examples/hdfgroup/H5G/makefile.am create mode 100644 examples/hdfgroup/H5G/makefile.in create mode 100644 examples/hdfgroup/H5G/maketestref.sh create mode 100644 examples/hdfgroup/H5G/test.sh.in create mode 100644 examples/hdfgroup/H5G/testfiles/h5ex_g_compact.tst create mode 100644 examples/hdfgroup/H5G/testfiles/h5ex_g_compact1.ddl create mode 100644 examples/hdfgroup/H5G/testfiles/h5ex_g_compact2.ddl create mode 100644 examples/hdfgroup/H5G/testfiles/h5ex_g_corder.tst create mode 100644 examples/hdfgroup/H5G/testfiles/h5ex_g_create.ddl create mode 100644 examples/hdfgroup/H5G/testfiles/h5ex_g_intermediate.tst create mode 100644 examples/hdfgroup/H5G/testfiles/h5ex_g_iterate.tst create mode 100644 examples/hdfgroup/H5G/testfiles/h5ex_g_phase.tst create mode 100644 examples/hdfgroup/H5G/testfiles/h5ex_g_traverse.tst create mode 100644 examples/hdfgroup/H5G/testfiles/h5ex_g_visit.tst create mode 100644 examples/hdfgroup/H5T/CMakeLists.txt create mode 100644 examples/hdfgroup/H5T/C_sourcefiles.cmake create mode 100644 examples/hdfgroup/H5T/h5ex_t_array.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_array.cpp create mode 100644 examples/hdfgroup/H5T/h5ex_t_arrayatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_arrayatt.cpp create mode 100644 examples/hdfgroup/H5T/h5ex_t_bit.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_bitatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_cmpd.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_cmpd.cpp create mode 100644 examples/hdfgroup/H5T/h5ex_t_cmpdatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_commit.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_convert.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_cpxcmpd.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_cpxcmpdatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_enum.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_enum.cpp create mode 100644 examples/hdfgroup/H5T/h5ex_t_enumatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_float.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_floatatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_int.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_intatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_objref.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_objrefatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_opaque.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_opaqueatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_regref.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_regrefatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_string.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_stringatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_vlen.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_vlenatt.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_vlstring.c create mode 100644 examples/hdfgroup/H5T/h5ex_t_vlstringatt.c create mode 100644 examples/hdfgroup/H5T/makefile.am create mode 100644 examples/hdfgroup/H5T/makefile.in create mode 100644 examples/hdfgroup/H5T/maketestref.sh create mode 100644 examples/hdfgroup/H5T/measurement.cpp create mode 100644 examples/hdfgroup/H5T/measurement.hpp create mode 100644 examples/hdfgroup/H5T/measurement_hdf5.hpp create mode 100644 examples/hdfgroup/H5T/phase.cpp create mode 100644 examples/hdfgroup/H5T/phase.hpp create mode 100644 examples/hdfgroup/H5T/t_array.cpp create mode 100644 examples/hdfgroup/H5T/t_array.hpp create mode 100644 examples/hdfgroup/H5T/test.sh.in create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_array.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_array.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_arrayatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_arrayatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_bit.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_bit.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_bitatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_bitatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_cmpd.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_cmpd.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_cmpdatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_cmpdatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_commit.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_commit.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_convert.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpd.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpd.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpdatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpdatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_enum.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_enum.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_enumatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_enumatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_float.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_float.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_floatatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_floatatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_int.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_int.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_intatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_intatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_objref.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_objref.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_objrefatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_objrefatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_opaque.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_opaque.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_opaqueatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_opaqueatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_regref.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_regref.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_regrefatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_regrefatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_string.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_string.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_stringatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_stringatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_vlen.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_vlen.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_vlenatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_vlenatt.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_vlstring.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_vlstring.tst create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_vlstringatt.ddl create mode 100644 examples/hdfgroup/H5T/testfiles/h5ex_t_vlstringatt.tst create mode 100644 examples/hdfgroup/Performance/CMakeLists.txt create mode 100644 examples/hdfgroup/Performance/C_sourcefiles.cmake create mode 100644 examples/hdfgroup/Performance/h5efc.c create mode 100644 examples/hdfgroup/Performance/h5slab.h create mode 100644 examples/hdfgroup/Performance/h5slabread.c create mode 100644 examples/hdfgroup/Performance/h5slabwrite.c create mode 100644 examples/hdfgroup/Performance/makefile.am diff --git a/examples/hdfgroup/CMakeLists.txt b/examples/hdfgroup/CMakeLists.txt new file mode 100644 index 0000000000..a065d73757 --- /dev/null +++ b/examples/hdfgroup/CMakeLists.txt @@ -0,0 +1,9 @@ + + +#----------------------------------------------------------------------------- +# Build the C Examples +#----------------------------------------------------------------------------- +add_subdirectory (H5D) +add_subdirectory (H5G) +add_subdirectory (H5T) +#add_subdirectory (${PROJECT_SOURCE_DIR}/Performance ${PROJECT_BINARY_DIR}/Performance) diff --git a/examples/hdfgroup/H5D/CMakeLists.txt b/examples/hdfgroup/H5D/CMakeLists.txt new file mode 100644 index 0000000000..a99a1a557c --- /dev/null +++ b/examples/hdfgroup/H5D/CMakeLists.txt @@ -0,0 +1,30 @@ + +add_executable(h5ex_d_alloc h5ex_d_alloc.cpp) +target_link_libraries(h5ex_d_alloc h5cpp) + +add_executable(h5ex_d_checksum h5ex_d_checksum.cpp) +target_link_libraries(h5ex_d_checksum h5cpp) + +add_executable(h5ex_d_chunk h5ex_d_chunk.cpp) +target_link_libraries(h5ex_d_chunk h5cpp) + +add_executable(h5ex_d_compact h5ex_d_compact.cpp) +target_link_libraries(h5ex_d_compact h5cpp) + +add_executable(h5ex_d_fillval h5ex_d_fillval.cpp) +target_link_libraries(h5ex_d_fillval h5cpp) + +add_executable(h5ex_d_hyper h5ex_d_hyper.cpp) +target_link_libraries(h5ex_d_hyper h5cpp) + +add_executable(h5ex_d_rdwr h5ex_d_rdwr.cpp) +target_link_libraries(h5ex_d_rdwr h5cpp) + +add_executable(h5ex_d_shuffle h5ex_d_shuffle.cpp) +target_link_libraries(h5ex_d_shuffle h5cpp) + +add_executable(h5ex_d_transform h5ex_d_transform.cpp) +target_link_libraries(h5ex_d_transform h5cpp) + +add_executable(h5ex_d_unlimadd h5ex_d_unlimadd.cpp) +target_link_libraries(h5ex_d_unlimadd h5cpp) \ No newline at end of file diff --git a/examples/hdfgroup/H5D/C_sourcefiles.cmake b/examples/hdfgroup/H5D/C_sourcefiles.cmake new file mode 100644 index 0000000000..4f5e9a413e --- /dev/null +++ b/examples/hdfgroup/H5D/C_sourcefiles.cmake @@ -0,0 +1,25 @@ +#----------------------------------------------------------------------------- +# Define Sources, one file per application +#----------------------------------------------------------------------------- +set (examples + h5ex_d_alloc.c + h5ex_d_checksum.c + h5ex_d_chunk.c + h5ex_d_compact.c + h5ex_d_extern.c + h5ex_d_fillval.c + h5ex_d_gzip.c + h5ex_d_hyper.c + h5ex_d_nbit.c + h5ex_d_rdwr.c + h5ex_d_soint.c + h5ex_d_transform.c + h5ex_d_unlimmod.c + h5ex_d_shuffle.c + h5ex_d_sofloat.c + h5ex_d_unlimadd.c + h5ex_d_unlimgzip.c +) +if (HDF5_ENABLE_SZIP_SUPPORT) + set (examples ${examples} h5ex_d_szip.c) +endif () diff --git a/examples/hdfgroup/H5D/h5ex_d_alloc.c b/examples/hdfgroup/H5D/h5ex_d_alloc.c new file mode 100644 index 0000000000..2323fec2b9 --- /dev/null +++ b/examples/hdfgroup/H5D/h5ex_d_alloc.c @@ -0,0 +1,141 @@ +/************************************************************ + + This example shows how to set the space allocation time + for a dataset. The program first creates two datasets, + one with the default allocation time (late) and one with + early allocation time, and displays whether each has been + allocated and their allocation size. Next, it writes data + to the datasets, and again displays whether each has been + allocated and their allocation size. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "h5ex_d_alloc.h5" +#define DATASET1 "DS1" +#define DATASET2 "DS2" +#define DIM0 4 +#define DIM1 7 +#define FILLVAL 99 + +int +main (void) +{ + hid_t file, space, dset1, dset2, dcpl; + /* Handles */ + herr_t status; + H5D_space_status_t space_status; + hsize_t dims[2] = {DIM0, DIM1}, + storage_size; + int wdata[DIM0][DIM1], /* Write buffer */ + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include +#include + + +#define FILE "h5ex_d_alloc.h5" +#define DATASET1 "DS1" +#define DATASET2 "DS2" +#define DIM0 4 +#define DIM1 7 +#define FILLVAL 99 + +int32_t generate() +{ + static int32_t value = 0; + return value++; +} + +using namespace hdf5; + +int +main (void) +{ + std::array buffer; + std::generate(buffer.begin(),buffer.end(),generate); + + /* + * Create a new file using the default properties. + */ + file::File file = file::create(FILE, file::AccessFlags::TRUNCATE); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + dataspace::Simple space({DIM0,DIM1}); + + /* + * Create the dataset creation property list, and set the chunk + * size. + */ + property::DatasetCreationList dcpl; + property::LinkCreationList lcpl; + + /* + * Set the allocation time to "early". This way we can be sure + * that reading from the dataset immediately after creation will + * return the fill value. + */ + dcpl.allocation_time(property::DatasetAllocTime::EARLY); + + printf ("Creating datasets...\n"); + printf ("%s has allocation time H5D_ALLOC_TIME_LATE\n", DATASET1); + printf ("%s has allocation time H5D_ALLOC_TIME_EARLY\n\n", DATASET2); + + /* + * Create the dataset using the dataset creation property list. + */ + node::Dataset dset1(file.root(),DATASET1,datatype::create(),space); + node::Dataset dset2(file.root(),DATASET2,datatype::create(),space,lcpl,dcpl); + + /* + * Retrieve and print space status and storage size for dset1. + */ + H5D_space_status_t space_status; + H5Dget_space_status (static_cast(dset1), &space_status); + hsize_t storage_size = H5Dget_storage_size (static_cast(dset1)); + printf ("Space for %s has%sbeen allocated.\n", DATASET1, + space_status == H5D_SPACE_STATUS_ALLOCATED ? " " : " not "); + printf ("Storage size for %s is: %ld bytes.\n", DATASET1, + (long) storage_size); + + /* + * Retrieve and print space status and storage size for dset2. + */ + H5Dget_space_status (static_cast(dset2), &space_status); + storage_size = H5Dget_storage_size (static_cast(dset2)); + printf ("Space for %s has%sbeen allocated.\n", DATASET2, + space_status == H5D_SPACE_STATUS_ALLOCATED ? " " : " not "); + printf ("Storage size for %s is: %ld bytes.\n", DATASET2, + (long) storage_size); + + printf ("\nWriting data...\n\n"); + + /* + * Write the data to the datasets. + */ + dset1.write(buffer); + dset2.write(buffer); + + /* + * Retrieve and print space status and storage size for dset1. + */ + H5Dget_space_status (static_cast(dset1), &space_status); + storage_size = H5Dget_storage_size (static_cast(dset1)); + printf ("Space for %s has%sbeen allocated.\n", DATASET1, + space_status == H5D_SPACE_STATUS_ALLOCATED ? " " : " not "); + printf ("Storage size for %s is: %ld bytes.\n", DATASET1, + (long) storage_size); + + /* + * Retrieve and print space status and storage size for dset2. + */ + H5Dget_space_status (static_cast(dset2), &space_status); + storage_size = H5Dget_storage_size (static_cast(dset2)); + printf ("Space for %s has%sbeen allocated.\n", DATASET2, + space_status == H5D_SPACE_STATUS_ALLOCATED ? " " : " not "); + printf ("Storage size for %s is: %ld bytes.\n", DATASET2, + (long) storage_size); + + return 0; +} diff --git a/examples/hdfgroup/H5D/h5ex_d_checksum.c b/examples/hdfgroup/H5D/h5ex_d_checksum.c new file mode 100644 index 0000000000..256b3aa169 --- /dev/null +++ b/examples/hdfgroup/H5D/h5ex_d_checksum.c @@ -0,0 +1,197 @@ +/************************************************************ + + This example shows how to read and write data to a dataset + using the Fletcher32 checksum filter. The program first + checks if the Fletcher32 filter is available, then if it + is it writes integers to a dataset using Fletcher32, then + closes the file. Next, it reopens the file, reads back + the data, checks if the filter detected an error and + outputs the type of filter and the maximum value in the + dataset to the screen. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "h5ex_d_checksum.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 + +int +main (void) +{ + hid_t file, space, dset, dcpl; + /* Handles */ + herr_t status; + htri_t avail; + H5Z_filter_t filter_type; + hsize_t dims[2] = {DIM0, DIM1}, + chunk[2] = {CHUNK0, CHUNK1}; + size_t nelmts; + unsigned int flags, + filter_info; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + max, + i, j; + + /* + * Check if the Fletcher32 filter is available and can be used for + * both encoding and decoding. Normally we do not perform error + * checking in these examples for the sake of clarity, but in this + * case we will make an exception because this filter is an + * optional part of the hdf5 library. + */ + avail = H5Zfilter_avail(H5Z_FILTER_FLETCHER32); + if (!avail) { + printf ("Fletcher32 filter not available.\n"); + return 1; + } + status = H5Zget_filter_info (H5Z_FILTER_FLETCHER32, &filter_info); + if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || + !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { + printf ("Fletcher32 filter not available for encoding and decoding.\n"); + return 1; + } + + /* + * Initialize data. + */ + for (i=0; i +#include +#include +#include "matrix_hdf5.hpp" + +#define FILE "h5ex_d_checksum.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 + +using Int32Matrix = Matrix; + +int32_t generator() +{ + static size_t i = 0; + static size_t j = 0; + + i = i(),space,lcpl,dcpl); + dset.write(matrix); +} + +void read_data() +{ + + /* + * Open file and dataset using the default properties. + */ + file::File file = file::open(FILE,file::AccessFlags::READONLY); + node::Dataset dset = file.root()[DATASET]; + + /* + * Retrieve dataset creation property list. + */ + property::DatasetCreationList dcpl = dset.creation_list(); + + /* + * Retrieve and print the filter type. Here we only retrieve the + * first filter because we know that we only added one filter. + */ + size_t nelmts = 0; + unsigned int flags = 0, filter_info = 0; + H5Z_filter_t filter_type = H5Pget_filter (static_cast(dcpl), 0, + &flags, &nelmts, NULL, 0, NULL, + &filter_info); + printf ("Filter type is: "); + switch (filter_type) { + case H5Z_FILTER_DEFLATE: + printf ("H5Z_FILTER_DEFLATE\n"); + break; + case H5Z_FILTER_SHUFFLE: + printf ("H5Z_FILTER_SHUFFLE\n"); + break; + case H5Z_FILTER_FLETCHER32: + printf ("H5Z_FILTER_FLETCHER32\n"); + break; + case H5Z_FILTER_SZIP: + printf ("H5Z_FILTER_SZIP\n"); + break; + case H5Z_FILTER_NBIT: + printf ("H5Z_FILTER_NBIT\n"); + break; + case H5Z_FILTER_SCALEOFFSET: + printf ("H5Z_FILTER_SCALEOFFSET\n"); + } + + /* + * Read the data using the default properties. + */ + Int32Matrix matrix; + dset.read(matrix); + std::cout< +#include + +#define FILE "h5ex_d_chunk.h5" +#define DATASET "DS1" +#define DIM0 6 +#define DIM1 8 +#define CHUNK0 4 +#define CHUNK1 4 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + H5D_layout_t layout; + hsize_t dims[2] = {DIM0, DIM1}, + chunk[2] = {CHUNK0, CHUNK1}, + start[2], + stride[2], + count[2], + block[2]; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + i, j; + + /* + * Initialize data to "1", to make it easier to see the selections. + */ + for (i=0; i +#include +#include "matrix_hdf5.hpp" + +#define FILE "h5ex_d_chunk.h5" +#define DATASET "DS1" +#define DIM0 6 +#define DIM1 8 +#define CHUNK0 4 +#define CHUNK1 4 + +using namespace hdf5; + +using Int32Matrix = Matrix; + +void write_data() +{ + /* + * Create a new file using the default properties. + */ + + file::File file = file::create (FILE, file::AccessFlags::TRUNCATE); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + dataspace::Simple file_space({ DIM0, DIM1 }); + + /* + * Create the dataset creation property list, and set the chunk + * size. + */ + property::DatasetCreationList dcpl; + dcpl.layout (property::DatasetLayout::CHUNKED); + dcpl.chunk (Dimensions{ CHUNK0, CHUNK1 }); + + /* + * Create the chunked dataset. + */ + property::LinkCreationList lcpl; + node::Dataset dset (file.root (), DATASET, datatype::create (), + file_space, lcpl, dcpl); + + /* + * Define and select the first part of the hyperslab selection. + */ + file_space.selection(dataspace::SelectionOperation::SET, + dataspace::Hyperslab({ 0, 0 },{ 2, 2 },{ 2, 3 },{ 3, 3 })); + file_space.selection(dataspace::SelectionOperation::NOTB, + dataspace::Hyperslab({ 0, 0 },{ 1, 1 },{ 2, 3 },{ 3, 3 })); + + + /* + * Write the data to the dataset. + */ + Int32Matrix matrix(1); + std::cout<<"Original data: "<(),file_space,file_space); + +} + +void read_data() +{ + file::File file = file::open(FILE,file::AccessFlags::READONLY); + node::Dataset dset = file.root()[DATASET]; + + property::DatasetCreationList dcpl = dset.creation_list(); + std::cout<<"Dataset layout: "<(),file_space,file_space); + std::cout< +#include + +#define FILE "h5ex_d_compact.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + H5D_layout_t layout; + hsize_t dims[2] = {DIM0, DIM1}; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include "matrix_hdf5.hpp" + +#define FILE "h5ex_d_compact.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 + +using Int32Matrix = Matrix; + +void write_data() +{ + using namespace hdf5; + + // + // Create a new file using the default properties. + // + file::File file = file::create(FILE,file::AccessFlags::TRUNCATE); + + // + // Create dataspace. Setting maximum size to NULL sets the maximum + // size to be the current size. + // + dataspace::Simple space({DIM0,DIM1}); + + // + // Create the dataset creation property list, set the layout to + // compact. + // + property::LinkCreationList lcpl; + property::DatasetCreationList dcpl; + dcpl.layout(property::DatasetLayout::COMPACT); + + // + // Create the dataset. We will use all default properties for this + // example. + // + node::Dataset dset(file.root(), DATASET, datatype::create(), + space,lcpl, dcpl); + + // + // Initialize data + // + Int32Matrix data; + for (size_t i=0; i +#include + +#define FILE "h5ex_d_extern.h5" +#define EXTERNAL "h5ex_d_extern.data" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define NAME_BUF_SIZE 32 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + char name[NAME_BUF_SIZE]; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_d_fillval.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define EDIM0 6 +#define EDIM1 10 +#define CHUNK0 4 +#define CHUNK1 4 +#define FILLVAL 99 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}, + extdims[2] = {EDIM0, EDIM1}, + maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}, + chunk[2] = {CHUNK0, CHUNK1}; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + rdata2[EDIM0][EDIM1], /* Read buffer for + extenstion */ + fillval, + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include "matrix_hdf5.hpp" + +#define FILE "h5ex_d_fillval.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define EDIM0 6 +#define EDIM1 10 +#define CHUNK0 4 +#define CHUNK1 4 +#define FILLVAL 99 + +using namespace hdf5; +using Int32Matrix = Matrix; + +int +main (void) +{ + Int32Matrix rdata,wdata; + Matrix rdata2; + /* + * Initialize data. + */ + for (size_t i=0; i()); + + /* + * Set the allocation time to "early". This way we can be sure + * that reading from the dataset immediately after creation will + * return the fill value. + */ + dcpl.allocation_time(property::DatasetAllocTime::EARLY); + + /* + * Create the dataset using the dataset creation property list. + */ + node::Dataset dset(file.root(),DATASET,datatype::create(),space,lcpl,dcpl); + /* + * Read values from the dataset, which has not been written to yet. + */ + dset.read(rdata); + std::cout<<"Dataset before being written to:"< +#include + +#define FILE "h5ex_d_gzip.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + htri_t avail; + H5Z_filter_t filter_type; + hsize_t dims[2] = {DIM0, DIM1}, + chunk[2] = {CHUNK0, CHUNK1}; + size_t nelmts; + unsigned int flags, + filter_info; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + max, + i, j; + + /* + * Check if gzip compression is available and can be used for both + * compression and decompression. Normally we do not perform error + * checking in these examples for the sake of clarity, but in this + * case we will make an exception because this filter is an + * optional part of the hdf5 library. + */ + avail = H5Zfilter_avail(H5Z_FILTER_DEFLATE); + if (!avail) { + printf ("gzip filter not available.\n"); + return 1; + } + status = H5Zget_filter_info (H5Z_FILTER_DEFLATE, &filter_info); + if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || + !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { + printf ("gzip filter not available for encoding and decoding.\n"); + return 1; + } + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_d_gzip.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + htri_t avail; + H5Z_filter_t filter_type; + hsize_t dims[2] = {DIM0, DIM1}, + chunk[2] = {CHUNK0, CHUNK1}; + size_t nelmts; + unsigned int flags, + filter_info; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + max, + i, j; + + /* + * Check if gzip compression is available and can be used for both + * compression and decompression. Normally we do not perform error + * checking in these examples for the sake of clarity, but in this + * case we will make an exception because this filter is an + * optional part of the hdf5 library. + */ + avail = H5Zfilter_avail(H5Z_FILTER_DEFLATE); + if (!avail) { + printf ("gzip filter not available.\n"); + return 1; + } + status = H5Zget_filter_info (H5Z_FILTER_DEFLATE, &filter_info); + if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || + !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { + printf ("gzip filter not available for encoding and decoding.\n"); + return 1; + } + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_d_hyper.h5" +#define DATASET "DS1" +#define DIM0 6 +#define DIM1 8 + +int +main (void) +{ + hid_t file, space, dset; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}, + start[2], + stride[2], + count[2], + block[2]; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + i, j; + + /* + * Initialize data to "1", to make it easier to see the selections. + */ + for (i=0; i +#include "matrix_hdf5.hpp" +#include + +#define FILE "h5ex_d_hyper.h5" +#define DATASET "DS1" +#define DIM0 6 +#define DIM1 8 + +using Int32Matrix = Matrix; +using namespace hdf5; + +void write () +{ + Int32Matrix wdata; + std::fill (wdata.begin (), wdata.end (), 1); + + // Print the data to the screen. + std::cout << "Original Data:" << std::endl; + std::cout << wdata << std::endl; + + // Create a new file using the default properties. + file::File file = file::create (FILE, file::AccessFlags::TRUNCATE); + + // Create dataspace. Setting maximum size to NULL sets the maximum + // size to be the current size. + dataspace::Simple space ({ DIM0, DIM1 }); + + // Create the dataset. We will use all default properties for this + // example. + node::Dataset dset (file.root (), DATASET, datatype::create (), + space); + + // Define and select the first part of the hyperslab selection. + dataspace::Hyperslab hyperslab1 ( { 0, 0 }, //offset + { 2, 2 }, //block + { 2, 3 }, //count + { 3, 3 }); //stride + + // Define and select the second part of the hyperslab selection. + dataspace::Hyperslab hyperslab2 ( { 0, 0 }, //offset + { 1, 1 }, //block + { 2, 3 }, //count + { 3, 3 }); //stride + + //apply the hyperslabs to the dataspace + space.selection (dataspace::SelectionOperation::SET, hyperslab1); + space.selection (dataspace::SelectionOperation::NOTB, hyperslab2); + + + //Write the data to the dataset. + dset.write (wdata, datatype::create (wdata), space, + space); +} + +void read() +{ + // Open file and dataset using the default properties. + file::File file = file::open(FILE,file::AccessFlags::READONLY); + node::Dataset dset = file.root().nodes[DATASET]; + + + // Read the data using the default properties. + Int32Matrix rdata; + dset.read(rdata); + + // Output the data to the screen. + + std::cout<<"Data as written to disk by hyberslabs:"< +#include + +#define FILE "h5ex_d_nbit.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 + +int +main (void) +{ + hid_t file, space, dset, dtype, dcpl; + /* Handles */ + herr_t status; + htri_t avail; + H5Z_filter_t filter_type; + hsize_t dims[2] = {DIM0, DIM1}, + chunk[2] = {CHUNK0, CHUNK1}; + size_t nelmts; + unsigned int flags, + filter_info; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + max, + i, j; + + /* + * Check if N-Bit compression is available and can be used for both + * compression and decompression. Normally we do not perform error + * checking in these examples for the sake of clarity, but in this + * case we will make an exception because this filter is an + * optional part of the hdf5 library. + */ + avail = H5Zfilter_avail(H5Z_FILTER_NBIT); + if (!avail) { + printf ("N-Bit filter not available.\n"); + return 1; + } + status = H5Zget_filter_info (H5Z_FILTER_NBIT, &filter_info); + if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || + !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { + printf ("N-Bit filter not available for encoding and decoding.\n"); + return 1; + } + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_d_rdwr.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 + +int +main (void) +{ + hid_t file, space, dset; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include "matrix_hdf5.hpp" + +#define FILE "h5ex_d_rdwr.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 + +using Int32Matrix = Matrix; +using namespace hdf5; + +void write() +{ + Int32Matrix wdata; + + // Initialize data. + for (int32_t i = 0; i < DIM0; i++) + for (int32_t j = 0; j < DIM1; j++) + wdata (i, j) = i * j - j; + + + // Create a new file using the default properties. + file::File file = file::create (FILE, file::AccessFlags::TRUNCATE); + + // Create dataspace. Setting maximum size to NULL sets the maximum + // size to be the current size. + dataspace::Simple space ({ DIM0, DIM1 }); + + + // Create the dataset. We will use all default properties for this + // example. + std::cout<<"Data to write:"< +#include + +#define FILE "h5ex_d_shuffle.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + htri_t avail; + H5Z_filter_t filter_type; + hsize_t dims[2] = {DIM0, DIM1}, + chunk[2] = {CHUNK0, CHUNK1}; + size_t nelmts; + unsigned int flags, + filter_info; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + max, + nfilters, + i, j; + + /* + * Check if gzip compression is available and can be used for both + * compression and decompression. Normally we do not perform error + * checking in these examples for the sake of clarity, but in this + * case we will make an exception because this filter is an + * optional part of the hdf5 library. + */ + avail = H5Zfilter_avail(H5Z_FILTER_DEFLATE); + if (!avail) { + printf ("gzip filter not available.\n"); + return 1; + } + status = H5Zget_filter_info (H5Z_FILTER_DEFLATE, &filter_info); + if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || + !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { + printf ("gzip filter not available for encoding and decoding.\n"); + return 1; + } + + /* + * Similarly, check for availability of the shuffle filter. + */ + avail = H5Zfilter_avail(H5Z_FILTER_SHUFFLE); + if (!avail) { + printf ("Shuffle filter not available.\n"); + return 1; + } + status = H5Zget_filter_info (H5Z_FILTER_SHUFFLE, &filter_info); + if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || + !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { + printf ("Shuffle filter not available for encoding and decoding.\n"); + return 1; + } + + /* + * Initialize data. + */ + for (i=0; i +#include "matrix_hdf5.hpp" +#include + +#define FILE "h5ex_d_shuffle.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 + +using namespace hdf5; +using Int32Matrix = Matrix; + +void write() +{ + filter::Shuffle shuffle_filter; + filter::Deflate deflate_filter; + deflate_filter.level(9); + + Int32Matrix wdata; + // Initialize data. + for (size_t i=0; i (), + space, lcpl, dcpl); + + // Write the data to the dataset. + dset.write (wdata); +} + +void read() +{ + // Open file and dataset using the default properties. + file::File file = file::open (FILE,file::AccessFlags::READONLY); + node::Dataset dset = file.root().nodes[DATASET]; + + // Retrieve dataset creation property list + property::DatasetCreationList dcpl = dset.creation_list(); + + // Retrieve the number of filters, and retrieve and print the + // type of each. + unsigned int flags,filter_info; + int nfilters = H5Pget_nfilters (static_cast(dcpl)); + for (int i=0; i(dcpl), i, &flags, &nelmts, NULL, 0, NULL, + &filter_info); + std::cout<< "Filter "< +#include + +#define FILE "h5ex_d_sofloat.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 + +int +main (void) +{ + hid_t file, space, dset, dcpl; + /* Handles */ + herr_t status; + htri_t avail; + H5Z_filter_t filter_type; + hsize_t dims[2] = {DIM0, DIM1}, + chunk[2] = {CHUNK0, CHUNK1}; + size_t nelmts; + unsigned int flags, + filter_info; + double wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + max, + min; + int i, j; + + /* + * Check if Scale-Offset compression is available and can be used + * for both compression and decompression. Normally we do not + * perform error checking in these examples for the sake of + * clarity, but in this case we will make an exception because this + * filter is an optional part of the hdf5 library. + */ + avail = H5Zfilter_avail(H5Z_FILTER_SCALEOFFSET); + if (!avail) { + printf ("Scale-Offset filter not available.\n"); + return 1; + } + status = H5Zget_filter_info (H5Z_FILTER_SCALEOFFSET, &filter_info); + if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || + !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { + printf ("Scale-Offset filter not available for encoding and decoding.\n"); + return 1; + } + + /* + * Initialize data. + */ + for (i=0; i wdata[i][j]) + min = wdata[i][j]; + } + + /* + * Print the maximum value. + */ + printf ("Maximum value in write buffer is: %f\n", max); + printf ("Minimum value in write buffer is: %f\n", min); + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (2, dims, NULL); + + /* + * Create the dataset creation property list, add the Scale-Offset + * filter and set the chunk size. + */ + dcpl = H5Pcreate (H5P_DATASET_CREATE); + status = H5Pset_scaleoffset (dcpl, H5Z_SO_FLOAT_DSCALE, 2); + status = H5Pset_chunk (dcpl, 2, chunk); + + /* + * Create the dataset. + */ + dset = H5Dcreate (file, DATASET, H5T_IEEE_F64LE, space, H5P_DEFAULT, dcpl, + H5P_DEFAULT); + + /* + * Write the data to the dataset. + */ + status = H5Dwrite (dset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata[0]); + + /* + * Close and release resources. + */ + status = H5Pclose (dcpl); + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. + */ + + /* + * Open file and dataset using the default properties. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Retrieve dataset creation property list. + */ + dcpl = H5Dget_create_plist (dset); + + /* + * Retrieve and print the filter type. Here we only retrieve the + * first filter because we know that we only added one filter. + */ + nelmts = 0; + filter_type = H5Pget_filter (dcpl, 0, &flags, &nelmts, NULL, 0, NULL, &filter_info); + printf ("Filter type is: "); + switch (filter_type) { + case H5Z_FILTER_DEFLATE: + printf ("H5Z_FILTER_DEFLATE\n"); + break; + case H5Z_FILTER_SHUFFLE: + printf ("H5Z_FILTER_SHUFFLE\n"); + break; + case H5Z_FILTER_FLETCHER32: + printf ("H5Z_FILTER_FLETCHER32\n"); + break; + case H5Z_FILTER_SZIP: + printf ("H5Z_FILTER_SZIP\n"); + break; + case H5Z_FILTER_NBIT: + printf ("H5Z_FILTER_NBIT\n"); + break; + case H5Z_FILTER_SCALEOFFSET: + printf ("H5Z_FILTER_SCALEOFFSET\n"); + } + + /* + * Read the data using the default properties. + */ + status = H5Dread (dset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, + rdata[0]); + + /* + * Find the maximum value in the dataset, to verify that it was + * read correctly. + */ + max = rdata[0][0]; + min = rdata[0][0]; + for (i=0; i rdata[i][j]) + min = rdata[i][j]; + } + + /* + * Print the maximum value. + */ + printf ("Maximum value in %s is: %f\n", DATASET, max); + printf ("Minimum value in %s is: %f\n", DATASET, min); + + /* + * Close and release resources. + */ + status = H5Pclose (dcpl); + status = H5Dclose (dset); + status = H5Fclose (file); + + return 0; +} diff --git a/examples/hdfgroup/H5D/h5ex_d_soint.c b/examples/hdfgroup/H5D/h5ex_d_soint.c new file mode 100644 index 0000000000..7328a77173 --- /dev/null +++ b/examples/hdfgroup/H5D/h5ex_d_soint.c @@ -0,0 +1,181 @@ +/************************************************************ + + This example shows how to read and write data to a dataset + using the Scale-Offset filter. The program first checks + if the Scale-Offset filter is available, then if it is it + writes integers to a dataset using Scale-Offset, then + closes the file Next, it reopens the file, reads back the + data, and outputs the type of filter and the maximum value + in the dataset to the screen. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "h5ex_d_soint.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 + +int +main (void) +{ + hid_t file, space, dset, dcpl; + /* Handles */ + herr_t status; + htri_t avail; + H5Z_filter_t filter_type; + hsize_t dims[2] = {DIM0, DIM1}, + chunk[2] = {CHUNK0, CHUNK1}; + size_t nelmts; + unsigned int flags, + filter_info; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + max, + i, j; + + /* + * Check if Scale-Offset compression is available and can be used + * for both compression and decompression. Normally we do not + * perform error checking in these examples for the sake of + * clarity, but in this case we will make an exception because this + * filter is an optional part of the hdf5 library. + */ + avail = H5Zfilter_avail(H5Z_FILTER_SCALEOFFSET); + if (!avail) { + printf ("Scale-Offset filter not available.\n"); + return 1; + } + status = H5Zget_filter_info (H5Z_FILTER_SCALEOFFSET, &filter_info); + if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || + !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { + printf ("Scale-Offset filter not available for encoding and decoding.\n"); + return 1; + } + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_d_szip.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + htri_t avail; + H5Z_filter_t filter_type; + hsize_t dims[2] = {DIM0, DIM1}, + chunk[2] = {CHUNK0, CHUNK1}; + size_t nelmts; + unsigned int flags, + filter_info; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + max, + i, j; + + /* + * Check if szip compression is available and can be used for both + * compression and decompression. Normally we do not perform error + * checking in these examples for the sake of clarity, but in this + * case we will make an exception because this filter is an + * optional part of the hdf5 library. + */ + avail = H5Zfilter_avail(H5Z_FILTER_SZIP); + if (!avail) { + printf ("szip filter not available.\n"); + return 1; + } + status = H5Zget_filter_info (H5Z_FILTER_SZIP, &filter_info); + if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || + !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { + printf ("szip filter not available for encoding and decoding.\n"); + return 1; + } + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_d_transform.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define TRANSFORM "x+1" +#define RTRANSFORM "x-1" + +int +main (void) +{ + hid_t file, space, dset, dxpl; + /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + int wdata[DIM0][DIM1], /* Write buffer */ + rdata[DIM0][DIM1], /* Read buffer */ + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include "matrix_hdf5.hpp" + +#define FILE "h5ex_d_transform.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define TRANSFORM "x+1" +#define RTRANSFORM "x-1" + +using namespace hdf5; +using Int32Matrix = Matrix; + +void write() +{ + // Initialize data. + Int32Matrix wdata; + for (int32_t i=0; i(); + + // Create the dataset transfer property list and define the + // transform expression. + property::DatasetTransferList dxpl; + dxpl.data_transform(TRANSFORM); + + // Create the dataset using the default properties. Unfortunately + // we must save as a native type or the transform operation will + // fail. + node::Dataset dset(file.root(), DATASET, memory_type,memory_space); + + + // Write the data to the dataset using the dataset transfer + // property list. + dset.write(wdata,memory_type,memory_space,memory_space,dxpl); +} + +void read() +{ + // Open file and dataset using the default properties. + file::File file = file::open (FILE, file::AccessFlags::READONLY); + node::Dataset dset = file.root().nodes[DATASET]; + + // Read the data using the default properties. + Int32Matrix rdata; + dset.read(rdata); + + // Output the data to the screen. + std::cout< +#include + +#define FILE "h5ex_d_unlimadd.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define EDIM0 6 +#define EDIM1 10 +#define CHUNK0 4 +#define CHUNK1 4 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}, + extdims[2] = {EDIM0, EDIM1}, + maxdims[2], + chunk[2] = {CHUNK0, CHUNK1}, + start[2], + count[2]; + int wdata[DIM0][DIM1], /* Write buffer */ + wdata2[EDIM0][EDIM1], /* Write buffer for + extension */ + **rdata, /* Read buffer */ + ndims, + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include "matrix_hdf5.hpp" +#include + + +#define FILE "h5ex_d_unlimadd.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define EDIM0 6 +#define EDIM1 10 +#define CHUNK0 4 +#define CHUNK1 4 + +using namespace hdf5; +using Int32Matrix = Matrix; +using Int32MatrixExtended = Matrix; + +void write_initial_data() +{ + // Initialize data. + Int32Matrix wdata; + for (int32_t i=0; i(), space,lcpl, dcpl); + + // Write the data to the dataset. + dset.write(wdata); +} + +void append_data() +{ + // Open file and dataset using the default properties. + file::File file = file::open (FILE, file::AccessFlags::READWRITE); + node::Dataset dset = file.root().nodes[DATASET]; + + // Get dataspace and allocate memory for read buffer. This is a + // two dimensional dataset so the dynamic allocation must be done + // in steps. + dataspace::Simple space = dset.dataspace(); + + // Read the data using the default properties. + Int32Matrix rdata; + dset.read(rdata); + + // Output the data to the screen. + std::cout<<"Dataset before extension:"< +#include + +#define FILE "h5ex_d_unlimgzip.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define EDIM0 6 +#define EDIM1 10 +#define CHUNK0 4 +#define CHUNK1 4 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + htri_t avail; + H5Z_filter_t filter_type; + hsize_t dims[2] = {DIM0, DIM1}, + extdims[2] = {EDIM0, EDIM1}, + maxdims[2], + chunk[2] = {CHUNK0, CHUNK1}, + start[2], + count[2]; + size_t nelmts; + unsigned int flags, + filter_info; + int wdata[DIM0][DIM1], /* Write buffer */ + wdata2[EDIM0][EDIM1], /* Write buffer for + extension */ + **rdata, /* Read buffer */ + ndims, + i, j; + + /* + * Check if gzip compression is available and can be used for both + * compression and decompression. Normally we do not perform error + * checking in these examples for the sake of clarity, but in this + * case we will make an exception because this filter is an + * optional part of the hdf5 library. + */ + avail = H5Zfilter_avail(H5Z_FILTER_DEFLATE); + if (!avail) { + printf ("gzip filter not available.\n"); + return 1; + } + status = H5Zget_filter_info (H5Z_FILTER_DEFLATE, &filter_info); + if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || + !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { + printf ("gzip filter not available for encoding and decoding.\n"); + return 1; + } + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_d_unlimmod.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define EDIM0 6 +#define EDIM1 10 +#define CHUNK0 4 +#define CHUNK1 4 + +int +main (void) +{ + hid_t file, space, dset, dcpl; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}, + extdims[2] = {EDIM0, EDIM1}, + maxdims[2], + chunk[2] = {CHUNK0, CHUNK1}; + int wdata[DIM0][DIM1], /* Write buffer */ + wdata2[EDIM0][EDIM1], /* Write buffer for + extension */ + **rdata, /* Read buffer */ + ndims, + i, j; + + /* + * Initialize data. + */ + for (i=0; i&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +noinst_PROGRAMS = h5ex_d_rdwr$(EXEEXT) h5ex_d_hyper$(EXEEXT) \ + h5ex_d_chunk$(EXEEXT) h5ex_d_gzip$(EXEEXT) \ + h5ex_d_szip$(EXEEXT) h5ex_d_nbit$(EXEEXT) \ + h5ex_d_soint$(EXEEXT) h5ex_d_sofloat$(EXEEXT) \ + h5ex_d_extern$(EXEEXT) h5ex_d_compact$(EXEEXT) \ + h5ex_d_unlimadd$(EXEEXT) h5ex_d_unlimmod$(EXEEXT) \ + h5ex_d_unlimgzip$(EXEEXT) h5ex_d_checksum$(EXEEXT) \ + h5ex_d_shuffle$(EXEEXT) h5ex_d_transform$(EXEEXT) \ + h5ex_d_fillval$(EXEEXT) h5ex_d_alloc$(EXEEXT) +subdir = 1_10/C/H5D +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = test.sh +CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) +h5ex_d_alloc_SOURCES = h5ex_d_alloc.c +h5ex_d_alloc_OBJECTS = h5ex_d_alloc.$(OBJEXT) +h5ex_d_alloc_LDADD = $(LDADD) +h5ex_d_checksum_SOURCES = h5ex_d_checksum.c +h5ex_d_checksum_OBJECTS = h5ex_d_checksum.$(OBJEXT) +h5ex_d_checksum_LDADD = $(LDADD) +h5ex_d_chunk_SOURCES = h5ex_d_chunk.c +h5ex_d_chunk_OBJECTS = h5ex_d_chunk.$(OBJEXT) +h5ex_d_chunk_LDADD = $(LDADD) +h5ex_d_compact_SOURCES = h5ex_d_compact.c +h5ex_d_compact_OBJECTS = h5ex_d_compact.$(OBJEXT) +h5ex_d_compact_LDADD = $(LDADD) +h5ex_d_extern_SOURCES = h5ex_d_extern.c +h5ex_d_extern_OBJECTS = h5ex_d_extern.$(OBJEXT) +h5ex_d_extern_LDADD = $(LDADD) +h5ex_d_fillval_SOURCES = h5ex_d_fillval.c +h5ex_d_fillval_OBJECTS = h5ex_d_fillval.$(OBJEXT) +h5ex_d_fillval_LDADD = $(LDADD) +h5ex_d_gzip_SOURCES = h5ex_d_gzip.c +h5ex_d_gzip_OBJECTS = h5ex_d_gzip.$(OBJEXT) +h5ex_d_gzip_LDADD = $(LDADD) +h5ex_d_hyper_SOURCES = h5ex_d_hyper.c +h5ex_d_hyper_OBJECTS = h5ex_d_hyper.$(OBJEXT) +h5ex_d_hyper_LDADD = $(LDADD) +h5ex_d_nbit_SOURCES = h5ex_d_nbit.c +h5ex_d_nbit_OBJECTS = h5ex_d_nbit.$(OBJEXT) +h5ex_d_nbit_LDADD = $(LDADD) +h5ex_d_rdwr_SOURCES = h5ex_d_rdwr.c +h5ex_d_rdwr_OBJECTS = h5ex_d_rdwr.$(OBJEXT) +h5ex_d_rdwr_LDADD = $(LDADD) +h5ex_d_shuffle_SOURCES = h5ex_d_shuffle.c +h5ex_d_shuffle_OBJECTS = h5ex_d_shuffle.$(OBJEXT) +h5ex_d_shuffle_LDADD = $(LDADD) +h5ex_d_sofloat_SOURCES = h5ex_d_sofloat.c +h5ex_d_sofloat_OBJECTS = h5ex_d_sofloat.$(OBJEXT) +h5ex_d_sofloat_LDADD = $(LDADD) +h5ex_d_soint_SOURCES = h5ex_d_soint.c +h5ex_d_soint_OBJECTS = h5ex_d_soint.$(OBJEXT) +h5ex_d_soint_LDADD = $(LDADD) +h5ex_d_szip_SOURCES = h5ex_d_szip.c +h5ex_d_szip_OBJECTS = h5ex_d_szip.$(OBJEXT) +h5ex_d_szip_LDADD = $(LDADD) +h5ex_d_transform_SOURCES = h5ex_d_transform.c +h5ex_d_transform_OBJECTS = h5ex_d_transform.$(OBJEXT) +h5ex_d_transform_LDADD = $(LDADD) +h5ex_d_unlimadd_SOURCES = h5ex_d_unlimadd.c +h5ex_d_unlimadd_OBJECTS = h5ex_d_unlimadd.$(OBJEXT) +h5ex_d_unlimadd_LDADD = $(LDADD) +h5ex_d_unlimgzip_SOURCES = h5ex_d_unlimgzip.c +h5ex_d_unlimgzip_OBJECTS = h5ex_d_unlimgzip.$(OBJEXT) +h5ex_d_unlimgzip_LDADD = $(LDADD) +h5ex_d_unlimmod_SOURCES = h5ex_d_unlimmod.c +h5ex_d_unlimmod_OBJECTS = h5ex_d_unlimmod.$(OBJEXT) +h5ex_d_unlimmod_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = h5ex_d_alloc.c h5ex_d_checksum.c h5ex_d_chunk.c \ + h5ex_d_compact.c h5ex_d_extern.c h5ex_d_fillval.c \ + h5ex_d_gzip.c h5ex_d_hyper.c h5ex_d_nbit.c h5ex_d_rdwr.c \ + h5ex_d_shuffle.c h5ex_d_sofloat.c h5ex_d_soint.c h5ex_d_szip.c \ + h5ex_d_transform.c h5ex_d_unlimadd.c h5ex_d_unlimgzip.c \ + h5ex_d_unlimmod.c +DIST_SOURCES = h5ex_d_alloc.c h5ex_d_checksum.c h5ex_d_chunk.c \ + h5ex_d_compact.c h5ex_d_extern.c h5ex_d_fillval.c \ + h5ex_d_gzip.c h5ex_d_hyper.c h5ex_d_nbit.c h5ex_d_rdwr.c \ + h5ex_d_shuffle.c h5ex_d_sofloat.c h5ex_d_soint.c h5ex_d_szip.c \ + h5ex_d_transform.c h5ex_d_unlimadd.c h5ex_d_unlimgzip.c \ + h5ex_d_unlimmod.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/makefile.in $(srcdir)/test.sh.in \ + $(top_srcdir)/depcomp $(top_srcdir)/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EXEEXT = @EXEEXT@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = testfiles/h5ex_d_rdwr.tst testfiles/h5ex_d_hyper.tst testfiles/h5ex_d_chunk.tst \ +testfiles/h5ex_d_gzip.tst testfiles/h5ex_d_szip.tst testfiles/h5ex_d_nbit.tst testfiles/h5ex_d_soint.tst \ +testfiles/h5ex_d_sofloat.tst testfiles/h5ex_d_extern.tst testfiles/h5ex_d_compact.tst \ +testfiles/h5ex_d_unlimadd.tst testfiles/h5ex_d_unlimmod.tst testfiles/h5ex_d_unlimgzip.tst \ +testfiles/h5ex_d_checksum.tst testfiles/h5ex_d_shuffle.tst testfiles/h5ex_d_transform.tst \ +testfiles/h5ex_d_fillval.tst testfiles/h5ex_d_alloc.tst \ +testfiles/h5ex_d_rdwr.ddl testfiles/h5ex_d_hyper.ddl testfiles/h5ex_d_chunk.ddl \ +testfiles/h5ex_d_gzip.ddl testfiles/h5ex_d_szip.ddl testfiles/h5ex_d_nbit.ddl testfiles/h5ex_d_soint.ddl \ +testfiles/h5ex_d_sofloat.ddl testfiles/h5ex_d_extern.ddl testfiles/h5ex_d_compact.ddl \ +testfiles/h5ex_d_unlimadd.ddl testfiles/h5ex_d_unlimmod.ddl testfiles/h5ex_d_unlimgzip.ddl \ +testfiles/h5ex_d_checksum.ddl testfiles/h5ex_d_shuffle.ddl testfiles/h5ex_d_transform.ddl \ +testfiles/h5ex_d_fillval.ddl testfiles/h5ex_d_alloc.ddl test.sh + +AM_CPPFLAGS = '-D H5_USE_110_API' +TESTS = test.sh +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign 1_10/C/H5D/makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign 1_10/C/H5D/makefile +makefile: $(srcdir)/makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +test.sh: $(top_builddir)/config.status $(srcdir)/test.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + +h5ex_d_alloc$(EXEEXT): $(h5ex_d_alloc_OBJECTS) $(h5ex_d_alloc_DEPENDENCIES) $(EXTRA_h5ex_d_alloc_DEPENDENCIES) + @rm -f h5ex_d_alloc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_alloc_OBJECTS) $(h5ex_d_alloc_LDADD) $(LIBS) + +h5ex_d_checksum$(EXEEXT): $(h5ex_d_checksum_OBJECTS) $(h5ex_d_checksum_DEPENDENCIES) $(EXTRA_h5ex_d_checksum_DEPENDENCIES) + @rm -f h5ex_d_checksum$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_checksum_OBJECTS) $(h5ex_d_checksum_LDADD) $(LIBS) + +h5ex_d_chunk$(EXEEXT): $(h5ex_d_chunk_OBJECTS) $(h5ex_d_chunk_DEPENDENCIES) $(EXTRA_h5ex_d_chunk_DEPENDENCIES) + @rm -f h5ex_d_chunk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_chunk_OBJECTS) $(h5ex_d_chunk_LDADD) $(LIBS) + +h5ex_d_compact$(EXEEXT): $(h5ex_d_compact_OBJECTS) $(h5ex_d_compact_DEPENDENCIES) $(EXTRA_h5ex_d_compact_DEPENDENCIES) + @rm -f h5ex_d_compact$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_compact_OBJECTS) $(h5ex_d_compact_LDADD) $(LIBS) + +h5ex_d_extern$(EXEEXT): $(h5ex_d_extern_OBJECTS) $(h5ex_d_extern_DEPENDENCIES) $(EXTRA_h5ex_d_extern_DEPENDENCIES) + @rm -f h5ex_d_extern$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_extern_OBJECTS) $(h5ex_d_extern_LDADD) $(LIBS) + +h5ex_d_fillval$(EXEEXT): $(h5ex_d_fillval_OBJECTS) $(h5ex_d_fillval_DEPENDENCIES) $(EXTRA_h5ex_d_fillval_DEPENDENCIES) + @rm -f h5ex_d_fillval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_fillval_OBJECTS) $(h5ex_d_fillval_LDADD) $(LIBS) + +h5ex_d_gzip$(EXEEXT): $(h5ex_d_gzip_OBJECTS) $(h5ex_d_gzip_DEPENDENCIES) $(EXTRA_h5ex_d_gzip_DEPENDENCIES) + @rm -f h5ex_d_gzip$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_gzip_OBJECTS) $(h5ex_d_gzip_LDADD) $(LIBS) + +h5ex_d_hyper$(EXEEXT): $(h5ex_d_hyper_OBJECTS) $(h5ex_d_hyper_DEPENDENCIES) $(EXTRA_h5ex_d_hyper_DEPENDENCIES) + @rm -f h5ex_d_hyper$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_hyper_OBJECTS) $(h5ex_d_hyper_LDADD) $(LIBS) + +h5ex_d_nbit$(EXEEXT): $(h5ex_d_nbit_OBJECTS) $(h5ex_d_nbit_DEPENDENCIES) $(EXTRA_h5ex_d_nbit_DEPENDENCIES) + @rm -f h5ex_d_nbit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_nbit_OBJECTS) $(h5ex_d_nbit_LDADD) $(LIBS) + +h5ex_d_rdwr$(EXEEXT): $(h5ex_d_rdwr_OBJECTS) $(h5ex_d_rdwr_DEPENDENCIES) $(EXTRA_h5ex_d_rdwr_DEPENDENCIES) + @rm -f h5ex_d_rdwr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_rdwr_OBJECTS) $(h5ex_d_rdwr_LDADD) $(LIBS) + +h5ex_d_shuffle$(EXEEXT): $(h5ex_d_shuffle_OBJECTS) $(h5ex_d_shuffle_DEPENDENCIES) $(EXTRA_h5ex_d_shuffle_DEPENDENCIES) + @rm -f h5ex_d_shuffle$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_shuffle_OBJECTS) $(h5ex_d_shuffle_LDADD) $(LIBS) + +h5ex_d_sofloat$(EXEEXT): $(h5ex_d_sofloat_OBJECTS) $(h5ex_d_sofloat_DEPENDENCIES) $(EXTRA_h5ex_d_sofloat_DEPENDENCIES) + @rm -f h5ex_d_sofloat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_sofloat_OBJECTS) $(h5ex_d_sofloat_LDADD) $(LIBS) + +h5ex_d_soint$(EXEEXT): $(h5ex_d_soint_OBJECTS) $(h5ex_d_soint_DEPENDENCIES) $(EXTRA_h5ex_d_soint_DEPENDENCIES) + @rm -f h5ex_d_soint$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_soint_OBJECTS) $(h5ex_d_soint_LDADD) $(LIBS) + +h5ex_d_szip$(EXEEXT): $(h5ex_d_szip_OBJECTS) $(h5ex_d_szip_DEPENDENCIES) $(EXTRA_h5ex_d_szip_DEPENDENCIES) + @rm -f h5ex_d_szip$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_szip_OBJECTS) $(h5ex_d_szip_LDADD) $(LIBS) + +h5ex_d_transform$(EXEEXT): $(h5ex_d_transform_OBJECTS) $(h5ex_d_transform_DEPENDENCIES) $(EXTRA_h5ex_d_transform_DEPENDENCIES) + @rm -f h5ex_d_transform$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_transform_OBJECTS) $(h5ex_d_transform_LDADD) $(LIBS) + +h5ex_d_unlimadd$(EXEEXT): $(h5ex_d_unlimadd_OBJECTS) $(h5ex_d_unlimadd_DEPENDENCIES) $(EXTRA_h5ex_d_unlimadd_DEPENDENCIES) + @rm -f h5ex_d_unlimadd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_unlimadd_OBJECTS) $(h5ex_d_unlimadd_LDADD) $(LIBS) + +h5ex_d_unlimgzip$(EXEEXT): $(h5ex_d_unlimgzip_OBJECTS) $(h5ex_d_unlimgzip_DEPENDENCIES) $(EXTRA_h5ex_d_unlimgzip_DEPENDENCIES) + @rm -f h5ex_d_unlimgzip$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_unlimgzip_OBJECTS) $(h5ex_d_unlimgzip_LDADD) $(LIBS) + +h5ex_d_unlimmod$(EXEEXT): $(h5ex_d_unlimmod_OBJECTS) $(h5ex_d_unlimmod_DEPENDENCIES) $(EXTRA_h5ex_d_unlimmod_DEPENDENCIES) + @rm -f h5ex_d_unlimmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_d_unlimmod_OBJECTS) $(h5ex_d_unlimmod_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_checksum.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_chunk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_compact.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_extern.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_fillval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_gzip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_hyper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_nbit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_rdwr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_shuffle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_sofloat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_soint.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_szip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_transform.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_unlimadd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_unlimgzip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_d_unlimmod.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +test.sh.log: test.sh + @p='test.sh'; \ + b='test.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-generic clean-noinstPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/hdfgroup/H5D/maketestref.sh b/examples/hdfgroup/H5D/maketestref.sh new file mode 100644 index 0000000000..8ed036f2c2 --- /dev/null +++ b/examples/hdfgroup/H5D/maketestref.sh @@ -0,0 +1,61 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. + +case $CC in +*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`; + test -x $H5DUMP || H5DUMP=h5dump;; +*) H5DUMP=h5dump;; +esac + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ;; + *c*,* ) ECHO_N=-n ECHO_C= ;; + *) ECHO_N= ECHO_C='\c' ;; +esac +ECHO_N="echo $ECHO_N" + +exout() { + $* +} + +dumpout() { + $H5DUMP $* +} + +topics="rdwr hyper chunk gzip szip nbit soint sofloat extern compact unlimadd \ +unlimmod unlimgzip checksum shuffle fillval alloc" + +for topic in $topics +do + fname=h5ex_d_$topic + $ECHO_N "Creating test reference file for 1.8/C/H5D/$fname...$ECHO_C" + exout ./$fname >testfiles/$fname.tst + dumpout $fname.h5 >testfiles/$fname.ddl + rm -f $fname.h5 + echo " Done." +done + +#######Non-standard tests####### + +#Remove external data file from h5ex_d_extern +rm -f h5ex_d_extern.data + +fname=h5ex_d_transform +$ECHO_N "Creating test reference file for 1.8/C/H5D/$fname...$ECHO_C" +exout ./$fname >testfiles/$fname.tst +dumpout -n $fname.h5 >testfiles/$fname.ddl +rm -f $fname.h5 +echo " Done." diff --git a/examples/hdfgroup/H5D/matrix.hpp b/examples/hdfgroup/H5D/matrix.hpp new file mode 100644 index 0000000000..3151bd9399 --- /dev/null +++ b/examples/hdfgroup/H5D/matrix.hpp @@ -0,0 +1,99 @@ +// +// (c) Copyright 2018 Eugen Wintersberger +// +// This file is part of h5cpp. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +// License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the +// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor +// Boston, MA 02110-1301 USA +// =========================================================================== +// +// Author: Eugen Wintersberger +// Created on: Dec 29, 2018 +// + +#pragma once + +#include +#include +#include +#include +#include + + +template class Matrix +{ + public: + using BufferType = std::array; + using value_type = typename BufferType::value_type; + using iterator = typename BufferType::iterator; + using const_iterator = typename BufferType::const_iterator; + using pointer = value_type*; + using const_pointer = const value_type*; + private: + BufferType _buffer; + + size_t offset(size_t i,size_t j) const noexcept + { + return i*DIM1+j; + } + public: + Matrix() = default; + Matrix(const Matrix &matrix) = default; + Matrix(Matrix &&matrix) = default; + explicit Matrix(value_type fill_value) + { + std::fill(begin(),end(),fill_value); + } + + Matrix &operator=(const Matrix &matrix) = default; + Matrix &operator=(Matrix &&matrix) = default; + + + iterator begin() noexcept {return _buffer.begin();} + + iterator end() noexcept { return _buffer.end(); } + + const_iterator begin() const noexcept {return _buffer.begin();} + + const_iterator end() const noexcept { return _buffer.end(); } + + value_type operator()(size_t i,size_t j) const + { + return _buffer[offset(i,j)]; + } + + value_type &operator()(size_t i,size_t j) + { + return _buffer[offset(i,j)]; + } + + pointer data() noexcept { return _buffer.data(); } + const_pointer data() const noexcept { return _buffer.data(); } +}; + +template +std::ostream &operator<<(std::ostream &stream,const Matrix &matrix) +{ + for(size_t i=0;i +// +// This file is part of h5cpp. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +// License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the +// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor +// Boston, MA 02110-1301 USA +// =========================================================================== +// +// Author: Eugen Wintersberger +// Created on: Dec 29, 2018 +// + +#pragma once + + +#include +#include "matrix.hpp" + + +namespace hdf5 { + +namespace datatype { + +template +class TypeTrait> +{ + public: + using Type = Matrix; + using TypeClass = typename TypeTrait::TypeClass; + + static TypeClass create(const Type& = Type()) + { + return TypeTrait::create(); + } +}; + + +} + +namespace dataspace { + +template +class TypeTrait> +{ + public: + using DataspaceType = Simple; + + static DataspaceType create(const Matrix &value) + { + return Simple(Dimensions{DIM0,DIM1},Dimensions{DIM0,DIM1}); + } + + static void *ptr(Matrix &value) + { + return reinterpret_cast(value.data()); + } + + static const void *cptr(const Matrix &value) + { + return reinterpret_cast(value.data()); + } + +}; + +} +} diff --git a/examples/hdfgroup/H5D/test.sh.in b/examples/hdfgroup/H5D/test.sh.in new file mode 100644 index 0000000000..52e3427d96 --- /dev/null +++ b/examples/hdfgroup/H5D/test.sh.in @@ -0,0 +1,122 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. + +srcdir=@srcdir@ + + +case $CC in +*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`; + test -x $H5DUMP || H5DUMP=h5dump;; +*) H5DUMP=h5dump;; +esac + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ;; + *c*,* ) ECHO_N=-n ECHO_C= ;; + *) ECHO_N= ECHO_C='\c' ;; +esac +ECHO_N="echo $ECHO_N" + + +exout() { + $* +} + +dumpout() { + $H5DUMP $* +} + + +topics="rdwr hyper chunk gzip szip nbit soint sofloat extern compact unlimadd \ +unlimmod unlimgzip checksum shuffle fillval alloc" + + +return_val=0 + + +for topic in $topics +do + fname=h5ex_d_$topic + $ECHO_N "Testing 1_10/C/H5D/$fname...$ECHO_C" + exout ./$fname >tmp.test + status=$? + if test $status -eq 1 + then + echo " Unsupported feature" + else + cmp -s tmp.test $srcdir/testfiles/$fname.tst + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + dumpout $fname.h5 >tmp.test + rm -f $fname.h5 + cmp -s tmp.test $srcdir/testfiles/$fname.ddl + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + echo " Passed" + fi + fi + return_val=`expr $status + $return_val` + fi +done + + +#######Non-standard tests####### + + +#Remove external data file from h5ex_d_extern +rm -f h5ex_d_extern.data + + +fname=h5ex_d_transform +$ECHO_N "Testing 1_10/C/H5D/$fname...$ECHO_C" +exout ./$fname >tmp.test +status=$? +if test $status -eq 1 +then + echo " Unsupported feature" +else + cmp -s tmp.test $srcdir/testfiles/$fname.tst + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + dumpout -n $fname.h5 >tmp.test + rm -f $fname.h5 + cmp -s tmp.test $srcdir/testfiles/$fname.ddl + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + echo " Passed" + fi + return_val=`expr $status + $return_val` + fi + return_val=`expr $status + $return_val` +fi + + +rm -f tmp.test +echo "$return_val tests failed in 1_10/C/H5D/" +exit $return_val diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_alloc.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_alloc.ddl new file mode 100644 index 0000000000..9ec48cc3cb --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_alloc.ddl @@ -0,0 +1,24 @@ +HDF5 "h5ex_d_alloc.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, + (1,0): 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, + (3,0): 0, 2, 4, 6, 8, 10, 12 + } + } + DATASET "DS2" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, + (1,0): 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, + (3,0): 0, 2, 4, 6, 8, 10, 12 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_alloc.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_alloc.tst new file mode 100644 index 0000000000..92f04ee7bc --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_alloc.tst @@ -0,0 +1,15 @@ +Creating datasets... +DS1 has allocation time H5D_ALLOC_TIME_LATE +DS2 has allocation time H5D_ALLOC_TIME_EARLY + +Space for DS1 has not been allocated. +Storage size for DS1 is: 0 bytes. +Space for DS2 has been allocated. +Storage size for DS2 is: 112 bytes. + +Writing data... + +Space for DS1 has been allocated. +Storage size for DS1 is: 112 bytes. +Space for DS2 has been allocated. +Storage size for DS2 is: 112 bytes. diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_checksum.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_checksum.ddl new file mode 100644 index 0000000000..86ca531f9c --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_checksum.ddl @@ -0,0 +1,191 @@ +HDF5 "h5ex_d_checksum.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 32, 64 ) / ( 32, 64 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, + (0,15): -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, + (0,27): -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, + (0,39): -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, + (0,51): -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61, -62, + (0,63): -63, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,63): 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + (2,18): 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + (2,34): 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + (2,50): 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + (3,0): 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, + (3,17): 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, + (3,33): 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, + (3,49): 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, + (3,62): 124, 126, + (4,0): 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, + (4,17): 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, + (4,33): 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, + (4,46): 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168, 171, + (4,58): 174, 177, 180, 183, 186, 189, + (5,0): 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, + (5,17): 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, + (5,31): 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, + (5,43): 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, + (5,55): 220, 224, 228, 232, 236, 240, 244, 248, 252, + (6,0): 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + (6,16): 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, + (6,29): 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, + (6,41): 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, + (6,53): 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, + (7,0): 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, + (7,16): 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, + (7,29): 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, + (7,41): 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, + (7,53): 318, 324, 330, 336, 342, 348, 354, 360, 366, 372, 378, + (8,0): 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, + (8,16): 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, + (8,28): 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, + (8,40): 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, + (8,52): 364, 371, 378, 385, 392, 399, 406, 413, 420, 427, 434, 441, + (9,0): 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, + (9,16): 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, + (9,28): 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, + (9,40): 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, + (9,52): 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, + (10,0): 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126, + (10,15): 135, 144, 153, 162, 171, 180, 189, 198, 207, 216, 225, 234, + (10,27): 243, 252, 261, 270, 279, 288, 297, 306, 315, 324, 333, 342, + (10,39): 351, 360, 369, 378, 387, 396, 405, 414, 423, 432, 441, 450, + (10,51): 459, 468, 477, 486, 495, 504, 513, 522, 531, 540, 549, 558, + (10,63): 567, + (11,0): 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, + (11,15): 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, + (11,27): 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, + (11,39): 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, + (11,51): 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, + (11,63): 630, + (12,0): 0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, + (12,15): 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, + (12,27): 297, 308, 319, 330, 341, 352, 363, 374, 385, 396, 407, 418, + (12,39): 429, 440, 451, 462, 473, 484, 495, 506, 517, 528, 539, 550, + (12,51): 561, 572, 583, 594, 605, 616, 627, 638, 649, 660, 671, 682, + (12,63): 693, + (13,0): 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, + (13,14): 168, 180, 192, 204, 216, 228, 240, 252, 264, 276, 288, 300, + (13,26): 312, 324, 336, 348, 360, 372, 384, 396, 408, 420, 432, 444, + (13,38): 456, 468, 480, 492, 504, 516, 528, 540, 552, 564, 576, 588, + (13,50): 600, 612, 624, 636, 648, 660, 672, 684, 696, 708, 720, 732, + (13,62): 744, 756, + (14,0): 0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 156, 169, + (14,14): 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, + (14,26): 338, 351, 364, 377, 390, 403, 416, 429, 442, 455, 468, 481, + (14,38): 494, 507, 520, 533, 546, 559, 572, 585, 598, 611, 624, 637, + (14,50): 650, 663, 676, 689, 702, 715, 728, 741, 754, 767, 780, 793, + (14,62): 806, 819, + (15,0): 0, 14, 28, 42, 56, 70, 84, 98, 112, 126, 140, 154, 168, 182, + (15,14): 196, 210, 224, 238, 252, 266, 280, 294, 308, 322, 336, 350, + (15,26): 364, 378, 392, 406, 420, 434, 448, 462, 476, 490, 504, 518, + (15,38): 532, 546, 560, 574, 588, 602, 616, 630, 644, 658, 672, 686, + (15,50): 700, 714, 728, 742, 756, 770, 784, 798, 812, 826, 840, 854, + (15,62): 868, 882, + (16,0): 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, + (16,14): 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, + (16,26): 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, + (16,38): 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, + (16,50): 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, + (16,62): 930, 945, + (17,0): 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, + (17,14): 224, 240, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, + (17,26): 416, 432, 448, 464, 480, 496, 512, 528, 544, 560, 576, 592, + (17,38): 608, 624, 640, 656, 672, 688, 704, 720, 736, 752, 768, 784, + (17,50): 800, 816, 832, 848, 864, 880, 896, 912, 928, 944, 960, 976, + (17,62): 992, 1008, + (18,0): 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, + (18,14): 238, 255, 272, 289, 306, 323, 340, 357, 374, 391, 408, 425, + (18,26): 442, 459, 476, 493, 510, 527, 544, 561, 578, 595, 612, 629, + (18,38): 646, 663, 680, 697, 714, 731, 748, 765, 782, 799, 816, 833, + (18,50): 850, 867, 884, 901, 918, 935, 952, 969, 986, 1003, 1020, 1037, + (18,62): 1054, 1071, + (19,0): 0, 18, 36, 54, 72, 90, 108, 126, 144, 162, 180, 198, 216, 234, + (19,14): 252, 270, 288, 306, 324, 342, 360, 378, 396, 414, 432, 450, + (19,26): 468, 486, 504, 522, 540, 558, 576, 594, 612, 630, 648, 666, + (19,38): 684, 702, 720, 738, 756, 774, 792, 810, 828, 846, 864, 882, + (19,50): 900, 918, 936, 954, 972, 990, 1008, 1026, 1044, 1062, 1080, + (19,61): 1098, 1116, 1134, + (20,0): 0, 19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247, + (20,14): 266, 285, 304, 323, 342, 361, 380, 399, 418, 437, 456, 475, + (20,26): 494, 513, 532, 551, 570, 589, 608, 627, 646, 665, 684, 703, + (20,38): 722, 741, 760, 779, 798, 817, 836, 855, 874, 893, 912, 931, + (20,50): 950, 969, 988, 1007, 1026, 1045, 1064, 1083, 1102, 1121, 1140, + (20,61): 1159, 1178, 1197, + (21,0): 0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, + (21,14): 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, + (21,26): 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, + (21,38): 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 980, + (21,50): 1000, 1020, 1040, 1060, 1080, 1100, 1120, 1140, 1160, 1180, + (21,60): 1200, 1220, 1240, 1260, + (22,0): 0, 21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, + (22,14): 294, 315, 336, 357, 378, 399, 420, 441, 462, 483, 504, 525, + (22,26): 546, 567, 588, 609, 630, 651, 672, 693, 714, 735, 756, 777, + (22,38): 798, 819, 840, 861, 882, 903, 924, 945, 966, 987, 1008, 1029, + (22,50): 1050, 1071, 1092, 1113, 1134, 1155, 1176, 1197, 1218, 1239, + (22,60): 1260, 1281, 1302, 1323, + (23,0): 0, 22, 44, 66, 88, 110, 132, 154, 176, 198, 220, 242, 264, 286, + (23,14): 308, 330, 352, 374, 396, 418, 440, 462, 484, 506, 528, 550, + (23,26): 572, 594, 616, 638, 660, 682, 704, 726, 748, 770, 792, 814, + (23,38): 836, 858, 880, 902, 924, 946, 968, 990, 1012, 1034, 1056, + (23,49): 1078, 1100, 1122, 1144, 1166, 1188, 1210, 1232, 1254, 1276, + (23,59): 1298, 1320, 1342, 1364, 1386, + (24,0): 0, 23, 46, 69, 92, 115, 138, 161, 184, 207, 230, 253, 276, 299, + (24,14): 322, 345, 368, 391, 414, 437, 460, 483, 506, 529, 552, 575, + (24,26): 598, 621, 644, 667, 690, 713, 736, 759, 782, 805, 828, 851, + (24,38): 874, 897, 920, 943, 966, 989, 1012, 1035, 1058, 1081, 1104, + (24,49): 1127, 1150, 1173, 1196, 1219, 1242, 1265, 1288, 1311, 1334, + (24,59): 1357, 1380, 1403, 1426, 1449, + (25,0): 0, 24, 48, 72, 96, 120, 144, 168, 192, 216, 240, 264, 288, 312, + (25,14): 336, 360, 384, 408, 432, 456, 480, 504, 528, 552, 576, 600, + (25,26): 624, 648, 672, 696, 720, 744, 768, 792, 816, 840, 864, 888, + (25,38): 912, 936, 960, 984, 1008, 1032, 1056, 1080, 1104, 1128, 1152, + (25,49): 1176, 1200, 1224, 1248, 1272, 1296, 1320, 1344, 1368, 1392, + (25,59): 1416, 1440, 1464, 1488, 1512, + (26,0): 0, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, + (26,13): 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, + (26,25): 625, 650, 675, 700, 725, 750, 775, 800, 825, 850, 875, 900, + (26,37): 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175, + (26,48): 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 1425, + (26,58): 1450, 1475, 1500, 1525, 1550, 1575, + (27,0): 0, 26, 52, 78, 104, 130, 156, 182, 208, 234, 260, 286, 312, + (27,13): 338, 364, 390, 416, 442, 468, 494, 520, 546, 572, 598, 624, + (27,25): 650, 676, 702, 728, 754, 780, 806, 832, 858, 884, 910, 936, + (27,37): 962, 988, 1014, 1040, 1066, 1092, 1118, 1144, 1170, 1196, + (27,47): 1222, 1248, 1274, 1300, 1326, 1352, 1378, 1404, 1430, 1456, + (27,57): 1482, 1508, 1534, 1560, 1586, 1612, 1638, + (28,0): 0, 27, 54, 81, 108, 135, 162, 189, 216, 243, 270, 297, 324, + (28,13): 351, 378, 405, 432, 459, 486, 513, 540, 567, 594, 621, 648, + (28,25): 675, 702, 729, 756, 783, 810, 837, 864, 891, 918, 945, 972, + (28,37): 999, 1026, 1053, 1080, 1107, 1134, 1161, 1188, 1215, 1242, + (28,47): 1269, 1296, 1323, 1350, 1377, 1404, 1431, 1458, 1485, 1512, + (28,57): 1539, 1566, 1593, 1620, 1647, 1674, 1701, + (29,0): 0, 28, 56, 84, 112, 140, 168, 196, 224, 252, 280, 308, 336, + (29,13): 364, 392, 420, 448, 476, 504, 532, 560, 588, 616, 644, 672, + (29,25): 700, 728, 756, 784, 812, 840, 868, 896, 924, 952, 980, 1008, + (29,37): 1036, 1064, 1092, 1120, 1148, 1176, 1204, 1232, 1260, 1288, + (29,47): 1316, 1344, 1372, 1400, 1428, 1456, 1484, 1512, 1540, 1568, + (29,57): 1596, 1624, 1652, 1680, 1708, 1736, 1764, + (30,0): 0, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, + (30,13): 377, 406, 435, 464, 493, 522, 551, 580, 609, 638, 667, 696, + (30,25): 725, 754, 783, 812, 841, 870, 899, 928, 957, 986, 1015, 1044, + (30,37): 1073, 1102, 1131, 1160, 1189, 1218, 1247, 1276, 1305, 1334, + (30,47): 1363, 1392, 1421, 1450, 1479, 1508, 1537, 1566, 1595, 1624, + (30,57): 1653, 1682, 1711, 1740, 1769, 1798, 1827, + (31,0): 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360, + (31,13): 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690, 720, + (31,25): 750, 780, 810, 840, 870, 900, 930, 960, 990, 1020, 1050, 1080, + (31,37): 1110, 1140, 1170, 1200, 1230, 1260, 1290, 1320, 1350, 1380, + (31,47): 1410, 1440, 1470, 1500, 1530, 1560, 1590, 1620, 1650, 1680, + (31,57): 1710, 1740, 1770, 1800, 1830, 1860, 1890 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_checksum.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_checksum.tst new file mode 100644 index 0000000000..6f1bd18071 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_checksum.tst @@ -0,0 +1,2 @@ +Filter type is: H5Z_FILTER_FLETCHER32 +Maximum value in DS1 is: 1890 diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_chunk.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_chunk.ddl new file mode 100644 index 0000000000..08548591df --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_chunk.ddl @@ -0,0 +1,16 @@ +HDF5 "h5ex_d_chunk.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 6, 8 ) / ( 6, 8 ) } + DATA { + (0,0): 0, 1, 0, 0, 1, 0, 0, 1, + (1,0): 1, 1, 0, 1, 1, 0, 1, 1, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 1, 0, 0, 1, 0, 0, 1, + (4,0): 1, 1, 0, 1, 1, 0, 1, 1, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_chunk.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_chunk.tst new file mode 100644 index 0000000000..1de089ea96 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_chunk.tst @@ -0,0 +1,25 @@ +Original Data: + [ 1 1 1 1 1 1 1 1] + [ 1 1 1 1 1 1 1 1] + [ 1 1 1 1 1 1 1 1] + [ 1 1 1 1 1 1 1 1] + [ 1 1 1 1 1 1 1 1] + [ 1 1 1 1 1 1 1 1] + +Storage layout for DS1 is: H5D_CHUNKED + +Data as written to disk by hyberslabs: + [ 0 1 0 0 1 0 0 1] + [ 1 1 0 1 1 0 1 1] + [ 0 0 0 0 0 0 0 0] + [ 0 1 0 0 1 0 0 1] + [ 1 1 0 1 1 0 1 1] + [ 0 0 0 0 0 0 0 0] + +Data as read from disk by hyperslab: + [ 0 1 0 0 0 0 0 1] + [ 0 1 0 1 0 0 1 1] + [ 0 0 0 0 0 0 0 0] + [ 0 0 0 0 0 0 0 0] + [ 0 1 0 1 0 0 1 1] + [ 0 0 0 0 0 0 0 0] diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_compact.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_compact.ddl new file mode 100644 index 0000000000..531d11a486 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_compact.ddl @@ -0,0 +1,14 @@ +HDF5 "h5ex_d_compact.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, + (1,0): 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, + (3,0): 0, 2, 4, 6, 8, 10, 12 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_compact.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_compact.tst new file mode 100644 index 0000000000..96f0107f0c --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_compact.tst @@ -0,0 +1,6 @@ +Storage layout for DS1 is: H5D_COMPACT +DS1: + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_extern.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_extern.ddl new file mode 100644 index 0000000000..b1cb8a2b31 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_extern.ddl @@ -0,0 +1,14 @@ +HDF5 "h5ex_d_extern.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, + (1,0): 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, + (3,0): 0, 2, 4, 6, 8, 10, 12 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_extern.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_extern.tst new file mode 100644 index 0000000000..4754d06026 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_extern.tst @@ -0,0 +1,6 @@ +DS1 is stored in file: h5ex_d_extern.data +DS1: + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_fillval.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_fillval.ddl new file mode 100644 index 0000000000..86b9b1392a --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_fillval.ddl @@ -0,0 +1,16 @@ +HDF5 "h5ex_d_fillval.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 6, 10 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, 99, 99, 99, + (1,0): 0, 0, 0, 0, 0, 0, 0, 99, 99, 99, + (2,0): 0, 1, 2, 3, 4, 5, 6, 99, 99, 99, + (3,0): 0, 2, 4, 6, 8, 10, 12, 99, 99, 99, + (4,0): 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + (5,0): 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_fillval.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_fillval.tst new file mode 100644 index 0000000000..07860371d1 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_fillval.tst @@ -0,0 +1,19 @@ +Dataset before being written to: + [ 99 99 99 99 99 99 99] + [ 99 99 99 99 99 99 99] + [ 99 99 99 99 99 99 99] + [ 99 99 99 99 99 99 99] + +Dataset after being written to: + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] + +Dataset after extension: + [ 0 -1 -2 -3 -4 -5 -6 99 99 99] + [ 0 0 0 0 0 0 0 99 99 99] + [ 0 1 2 3 4 5 6 99 99 99] + [ 0 2 4 6 8 10 12 99 99 99] + [ 99 99 99 99 99 99 99 99 99 99] + [ 99 99 99 99 99 99 99 99 99 99] diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_gzip.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_gzip.ddl new file mode 100644 index 0000000000..a7276dbca5 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_gzip.ddl @@ -0,0 +1,191 @@ +HDF5 "h5ex_d_gzip.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 32, 64 ) / ( 32, 64 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, + (0,15): -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, + (0,27): -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, + (0,39): -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, + (0,51): -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61, -62, + (0,63): -63, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,63): 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + (2,18): 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + (2,34): 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + (2,50): 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + (3,0): 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, + (3,17): 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, + (3,33): 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, + (3,49): 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, + (3,62): 124, 126, + (4,0): 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, + (4,17): 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, + (4,33): 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, + (4,46): 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168, 171, + (4,58): 174, 177, 180, 183, 186, 189, + (5,0): 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, + (5,17): 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, + (5,31): 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, + (5,43): 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, + (5,55): 220, 224, 228, 232, 236, 240, 244, 248, 252, + (6,0): 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + (6,16): 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, + (6,29): 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, + (6,41): 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, + (6,53): 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, + (7,0): 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, + (7,16): 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, + (7,29): 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, + (7,41): 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, + (7,53): 318, 324, 330, 336, 342, 348, 354, 360, 366, 372, 378, + (8,0): 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, + (8,16): 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, + (8,28): 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, + (8,40): 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, + (8,52): 364, 371, 378, 385, 392, 399, 406, 413, 420, 427, 434, 441, + (9,0): 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, + (9,16): 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, + (9,28): 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, + (9,40): 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, + (9,52): 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, + (10,0): 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126, + (10,15): 135, 144, 153, 162, 171, 180, 189, 198, 207, 216, 225, 234, + (10,27): 243, 252, 261, 270, 279, 288, 297, 306, 315, 324, 333, 342, + (10,39): 351, 360, 369, 378, 387, 396, 405, 414, 423, 432, 441, 450, + (10,51): 459, 468, 477, 486, 495, 504, 513, 522, 531, 540, 549, 558, + (10,63): 567, + (11,0): 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, + (11,15): 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, + (11,27): 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, + (11,39): 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, + (11,51): 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, + (11,63): 630, + (12,0): 0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, + (12,15): 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, + (12,27): 297, 308, 319, 330, 341, 352, 363, 374, 385, 396, 407, 418, + (12,39): 429, 440, 451, 462, 473, 484, 495, 506, 517, 528, 539, 550, + (12,51): 561, 572, 583, 594, 605, 616, 627, 638, 649, 660, 671, 682, + (12,63): 693, + (13,0): 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, + (13,14): 168, 180, 192, 204, 216, 228, 240, 252, 264, 276, 288, 300, + (13,26): 312, 324, 336, 348, 360, 372, 384, 396, 408, 420, 432, 444, + (13,38): 456, 468, 480, 492, 504, 516, 528, 540, 552, 564, 576, 588, + (13,50): 600, 612, 624, 636, 648, 660, 672, 684, 696, 708, 720, 732, + (13,62): 744, 756, + (14,0): 0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 156, 169, + (14,14): 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, + (14,26): 338, 351, 364, 377, 390, 403, 416, 429, 442, 455, 468, 481, + (14,38): 494, 507, 520, 533, 546, 559, 572, 585, 598, 611, 624, 637, + (14,50): 650, 663, 676, 689, 702, 715, 728, 741, 754, 767, 780, 793, + (14,62): 806, 819, + (15,0): 0, 14, 28, 42, 56, 70, 84, 98, 112, 126, 140, 154, 168, 182, + (15,14): 196, 210, 224, 238, 252, 266, 280, 294, 308, 322, 336, 350, + (15,26): 364, 378, 392, 406, 420, 434, 448, 462, 476, 490, 504, 518, + (15,38): 532, 546, 560, 574, 588, 602, 616, 630, 644, 658, 672, 686, + (15,50): 700, 714, 728, 742, 756, 770, 784, 798, 812, 826, 840, 854, + (15,62): 868, 882, + (16,0): 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, + (16,14): 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, + (16,26): 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, + (16,38): 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, + (16,50): 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, + (16,62): 930, 945, + (17,0): 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, + (17,14): 224, 240, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, + (17,26): 416, 432, 448, 464, 480, 496, 512, 528, 544, 560, 576, 592, + (17,38): 608, 624, 640, 656, 672, 688, 704, 720, 736, 752, 768, 784, + (17,50): 800, 816, 832, 848, 864, 880, 896, 912, 928, 944, 960, 976, + (17,62): 992, 1008, + (18,0): 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, + (18,14): 238, 255, 272, 289, 306, 323, 340, 357, 374, 391, 408, 425, + (18,26): 442, 459, 476, 493, 510, 527, 544, 561, 578, 595, 612, 629, + (18,38): 646, 663, 680, 697, 714, 731, 748, 765, 782, 799, 816, 833, + (18,50): 850, 867, 884, 901, 918, 935, 952, 969, 986, 1003, 1020, 1037, + (18,62): 1054, 1071, + (19,0): 0, 18, 36, 54, 72, 90, 108, 126, 144, 162, 180, 198, 216, 234, + (19,14): 252, 270, 288, 306, 324, 342, 360, 378, 396, 414, 432, 450, + (19,26): 468, 486, 504, 522, 540, 558, 576, 594, 612, 630, 648, 666, + (19,38): 684, 702, 720, 738, 756, 774, 792, 810, 828, 846, 864, 882, + (19,50): 900, 918, 936, 954, 972, 990, 1008, 1026, 1044, 1062, 1080, + (19,61): 1098, 1116, 1134, + (20,0): 0, 19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247, + (20,14): 266, 285, 304, 323, 342, 361, 380, 399, 418, 437, 456, 475, + (20,26): 494, 513, 532, 551, 570, 589, 608, 627, 646, 665, 684, 703, + (20,38): 722, 741, 760, 779, 798, 817, 836, 855, 874, 893, 912, 931, + (20,50): 950, 969, 988, 1007, 1026, 1045, 1064, 1083, 1102, 1121, 1140, + (20,61): 1159, 1178, 1197, + (21,0): 0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, + (21,14): 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, + (21,26): 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, + (21,38): 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 980, + (21,50): 1000, 1020, 1040, 1060, 1080, 1100, 1120, 1140, 1160, 1180, + (21,60): 1200, 1220, 1240, 1260, + (22,0): 0, 21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, + (22,14): 294, 315, 336, 357, 378, 399, 420, 441, 462, 483, 504, 525, + (22,26): 546, 567, 588, 609, 630, 651, 672, 693, 714, 735, 756, 777, + (22,38): 798, 819, 840, 861, 882, 903, 924, 945, 966, 987, 1008, 1029, + (22,50): 1050, 1071, 1092, 1113, 1134, 1155, 1176, 1197, 1218, 1239, + (22,60): 1260, 1281, 1302, 1323, + (23,0): 0, 22, 44, 66, 88, 110, 132, 154, 176, 198, 220, 242, 264, 286, + (23,14): 308, 330, 352, 374, 396, 418, 440, 462, 484, 506, 528, 550, + (23,26): 572, 594, 616, 638, 660, 682, 704, 726, 748, 770, 792, 814, + (23,38): 836, 858, 880, 902, 924, 946, 968, 990, 1012, 1034, 1056, + (23,49): 1078, 1100, 1122, 1144, 1166, 1188, 1210, 1232, 1254, 1276, + (23,59): 1298, 1320, 1342, 1364, 1386, + (24,0): 0, 23, 46, 69, 92, 115, 138, 161, 184, 207, 230, 253, 276, 299, + (24,14): 322, 345, 368, 391, 414, 437, 460, 483, 506, 529, 552, 575, + (24,26): 598, 621, 644, 667, 690, 713, 736, 759, 782, 805, 828, 851, + (24,38): 874, 897, 920, 943, 966, 989, 1012, 1035, 1058, 1081, 1104, + (24,49): 1127, 1150, 1173, 1196, 1219, 1242, 1265, 1288, 1311, 1334, + (24,59): 1357, 1380, 1403, 1426, 1449, + (25,0): 0, 24, 48, 72, 96, 120, 144, 168, 192, 216, 240, 264, 288, 312, + (25,14): 336, 360, 384, 408, 432, 456, 480, 504, 528, 552, 576, 600, + (25,26): 624, 648, 672, 696, 720, 744, 768, 792, 816, 840, 864, 888, + (25,38): 912, 936, 960, 984, 1008, 1032, 1056, 1080, 1104, 1128, 1152, + (25,49): 1176, 1200, 1224, 1248, 1272, 1296, 1320, 1344, 1368, 1392, + (25,59): 1416, 1440, 1464, 1488, 1512, + (26,0): 0, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, + (26,13): 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, + (26,25): 625, 650, 675, 700, 725, 750, 775, 800, 825, 850, 875, 900, + (26,37): 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175, + (26,48): 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 1425, + (26,58): 1450, 1475, 1500, 1525, 1550, 1575, + (27,0): 0, 26, 52, 78, 104, 130, 156, 182, 208, 234, 260, 286, 312, + (27,13): 338, 364, 390, 416, 442, 468, 494, 520, 546, 572, 598, 624, + (27,25): 650, 676, 702, 728, 754, 780, 806, 832, 858, 884, 910, 936, + (27,37): 962, 988, 1014, 1040, 1066, 1092, 1118, 1144, 1170, 1196, + (27,47): 1222, 1248, 1274, 1300, 1326, 1352, 1378, 1404, 1430, 1456, + (27,57): 1482, 1508, 1534, 1560, 1586, 1612, 1638, + (28,0): 0, 27, 54, 81, 108, 135, 162, 189, 216, 243, 270, 297, 324, + (28,13): 351, 378, 405, 432, 459, 486, 513, 540, 567, 594, 621, 648, + (28,25): 675, 702, 729, 756, 783, 810, 837, 864, 891, 918, 945, 972, + (28,37): 999, 1026, 1053, 1080, 1107, 1134, 1161, 1188, 1215, 1242, + (28,47): 1269, 1296, 1323, 1350, 1377, 1404, 1431, 1458, 1485, 1512, + (28,57): 1539, 1566, 1593, 1620, 1647, 1674, 1701, + (29,0): 0, 28, 56, 84, 112, 140, 168, 196, 224, 252, 280, 308, 336, + (29,13): 364, 392, 420, 448, 476, 504, 532, 560, 588, 616, 644, 672, + (29,25): 700, 728, 756, 784, 812, 840, 868, 896, 924, 952, 980, 1008, + (29,37): 1036, 1064, 1092, 1120, 1148, 1176, 1204, 1232, 1260, 1288, + (29,47): 1316, 1344, 1372, 1400, 1428, 1456, 1484, 1512, 1540, 1568, + (29,57): 1596, 1624, 1652, 1680, 1708, 1736, 1764, + (30,0): 0, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, + (30,13): 377, 406, 435, 464, 493, 522, 551, 580, 609, 638, 667, 696, + (30,25): 725, 754, 783, 812, 841, 870, 899, 928, 957, 986, 1015, 1044, + (30,37): 1073, 1102, 1131, 1160, 1189, 1218, 1247, 1276, 1305, 1334, + (30,47): 1363, 1392, 1421, 1450, 1479, 1508, 1537, 1566, 1595, 1624, + (30,57): 1653, 1682, 1711, 1740, 1769, 1798, 1827, + (31,0): 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360, + (31,13): 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690, 720, + (31,25): 750, 780, 810, 840, 870, 900, 930, 960, 990, 1020, 1050, 1080, + (31,37): 1110, 1140, 1170, 1200, 1230, 1260, 1290, 1320, 1350, 1380, + (31,47): 1410, 1440, 1470, 1500, 1530, 1560, 1590, 1620, 1650, 1680, + (31,57): 1710, 1740, 1770, 1800, 1830, 1860, 1890 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_gzip.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_gzip.tst new file mode 100644 index 0000000000..97e7fabf69 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_gzip.tst @@ -0,0 +1,2 @@ +Filter type is: H5Z_FILTER_DEFLATE +Maximum value in DS1 is: 1890 diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_hyper.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_hyper.ddl new file mode 100644 index 0000000000..4d28ec1299 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_hyper.ddl @@ -0,0 +1,16 @@ +HDF5 "h5ex_d_hyper.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 6, 8 ) / ( 6, 8 ) } + DATA { + (0,0): 0, 1, 0, 0, 1, 0, 0, 1, + (1,0): 1, 1, 0, 1, 1, 0, 1, 1, + (2,0): 0, 0, 0, 0, 0, 0, 0, 0, + (3,0): 0, 1, 0, 0, 1, 0, 0, 1, + (4,0): 1, 1, 0, 1, 1, 0, 1, 1, + (5,0): 0, 0, 0, 0, 0, 0, 0, 0 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_hyper.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_hyper.tst new file mode 100644 index 0000000000..b7cc40d03a --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_hyper.tst @@ -0,0 +1,23 @@ +Original Data: + [ 1 1 1 1 1 1 1 1] + [ 1 1 1 1 1 1 1 1] + [ 1 1 1 1 1 1 1 1] + [ 1 1 1 1 1 1 1 1] + [ 1 1 1 1 1 1 1 1] + [ 1 1 1 1 1 1 1 1] + +Data as written to disk by hyberslabs: + [ 0 1 0 0 1 0 0 1] + [ 1 1 0 1 1 0 1 1] + [ 0 0 0 0 0 0 0 0] + [ 0 1 0 0 1 0 0 1] + [ 1 1 0 1 1 0 1 1] + [ 0 0 0 0 0 0 0 0] + +Data as read from disk by hyperslab: + [ 0 1 0 0 0 0 0 1] + [ 0 1 0 1 0 0 1 1] + [ 0 0 0 0 0 0 0 0] + [ 0 0 0 0 0 0 0 0] + [ 0 1 0 1 0 0 1 1] + [ 0 0 0 0 0 0 0 0] diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_nbit.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_nbit.ddl new file mode 100644 index 0000000000..3fc852f5a5 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_nbit.ddl @@ -0,0 +1,191 @@ +HDF5 "h5ex_d_nbit.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE 32-bit little-endian integer + DATASPACE SIMPLE { ( 32, 64 ) / ( 32, 64 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, + (0,15): -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, + (0,27): -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, + (0,39): -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, + (0,51): -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61, -62, + (0,63): -63, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,63): 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + (2,18): 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + (2,34): 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + (2,50): 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + (3,0): 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, + (3,17): 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, + (3,33): 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, + (3,49): 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, + (3,62): 124, 126, + (4,0): 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, + (4,17): 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, + (4,33): 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, + (4,46): 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168, 171, + (4,58): 174, 177, 180, 183, 186, 189, + (5,0): 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, + (5,17): 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, + (5,31): 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, + (5,43): 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, + (5,55): 220, 224, 228, 232, 236, 240, 244, 248, 252, + (6,0): 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + (6,16): 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, + (6,29): 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, + (6,41): 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, + (6,53): 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, + (7,0): 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, + (7,16): 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, + (7,29): 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, + (7,41): 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, + (7,53): 318, 324, 330, 336, 342, 348, 354, 360, 366, 372, 378, + (8,0): 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, + (8,16): 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, + (8,28): 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, + (8,40): 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, + (8,52): 364, 371, 378, 385, 392, 399, 406, 413, 420, 427, 434, 441, + (9,0): 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, + (9,16): 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, + (9,28): 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, + (9,40): 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, + (9,52): 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, + (10,0): 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126, + (10,15): 135, 144, 153, 162, 171, 180, 189, 198, 207, 216, 225, 234, + (10,27): 243, 252, 261, 270, 279, 288, 297, 306, 315, 324, 333, 342, + (10,39): 351, 360, 369, 378, 387, 396, 405, 414, 423, 432, 441, 450, + (10,51): 459, 468, 477, 486, 495, 504, 513, 522, 531, 540, 549, 558, + (10,63): 567, + (11,0): 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, + (11,15): 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, + (11,27): 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, + (11,39): 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, + (11,51): 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, + (11,63): 630, + (12,0): 0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, + (12,15): 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, + (12,27): 297, 308, 319, 330, 341, 352, 363, 374, 385, 396, 407, 418, + (12,39): 429, 440, 451, 462, 473, 484, 495, 506, 517, 528, 539, 550, + (12,51): 561, 572, 583, 594, 605, 616, 627, 638, 649, 660, 671, 682, + (12,63): 693, + (13,0): 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, + (13,14): 168, 180, 192, 204, 216, 228, 240, 252, 264, 276, 288, 300, + (13,26): 312, 324, 336, 348, 360, 372, 384, 396, 408, 420, 432, 444, + (13,38): 456, 468, 480, 492, 504, 516, 528, 540, 552, 564, 576, 588, + (13,50): 600, 612, 624, 636, 648, 660, 672, 684, 696, 708, 720, 732, + (13,62): 744, 756, + (14,0): 0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 156, 169, + (14,14): 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, + (14,26): 338, 351, 364, 377, 390, 403, 416, 429, 442, 455, 468, 481, + (14,38): 494, 507, 520, 533, 546, 559, 572, 585, 598, 611, 624, 637, + (14,50): 650, 663, 676, 689, 702, 715, 728, 741, 754, 767, 780, 793, + (14,62): 806, 819, + (15,0): 0, 14, 28, 42, 56, 70, 84, 98, 112, 126, 140, 154, 168, 182, + (15,14): 196, 210, 224, 238, 252, 266, 280, 294, 308, 322, 336, 350, + (15,26): 364, 378, 392, 406, 420, 434, 448, 462, 476, 490, 504, 518, + (15,38): 532, 546, 560, 574, 588, 602, 616, 630, 644, 658, 672, 686, + (15,50): 700, 714, 728, 742, 756, 770, 784, 798, 812, 826, 840, 854, + (15,62): 868, 882, + (16,0): 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, + (16,14): 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, + (16,26): 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, + (16,38): 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, + (16,50): 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, + (16,62): 930, 945, + (17,0): 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, + (17,14): 224, 240, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, + (17,26): 416, 432, 448, 464, 480, 496, 512, 528, 544, 560, 576, 592, + (17,38): 608, 624, 640, 656, 672, 688, 704, 720, 736, 752, 768, 784, + (17,50): 800, 816, 832, 848, 864, 880, 896, 912, 928, 944, 960, 976, + (17,62): 992, 1008, + (18,0): 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, + (18,14): 238, 255, 272, 289, 306, 323, 340, 357, 374, 391, 408, 425, + (18,26): 442, 459, 476, 493, 510, 527, 544, 561, 578, 595, 612, 629, + (18,38): 646, 663, 680, 697, 714, 731, 748, 765, 782, 799, 816, 833, + (18,50): 850, 867, 884, 901, 918, 935, 952, 969, 986, 1003, 1020, 1037, + (18,62): 1054, 1071, + (19,0): 0, 18, 36, 54, 72, 90, 108, 126, 144, 162, 180, 198, 216, 234, + (19,14): 252, 270, 288, 306, 324, 342, 360, 378, 396, 414, 432, 450, + (19,26): 468, 486, 504, 522, 540, 558, 576, 594, 612, 630, 648, 666, + (19,38): 684, 702, 720, 738, 756, 774, 792, 810, 828, 846, 864, 882, + (19,50): 900, 918, 936, 954, 972, 990, 1008, 1026, 1044, 1062, 1080, + (19,61): 1098, 1116, 1134, + (20,0): 0, 19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247, + (20,14): 266, 285, 304, 323, 342, 361, 380, 399, 418, 437, 456, 475, + (20,26): 494, 513, 532, 551, 570, 589, 608, 627, 646, 665, 684, 703, + (20,38): 722, 741, 760, 779, 798, 817, 836, 855, 874, 893, 912, 931, + (20,50): 950, 969, 988, 1007, 1026, 1045, 1064, 1083, 1102, 1121, 1140, + (20,61): 1159, 1178, 1197, + (21,0): 0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, + (21,14): 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, + (21,26): 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, + (21,38): 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 980, + (21,50): 1000, 1020, 1040, 1060, 1080, 1100, 1120, 1140, 1160, 1180, + (21,60): 1200, 1220, 1240, 1260, + (22,0): 0, 21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, + (22,14): 294, 315, 336, 357, 378, 399, 420, 441, 462, 483, 504, 525, + (22,26): 546, 567, 588, 609, 630, 651, 672, 693, 714, 735, 756, 777, + (22,38): 798, 819, 840, 861, 882, 903, 924, 945, 966, 987, 1008, 1029, + (22,50): 1050, 1071, 1092, 1113, 1134, 1155, 1176, 1197, 1218, 1239, + (22,60): 1260, 1281, 1302, 1323, + (23,0): 0, 22, 44, 66, 88, 110, 132, 154, 176, 198, 220, 242, 264, 286, + (23,14): 308, 330, 352, 374, 396, 418, 440, 462, 484, 506, 528, 550, + (23,26): 572, 594, 616, 638, 660, 682, 704, 726, 748, 770, 792, 814, + (23,38): 836, 858, 880, 902, 924, 946, 968, 990, 1012, 1034, 1056, + (23,49): 1078, 1100, 1122, 1144, 1166, 1188, 1210, 1232, 1254, 1276, + (23,59): 1298, 1320, 1342, 1364, 1386, + (24,0): 0, 23, 46, 69, 92, 115, 138, 161, 184, 207, 230, 253, 276, 299, + (24,14): 322, 345, 368, 391, 414, 437, 460, 483, 506, 529, 552, 575, + (24,26): 598, 621, 644, 667, 690, 713, 736, 759, 782, 805, 828, 851, + (24,38): 874, 897, 920, 943, 966, 989, 1012, 1035, 1058, 1081, 1104, + (24,49): 1127, 1150, 1173, 1196, 1219, 1242, 1265, 1288, 1311, 1334, + (24,59): 1357, 1380, 1403, 1426, 1449, + (25,0): 0, 24, 48, 72, 96, 120, 144, 168, 192, 216, 240, 264, 288, 312, + (25,14): 336, 360, 384, 408, 432, 456, 480, 504, 528, 552, 576, 600, + (25,26): 624, 648, 672, 696, 720, 744, 768, 792, 816, 840, 864, 888, + (25,38): 912, 936, 960, 984, 1008, 1032, 1056, 1080, 1104, 1128, 1152, + (25,49): 1176, 1200, 1224, 1248, 1272, 1296, 1320, 1344, 1368, 1392, + (25,59): 1416, 1440, 1464, 1488, 1512, + (26,0): 0, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, + (26,13): 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, + (26,25): 625, 650, 675, 700, 725, 750, 775, 800, 825, 850, 875, 900, + (26,37): 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175, + (26,48): 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 1425, + (26,58): 1450, 1475, 1500, 1525, 1550, 1575, + (27,0): 0, 26, 52, 78, 104, 130, 156, 182, 208, 234, 260, 286, 312, + (27,13): 338, 364, 390, 416, 442, 468, 494, 520, 546, 572, 598, 624, + (27,25): 650, 676, 702, 728, 754, 780, 806, 832, 858, 884, 910, 936, + (27,37): 962, 988, 1014, 1040, 1066, 1092, 1118, 1144, 1170, 1196, + (27,47): 1222, 1248, 1274, 1300, 1326, 1352, 1378, 1404, 1430, 1456, + (27,57): 1482, 1508, 1534, 1560, 1586, 1612, 1638, + (28,0): 0, 27, 54, 81, 108, 135, 162, 189, 216, 243, 270, 297, 324, + (28,13): 351, 378, 405, 432, 459, 486, 513, 540, 567, 594, 621, 648, + (28,25): 675, 702, 729, 756, 783, 810, 837, 864, 891, 918, 945, 972, + (28,37): 999, 1026, 1053, 1080, 1107, 1134, 1161, 1188, 1215, 1242, + (28,47): 1269, 1296, 1323, 1350, 1377, 1404, 1431, 1458, 1485, 1512, + (28,57): 1539, 1566, 1593, 1620, 1647, 1674, 1701, + (29,0): 0, 28, 56, 84, 112, 140, 168, 196, 224, 252, 280, 308, 336, + (29,13): 364, 392, 420, 448, 476, 504, 532, 560, 588, 616, 644, 672, + (29,25): 700, 728, 756, 784, 812, 840, 868, 896, 924, 952, 980, 1008, + (29,37): 1036, 1064, 1092, 1120, 1148, 1176, 1204, 1232, 1260, 1288, + (29,47): 1316, 1344, 1372, 1400, 1428, 1456, 1484, 1512, 1540, 1568, + (29,57): 1596, 1624, 1652, 1680, 1708, 1736, 1764, + (30,0): 0, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, + (30,13): 377, 406, 435, 464, 493, 522, 551, 580, 609, 638, 667, 696, + (30,25): 725, 754, 783, 812, 841, 870, 899, 928, 957, 986, 1015, 1044, + (30,37): 1073, 1102, 1131, 1160, 1189, 1218, 1247, 1276, 1305, 1334, + (30,47): 1363, 1392, 1421, 1450, 1479, 1508, 1537, 1566, 1595, 1624, + (30,57): 1653, 1682, 1711, 1740, 1769, 1798, 1827, + (31,0): 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360, + (31,13): 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690, 720, + (31,25): 750, 780, 810, 840, 870, 900, 930, 960, 990, 1020, 1050, 1080, + (31,37): 1110, 1140, 1170, 1200, 1230, 1260, 1290, 1320, 1350, 1380, + (31,47): 1410, 1440, 1470, 1500, 1530, 1560, 1590, 1620, 1650, 1680, + (31,57): 1710, 1740, 1770, 1800, 1830, 1860, 1890 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_nbit.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_nbit.tst new file mode 100644 index 0000000000..6dc94b37b5 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_nbit.tst @@ -0,0 +1,2 @@ +Filter type is: H5Z_FILTER_NBIT +Maximum value in DS1 is: 1890 diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_rdwr.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_rdwr.ddl new file mode 100644 index 0000000000..e3e9d65660 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_rdwr.ddl @@ -0,0 +1,14 @@ +HDF5 "h5ex_d_rdwr.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, + (1,0): 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, + (3,0): 0, 2, 4, 6, 8, 10, 12 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_rdwr.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_rdwr.tst new file mode 100644 index 0000000000..7d867d5ffa --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_rdwr.tst @@ -0,0 +1,5 @@ +DS1: + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_shuffle.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_shuffle.ddl new file mode 100644 index 0000000000..0c204ba4f2 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_shuffle.ddl @@ -0,0 +1,191 @@ +HDF5 "h5ex_d_shuffle.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 32, 64 ) / ( 32, 64 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, + (0,15): -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, + (0,27): -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, + (0,39): -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, + (0,51): -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61, -62, + (0,63): -63, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,63): 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + (2,18): 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + (2,34): 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + (2,50): 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + (3,0): 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, + (3,17): 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, + (3,33): 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, + (3,49): 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, + (3,62): 124, 126, + (4,0): 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, + (4,17): 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, + (4,33): 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, + (4,46): 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168, 171, + (4,58): 174, 177, 180, 183, 186, 189, + (5,0): 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, + (5,17): 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, + (5,31): 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, + (5,43): 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, + (5,55): 220, 224, 228, 232, 236, 240, 244, 248, 252, + (6,0): 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + (6,16): 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, + (6,29): 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, + (6,41): 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, + (6,53): 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, + (7,0): 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, + (7,16): 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, + (7,29): 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, + (7,41): 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, + (7,53): 318, 324, 330, 336, 342, 348, 354, 360, 366, 372, 378, + (8,0): 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, + (8,16): 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, + (8,28): 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, + (8,40): 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, + (8,52): 364, 371, 378, 385, 392, 399, 406, 413, 420, 427, 434, 441, + (9,0): 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, + (9,16): 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, + (9,28): 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, + (9,40): 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, + (9,52): 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, + (10,0): 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126, + (10,15): 135, 144, 153, 162, 171, 180, 189, 198, 207, 216, 225, 234, + (10,27): 243, 252, 261, 270, 279, 288, 297, 306, 315, 324, 333, 342, + (10,39): 351, 360, 369, 378, 387, 396, 405, 414, 423, 432, 441, 450, + (10,51): 459, 468, 477, 486, 495, 504, 513, 522, 531, 540, 549, 558, + (10,63): 567, + (11,0): 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, + (11,15): 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, + (11,27): 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, + (11,39): 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, + (11,51): 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, + (11,63): 630, + (12,0): 0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, + (12,15): 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, + (12,27): 297, 308, 319, 330, 341, 352, 363, 374, 385, 396, 407, 418, + (12,39): 429, 440, 451, 462, 473, 484, 495, 506, 517, 528, 539, 550, + (12,51): 561, 572, 583, 594, 605, 616, 627, 638, 649, 660, 671, 682, + (12,63): 693, + (13,0): 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, + (13,14): 168, 180, 192, 204, 216, 228, 240, 252, 264, 276, 288, 300, + (13,26): 312, 324, 336, 348, 360, 372, 384, 396, 408, 420, 432, 444, + (13,38): 456, 468, 480, 492, 504, 516, 528, 540, 552, 564, 576, 588, + (13,50): 600, 612, 624, 636, 648, 660, 672, 684, 696, 708, 720, 732, + (13,62): 744, 756, + (14,0): 0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 156, 169, + (14,14): 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, + (14,26): 338, 351, 364, 377, 390, 403, 416, 429, 442, 455, 468, 481, + (14,38): 494, 507, 520, 533, 546, 559, 572, 585, 598, 611, 624, 637, + (14,50): 650, 663, 676, 689, 702, 715, 728, 741, 754, 767, 780, 793, + (14,62): 806, 819, + (15,0): 0, 14, 28, 42, 56, 70, 84, 98, 112, 126, 140, 154, 168, 182, + (15,14): 196, 210, 224, 238, 252, 266, 280, 294, 308, 322, 336, 350, + (15,26): 364, 378, 392, 406, 420, 434, 448, 462, 476, 490, 504, 518, + (15,38): 532, 546, 560, 574, 588, 602, 616, 630, 644, 658, 672, 686, + (15,50): 700, 714, 728, 742, 756, 770, 784, 798, 812, 826, 840, 854, + (15,62): 868, 882, + (16,0): 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, + (16,14): 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, + (16,26): 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, + (16,38): 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, + (16,50): 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, + (16,62): 930, 945, + (17,0): 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, + (17,14): 224, 240, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, + (17,26): 416, 432, 448, 464, 480, 496, 512, 528, 544, 560, 576, 592, + (17,38): 608, 624, 640, 656, 672, 688, 704, 720, 736, 752, 768, 784, + (17,50): 800, 816, 832, 848, 864, 880, 896, 912, 928, 944, 960, 976, + (17,62): 992, 1008, + (18,0): 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, + (18,14): 238, 255, 272, 289, 306, 323, 340, 357, 374, 391, 408, 425, + (18,26): 442, 459, 476, 493, 510, 527, 544, 561, 578, 595, 612, 629, + (18,38): 646, 663, 680, 697, 714, 731, 748, 765, 782, 799, 816, 833, + (18,50): 850, 867, 884, 901, 918, 935, 952, 969, 986, 1003, 1020, 1037, + (18,62): 1054, 1071, + (19,0): 0, 18, 36, 54, 72, 90, 108, 126, 144, 162, 180, 198, 216, 234, + (19,14): 252, 270, 288, 306, 324, 342, 360, 378, 396, 414, 432, 450, + (19,26): 468, 486, 504, 522, 540, 558, 576, 594, 612, 630, 648, 666, + (19,38): 684, 702, 720, 738, 756, 774, 792, 810, 828, 846, 864, 882, + (19,50): 900, 918, 936, 954, 972, 990, 1008, 1026, 1044, 1062, 1080, + (19,61): 1098, 1116, 1134, + (20,0): 0, 19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247, + (20,14): 266, 285, 304, 323, 342, 361, 380, 399, 418, 437, 456, 475, + (20,26): 494, 513, 532, 551, 570, 589, 608, 627, 646, 665, 684, 703, + (20,38): 722, 741, 760, 779, 798, 817, 836, 855, 874, 893, 912, 931, + (20,50): 950, 969, 988, 1007, 1026, 1045, 1064, 1083, 1102, 1121, 1140, + (20,61): 1159, 1178, 1197, + (21,0): 0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, + (21,14): 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, + (21,26): 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, + (21,38): 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 980, + (21,50): 1000, 1020, 1040, 1060, 1080, 1100, 1120, 1140, 1160, 1180, + (21,60): 1200, 1220, 1240, 1260, + (22,0): 0, 21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, + (22,14): 294, 315, 336, 357, 378, 399, 420, 441, 462, 483, 504, 525, + (22,26): 546, 567, 588, 609, 630, 651, 672, 693, 714, 735, 756, 777, + (22,38): 798, 819, 840, 861, 882, 903, 924, 945, 966, 987, 1008, 1029, + (22,50): 1050, 1071, 1092, 1113, 1134, 1155, 1176, 1197, 1218, 1239, + (22,60): 1260, 1281, 1302, 1323, + (23,0): 0, 22, 44, 66, 88, 110, 132, 154, 176, 198, 220, 242, 264, 286, + (23,14): 308, 330, 352, 374, 396, 418, 440, 462, 484, 506, 528, 550, + (23,26): 572, 594, 616, 638, 660, 682, 704, 726, 748, 770, 792, 814, + (23,38): 836, 858, 880, 902, 924, 946, 968, 990, 1012, 1034, 1056, + (23,49): 1078, 1100, 1122, 1144, 1166, 1188, 1210, 1232, 1254, 1276, + (23,59): 1298, 1320, 1342, 1364, 1386, + (24,0): 0, 23, 46, 69, 92, 115, 138, 161, 184, 207, 230, 253, 276, 299, + (24,14): 322, 345, 368, 391, 414, 437, 460, 483, 506, 529, 552, 575, + (24,26): 598, 621, 644, 667, 690, 713, 736, 759, 782, 805, 828, 851, + (24,38): 874, 897, 920, 943, 966, 989, 1012, 1035, 1058, 1081, 1104, + (24,49): 1127, 1150, 1173, 1196, 1219, 1242, 1265, 1288, 1311, 1334, + (24,59): 1357, 1380, 1403, 1426, 1449, + (25,0): 0, 24, 48, 72, 96, 120, 144, 168, 192, 216, 240, 264, 288, 312, + (25,14): 336, 360, 384, 408, 432, 456, 480, 504, 528, 552, 576, 600, + (25,26): 624, 648, 672, 696, 720, 744, 768, 792, 816, 840, 864, 888, + (25,38): 912, 936, 960, 984, 1008, 1032, 1056, 1080, 1104, 1128, 1152, + (25,49): 1176, 1200, 1224, 1248, 1272, 1296, 1320, 1344, 1368, 1392, + (25,59): 1416, 1440, 1464, 1488, 1512, + (26,0): 0, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, + (26,13): 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, + (26,25): 625, 650, 675, 700, 725, 750, 775, 800, 825, 850, 875, 900, + (26,37): 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175, + (26,48): 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 1425, + (26,58): 1450, 1475, 1500, 1525, 1550, 1575, + (27,0): 0, 26, 52, 78, 104, 130, 156, 182, 208, 234, 260, 286, 312, + (27,13): 338, 364, 390, 416, 442, 468, 494, 520, 546, 572, 598, 624, + (27,25): 650, 676, 702, 728, 754, 780, 806, 832, 858, 884, 910, 936, + (27,37): 962, 988, 1014, 1040, 1066, 1092, 1118, 1144, 1170, 1196, + (27,47): 1222, 1248, 1274, 1300, 1326, 1352, 1378, 1404, 1430, 1456, + (27,57): 1482, 1508, 1534, 1560, 1586, 1612, 1638, + (28,0): 0, 27, 54, 81, 108, 135, 162, 189, 216, 243, 270, 297, 324, + (28,13): 351, 378, 405, 432, 459, 486, 513, 540, 567, 594, 621, 648, + (28,25): 675, 702, 729, 756, 783, 810, 837, 864, 891, 918, 945, 972, + (28,37): 999, 1026, 1053, 1080, 1107, 1134, 1161, 1188, 1215, 1242, + (28,47): 1269, 1296, 1323, 1350, 1377, 1404, 1431, 1458, 1485, 1512, + (28,57): 1539, 1566, 1593, 1620, 1647, 1674, 1701, + (29,0): 0, 28, 56, 84, 112, 140, 168, 196, 224, 252, 280, 308, 336, + (29,13): 364, 392, 420, 448, 476, 504, 532, 560, 588, 616, 644, 672, + (29,25): 700, 728, 756, 784, 812, 840, 868, 896, 924, 952, 980, 1008, + (29,37): 1036, 1064, 1092, 1120, 1148, 1176, 1204, 1232, 1260, 1288, + (29,47): 1316, 1344, 1372, 1400, 1428, 1456, 1484, 1512, 1540, 1568, + (29,57): 1596, 1624, 1652, 1680, 1708, 1736, 1764, + (30,0): 0, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, + (30,13): 377, 406, 435, 464, 493, 522, 551, 580, 609, 638, 667, 696, + (30,25): 725, 754, 783, 812, 841, 870, 899, 928, 957, 986, 1015, 1044, + (30,37): 1073, 1102, 1131, 1160, 1189, 1218, 1247, 1276, 1305, 1334, + (30,47): 1363, 1392, 1421, 1450, 1479, 1508, 1537, 1566, 1595, 1624, + (30,57): 1653, 1682, 1711, 1740, 1769, 1798, 1827, + (31,0): 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360, + (31,13): 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690, 720, + (31,25): 750, 780, 810, 840, 870, 900, 930, 960, 990, 1020, 1050, 1080, + (31,37): 1110, 1140, 1170, 1200, 1230, 1260, 1290, 1320, 1350, 1380, + (31,47): 1410, 1440, 1470, 1500, 1530, 1560, 1590, 1620, 1650, 1680, + (31,57): 1710, 1740, 1770, 1800, 1830, 1860, 1890 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_shuffle.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_shuffle.tst new file mode 100644 index 0000000000..6c77316c84 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_shuffle.tst @@ -0,0 +1,3 @@ +Filter 0: Type is: H5Z_FILTER_SHUFFLE +Filter 1: Type is: H5Z_FILTER_DEFLATE +Maximum value in DS1 is: 1890 diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_sofloat.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_sofloat.ddl new file mode 100644 index 0000000000..b4b1254f9e --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_sofloat.ddl @@ -0,0 +1,326 @@ +HDF5 "h5ex_d_sofloat.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_IEEE_F64LE + DATASPACE SIMPLE { ( 32, 64 ) / ( 32, 64 ) } + DATA { + (0,0): 3.32923, 1.76923, 2.43923, 3.29923, 4.22923, 5.18923, 6.15923, + (0,7): 7.13923, 8.12048, 9.11048, 10.1005, 11.0905, 12.0805, 13.0705, + (0,14): 14.0705, 15.0605, 16.0613, 17.0613, 18.0513, 19.0513, 20.0513, + (0,21): 21.0513, 22.0413, 23.0413, 24.0412, 25.0412, 26.0412, 27.0412, + (0,28): 28.0312, 29.0312, 30.0312, 31.0312, 32.031, 33.031, 34.031, + (0,35): 35.031, 36.031, 37.031, 38.031, 39.021, 40.0248, 41.0248, + (0,42): 42.0248, 43.0248, 44.0248, 45.0248, 46.0248, 47.0248, 48.0207, + (0,49): 49.0207, 50.0207, 51.0207, 52.0207, 53.0207, 54.0207, 55.0207, + (0,56): 56.0178, 57.0178, 58.0178, 59.0178, 60.0178, 61.0178, 62.0178, + (0,63): 63.0178, + (1,0): 6.66923, 2.53923, 2.86923, 3.60923, 4.46923, 5.37923, 6.31923, + (1,7): 7.26923, 8.24048, 9.21048, 10.1905, 11.1805, 12.1605, 13.1505, + (1,14): 14.1405, 15.1305, 16.1213, 17.1113, 18.1113, 19.1013, 20.1013, + (1,21): 21.0913, 22.0913, 23.0813, 24.0812, 25.0812, 26.0712, 27.0712, + (1,28): 28.0712, 29.0712, 30.0612, 31.0612, 32.061, 33.061, 34.061, + (1,35): 35.061, 36.051, 37.051, 38.051, 39.051, 40.0448, 41.0448, + (1,42): 42.0448, 43.0448, 44.0448, 45.0448, 46.0448, 47.0448, 48.0407, + (1,49): 49.0407, 50.0407, 51.0407, 52.0407, 53.0407, 54.0407, 55.0407, + (1,56): 56.0378, 57.0378, 58.0378, 59.0378, 60.0378, 61.0278, 62.0278, + (1,63): 63.0278, + (2,0): 9.99923, 3.30923, 3.30923, 3.90923, 4.69923, 5.56923, 6.47923, + (2,7): 7.40923, 8.36048, 9.32048, 10.2905, 11.2705, 12.2405, 13.2305, + (2,14): 14.2105, 15.2005, 16.1813, 17.1713, 18.1613, 19.1513, 20.1513, + (2,21): 21.1413, 22.1313, 23.1313, 24.1212, 25.1212, 26.1112, 27.1112, + (2,28): 28.1012, 29.1012, 30.1012, 31.0912, 32.091, 33.091, 34.091, + (2,35): 35.081, 36.081, 37.081, 38.081, 39.081, 40.0748, 41.0748, + (2,42): 42.0748, 43.0648, 44.0648, 45.0648, 46.0648, 47.0648, 48.0607, + (2,49): 49.0607, 50.0607, 51.0607, 52.0607, 53.0607, 54.0507, 55.0507, + (2,56): 56.0578, 57.0478, 58.0478, 59.0478, 60.0478, 61.0478, 62.0478, + (2,63): 63.0478, + (3,0): 13.3292, 4.07923, 3.73923, 4.20923, 4.92923, 5.75923, 6.63923, + (3,7): 7.54923, 8.48048, 9.43048, 10.3905, 11.3505, 12.3205, 13.3005, + (3,14): 14.2805, 15.2605, 16.2413, 17.2313, 18.2213, 19.2113, 20.2013, + (3,21): 21.1913, 22.1813, 23.1713, 24.1612, 25.1612, 26.1512, 27.1512, + (3,28): 28.1412, 29.1412, 30.1312, 31.1312, 32.121, 33.121, 34.121, + (3,35): 35.111, 36.111, 37.111, 38.101, 39.101, 40.0948, 41.0948, + (3,42): 42.0948, 43.0948, 44.0948, 45.0848, 46.0848, 47.0848, 48.0807, + (3,49): 49.0807, 50.0807, 51.0807, 52.0807, 53.0707, 54.0707, 55.0707, + (3,56): 56.0678, 57.0678, 58.0678, 59.0678, 60.0678, 61.0678, 62.0678, + (3,63): 63.0678, + (4,0): 16.6639, 4.84391, 4.17391, 4.51391, 5.16391, 5.94391, 6.79391, + (4,7): 7.68391, 8.60241, 9.54241, 10.4824, 11.4424, 12.4024, 13.3724, + (4,14): 14.3524, 15.3224, 16.3067, 17.2867, 18.2767, 19.2567, 20.2467, + (4,21): 21.2367, 22.2267, 23.2167, 24.2058, 25.1958, 26.1858, 27.1858, + (4,28): 28.1758, 29.1658, 30.1658, 31.1558, 32.1548, 33.1548, 34.1448, + (4,35): 35.1448, 36.1348, 37.1348, 38.1348, 39.1248, 40.1241, 41.1241, + (4,42): 42.1141, 43.1141, 44.1141, 45.1141, 46.1041, 47.1041, 48.1035, + (4,49): 49.1035, 50.1035, 51.0935, 52.0935, 53.0935, 54.0935, 55.0935, + (4,56): 56.0888, 57.0888, 58.0888, 59.0888, 60.0788, 61.0788, 62.0788, + (4,63): 63.0788, + (5,0): 20.0039, 5.61391, 4.60391, 4.81391, 5.39391, 6.13391, 6.95391, + (5,7): 7.82391, 8.72241, 9.64241, 10.5824, 11.5324, 12.4924, 13.4524, + (5,14): 14.4224, 15.3924, 16.3667, 17.3467, 18.3267, 19.3067, 20.2967, + (5,21): 21.2767, 22.2667, 23.2567, 24.2458, 25.2358, 26.2258, 27.2158, + (5,28): 28.2158, 29.2058, 30.1958, 31.1958, 32.1848, 33.1848, 34.1748, + (5,35): 35.1748, 36.1648, 37.1648, 38.1548, 39.1548, 40.1441, 41.1441, + (5,42): 42.1441, 43.1341, 44.1341, 45.1341, 46.1341, 47.1241, 48.1235, + (5,49): 49.1235, 50.1235, 51.1135, 52.1135, 53.1135, 54.1135, 55.1035, + (5,56): 56.1088, 57.1088, 58.0988, 59.0988, 60.0988, 61.0988, 62.0988, + (5,63): 63.0988, + (6,0): 23.3339, 6.38391, 5.04391, 5.12391, 5.62391, 6.32391, 7.11391, + (6,7): 7.95391, 8.84241, 9.75241, 10.6824, 11.6224, 12.5724, 13.5224, + (6,14): 14.4924, 15.4624, 16.4267, 17.4067, 18.3867, 19.3667, 20.3467, + (6,21): 21.3267, 22.3167, 23.2967, 24.2858, 25.2758, 26.2658, 27.2558, + (6,28): 28.2458, 29.2358, 30.2358, 31.2258, 32.2148, 33.2148, 34.2048, + (6,35): 35.1948, 36.1948, 37.1848, 38.1848, 39.1748, 40.1741, 41.1741, + (6,42): 42.1641, 43.1641, 44.1541, 45.1541, 46.1541, 47.1441, 48.1435, + (6,49): 49.1435, 50.1435, 51.1335, 52.1335, 53.1335, 54.1335, 55.1235, + (6,56): 56.1288, 57.1188, 58.1188, 59.1188, 60.1188, 61.1188, 62.1088, + (6,63): 63.1088, + (7,0): 26.6639, 7.15391, 5.47391, 5.42391, 5.86391, 6.51391, 7.27391, + (7,7): 8.09391, 8.96241, 9.86241, 10.7724, 11.7124, 12.6524, 13.6024, + (7,14): 14.5624, 15.5224, 16.4867, 17.4667, 18.4367, 19.4167, 20.3967, + (7,21): 21.3767, 22.3567, 23.3467, 24.3258, 25.3158, 26.3058, 27.2958, + (7,28): 28.2858, 29.2758, 30.2658, 31.2558, 32.2448, 33.2448, 34.2348, + (7,35): 35.2248, 36.2248, 37.2148, 38.2048, 39.2048, 40.1941, 41.1941, + (7,42): 42.1941, 43.1841, 44.1841, 45.1741, 46.1741, 47.1741, 48.1635, + (7,49): 49.1635, 50.1635, 51.1535, 52.1535, 53.1535, 54.1435, 55.1435, + (7,56): 56.1388, 57.1388, 58.1388, 59.1388, 60.1288, 61.1288, 62.1288, + (7,63): 63.1288, + (8,0): 29.9973, 7.92727, 5.91727, 5.72727, 6.09727, 6.69727, 7.42727, + (8,7): 8.23727, 9.08434, 9.96434, 10.8743, 11.7943, 12.7343, 13.6743, + (8,14): 14.6343, 15.5843, 16.5521, 17.5221, 18.4921, 19.4621, 20.4421, + (8,21): 21.4221, 22.4021, 23.3821, 24.3704, 25.3604, 26.3404, 27.3304, + (8,28): 28.3204, 29.3104, 30.3004, 31.2904, 32.2786, 33.2686, 34.2586, + (8,35): 35.2586, 36.2486, 37.2386, 38.2386, 39.2286, 40.2233, 41.2133, + (8,42): 42.2133, 43.2033, 44.2033, 45.2033, 46.1933, 47.1933, 48.1863, + (8,49): 49.1863, 50.1763, 51.1763, 52.1763, 53.1663, 54.1663, 55.1663, + (8,56): 56.1599, 57.1599, 58.1499, 59.1499, 60.1499, 61.1499, 62.1399, + (8,63): 63.1399, + (9,0): 33.3373, 8.69727, 6.34727, 6.02727, 6.32727, 6.88727, 7.58727, + (9,7): 8.36727, 9.20434, 10.0743, 10.9743, 11.8843, 12.8143, 13.7543, + (9,14): 14.6943, 15.6543, 16.6121, 17.5821, 18.5421, 19.5221, 20.4921, + (9,21): 21.4721, 22.4521, 23.4321, 24.4104, 25.3904, 26.3804, 27.3704, + (9,28): 28.3504, 29.3404, 30.3304, 31.3204, 32.3086, 33.2986, 34.2886, + (9,35): 35.2786, 36.2786, 37.2686, 38.2586, 39.2586, 40.2433, 41.2433, + (9,42): 42.2333, 43.2333, 44.2233, 45.2233, 46.2133, 47.2133, 48.2063, + (9,49): 49.2063, 50.1963, 51.1963, 52.1863, 53.1863, 54.1863, 55.1763, + (9,56): 56.1799, 57.1699, 58.1699, 59.1699, 60.1699, 61.1599, 62.1599, + (9,63): 63.1599, + (10,0): 36.6673, 9.45727, 6.78727, 6.33727, 6.55727, 7.07727, 7.74727, + (10,7): 8.50727, 9.32434, 10.1843, 11.0643, 11.9743, 12.8943, 13.8243, + (10,14): 14.7643, 15.7143, 16.6721, 17.6321, 18.6021, 19.5721, 20.5421, + (10,21): 21.5121, 22.4921, 23.4721, 24.4504, 25.4304, 26.4204, 27.4004, + (10,28): 28.3904, 29.3804, 30.3604, 31.3504, 32.3386, 33.3286, 34.3186, + (10,35): 35.3086, 36.2986, 37.2986, 38.2886, 39.2786, 40.2733, 41.2633, + (10,42): 42.2633, 43.2533, 44.2433, 45.2433, 46.2333, 47.2333, 48.2263, + (10,49): 49.2263, 50.2163, 51.2163, 52.2063, 53.2063, 54.2063, 55.1963, + (10,56): 56.1999, 57.1899, 58.1899, 59.1899, 60.1799, 61.1799, 62.1799, + (10,63): 63.1699, + (11,0): 39.9973, 10.2273, 7.21727, 6.63727, 6.78727, 7.26727, 7.90727, + (11,7): 8.64727, 9.44434, 10.2943, 11.1643, 12.0643, 12.9743, 13.9043, + (11,14): 14.8343, 15.7843, 16.7321, 17.6921, 18.6521, 19.6221, 20.5921, + (11,21): 21.5621, 22.5421, 23.5121, 24.4904, 25.4704, 26.4604, 27.4404, + (11,28): 28.4204, 29.4104, 30.4004, 31.3804, 32.3686, 33.3586, 34.3486, + (11,35): 35.3386, 36.3286, 37.3186, 38.3086, 39.3086, 40.2933, 41.2933, + (11,42): 42.2833, 43.2733, 44.2733, 45.2633, 46.2633, 47.2533, 48.2463, + (11,49): 49.2463, 50.2363, 51.2363, 52.2263, 53.2263, 54.2163, 55.2163, + (11,56): 56.2099, 57.2099, 58.2099, 59.1999, 60.1999, 61.1999, 62.1899, + (11,63): 63.1899, + (12,0): 43.3294, 10.9994, 7.64939, 6.93939, 7.01939, 7.44939, 8.05939, + (12,7): 8.77939, 9.56627, 10.3963, 11.2663, 12.1463, 13.0563, 13.9763, + (12,14): 14.9063, 15.8463, 16.7975, 17.7475, 18.7075, 19.6775, 20.6375, + (12,21): 21.6075, 22.5875, 23.5575, 24.535, 25.515, 26.495, 27.475, + (12,28): 28.455, 29.445, 30.425, 31.415, 32.4025, 33.3925, 34.3825, + (12,35): 35.3725, 36.3625, 37.3525, 38.3425, 39.3325, 40.3226, 41.3126, + (12,42): 42.3026, 43.3026, 44.2926, 45.2826, 46.2826, 47.2726, 48.2692, + (12,49): 49.2592, 50.2592, 51.2492, 52.2492, 53.2392, 54.2392, 55.2392, + (12,56): 56.2309, 57.2309, 58.2209, 59.2209, 60.2109, 61.2109, 62.2109, + (12,63): 63.2009, + (13,0): 46.6694, 11.7694, 8.08939, 7.23939, 7.25939, 7.63939, 8.21939, + (13,7): 8.91939, 9.68627, 10.5063, 11.3563, 12.2363, 13.1363, 14.0563, + (13,14): 14.9763, 15.9163, 16.8575, 17.8075, 18.7675, 19.7275, 20.6875, + (13,21): 21.6575, 22.6275, 23.5975, 24.575, 25.555, 26.535, 27.515, + (13,28): 28.495, 29.475, 30.465, 31.445, 32.4325, 33.4225, 34.4125, + (13,35): 35.3925, 36.3825, 37.3725, 38.3625, 39.3525, 40.3426, 41.3426, + (13,42): 42.3326, 43.3226, 44.3126, 45.3126, 46.3026, 47.2926, 48.2892, + (13,49): 49.2792, 50.2792, 51.2692, 52.2692, 53.2592, 54.2592, 55.2492, + (13,56): 56.2509, 57.2409, 58.2409, 59.2409, 60.2309, 61.2309, 62.2209, + (13,63): 63.2209, + (14,0): 49.9994, 12.5394, 8.51939, 7.54939, 7.48939, 7.82939, 8.37939, + (14,7): 9.05939, 9.80627, 10.6163, 11.4563, 12.3263, 13.2163, 14.1263, + (14,14): 15.0463, 15.9763, 16.9175, 17.8675, 18.8175, 19.7775, 20.7375, + (14,21): 21.7075, 22.6775, 23.6475, 24.615, 25.595, 26.575, 27.545, + (14,28): 28.535, 29.515, 30.495, 31.475, 32.4625, 33.4525, 34.4325, + (14,35): 35.4225, 36.4125, 37.4025, 38.3925, 39.3825, 40.3726, 41.3626, + (14,42): 42.3526, 43.3426, 44.3426, 45.3326, 46.3226, 47.3126, 48.3092, + (14,49): 49.3092, 50.2992, 51.2892, 52.2892, 53.2792, 54.2792, 55.2692, + (14,56): 56.2709, 57.2609, 58.2609, 59.2509, 60.2509, 61.2409, 62.2409, + (14,63): 63.2409, + (15,0): 53.3294, 13.3094, 8.95939, 7.84939, 7.71939, 8.01939, 8.53939, + (15,7): 9.18939, 9.92627, 10.7163, 11.5563, 12.4163, 13.2963, 14.2063, + (15,14): 15.1163, 16.0463, 16.9775, 17.9275, 18.8775, 19.8275, 20.7875, + (15,21): 21.7475, 22.7175, 23.6875, 24.655, 25.635, 26.605, 27.585, + (15,28): 28.565, 29.545, 30.525, 31.515, 32.4925, 33.4825, 34.4625, + (15,35): 35.4525, 36.4425, 37.4325, 38.4225, 39.4025, 40.3926, 41.3826, + (15,42): 42.3826, 43.3726, 44.3626, 45.3526, 46.3426, 47.3426, 48.3292, + (15,49): 49.3292, 50.3192, 51.3092, 52.3092, 53.2992, 54.2992, 55.2892, + (15,56): 56.2809, 57.2809, 58.2709, 59.2709, 60.2609, 61.2609, 62.2609, + (15,63): 63.2509, + (16,0): 56.6635, 14.0735, 9.39349, 8.15349, 7.95349, 8.20349, 8.69349, + (16,7): 9.33349, 10.0482, 10.8282, 11.6482, 12.5082, 13.3782, 14.2782, + (16,14): 15.1882, 16.1082, 17.0429, 17.9829, 18.9329, 19.8829, 20.8329, + (16,21): 21.8029, 22.7629, 23.7329, 24.6996, 25.6696, 26.6496, 27.6196, + (16,28): 28.5996, 29.5796, 30.5596, 31.5396, 32.5263, 33.5063, 34.4963, + (16,35): 35.4863, 36.4663, 37.4563, 38.4463, 39.4363, 40.4218, 41.4118, + (16,42): 42.4018, 43.3918, 44.3818, 45.3718, 46.3718, 47.3618, 48.352, + (16,49): 49.342, 50.342, 51.332, 52.322, 53.322, 54.312, 55.312, + (16,56): 56.302, 57.292, 58.292, 59.282, 60.282, 61.282, 62.272, + (16,63): 63.272, + (17,0): 60.0035, 14.8435, 9.82349, 8.45349, 8.18349, 8.39349, 8.85349, + (17,7): 9.46349, 10.1682, 10.9382, 11.7482, 12.5882, 13.4682, 14.3582, + (17,14): 15.2582, 16.1782, 17.1029, 18.0429, 18.9829, 19.9329, 20.8829, + (17,21): 21.8429, 22.8029, 23.7729, 24.7396, 25.7096, 26.6796, 27.6596, + (17,28): 28.6396, 29.6096, 30.5896, 31.5796, 32.5563, 33.5363, 34.5263, + (17,35): 35.5063, 36.4963, 37.4863, 38.4663, 39.4563, 40.4418, 41.4318, + (17,42): 42.4218, 43.4118, 44.4018, 45.4018, 46.3918, 47.3818, 48.372, + (17,49): 49.362, 50.362, 51.352, 52.342, 53.342, 54.332, 55.322, + (17,56): 56.322, 57.312, 58.312, 59.302, 60.302, 61.292, 62.292, + (17,63): 63.282, + (18,0): 63.3335, 15.6135, 10.2635, 8.75349, 8.42349, 8.58349, 9.01349, + (18,7): 9.60349, 10.2882, 11.0382, 11.8482, 12.6782, 13.5482, 14.4282, + (18,14): 15.3282, 16.2382, 17.1629, 18.1029, 19.0429, 19.9829, 20.9329, + (18,21): 21.8929, 22.8529, 23.8129, 24.7796, 25.7496, 26.7196, 27.6996, + (18,28): 28.6696, 29.6496, 30.6296, 31.6096, 32.5863, 33.5663, 34.5563, + (18,35): 35.5363, 36.5263, 37.5063, 38.4963, 39.4863, 40.4718, 41.4618, + (18,42): 42.4518, 43.4418, 44.4318, 45.4218, 46.4118, 47.4018, 48.392, + (18,49): 49.382, 50.382, 51.372, 52.362, 53.352, 54.352, 55.342, + (18,56): 56.342, 57.332, 58.322, 59.322, 60.312, 61.312, 62.302, + (18,63): 63.302, + (19,0): 66.6635, 16.3835, 10.6935, 9.06349, 8.65349, 8.77349, 9.17349, + (19,7): 9.74349, 10.4082, 11.1482, 11.9382, 12.7682, 13.6282, 14.5082, + (19,14): 15.3982, 16.3082, 17.2229, 18.1529, 19.0929, 20.0329, 20.9829, + (19,21): 21.9429, 22.8929, 23.8629, 24.8196, 25.7896, 26.7596, 27.7296, + (19,28): 28.7096, 29.6796, 30.6596, 31.6396, 32.6163, 33.5963, 34.5863, + (19,35): 35.5663, 36.5463, 37.5363, 38.5263, 39.5063, 40.4918, 41.4818, + (19,42): 42.4718, 43.4618, 44.4518, 45.4418, 46.4318, 47.4218, 48.412, + (19,49): 49.402, 50.402, 51.392, 52.382, 53.372, 54.372, 55.362, + (19,56): 56.352, 57.352, 58.342, 59.342, 60.332, 61.322, 62.322, + (19,63): 63.312, + (20,0): 70.0037, 17.1537, 11.1337, 9.36372, 8.88372, 8.96372, 9.33372, + (20,7): 9.87372, 10.5301, 11.2601, 12.0401, 12.8601, 13.7101, 14.5801, + (20,14): 15.4701, 16.3701, 17.2883, 18.2183, 19.1483, 20.0883, 21.0383, + (20,21): 21.9883, 22.9383, 23.8983, 24.8642, 25.8342, 26.7942, 27.7742, + (20,28): 28.7442, 29.7142, 30.6942, 31.6742, 32.6502, 33.6302, 34.6102, + (20,35): 35.5902, 36.5802, 37.5602, 38.5502, 39.5302, 40.5211, 41.5111, + (20,42): 42.5011, 43.4811, 44.4711, 45.4611, 46.4511, 47.4411, 48.4348, + (20,49): 49.4248, 50.4148, 51.4048, 52.4048, 53.3948, 54.3848, 55.3748, + (20,56): 56.373, 57.363, 58.363, 59.353, 60.353, 61.343, 62.333, + (20,63): 63.333, + (21,0): 73.3337, 17.9237, 11.5637, 9.66372, 9.11372, 9.15372, 9.49372, + (21,7): 10.0137, 10.6501, 11.3701, 12.1401, 12.9501, 13.7901, 14.6501, + (21,14): 15.5401, 16.4401, 17.3483, 18.2683, 19.1983, 20.1383, 21.0883, + (21,21): 22.0283, 22.9883, 23.9483, 24.9042, 25.8742, 26.8342, 27.8042, + (21,28): 28.7742, 29.7542, 30.7242, 31.7042, 32.6802, 33.6602, 34.6402, + (21,35): 35.6202, 36.6102, 37.5902, 38.5702, 39.5602, 40.5411, 41.5311, + (21,42): 42.5211, 43.5111, 44.5011, 45.4811, 46.4711, 47.4611, 48.4548, + (21,49): 49.4448, 50.4348, 51.4248, 52.4248, 53.4148, 54.4048, 55.3948, + (21,56): 56.393, 57.383, 58.373, 59.373, 60.363, 61.363, 62.353, + (21,63): 63.343, + (22,0): 76.6637, 18.6937, 12.0037, 9.97372, 9.35372, 9.34372, 9.65372, + (22,7): 10.1537, 10.7701, 11.4701, 12.2301, 13.0401, 13.8701, 14.7301, + (22,14): 15.6101, 16.5001, 17.4083, 18.3283, 19.2583, 20.1883, 21.1283, + (22,21): 22.0783, 23.0283, 23.9883, 24.9442, 25.9042, 26.8742, 27.8442, + (22,28): 28.8142, 29.7842, 30.7542, 31.7342, 32.7102, 33.6902, 34.6702, + (22,35): 35.6502, 36.6302, 37.6202, 38.6002, 39.5902, 40.5711, 41.5611, + (22,42): 42.5411, 43.5311, 44.5211, 45.5111, 46.5011, 47.4911, 48.4748, + (22,49): 49.4648, 50.4548, 51.4448, 52.4348, 53.4348, 54.4248, 55.4148, + (22,56): 56.413, 57.403, 58.393, 59.383, 60.383, 61.373, 62.373, + (22,63): 63.363, + (23,0): 80.0037, 19.4637, 12.4337, 10.2737, 9.58372, 9.52372, 9.81372, + (23,7): 10.2837, 10.8901, 11.5801, 12.3301, 13.1201, 13.9501, 14.8001, + (23,14): 15.6801, 16.5701, 17.4683, 18.3883, 19.3083, 20.2483, 21.1783, + (23,21): 22.1283, 23.0783, 24.0283, 24.9842, 25.9442, 26.9142, 27.8742, + (23,28): 28.8442, 29.8142, 30.7942, 31.7642, 32.7402, 33.7202, 34.7002, + (23,35): 35.6802, 36.6602, 37.6402, 38.6302, 39.6102, 40.5911, 41.5811, + (23,42): 42.5711, 43.5511, 44.5411, 45.5311, 46.5211, 47.5111, 48.4948, + (23,49): 49.4848, 50.4748, 51.4648, 52.4548, 53.4548, 54.4448, 55.4348, + (23,56): 56.423, 57.423, 58.413, 59.403, 60.403, 61.393, 62.383, + (23,63): 63.383, + (24,0): 83.337, 20.227, 12.867, 10.577, 9.81698, 9.71698, 9.96698, + (24,7): 10.427, 11.012, 11.692, 12.432, 13.212, 14.032, 14.882, 15.752, + (24,15): 16.632, 17.5337, 18.4437, 19.3637, 20.2937, 21.2337, 22.1737, + (24,22): 23.1237, 24.0737, 25.0288, 25.9888, 26.9488, 27.9188, 28.8788, + (24,29): 29.8488, 30.8288, 31.7988, 32.774, 33.754, 34.724, 35.704, + (24,36): 36.684, 37.674, 38.654, 39.634, 40.6203, 41.6003, 42.5903, + (24,43): 43.5803, 44.5603, 45.5503, 46.5403, 47.5303, 48.5176, 49.5076, + (24,50): 50.4976, 51.4876, 52.4776, 53.4676, 54.4576, 55.4476, 56.444, + (24,57): 57.434, 58.424, 59.424, 60.414, 61.404, 62.404, 63.394, + (25,0): 86.667, 20.997, 13.307, 10.877, 10.047, 9.90698, 10.127, + (25,7): 10.557, 11.132, 11.792, 12.522, 13.302, 14.112, 14.952, 15.822, + (25,15): 16.702, 17.5937, 18.5037, 19.4237, 20.3437, 21.2837, 22.2237, + (25,22): 23.1637, 24.1137, 25.0688, 26.0288, 26.9888, 27.9488, 28.9188, + (25,29): 29.8888, 30.8588, 31.8288, 32.804, 33.784, 34.754, 35.734, + (25,36): 36.714, 37.694, 38.674, 39.664, 40.6403, 41.6303, 42.6103, + (25,43): 43.6003, 44.5903, 45.5703, 46.5603, 47.5503, 48.5376, 49.5276, + (25,50): 50.5176, 51.5076, 52.4976, 53.4876, 54.4776, 55.4676, 56.464, + (25,57): 57.454, 58.444, 59.434, 60.434, 61.424, 62.414, 63.414, + (26,0): 89.997, 21.767, 13.737, 11.177, 10.277, 10.097, 10.287, 10.697, + (26,8): 11.252, 11.902, 12.622, 13.392, 14.192, 15.032, 15.892, 16.762, + (26,16): 17.6537, 18.5637, 19.4737, 20.4037, 21.3337, 22.2637, 23.2137, + (26,23): 24.1637, 25.1088, 26.0688, 27.0288, 27.9888, 28.9588, 29.9188, + (26,30): 30.8888, 31.8588, 32.834, 33.814, 34.784, 35.764, 36.744, + (26,37): 37.724, 38.704, 39.684, 40.6703, 41.6503, 42.6403, 43.6203, + (26,44): 44.6103, 45.6003, 46.5803, 47.5703, 48.5576, 49.5476, 50.5376, + (26,51): 51.5276, 52.5176, 53.5076, 54.4976, 55.4876, 56.484, 57.474, + (26,58): 58.464, 59.454, 60.444, 61.444, 62.434, 63.424, + (27,0): 93.337, 22.537, 14.177, 11.487, 10.507, 10.287, 10.447, 10.837, + (27,8): 11.372, 12.012, 12.722, 13.482, 14.272, 15.102, 15.962, 16.832, + (27,16): 17.7137, 18.6137, 19.5337, 20.4537, 21.3837, 22.3137, 23.2537, + (27,23): 24.2037, 25.1488, 26.1088, 27.0688, 28.0288, 28.9888, 29.9588, + (27,30): 30.9288, 31.8988, 32.864, 33.844, 34.814, 35.794, 36.774, + (27,37): 37.754, 38.734, 39.714, 40.6903, 41.6803, 42.6603, 43.6503, + (27,44): 44.6303, 45.6203, 46.6003, 47.5903, 48.5776, 49.5676, 50.5576, + (27,51): 51.5476, 52.5376, 53.5276, 54.5176, 55.5076, 56.494, 57.484, + (27,58): 58.484, 59.474, 60.464, 61.454, 62.454, 63.444, + (28,0): 96.6617, 23.3117, 14.6117, 11.7917, 10.7417, 10.4717, 10.6017, + (28,7): 10.9717, 11.494, 12.114, 12.814, 13.564, 14.354, 15.184, + (28,14): 16.024, 16.894, 17.7791, 18.6791, 19.5891, 20.4991, 21.4291, + (28,21): 22.3591, 23.2991, 24.2491, 25.1934, 26.1434, 27.1034, 28.0634, + (28,28): 29.0234, 29.9934, 30.9534, 31.9234, 32.8978, 33.8678, 34.8478, + (28,35): 35.8178, 36.7978, 37.7778, 38.7578, 39.7378, 40.7196, 41.6996, + (28,42): 42.6896, 43.6696, 44.6596, 45.6396, 46.6296, 47.6096, 48.6004, + (28,49): 49.5904, 50.5804, 51.5604, 52.5504, 53.5404, 54.5304, 55.5204, + (28,56): 56.5151, 57.5051, 58.4951, 59.4851, 60.4851, 61.4751, 62.4651, + (28,63): 63.4551, + (29,0): 100.002, 24.0817, 15.0417, 12.0917, 10.9817, 10.6617, 10.7617, + (29,7): 11.1117, 11.614, 12.224, 12.914, 13.654, 14.444, 15.254, + (29,14): 16.094, 16.964, 17.8391, 18.7291, 19.6391, 20.5591, 21.4791, + (29,21): 22.4091, 23.3491, 24.2891, 25.2334, 26.1834, 27.1434, 28.1034, + (29,28): 29.0634, 30.0234, 30.9934, 31.9634, 32.9278, 33.8978, 34.8778, + (29,35): 35.8478, 36.8278, 37.8078, 38.7878, 39.7678, 40.7396, 41.7296, + (29,42): 42.7096, 43.6896, 44.6796, 45.6596, 46.6496, 47.6296, 48.6204, + (29,49): 49.6104, 50.6004, 51.5804, 52.5704, 53.5604, 54.5504, 55.5404, + (29,56): 56.5351, 57.5251, 58.5151, 59.5051, 60.4951, 61.4851, 62.4851, + (29,63): 63.4751, + (30,0): 103.332, 24.8417, 15.4817, 12.3917, 11.2117, 10.8517, 10.9217, + (30,7): 11.2417, 11.734, 12.334, 13.014, 13.744, 14.524, 15.334, + (30,14): 16.164, 17.024, 17.8991, 18.7891, 19.6891, 20.6091, 21.5291, + (30,21): 22.4591, 23.3891, 24.3291, 25.2734, 26.2234, 27.1834, 28.1334, + (30,28): 29.0934, 30.0534, 31.0234, 31.9934, 32.9578, 33.9278, 34.9078, + (30,35): 35.8778, 36.8578, 37.8278, 38.8078, 39.7878, 40.7696, 41.7496, + (30,42): 42.7296, 43.7196, 44.6996, 45.6796, 46.6696, 47.6596, 48.6404, + (30,49): 49.6304, 50.6204, 51.6004, 52.5904, 53.5804, 54.5704, 55.5604, + (30,56): 56.5551, 57.5451, 58.5351, 59.5251, 60.5151, 61.5051, 62.4951, + (30,63): 63.4851, + (31,0): 106.662, 25.6117, 15.9117, 12.7017, 11.4417, 11.0417, 11.0817, + (31,7): 11.3817, 11.854, 12.444, 13.104, 13.834, 14.604, 15.404, + (31,14): 16.234, 17.094, 17.9591, 18.8491, 19.7491, 20.6591, 21.5791, + (31,21): 22.4991, 23.4391, 24.3691, 25.3134, 26.2634, 27.2134, 28.1734, + (31,28): 29.1334, 30.0934, 31.0534, 32.0234, 32.9878, 33.9578, 34.9378, + (31,35): 35.9078, 36.8778, 37.8578, 38.8378, 39.8178, 40.7896, 41.7796, + (31,42): 42.7596, 43.7396, 44.7196, 45.7096, 46.6896, 47.6796, 48.6604, + (31,49): 49.6504, 50.6404, 51.6204, 52.6104, 53.6004, 54.5904, 55.5804, + (31,56): 56.5651, 57.5551, 58.5451, 59.5351, 60.5351, 61.5251, 62.5151, + (31,63): 63.5051 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_sofloat.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_sofloat.tst new file mode 100644 index 0000000000..54850c90de --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_sofloat.tst @@ -0,0 +1,5 @@ +Maximum value in write buffer is: 106.666667 +Minimum value in write buffer is: 1.769231 +Filter type is: H5Z_FILTER_SCALEOFFSET +Maximum value in DS1 is: 106.661698 +Minimum value in DS1 is: 1.769231 diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_soint.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_soint.ddl new file mode 100644 index 0000000000..f81418b5a3 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_soint.ddl @@ -0,0 +1,191 @@ +HDF5 "h5ex_d_soint.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 32, 64 ) / ( 32, 64 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, + (0,15): -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, + (0,27): -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, + (0,39): -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, + (0,51): -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61, -62, + (0,63): -63, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,63): 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + (2,18): 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + (2,34): 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + (2,50): 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + (3,0): 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, + (3,17): 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, + (3,33): 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, + (3,49): 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, + (3,62): 124, 126, + (4,0): 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, + (4,17): 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, + (4,33): 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, + (4,46): 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168, 171, + (4,58): 174, 177, 180, 183, 186, 189, + (5,0): 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, + (5,17): 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, + (5,31): 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, + (5,43): 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, + (5,55): 220, 224, 228, 232, 236, 240, 244, 248, 252, + (6,0): 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + (6,16): 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, + (6,29): 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, + (6,41): 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, + (6,53): 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, + (7,0): 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, + (7,16): 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, + (7,29): 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, + (7,41): 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, + (7,53): 318, 324, 330, 336, 342, 348, 354, 360, 366, 372, 378, + (8,0): 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, + (8,16): 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, + (8,28): 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, + (8,40): 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, + (8,52): 364, 371, 378, 385, 392, 399, 406, 413, 420, 427, 434, 441, + (9,0): 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, + (9,16): 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, + (9,28): 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, + (9,40): 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, + (9,52): 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, + (10,0): 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126, + (10,15): 135, 144, 153, 162, 171, 180, 189, 198, 207, 216, 225, 234, + (10,27): 243, 252, 261, 270, 279, 288, 297, 306, 315, 324, 333, 342, + (10,39): 351, 360, 369, 378, 387, 396, 405, 414, 423, 432, 441, 450, + (10,51): 459, 468, 477, 486, 495, 504, 513, 522, 531, 540, 549, 558, + (10,63): 567, + (11,0): 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, + (11,15): 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, + (11,27): 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, + (11,39): 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, + (11,51): 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, + (11,63): 630, + (12,0): 0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, + (12,15): 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, + (12,27): 297, 308, 319, 330, 341, 352, 363, 374, 385, 396, 407, 418, + (12,39): 429, 440, 451, 462, 473, 484, 495, 506, 517, 528, 539, 550, + (12,51): 561, 572, 583, 594, 605, 616, 627, 638, 649, 660, 671, 682, + (12,63): 693, + (13,0): 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, + (13,14): 168, 180, 192, 204, 216, 228, 240, 252, 264, 276, 288, 300, + (13,26): 312, 324, 336, 348, 360, 372, 384, 396, 408, 420, 432, 444, + (13,38): 456, 468, 480, 492, 504, 516, 528, 540, 552, 564, 576, 588, + (13,50): 600, 612, 624, 636, 648, 660, 672, 684, 696, 708, 720, 732, + (13,62): 744, 756, + (14,0): 0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 156, 169, + (14,14): 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, + (14,26): 338, 351, 364, 377, 390, 403, 416, 429, 442, 455, 468, 481, + (14,38): 494, 507, 520, 533, 546, 559, 572, 585, 598, 611, 624, 637, + (14,50): 650, 663, 676, 689, 702, 715, 728, 741, 754, 767, 780, 793, + (14,62): 806, 819, + (15,0): 0, 14, 28, 42, 56, 70, 84, 98, 112, 126, 140, 154, 168, 182, + (15,14): 196, 210, 224, 238, 252, 266, 280, 294, 308, 322, 336, 350, + (15,26): 364, 378, 392, 406, 420, 434, 448, 462, 476, 490, 504, 518, + (15,38): 532, 546, 560, 574, 588, 602, 616, 630, 644, 658, 672, 686, + (15,50): 700, 714, 728, 742, 756, 770, 784, 798, 812, 826, 840, 854, + (15,62): 868, 882, + (16,0): 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, + (16,14): 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, + (16,26): 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, + (16,38): 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, + (16,50): 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, + (16,62): 930, 945, + (17,0): 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, + (17,14): 224, 240, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, + (17,26): 416, 432, 448, 464, 480, 496, 512, 528, 544, 560, 576, 592, + (17,38): 608, 624, 640, 656, 672, 688, 704, 720, 736, 752, 768, 784, + (17,50): 800, 816, 832, 848, 864, 880, 896, 912, 928, 944, 960, 976, + (17,62): 992, 1008, + (18,0): 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, + (18,14): 238, 255, 272, 289, 306, 323, 340, 357, 374, 391, 408, 425, + (18,26): 442, 459, 476, 493, 510, 527, 544, 561, 578, 595, 612, 629, + (18,38): 646, 663, 680, 697, 714, 731, 748, 765, 782, 799, 816, 833, + (18,50): 850, 867, 884, 901, 918, 935, 952, 969, 986, 1003, 1020, 1037, + (18,62): 1054, 1071, + (19,0): 0, 18, 36, 54, 72, 90, 108, 126, 144, 162, 180, 198, 216, 234, + (19,14): 252, 270, 288, 306, 324, 342, 360, 378, 396, 414, 432, 450, + (19,26): 468, 486, 504, 522, 540, 558, 576, 594, 612, 630, 648, 666, + (19,38): 684, 702, 720, 738, 756, 774, 792, 810, 828, 846, 864, 882, + (19,50): 900, 918, 936, 954, 972, 990, 1008, 1026, 1044, 1062, 1080, + (19,61): 1098, 1116, 1134, + (20,0): 0, 19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247, + (20,14): 266, 285, 304, 323, 342, 361, 380, 399, 418, 437, 456, 475, + (20,26): 494, 513, 532, 551, 570, 589, 608, 627, 646, 665, 684, 703, + (20,38): 722, 741, 760, 779, 798, 817, 836, 855, 874, 893, 912, 931, + (20,50): 950, 969, 988, 1007, 1026, 1045, 1064, 1083, 1102, 1121, 1140, + (20,61): 1159, 1178, 1197, + (21,0): 0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, + (21,14): 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, + (21,26): 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, + (21,38): 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 980, + (21,50): 1000, 1020, 1040, 1060, 1080, 1100, 1120, 1140, 1160, 1180, + (21,60): 1200, 1220, 1240, 1260, + (22,0): 0, 21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, + (22,14): 294, 315, 336, 357, 378, 399, 420, 441, 462, 483, 504, 525, + (22,26): 546, 567, 588, 609, 630, 651, 672, 693, 714, 735, 756, 777, + (22,38): 798, 819, 840, 861, 882, 903, 924, 945, 966, 987, 1008, 1029, + (22,50): 1050, 1071, 1092, 1113, 1134, 1155, 1176, 1197, 1218, 1239, + (22,60): 1260, 1281, 1302, 1323, + (23,0): 0, 22, 44, 66, 88, 110, 132, 154, 176, 198, 220, 242, 264, 286, + (23,14): 308, 330, 352, 374, 396, 418, 440, 462, 484, 506, 528, 550, + (23,26): 572, 594, 616, 638, 660, 682, 704, 726, 748, 770, 792, 814, + (23,38): 836, 858, 880, 902, 924, 946, 968, 990, 1012, 1034, 1056, + (23,49): 1078, 1100, 1122, 1144, 1166, 1188, 1210, 1232, 1254, 1276, + (23,59): 1298, 1320, 1342, 1364, 1386, + (24,0): 0, 23, 46, 69, 92, 115, 138, 161, 184, 207, 230, 253, 276, 299, + (24,14): 322, 345, 368, 391, 414, 437, 460, 483, 506, 529, 552, 575, + (24,26): 598, 621, 644, 667, 690, 713, 736, 759, 782, 805, 828, 851, + (24,38): 874, 897, 920, 943, 966, 989, 1012, 1035, 1058, 1081, 1104, + (24,49): 1127, 1150, 1173, 1196, 1219, 1242, 1265, 1288, 1311, 1334, + (24,59): 1357, 1380, 1403, 1426, 1449, + (25,0): 0, 24, 48, 72, 96, 120, 144, 168, 192, 216, 240, 264, 288, 312, + (25,14): 336, 360, 384, 408, 432, 456, 480, 504, 528, 552, 576, 600, + (25,26): 624, 648, 672, 696, 720, 744, 768, 792, 816, 840, 864, 888, + (25,38): 912, 936, 960, 984, 1008, 1032, 1056, 1080, 1104, 1128, 1152, + (25,49): 1176, 1200, 1224, 1248, 1272, 1296, 1320, 1344, 1368, 1392, + (25,59): 1416, 1440, 1464, 1488, 1512, + (26,0): 0, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, + (26,13): 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, + (26,25): 625, 650, 675, 700, 725, 750, 775, 800, 825, 850, 875, 900, + (26,37): 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175, + (26,48): 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 1425, + (26,58): 1450, 1475, 1500, 1525, 1550, 1575, + (27,0): 0, 26, 52, 78, 104, 130, 156, 182, 208, 234, 260, 286, 312, + (27,13): 338, 364, 390, 416, 442, 468, 494, 520, 546, 572, 598, 624, + (27,25): 650, 676, 702, 728, 754, 780, 806, 832, 858, 884, 910, 936, + (27,37): 962, 988, 1014, 1040, 1066, 1092, 1118, 1144, 1170, 1196, + (27,47): 1222, 1248, 1274, 1300, 1326, 1352, 1378, 1404, 1430, 1456, + (27,57): 1482, 1508, 1534, 1560, 1586, 1612, 1638, + (28,0): 0, 27, 54, 81, 108, 135, 162, 189, 216, 243, 270, 297, 324, + (28,13): 351, 378, 405, 432, 459, 486, 513, 540, 567, 594, 621, 648, + (28,25): 675, 702, 729, 756, 783, 810, 837, 864, 891, 918, 945, 972, + (28,37): 999, 1026, 1053, 1080, 1107, 1134, 1161, 1188, 1215, 1242, + (28,47): 1269, 1296, 1323, 1350, 1377, 1404, 1431, 1458, 1485, 1512, + (28,57): 1539, 1566, 1593, 1620, 1647, 1674, 1701, + (29,0): 0, 28, 56, 84, 112, 140, 168, 196, 224, 252, 280, 308, 336, + (29,13): 364, 392, 420, 448, 476, 504, 532, 560, 588, 616, 644, 672, + (29,25): 700, 728, 756, 784, 812, 840, 868, 896, 924, 952, 980, 1008, + (29,37): 1036, 1064, 1092, 1120, 1148, 1176, 1204, 1232, 1260, 1288, + (29,47): 1316, 1344, 1372, 1400, 1428, 1456, 1484, 1512, 1540, 1568, + (29,57): 1596, 1624, 1652, 1680, 1708, 1736, 1764, + (30,0): 0, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, + (30,13): 377, 406, 435, 464, 493, 522, 551, 580, 609, 638, 667, 696, + (30,25): 725, 754, 783, 812, 841, 870, 899, 928, 957, 986, 1015, 1044, + (30,37): 1073, 1102, 1131, 1160, 1189, 1218, 1247, 1276, 1305, 1334, + (30,47): 1363, 1392, 1421, 1450, 1479, 1508, 1537, 1566, 1595, 1624, + (30,57): 1653, 1682, 1711, 1740, 1769, 1798, 1827, + (31,0): 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360, + (31,13): 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690, 720, + (31,25): 750, 780, 810, 840, 870, 900, 930, 960, 990, 1020, 1050, 1080, + (31,37): 1110, 1140, 1170, 1200, 1230, 1260, 1290, 1320, 1350, 1380, + (31,47): 1410, 1440, 1470, 1500, 1530, 1560, 1590, 1620, 1650, 1680, + (31,57): 1710, 1740, 1770, 1800, 1830, 1860, 1890 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_soint.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_soint.tst new file mode 100644 index 0000000000..34fad6a658 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_soint.tst @@ -0,0 +1,2 @@ +Filter type is: H5Z_FILTER_SCALEOFFSET +Maximum value in DS1 is: 1890 diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_szip.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_szip.ddl new file mode 100644 index 0000000000..7573de2cef --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_szip.ddl @@ -0,0 +1,191 @@ +HDF5 "h5ex_d_szip.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 32, 64 ) / ( 32, 64 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, + (0,15): -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, + (0,27): -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, + (0,39): -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, + (0,51): -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61, -62, + (0,63): -63, + (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + (1,63): 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + (2,18): 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + (2,34): 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + (2,50): 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + (3,0): 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, + (3,17): 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, + (3,33): 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, + (3,49): 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, + (3,62): 124, 126, + (4,0): 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, + (4,17): 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, + (4,33): 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, + (4,46): 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168, 171, + (4,58): 174, 177, 180, 183, 186, 189, + (5,0): 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, + (5,17): 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, + (5,31): 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, + (5,43): 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, + (5,55): 220, 224, 228, 232, 236, 240, 244, 248, 252, + (6,0): 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, + (6,16): 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, + (6,29): 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, + (6,41): 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, + (6,53): 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, + (7,0): 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, + (7,16): 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, + (7,29): 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, + (7,41): 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, + (7,53): 318, 324, 330, 336, 342, 348, 354, 360, 366, 372, 378, + (8,0): 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, + (8,16): 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, + (8,28): 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, + (8,40): 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, + (8,52): 364, 371, 378, 385, 392, 399, 406, 413, 420, 427, 434, 441, + (9,0): 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, + (9,16): 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, + (9,28): 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, + (9,40): 320, 328, 336, 344, 352, 360, 368, 376, 384, 392, 400, 408, + (9,52): 416, 424, 432, 440, 448, 456, 464, 472, 480, 488, 496, 504, + (10,0): 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126, + (10,15): 135, 144, 153, 162, 171, 180, 189, 198, 207, 216, 225, 234, + (10,27): 243, 252, 261, 270, 279, 288, 297, 306, 315, 324, 333, 342, + (10,39): 351, 360, 369, 378, 387, 396, 405, 414, 423, 432, 441, 450, + (10,51): 459, 468, 477, 486, 495, 504, 513, 522, 531, 540, 549, 558, + (10,63): 567, + (11,0): 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, + (11,15): 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, + (11,27): 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, + (11,39): 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, + (11,51): 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, + (11,63): 630, + (12,0): 0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, + (12,15): 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, + (12,27): 297, 308, 319, 330, 341, 352, 363, 374, 385, 396, 407, 418, + (12,39): 429, 440, 451, 462, 473, 484, 495, 506, 517, 528, 539, 550, + (12,51): 561, 572, 583, 594, 605, 616, 627, 638, 649, 660, 671, 682, + (12,63): 693, + (13,0): 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, + (13,14): 168, 180, 192, 204, 216, 228, 240, 252, 264, 276, 288, 300, + (13,26): 312, 324, 336, 348, 360, 372, 384, 396, 408, 420, 432, 444, + (13,38): 456, 468, 480, 492, 504, 516, 528, 540, 552, 564, 576, 588, + (13,50): 600, 612, 624, 636, 648, 660, 672, 684, 696, 708, 720, 732, + (13,62): 744, 756, + (14,0): 0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 156, 169, + (14,14): 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, + (14,26): 338, 351, 364, 377, 390, 403, 416, 429, 442, 455, 468, 481, + (14,38): 494, 507, 520, 533, 546, 559, 572, 585, 598, 611, 624, 637, + (14,50): 650, 663, 676, 689, 702, 715, 728, 741, 754, 767, 780, 793, + (14,62): 806, 819, + (15,0): 0, 14, 28, 42, 56, 70, 84, 98, 112, 126, 140, 154, 168, 182, + (15,14): 196, 210, 224, 238, 252, 266, 280, 294, 308, 322, 336, 350, + (15,26): 364, 378, 392, 406, 420, 434, 448, 462, 476, 490, 504, 518, + (15,38): 532, 546, 560, 574, 588, 602, 616, 630, 644, 658, 672, 686, + (15,50): 700, 714, 728, 742, 756, 770, 784, 798, 812, 826, 840, 854, + (15,62): 868, 882, + (16,0): 0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 195, + (16,14): 210, 225, 240, 255, 270, 285, 300, 315, 330, 345, 360, 375, + (16,26): 390, 405, 420, 435, 450, 465, 480, 495, 510, 525, 540, 555, + (16,38): 570, 585, 600, 615, 630, 645, 660, 675, 690, 705, 720, 735, + (16,50): 750, 765, 780, 795, 810, 825, 840, 855, 870, 885, 900, 915, + (16,62): 930, 945, + (17,0): 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, + (17,14): 224, 240, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, + (17,26): 416, 432, 448, 464, 480, 496, 512, 528, 544, 560, 576, 592, + (17,38): 608, 624, 640, 656, 672, 688, 704, 720, 736, 752, 768, 784, + (17,50): 800, 816, 832, 848, 864, 880, 896, 912, 928, 944, 960, 976, + (17,62): 992, 1008, + (18,0): 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, + (18,14): 238, 255, 272, 289, 306, 323, 340, 357, 374, 391, 408, 425, + (18,26): 442, 459, 476, 493, 510, 527, 544, 561, 578, 595, 612, 629, + (18,38): 646, 663, 680, 697, 714, 731, 748, 765, 782, 799, 816, 833, + (18,50): 850, 867, 884, 901, 918, 935, 952, 969, 986, 1003, 1020, 1037, + (18,62): 1054, 1071, + (19,0): 0, 18, 36, 54, 72, 90, 108, 126, 144, 162, 180, 198, 216, 234, + (19,14): 252, 270, 288, 306, 324, 342, 360, 378, 396, 414, 432, 450, + (19,26): 468, 486, 504, 522, 540, 558, 576, 594, 612, 630, 648, 666, + (19,38): 684, 702, 720, 738, 756, 774, 792, 810, 828, 846, 864, 882, + (19,50): 900, 918, 936, 954, 972, 990, 1008, 1026, 1044, 1062, 1080, + (19,61): 1098, 1116, 1134, + (20,0): 0, 19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247, + (20,14): 266, 285, 304, 323, 342, 361, 380, 399, 418, 437, 456, 475, + (20,26): 494, 513, 532, 551, 570, 589, 608, 627, 646, 665, 684, 703, + (20,38): 722, 741, 760, 779, 798, 817, 836, 855, 874, 893, 912, 931, + (20,50): 950, 969, 988, 1007, 1026, 1045, 1064, 1083, 1102, 1121, 1140, + (20,61): 1159, 1178, 1197, + (21,0): 0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, + (21,14): 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, + (21,26): 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, + (21,38): 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 980, + (21,50): 1000, 1020, 1040, 1060, 1080, 1100, 1120, 1140, 1160, 1180, + (21,60): 1200, 1220, 1240, 1260, + (22,0): 0, 21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, + (22,14): 294, 315, 336, 357, 378, 399, 420, 441, 462, 483, 504, 525, + (22,26): 546, 567, 588, 609, 630, 651, 672, 693, 714, 735, 756, 777, + (22,38): 798, 819, 840, 861, 882, 903, 924, 945, 966, 987, 1008, 1029, + (22,50): 1050, 1071, 1092, 1113, 1134, 1155, 1176, 1197, 1218, 1239, + (22,60): 1260, 1281, 1302, 1323, + (23,0): 0, 22, 44, 66, 88, 110, 132, 154, 176, 198, 220, 242, 264, 286, + (23,14): 308, 330, 352, 374, 396, 418, 440, 462, 484, 506, 528, 550, + (23,26): 572, 594, 616, 638, 660, 682, 704, 726, 748, 770, 792, 814, + (23,38): 836, 858, 880, 902, 924, 946, 968, 990, 1012, 1034, 1056, + (23,49): 1078, 1100, 1122, 1144, 1166, 1188, 1210, 1232, 1254, 1276, + (23,59): 1298, 1320, 1342, 1364, 1386, + (24,0): 0, 23, 46, 69, 92, 115, 138, 161, 184, 207, 230, 253, 276, 299, + (24,14): 322, 345, 368, 391, 414, 437, 460, 483, 506, 529, 552, 575, + (24,26): 598, 621, 644, 667, 690, 713, 736, 759, 782, 805, 828, 851, + (24,38): 874, 897, 920, 943, 966, 989, 1012, 1035, 1058, 1081, 1104, + (24,49): 1127, 1150, 1173, 1196, 1219, 1242, 1265, 1288, 1311, 1334, + (24,59): 1357, 1380, 1403, 1426, 1449, + (25,0): 0, 24, 48, 72, 96, 120, 144, 168, 192, 216, 240, 264, 288, 312, + (25,14): 336, 360, 384, 408, 432, 456, 480, 504, 528, 552, 576, 600, + (25,26): 624, 648, 672, 696, 720, 744, 768, 792, 816, 840, 864, 888, + (25,38): 912, 936, 960, 984, 1008, 1032, 1056, 1080, 1104, 1128, 1152, + (25,49): 1176, 1200, 1224, 1248, 1272, 1296, 1320, 1344, 1368, 1392, + (25,59): 1416, 1440, 1464, 1488, 1512, + (26,0): 0, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, + (26,13): 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, + (26,25): 625, 650, 675, 700, 725, 750, 775, 800, 825, 850, 875, 900, + (26,37): 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175, + (26,48): 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 1425, + (26,58): 1450, 1475, 1500, 1525, 1550, 1575, + (27,0): 0, 26, 52, 78, 104, 130, 156, 182, 208, 234, 260, 286, 312, + (27,13): 338, 364, 390, 416, 442, 468, 494, 520, 546, 572, 598, 624, + (27,25): 650, 676, 702, 728, 754, 780, 806, 832, 858, 884, 910, 936, + (27,37): 962, 988, 1014, 1040, 1066, 1092, 1118, 1144, 1170, 1196, + (27,47): 1222, 1248, 1274, 1300, 1326, 1352, 1378, 1404, 1430, 1456, + (27,57): 1482, 1508, 1534, 1560, 1586, 1612, 1638, + (28,0): 0, 27, 54, 81, 108, 135, 162, 189, 216, 243, 270, 297, 324, + (28,13): 351, 378, 405, 432, 459, 486, 513, 540, 567, 594, 621, 648, + (28,25): 675, 702, 729, 756, 783, 810, 837, 864, 891, 918, 945, 972, + (28,37): 999, 1026, 1053, 1080, 1107, 1134, 1161, 1188, 1215, 1242, + (28,47): 1269, 1296, 1323, 1350, 1377, 1404, 1431, 1458, 1485, 1512, + (28,57): 1539, 1566, 1593, 1620, 1647, 1674, 1701, + (29,0): 0, 28, 56, 84, 112, 140, 168, 196, 224, 252, 280, 308, 336, + (29,13): 364, 392, 420, 448, 476, 504, 532, 560, 588, 616, 644, 672, + (29,25): 700, 728, 756, 784, 812, 840, 868, 896, 924, 952, 980, 1008, + (29,37): 1036, 1064, 1092, 1120, 1148, 1176, 1204, 1232, 1260, 1288, + (29,47): 1316, 1344, 1372, 1400, 1428, 1456, 1484, 1512, 1540, 1568, + (29,57): 1596, 1624, 1652, 1680, 1708, 1736, 1764, + (30,0): 0, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, + (30,13): 377, 406, 435, 464, 493, 522, 551, 580, 609, 638, 667, 696, + (30,25): 725, 754, 783, 812, 841, 870, 899, 928, 957, 986, 1015, 1044, + (30,37): 1073, 1102, 1131, 1160, 1189, 1218, 1247, 1276, 1305, 1334, + (30,47): 1363, 1392, 1421, 1450, 1479, 1508, 1537, 1566, 1595, 1624, + (30,57): 1653, 1682, 1711, 1740, 1769, 1798, 1827, + (31,0): 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360, + (31,13): 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690, 720, + (31,25): 750, 780, 810, 840, 870, 900, 930, 960, 990, 1020, 1050, 1080, + (31,37): 1110, 1140, 1170, 1200, 1230, 1260, 1290, 1320, 1350, 1380, + (31,47): 1410, 1440, 1470, 1500, 1530, 1560, 1590, 1620, 1650, 1680, + (31,57): 1710, 1740, 1770, 1800, 1830, 1860, 1890 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_szip.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_szip.tst new file mode 100644 index 0000000000..528d92f0e6 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_szip.tst @@ -0,0 +1,2 @@ +Filter type is: H5Z_FILTER_SZIP +Maximum value in DS1 is: 1890 diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_transform.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_transform.ddl new file mode 100644 index 0000000000..054c2b3372 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_transform.ddl @@ -0,0 +1,6 @@ +HDF5 "h5ex_d_transform.h5" { +FILE_CONTENTS { + group / + dataset /DS1 + } +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_transform.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_transform.tst new file mode 100644 index 0000000000..3d4669bb33 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_transform.tst @@ -0,0 +1,17 @@ +Original Data: + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] + +Data as written with transform "x+1": + [ 1 0 -1 -2 -3 -4 -5] + [ 1 1 1 1 1 1 1] + [ 1 2 3 4 5 6 7] + [ 1 3 5 7 9 11 13] + +Data as written with transform "x+1" and read with transform "x-1": + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimadd.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimadd.ddl new file mode 100644 index 0000000000..db903269b6 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimadd.ddl @@ -0,0 +1,16 @@ +HDF5 "h5ex_d_unlimadd.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 6, 10 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, 7, 8, 9, + (1,0): 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, + (2,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + (3,0): 0, 2, 4, 6, 8, 10, 12, 7, 8, 9, + (4,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + (5,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimadd.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimadd.tst new file mode 100644 index 0000000000..0279cf2837 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimadd.tst @@ -0,0 +1,13 @@ +Dataset before extension: + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] + +Dataset after extension: + [ 0 -1 -2 -3 -4 -5 -6 7 8 9] + [ 0 0 0 0 0 0 0 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] + [ 0 2 4 6 8 10 12 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimgzip.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimgzip.ddl new file mode 100644 index 0000000000..27b037f5c0 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimgzip.ddl @@ -0,0 +1,16 @@ +HDF5 "h5ex_d_unlimgzip.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 6, 10 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, 7, 8, 9, + (1,0): 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, + (2,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + (3,0): 0, 2, 4, 6, 8, 10, 12, 7, 8, 9, + (4,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + (5,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimgzip.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimgzip.tst new file mode 100644 index 0000000000..b5c4087bf2 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimgzip.tst @@ -0,0 +1,14 @@ +Dataset before extension: + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] + +Filter type is: H5Z_FILTER_DEFLATE +Dataset after extension: + [ 0 -1 -2 -3 -4 -5 -6 7 8 9] + [ 0 0 0 0 0 0 0 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] + [ 0 2 4 6 8 10 12 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimmod.ddl b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimmod.ddl new file mode 100644 index 0000000000..dc4284cf80 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimmod.ddl @@ -0,0 +1,16 @@ +HDF5 "h5ex_d_unlimmod.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 6, 10 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) } + DATA { + (0,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + (1,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + (2,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + (3,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + (4,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + (5,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 + } + } +} +} diff --git a/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimmod.tst b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimmod.tst new file mode 100644 index 0000000000..26a2d0d242 --- /dev/null +++ b/examples/hdfgroup/H5D/testfiles/h5ex_d_unlimmod.tst @@ -0,0 +1,13 @@ +Dataset before extension: + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] + +Dataset after extension: + [ 0 1 2 3 4 5 6 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] + [ 0 1 2 3 4 5 6 7 8 9] diff --git a/examples/hdfgroup/H5G/CMakeLists.txt b/examples/hdfgroup/H5G/CMakeLists.txt new file mode 100644 index 0000000000..b44a7618ed --- /dev/null +++ b/examples/hdfgroup/H5G/CMakeLists.txt @@ -0,0 +1,28 @@ + +add_executable(h5ex_g_compact h5ex_g_compact.cpp) +target_link_libraries(h5ex_g_compact h5cpp) + +add_executable(h5ex_g_corder h5ex_g_corder.cpp) +target_link_libraries(h5ex_g_corder h5cpp) + +add_executable(h5ex_g_create h5ex_g_create.cpp) +target_link_libraries(h5ex_g_create h5cpp) + +add_executable(h5ex_g_intermediate h5ex_g_intermediate.cpp) +target_link_libraries(h5ex_g_intermediate h5cpp) + +add_executable(h5ex_g_phase h5ex_g_phase.cpp) +target_link_libraries(h5ex_g_phase h5cpp) + +configure_file(h5ex_g_iterate.h5 h5ex_g_iterate.h5 COPYONLY) +configure_file(h5ex_g_traverse.h5 h5ex_g_traverse.h5 COPYONLY) +configure_file(h5ex_g_visit.h5 h5ex_g_visit.h5 COPYONLY) + +add_executable(h5ex_g_iterate h5ex_g_iterate.cpp) +target_link_libraries(h5ex_g_iterate h5cpp) + +add_executable(h5ex_g_traverse h5ex_g_traverse.cpp) +target_link_libraries(h5ex_g_traverse h5cpp) + +add_executable(h5ex_g_visit h5ex_g_visit.cpp) +target_link_libraries(h5ex_g_visit h5cpp) \ No newline at end of file diff --git a/examples/hdfgroup/H5G/C_sourcefiles.cmake b/examples/hdfgroup/H5G/C_sourcefiles.cmake new file mode 100644 index 0000000000..6df13a38f9 --- /dev/null +++ b/examples/hdfgroup/H5G/C_sourcefiles.cmake @@ -0,0 +1,13 @@ +#----------------------------------------------------------------------------- +# Define Sources, one file per application +#----------------------------------------------------------------------------- +set (examples + h5ex_g_compact.c + h5ex_g_corder.c + h5ex_g_create.c + h5ex_g_phase.c + h5ex_g_iterate.c + h5ex_g_traverse.c + h5ex_g_intermediate.c + h5ex_g_visit.c +) diff --git a/examples/hdfgroup/H5G/h5ex_g_compact.c b/examples/hdfgroup/H5G/h5ex_g_compact.c new file mode 100644 index 0000000000..421a605379 --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_compact.c @@ -0,0 +1,125 @@ +/************************************************************ + + This example shows how to create "compact-or-indexed" + format groups, new to 1.8. This example also illustrates + the space savings of compact groups by creating 2 files + which are identical except for the group format, and + displaying the file size of each. Both files have one + empty group in the root group. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include + +#define FILE1 "h5ex_g_compact1.h5" +#define FILE2 "h5ex_g_compact2.h5" +#define GROUP "G1" + +int +main (void) +{ + hid_t file, group, fapl; /* Handles */ + herr_t status; + H5G_info_t ginfo; + hsize_t size; + + /* + * Create file 1. This file will use original format groups. + */ + file = H5Fcreate (FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + group = H5Gcreate (file, GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Obtain the group info and print the group storage type. + */ + status = H5Gget_info (group, &ginfo); + printf ("Group storage type for %s is: ", FILE1); + switch (ginfo.storage_type) { + case H5G_STORAGE_TYPE_COMPACT: + printf ("H5G_STORAGE_TYPE_COMPACT\n"); /* New compact format */ + break; + case H5G_STORAGE_TYPE_DENSE: + printf ("H5G_STORAGE_TYPE_DENSE\n"); /* New dense (indexed) format */ + break; + case H5G_STORAGE_TYPE_SYMBOL_TABLE: + printf ("H5G_STORAGE_TYPE_SYMBOL_TABLE\n"); /* Original format */ + break; + case H5G_STORAGE_TYPE_UNKNOWN: + printf ("H5G_STORAGE_TYPE_UNKNOWN\n"); /* Unknown format */ + } + + /* + * Close and re-open file. Needed to get the correct file size. + */ + status = H5Gclose (group); + status = H5Fclose (file); + file = H5Fopen (FILE1, H5F_ACC_RDONLY, H5P_DEFAULT); + + /* + * Obtain and print the file size. + */ + status = H5Fget_filesize (file, &size); + printf ("File size for %s is: %d bytes\n\n", FILE1, (int)size); + + /* + * Close FILE1. + */ + status = H5Fclose (file); + + /* + * Set file access property list to allow the latest file format. + * This will allow the library to create new compact format groups. + */ + fapl = H5Pcreate (H5P_FILE_ACCESS); + status = H5Pset_libver_bounds (fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); + + /* + * Create file 2 using the new file access property list. + */ + file = H5Fcreate (FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ); + group = H5Gcreate (file, GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Obtain the group info and print the group storage type. + */ + status = H5Gget_info (group, &ginfo); + printf ("Group storage type for %s is: ", FILE2); + switch (ginfo.storage_type) { + case H5G_STORAGE_TYPE_COMPACT: + printf ("H5G_STORAGE_TYPE_COMPACT\n"); /* New compact format */ + break; + case H5G_STORAGE_TYPE_DENSE: + printf ("H5G_STORAGE_TYPE_DENSE\n"); /* New dense (indexed) format */ + break; + case H5G_STORAGE_TYPE_SYMBOL_TABLE: + printf ("H5G_STORAGE_TYPE_SYMBOL_TABLE\n"); /* Original format */ + break; + case H5G_STORAGE_TYPE_UNKNOWN: + printf ("H5G_STORAGE_TYPE_UNKNOWN\n"); /* Unknown format */ + } + + /* + * Close and re-open file. Needed to get the correct file size. + */ + status = H5Gclose (group); + status = H5Fclose (file); + file = H5Fopen (FILE2, H5F_ACC_RDONLY, fapl); + + /* + * Obtain and print the file size. + */ + status = H5Fget_filesize (file, &size); + printf ("File size for %s is: %d bytes\n", FILE2, (int)size); + printf ("\n"); + + /* + * Close and release resources. + */ + status = H5Pclose (fapl); + status = H5Fclose (file); + + return 0; +} diff --git a/examples/hdfgroup/H5G/h5ex_g_compact.cpp b/examples/hdfgroup/H5G/h5ex_g_compact.cpp new file mode 100644 index 0000000000..d3290f0873 --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_compact.cpp @@ -0,0 +1,79 @@ +/************************************************************ + + This example shows how to create "compact-or-indexed" + format groups, new to 1.8. This example also illustrates + the space savings of compact groups by creating 2 files + which are identical except for the group format, and + displaying the file size of each. Both files have one + empty group in the root group. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include + +#define FILE1 "h5ex_g_compact1.h5" +#define FILE2 "h5ex_g_compact2.h5" +#define GROUP "G1" + +using namespace hdf5; + +void create_default_file() +{ + // Create file 1. This file will use original format groups. + file::File file = file::create (FILE1, file::AccessFlags::TRUNCATE); + node::Group group (file.root(), GROUP); + + // Obtain the group info and print the group storage type. + node::GroupInfo info = group.info(); + std::cout<<"Group storage type for "< +#include + +#define FILE "h5ex_g_corder.h5" + +int +main (void) +{ + hid_t file, group, subgroup, gcpl; /* Handles */ + herr_t status; + H5G_info_t ginfo; + ssize_t size; /* Size of name */ + hsize_t i; /* Index */ + char *name; /* Output buffer */ + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create group creation property list and enable link creation + * order tracking. Attempting to track by creation order in a + * group that does not have this property set will result in an + * error. + */ + gcpl = H5Pcreate (H5P_GROUP_CREATE); + status = H5Pset_link_creation_order( gcpl, H5P_CRT_ORDER_TRACKED | + H5P_CRT_ORDER_INDEXED ); + + /* + * Create primary group using the property list. + */ + group = H5Gcreate (file, "index_group", H5P_DEFAULT, gcpl, H5P_DEFAULT); + + /* + * Create subgroups in the primary group. These will be tracked + * by creation order. Note that these groups do not have to have + * the creation order tracking property set. + */ + subgroup = H5Gcreate (group, "H", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Gclose (subgroup); + subgroup = H5Gcreate (group, "D", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Gclose (subgroup); + subgroup = H5Gcreate (group, "F", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Gclose (subgroup); + subgroup = H5Gcreate (group, "5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Gclose (subgroup); + + /* + * Get group info. + */ + status = H5Gget_info (group, &ginfo); + + /* + * Traverse links in the primary group using alphabetical indices + * (H5_INDEX_NAME). + */ + printf("Traversing group using alphabetical indices:\n\n"); + for (i=0; i + +#define FILE "h5ex_g_corder.h5" + +using namespace hdf5; + +int main (void) +{ + // Create a new file using the default properties. + file::File file = file::create (FILE, file::AccessFlags::TRUNCATE); + + // Create group creation property list and enable link creation + // order tracking. Attempting to track by creation order in a + // group that does not have this property set will result in an + // error. + property::LinkCreationList lcpl; + property::GroupCreationList gcpl; + gcpl.link_creation_order ( + property::CreationOrder ().enable_tracked ().enable_indexed ()); + + // Create primary group using the property list. + node::Group group (file.root (), "index_group", lcpl, gcpl); + + // Create subgroups in the primary group. These will be tracked + // by creation order. Note that these groups do not have to have + // the creation order tracking property set. + node::Group (group, "H"); + node::Group (group, "D"); + node::Group (group, "F"); + node::Group (group, "5"); + + // Traverse links in the primary group using alphabetical indices + // (H5_INDEX_NAME). + std::cout << "Traversing group using alphabetical indices:" << std::endl + << std::endl; + group.iterator_config ().index (IterationIndex::NAME); + group.iterator_config ().order (IterationOrder::INCREASING); + size_t index = 0; + for (node::Node node : group.nodes) + { + std::cout << "Index " << index++ << ": " << node.link ().path ().name () + << std::endl; + } + + // Traverse links in the primary group by creation order + // (H5_INDEX_CRT_ORDER). + std::cout << std::endl << "Traversing group using creation order indices:" + << std::endl << std::endl; + group.iterator_config ().index (IterationIndex::CREATION_ORDER); + index = 0; + for (node::Node node : group.nodes) + { + std::cout << "Index " << index++ << ": " << node.link ().path ().name () + << std::endl; + } + + return 0; +} diff --git a/examples/hdfgroup/H5G/h5ex_g_create.c b/examples/hdfgroup/H5G/h5ex_g_create.c new file mode 100644 index 0000000000..a560de65af --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_create.c @@ -0,0 +1,44 @@ +/************************************************************ + + This example shows how to create, open, and close a group. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" + +#define FILE "h5ex_g_create.h5" + +int +main(void) +{ + hid_t file, group; /* Handles */ + herr_t status; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create a group named "G1" in the file. + */ + group = H5Gcreate (file, "/G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Close the group. The handle "group" can no longer be used. + */ + status = H5Gclose (group); + + /* + * Re-open the group, obtaining a new handle. + */ + group = H5Gopen (file, "/G1", H5P_DEFAULT); + + /* + * Close and release resources. + */ + status = H5Gclose (group); + status = H5Fclose (file); +} diff --git a/examples/hdfgroup/H5G/h5ex_g_create.cpp b/examples/hdfgroup/H5G/h5ex_g_create.cpp new file mode 100644 index 0000000000..60eac6dee3 --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_create.cpp @@ -0,0 +1,30 @@ +/************************************************************ + + This example shows how to create, open, and close a group. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include + +#define FILE "h5ex_g_create.h5" + +using namespace hdf5; + +int main(void) +{ + // Create a new file using the default properties. + file::File file = file::create (FILE, file::AccessFlags::TRUNCATE); + + // Create a group named "G1" in the file. + node::Group group (file.root(), "/G1"); + + // Close the group. The handle "group" can no longer be used. + group.close (); + + // Re-open the group, obtaining a new handle. + group = node::get_node (file.root (), "/G1"); + + return 0; +} diff --git a/examples/hdfgroup/H5G/h5ex_g_intermediate.c b/examples/hdfgroup/H5G/h5ex_g_intermediate.c new file mode 100644 index 0000000000..d6e33ae5d4 --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_intermediate.c @@ -0,0 +1,97 @@ +/************************************************************ + + This example shows how to create intermediate groups with + a single call to H5Gcreate. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" + +#define FILE "h5ex_g_intermediate.h5" + +/* + * Operator function to be called by H5Ovisit. + */ +herr_t op_func (hid_t loc_id, const char *name, const H5O_info_t *info, + void *operator_data); + +int +main(void) +{ + hid_t file, group, gcpl; /* Handles */ + herr_t status; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create group creation property list and set it to allow creation + * of intermediate groups. + */ + gcpl = H5Pcreate (H5P_LINK_CREATE); + status = H5Pset_create_intermediate_group (gcpl, 1); + + /* + * Create the group /G1/G2/G3. Note that /G1 and /G1/G2 do not + * exist yet. This call would cause an error if we did not use the + * previously created property list. + */ + group = H5Gcreate (file, "/G1/G2/G3", gcpl, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Print all the objects in the files to show that intermediate + * groups have been created. See h5ex_g_visit for more information + * on how to use H5Ovisit. + */ + printf ("Objects in the file:\n"); + status = H5Ovisit (file, H5_INDEX_NAME, H5_ITER_NATIVE, op_func, NULL); + + /* + * Close and release resources. + */ + status = H5Pclose (gcpl); + status = H5Gclose (group); + status = H5Fclose (file); + + return 0; +} + + +/************************************************************ + + Operator function for H5Ovisit. This function prints the + name and type of the object passed to it. + + ************************************************************/ +herr_t op_func (hid_t loc_id, const char *name, const H5O_info_t *info, + void *operator_data) +{ + printf ("/"); /* Print root group in object path */ + + /* + * Check if the current object is the root group, and if not print + * the full path name and type. + */ + if (name[0] == '.') /* Root group, do not print '.' */ + printf (" (Group)\n"); + else + switch (info->type) { + case H5O_TYPE_GROUP: + printf ("%s (Group)\n", name); + break; + case H5O_TYPE_DATASET: + printf ("%s (Dataset)\n", name); + break; + case H5O_TYPE_NAMED_DATATYPE: + printf ("%s (Datatype)\n", name); + break; + default: + printf ("%s (Unknown)\n", name); + } + + return 0; +} diff --git a/examples/hdfgroup/H5G/h5ex_g_intermediate.cpp b/examples/hdfgroup/H5G/h5ex_g_intermediate.cpp new file mode 100644 index 0000000000..0133cef53c --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_intermediate.cpp @@ -0,0 +1,49 @@ +/************************************************************ + + This example shows how to create intermediate groups with + a single call to H5Gcreate. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include + +#define FILE "h5ex_g_intermediate.h5" + +using namespace hdf5; + +int main(void) +{ + // Create a new file using the default properties. + file::File file = file::create (FILE, file::AccessFlags::TRUNCATE); + + // Create group creation property list and set it to allow creation + // of intermediate groups. + property::LinkCreationList lcpl; + lcpl.enable_intermediate_group_creation (); + + // Create the group /G1/G2/G3. Note that /G1 and /G1/G2 do not + // exist yet. This call would cause an error if we did not use the + // previously created property list. + node::Group group (file.root (), "/G1/G2/G3", lcpl); + + // Print all the objects in the files to show that intermediate + // groups have been created. See h5ex_g_visit for more information + // on how to use H5Ovisit. + std::cout << "Objects in the file:" << std::endl; + node::Group root_group = file.root (); + root_group.iterator_config ().index (IterationIndex::NAME); + root_group.iterator_config ().order (IterationOrder::NATIVE); + std::for_each (node::RecursiveNodeIterator::begin (root_group), + node::RecursiveNodeIterator::end (root_group), + [](const node::Node &node) + { + std::cout< + +#define FILE "h5ex_g_iterate.h5" + +/* + * Operator function to be called by H5Literate. + */ +herr_t op_func (hid_t loc_id, const char *name, const H5L_info_t *info, + void *operator_data); + +int +main (void) +{ + hid_t file; /* Handle */ + herr_t status; + + /* + * Open file. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + + /* + * Begin iteration. + */ + printf ("Objects in root group:\n"); + status = H5Literate (file, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func, NULL); + + /* + * Close and release resources. + */ + status = H5Fclose (file); + + return 0; +} + + +/************************************************************ + + Operator function. Prints the name and type of the object + being examined. + + ************************************************************/ +herr_t op_func (hid_t loc_id, const char *name, const H5L_info_t *info, + void *operator_data) +{ + herr_t status; + H5O_info_t infobuf; + + /* + * Get type of the object and display its name and type. + * The name of the object is passed to this function by + * the Library. + */ + status = H5Oget_info_by_name (loc_id, name, &infobuf, H5P_DEFAULT); + switch (infobuf.type) { + case H5O_TYPE_GROUP: + printf (" Group: %s\n", name); + break; + case H5O_TYPE_DATASET: + printf (" Dataset: %s\n", name); + break; + case H5O_TYPE_NAMED_DATATYPE: + printf (" Datatype: %s\n", name); + break; + default: + printf ( " Unknown: %s\n", name); + } + + return 0; +} diff --git a/examples/hdfgroup/H5G/h5ex_g_iterate.cpp b/examples/hdfgroup/H5G/h5ex_g_iterate.cpp new file mode 100644 index 0000000000..356c5587cc --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_iterate.cpp @@ -0,0 +1,33 @@ +/************************************************************ + + This example shows how to iterate over group members using + H5Literate. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include +#include + +#define FILE "h5ex_g_iterate.h5" + +using namespace hdf5; + +int main (void) +{ + // Open file. + file::File file = file::open (FILE, file::AccessFlags::READONLY); + node::Group root_group = file.root (); + + // Begin iteration. + std::cout << "Objects in root group:" << std::endl; + std::for_each (root_group.nodes.begin (), root_group.nodes.end (), + [](const node::Node &node) + { + std::cout<J5PjYa!3siJs1TLQv~YqT?ZOr)L~IU_l9D4tqJbMwQgRt2N{&HEfdo6A zc?6 + +#define FILE "h5ex_g_phase.h5" +#define MAX_GROUPS 7 +#define MAX_COMPACT 5 +#define MIN_DENSE 3 + +int +main (void) +{ + hid_t file, group, subgroup, fapl, gcpl; /* Handles */ + herr_t status; + H5G_info_t ginfo; + char name[3]="G0"; /* Name of subgroup */ + unsigned i; + + /* + * Set file access property list to allow the latest file format. + * This will allow the library to create new format groups. + */ + fapl = H5Pcreate (H5P_FILE_ACCESS); + status = H5Pset_libver_bounds (fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); + + /* + * Create group access property list and set the phase change + * conditions. In this example we lowered the conversion threshold + * to simplify the output, though this may not be optimal. + */ + gcpl = H5Pcreate (H5P_GROUP_CREATE); + status = H5Pset_link_phase_change (gcpl, MAX_COMPACT, MIN_DENSE); + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + + /* + * Create primary group. + */ + group = H5Gcreate (file, name, H5P_DEFAULT, gcpl, H5P_DEFAULT); + + /* + * Add subgroups to "group" one at a time, print the storage type + * for "group" after each subgroup is created. + */ + for (i=1; i<=MAX_GROUPS; i++) { + + /* + * Define the subgroup name and create the subgroup. + */ + name[1] = ((char) i) + '0'; /* G1, G2, G3 etc. */ + subgroup = H5Gcreate (group, name, H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Gclose (subgroup); + + /* + * Obtain the group info and print the group storage type + */ + status = H5Gget_info (group, &ginfo); + printf ("%d Group%s: Storage type is ", (int) ginfo.nlinks, + ginfo.nlinks == 1 ? " " : "s"); + switch (ginfo.storage_type) { + case H5G_STORAGE_TYPE_COMPACT: + printf ("H5G_STORAGE_TYPE_COMPACT\n"); /* New compact format */ + break; + case H5G_STORAGE_TYPE_DENSE: + printf ("H5G_STORAGE_TYPE_DENSE\n"); /* New dense (indexed) format */ + break; + case H5G_STORAGE_TYPE_SYMBOL_TABLE: + printf ("H5G_STORAGE_TYPE_SYMBOL_TABLE\n"); /* Original format */ + break; + case H5G_STORAGE_TYPE_UNKNOWN: + printf ("H5G_STORAGE_TYPE_UNKNOWN\n"); /* Unknown format */ + } + } + + printf("\n"); + + /* + * Delete subgroups one at a time, print the storage type for + * "group" after each subgroup is deleted. + */ + for (i=MAX_GROUPS; i>=1; i--) { + + /* + * Define the subgroup name and delete the subgroup. + */ + name[1] = ((char) i) + '0'; /* G1, G2, G3 etc. */ + status = H5Ldelete (group, name, H5P_DEFAULT); + + /* + * Obtain the group info and print the group storage type + */ + status = H5Gget_info (group, &ginfo); + printf ("%d Group%s: Storage type is ", (int) ginfo.nlinks, + ginfo.nlinks == 1 ? " " : "s"); + switch (ginfo.storage_type) { + case H5G_STORAGE_TYPE_COMPACT: + printf ("H5G_STORAGE_TYPE_COMPACT\n"); /* New compact format */ + break; + case H5G_STORAGE_TYPE_DENSE: + printf ("H5G_STORAGE_TYPE_DENSE\n"); /* New dense (indexed) format */ + break; + case H5G_STORAGE_TYPE_SYMBOL_TABLE: + printf ("H5G_STORAGE_TYPE_SYMBOL_TABLE\n"); /* Original format */ + break; + case H5G_STORAGE_TYPE_UNKNOWN: + printf ("H5G_STORAGE_TYPE_UNKNOWN\n"); /* Unknown format */ + } + } + + /* + * Close and release resources. + */ + status = H5Pclose (fapl); + status = H5Pclose (gcpl); + status = H5Gclose (group); + status = H5Fclose (file); + + return 0; +} diff --git a/examples/hdfgroup/H5G/h5ex_g_phase.cpp b/examples/hdfgroup/H5G/h5ex_g_phase.cpp new file mode 100644 index 0000000000..eeb853ee27 --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_phase.cpp @@ -0,0 +1,84 @@ +/************************************************************ + + This example shows how to set the conditions for + conversion between compact and dense (indexed) groups. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include +#include + +#define FILE "h5ex_g_phase.h5" +#define MAX_GROUPS 7 +#define MAX_COMPACT 5 +#define MIN_DENSE 3 + +using namespace hdf5; + +void print_group_info(const node::GroupInfo &info) +{ + std::string group = "Group"; + + group += info.number_of_links () == 1 ? " " : "s"; + std::cout << info.number_of_links () << group << ": Storage type is " + << info.storage_type () << std::endl; +} + +int main (void) +{ + char name[3] = "G0"; /* Name of subgroup */ + + // Set file access property list to allow the latest file format. + // This will allow the library to create new format groups. + property::FileCreationList fcpl; + property::FileAccessList fapl; + fapl.library_version_bounds (property::LibVersion::LATEST, + property::LibVersion::LATEST); + + // Create group access property list and set the phase change + // conditions. In this example we lowered the conversion threshold + // to simplify the output, though this may not be optimal. + property::LinkCreationList lcpl; + property::GroupCreationList gcpl; + gcpl.link_storage_thresholds (MAX_COMPACT, MIN_DENSE); + + // Create a new file using the default properties. + file::File file = file::create (FILE, file::AccessFlags::TRUNCATE, fcpl, + fapl); + + // Create primary group. + node::Group group (file.root(), "G0", lcpl, gcpl); + + // Add subgroups to "group" one at a time, print the storage type + // for "group" after each subgroup is created. + for (size_t i = 1; i <= MAX_GROUPS; i++) + { + + { + std::stringstream ss; + ss << "G0_" << i; + node::Group (group, ss.str ()); + } + + // Obtain the group info and print the group storage type + print_group_info (group.info ()); + } + std::cout<= 1; i--) + { + // Define the subgroup name and delete the subgroup. + std::stringstream ss; + ss << "G0_" << i; + node::remove (group, ss.str ()); + + // Obtain the group info and print the group storage type + print_group_info (group.info ()); + } + + return 0; +} diff --git a/examples/hdfgroup/H5G/h5ex_g_traverse.c b/examples/hdfgroup/H5G/h5ex_g_traverse.c new file mode 100644 index 0000000000..4bae6bf890 --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_traverse.c @@ -0,0 +1,174 @@ +/************************************************************ + + This example shows a way to recursively traverse the file + using H5Literate. The method shown here guarantees that + the recursion will not enter an infinite loop, but does + not prevent objects from being visited more than once. + The program prints the directory structure of the file + specified in FILE. The default file used by this example + implements the structure described in the User's Guide, + chapter 4, figure 26. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include + +#define FILE "h5ex_g_traverse.h5" + +/* + * Define operator data structure type for H5Literate callback. + * During recursive iteration, these structures will form a + * linked list that can be searched for duplicate groups, + * preventing infinite recursion. + */ +struct opdata { + unsigned recurs; /* Recursion level. 0=root */ + struct opdata *prev; /* Pointer to previous opdata */ + haddr_t addr; /* Group address */ +}; + +/* + * Operator function to be called by H5Literate. + */ +herr_t op_func (hid_t loc_id, const char *name, const H5L_info_t *info, + void *operator_data); + +/* + * Function to check for duplicate groups in a path. + */ +int group_check (struct opdata *od, haddr_t target_addr); + +int +main (void) +{ + hid_t file; /* Handle */ + herr_t status; + H5O_info_t infobuf; + struct opdata od; + + /* + * Open file and initialize the operator data structure. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + status = H5Oget_info (file, &infobuf); + od.recurs = 0; + od.prev = NULL; + od.addr = infobuf.addr; + + /* + * Print the root group and formatting, begin iteration. + */ + printf ("/ {\n"); + status = H5Literate (file, H5_INDEX_NAME, H5_ITER_NATIVE, NULL, op_func, + (void *) &od); + printf ("}\n"); + + /* + * Close and release resources. + */ + status = H5Fclose (file); + + return 0; +} + + +/************************************************************ + + Operator function. This function prints the name and type + of the object passed to it. If the object is a group, it + is first checked against other groups in its path using + the group_check function, then if it is not a duplicate, + H5Literate is called for that group. This guarantees that + the program will not enter infinite recursion due to a + circular path in the file. + + ************************************************************/ +herr_t op_func (hid_t loc_id, const char *name, const H5L_info_t *info, + void *operator_data) +{ + herr_t status, return_val = 0; + H5O_info_t infobuf; + struct opdata *od = (struct opdata *) operator_data; + /* Type conversion */ + unsigned spaces = 2*(od->recurs+1); + /* Number of whitespaces to prepend + to output */ + + /* + * Get type of the object and display its name and type. + * The name of the object is passed to this function by + * the Library. + */ + status = H5Oget_info_by_name (loc_id, name, &infobuf, H5P_DEFAULT); + printf ("%*s", spaces, ""); /* Format output */ + switch (infobuf.type) { + case H5O_TYPE_GROUP: + printf ("Group: %s {\n", name); + + /* + * Check group address against linked list of operator + * data structures. We will always run the check, as the + * reference count cannot be relied upon if there are + * symbolic links, and H5Oget_info_by_name always follows + * symbolic links. Alternatively we could use H5Lget_info + * and never recurse on groups discovered by symbolic + * links, however it could still fail if an object's + * reference count was manually manipulated with + * H5Odecr_refcount. + */ + if ( group_check (od, infobuf.addr) ) { + printf ("%*s Warning: Loop detected!\n", spaces, ""); + } + else { + + /* + * Initialize new operator data structure and + * begin recursive iteration on the discovered + * group. The new opdata structure is given a + * pointer to the current one. + */ + struct opdata nextod; + nextod.recurs = od->recurs + 1; + nextod.prev = od; + nextod.addr = infobuf.addr; + return_val = H5Literate_by_name (loc_id, name, H5_INDEX_NAME, + H5_ITER_NATIVE, NULL, op_func, (void *) &nextod, + H5P_DEFAULT); + } + printf ("%*s}\n", spaces, ""); + break; + case H5O_TYPE_DATASET: + printf ("Dataset: %s\n", name); + break; + case H5O_TYPE_NAMED_DATATYPE: + printf ("Datatype: %s\n", name); + break; + default: + printf ( "Unknown: %s\n", name); + } + + return return_val; +} + + +/************************************************************ + + This function recursively searches the linked list of + opdata structures for one whose address matches + target_addr. Returns 1 if a match is found, and 0 + otherwise. + + ************************************************************/ +int group_check (struct opdata *od, haddr_t target_addr) +{ + if (od->addr == target_addr) + return 1; /* Addresses match */ + else if (!od->recurs) + return 0; /* Root group reached with no matches */ + else + return group_check (od->prev, target_addr); + /* Recursively examine the next node */ +} diff --git a/examples/hdfgroup/H5G/h5ex_g_traverse.cpp b/examples/hdfgroup/H5G/h5ex_g_traverse.cpp new file mode 100644 index 0000000000..8591e1d74d --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_traverse.cpp @@ -0,0 +1,45 @@ +/************************************************************ + + This example shows a way to recursively traverse the file + using H5Literate. The method shown here guarantees that + the recursion will not enter an infinite loop, but does + not prevent objects from being visited more than once. + The program prints the directory structure of the file + specified in FILE. The default file used by this example + implements the structure described in the User's Guide, + chapter 4, figure 26. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include +#include + +#define FILE "h5ex_g_traverse.h5" +using namespace hdf5; + +int +main (void) +{ + // Open file and initialize the operator data structure. + file::File file = file::open (FILE, file::AccessFlags::READONLY); + node::Group root_group = file.root (); + + // Print the root group and formatting, begin iteration. + std::cout << "/" << std::endl; + std::for_each (node::RecursiveNodeIterator::begin (root_group), + node::RecursiveNodeIterator::end (root_group), + [](const node::Node &node) + { + std::cout<<q=NtBA zR+P1gidsSJcy7?B6Sdgif4xx0P@g`vKDqo03PedAb0H+-H&?gU<~Z+s{)&5DKa^w@ zQE5e71S*{lV={66aPeraQ=`Xz2ixcS)$Y&z3i%%0e~{lLy|7K&e}+YI6^=Y6jW{9T zx~I5!>B_g(jQQ4G7j(loft + +#define FILE "h5ex_g_visit.h5" + +/* + * Operator function to be called by H5Ovisit. + */ +herr_t op_func (hid_t loc_id, const char *name, const H5O_info_t *info, + void *operator_data); + +/* + * Operator function to be called by H5Lvisit. + */ +herr_t op_func_L (hid_t loc_id, const char *name, const H5L_info_t *info, + void *operator_data); + +int +main (void) +{ + hid_t file; /* Handle */ + herr_t status; + + /* + * Open file + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + + /* + * Begin iteration using H5Ovisit + */ + printf ("Objects in the file:\n"); + status = H5Ovisit (file, H5_INDEX_NAME, H5_ITER_NATIVE, op_func, NULL); + + /* + * Repeat the same process using H5Lvisit + */ + printf ("\nLinks in the file:\n"); + status = H5Lvisit (file, H5_INDEX_NAME, H5_ITER_NATIVE, op_func_L, NULL); + + /* + * Close and release resources. + */ + status = H5Fclose (file); + + return 0; +} + + +/************************************************************ + + Operator function for H5Ovisit. This function prints the + name and type of the object passed to it. + + ************************************************************/ +herr_t op_func (hid_t loc_id, const char *name, const H5O_info_t *info, + void *operator_data) +{ + printf ("/"); /* Print root group in object path */ + + /* + * Check if the current object is the root group, and if not print + * the full path name and type. + */ + if (name[0] == '.') /* Root group, do not print '.' */ + printf (" (Group)\n"); + else + switch (info->type) { + case H5O_TYPE_GROUP: + printf ("%s (Group)\n", name); + break; + case H5O_TYPE_DATASET: + printf ("%s (Dataset)\n", name); + break; + case H5O_TYPE_NAMED_DATATYPE: + printf ("%s (Datatype)\n", name); + break; + default: + printf ("%s (Unknown)\n", name); + } + + return 0; +} + + +/************************************************************ + + Operator function for H5Lvisit. This function simply + retrieves the info for the object the current link points + to, and calls the operator function for H5Ovisit. + + ************************************************************/ +herr_t op_func_L (hid_t loc_id, const char *name, const H5L_info_t *info, + void *operator_data) +{ + herr_t status; + H5O_info_t infobuf; + + /* + * Get type of the object and display its name and type. + * The name of the object is passed to this function by + * the Library. + */ + status = H5Oget_info_by_name (loc_id, name, &infobuf, H5P_DEFAULT); + return op_func (loc_id, name, &infobuf, operator_data); +} diff --git a/examples/hdfgroup/H5G/h5ex_g_visit.cpp b/examples/hdfgroup/H5G/h5ex_g_visit.cpp new file mode 100644 index 0000000000..50beedf5c7 --- /dev/null +++ b/examples/hdfgroup/H5G/h5ex_g_visit.cpp @@ -0,0 +1,52 @@ +/************************************************************ + + This example shows how to recursively traverse a file + using H5Ovisit and H5Lvisit. The program prints all of + the objects in the file specified in FILE, then prints all + of the links in that file. The default file used by this + example implements the structure described in the User's + Guide, chapter 4, figure 26. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include +#include + +#define FILE "h5ex_g_visit.h5" +using namespace hdf5; + +int main (void) +{ + + // Open file + file::File file = file::open (FILE, file::AccessFlags::READONLY); + node::Group root_group = file.root (); + + /* + * Begin iteration using H5Ovisit + */ + std::cout << "Objects in the file:" << std::endl; + std::for_each (node::RecursiveNodeIterator::begin (root_group), + node::RecursiveNodeIterator::end (root_group), + [](const node::Node &node) + { + std::cout<<q=NtBA zR+P1gidsSJcy7?B6Sdgif4xx0P@g`vKDqo03PedAb0H+-H&?gU<~Z+s{)&5DKa^w@ zQE5e71S*{lV={66aPeraQ=`Xz2ixcS)$Y&z3i%%0e~{lLy|7K&e}+YI6^=Y6jW{9T zx~I5!>B_g(jQQ4G7j(loft&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +noinst_PROGRAMS = h5ex_g_create$(EXEEXT) h5ex_g_iterate$(EXEEXT) \ + h5ex_g_traverse$(EXEEXT) h5ex_g_compact$(EXEEXT) \ + h5ex_g_corder$(EXEEXT) h5ex_g_intermediate$(EXEEXT) \ + h5ex_g_phase$(EXEEXT) h5ex_g_visit$(EXEEXT) +subdir = 1_10/C/H5G +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = test.sh +CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) +h5ex_g_compact_SOURCES = h5ex_g_compact.c +h5ex_g_compact_OBJECTS = h5ex_g_compact.$(OBJEXT) +h5ex_g_compact_LDADD = $(LDADD) +h5ex_g_corder_SOURCES = h5ex_g_corder.c +h5ex_g_corder_OBJECTS = h5ex_g_corder.$(OBJEXT) +h5ex_g_corder_LDADD = $(LDADD) +h5ex_g_create_SOURCES = h5ex_g_create.c +h5ex_g_create_OBJECTS = h5ex_g_create.$(OBJEXT) +h5ex_g_create_LDADD = $(LDADD) +h5ex_g_intermediate_SOURCES = h5ex_g_intermediate.c +h5ex_g_intermediate_OBJECTS = h5ex_g_intermediate.$(OBJEXT) +h5ex_g_intermediate_LDADD = $(LDADD) +h5ex_g_iterate_SOURCES = h5ex_g_iterate.c +h5ex_g_iterate_OBJECTS = h5ex_g_iterate.$(OBJEXT) +h5ex_g_iterate_LDADD = $(LDADD) +h5ex_g_phase_SOURCES = h5ex_g_phase.c +h5ex_g_phase_OBJECTS = h5ex_g_phase.$(OBJEXT) +h5ex_g_phase_LDADD = $(LDADD) +h5ex_g_traverse_SOURCES = h5ex_g_traverse.c +h5ex_g_traverse_OBJECTS = h5ex_g_traverse.$(OBJEXT) +h5ex_g_traverse_LDADD = $(LDADD) +h5ex_g_visit_SOURCES = h5ex_g_visit.c +h5ex_g_visit_OBJECTS = h5ex_g_visit.$(OBJEXT) +h5ex_g_visit_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = h5ex_g_compact.c h5ex_g_corder.c h5ex_g_create.c \ + h5ex_g_intermediate.c h5ex_g_iterate.c h5ex_g_phase.c \ + h5ex_g_traverse.c h5ex_g_visit.c +DIST_SOURCES = h5ex_g_compact.c h5ex_g_corder.c h5ex_g_create.c \ + h5ex_g_intermediate.c h5ex_g_iterate.c h5ex_g_phase.c \ + h5ex_g_traverse.c h5ex_g_visit.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/makefile.in $(srcdir)/test.sh.in \ + $(top_srcdir)/depcomp $(top_srcdir)/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EXEEXT = @EXEEXT@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = testfiles/h5ex_g_create.ddl testfiles/h5ex_g_iterate.tst testfiles/h5ex_g_traverse.tst \ +testfiles/h5ex_g_compact1.ddl testfiles/h5ex_g_compact2.ddl testfiles/h5ex_g_corder.tst \ +testfiles/h5ex_g_intermediate.tst testfiles/h5ex_g_phase.tst testfiles/h5ex_g_visit.tst \ +h5ex_g_iterate.h5 h5ex_g_traverse.h5 h5ex_g_visit.h5 \ +test.sh + +AM_CPPFLAGS = '-D H5_USE_110_API' +TESTS = test.sh +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign 1_10/C/H5G/makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign 1_10/C/H5G/makefile +makefile: $(srcdir)/makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +test.sh: $(top_builddir)/config.status $(srcdir)/test.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + +h5ex_g_compact$(EXEEXT): $(h5ex_g_compact_OBJECTS) $(h5ex_g_compact_DEPENDENCIES) $(EXTRA_h5ex_g_compact_DEPENDENCIES) + @rm -f h5ex_g_compact$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_g_compact_OBJECTS) $(h5ex_g_compact_LDADD) $(LIBS) + +h5ex_g_corder$(EXEEXT): $(h5ex_g_corder_OBJECTS) $(h5ex_g_corder_DEPENDENCIES) $(EXTRA_h5ex_g_corder_DEPENDENCIES) + @rm -f h5ex_g_corder$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_g_corder_OBJECTS) $(h5ex_g_corder_LDADD) $(LIBS) + +h5ex_g_create$(EXEEXT): $(h5ex_g_create_OBJECTS) $(h5ex_g_create_DEPENDENCIES) $(EXTRA_h5ex_g_create_DEPENDENCIES) + @rm -f h5ex_g_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_g_create_OBJECTS) $(h5ex_g_create_LDADD) $(LIBS) + +h5ex_g_intermediate$(EXEEXT): $(h5ex_g_intermediate_OBJECTS) $(h5ex_g_intermediate_DEPENDENCIES) $(EXTRA_h5ex_g_intermediate_DEPENDENCIES) + @rm -f h5ex_g_intermediate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_g_intermediate_OBJECTS) $(h5ex_g_intermediate_LDADD) $(LIBS) + +h5ex_g_iterate$(EXEEXT): $(h5ex_g_iterate_OBJECTS) $(h5ex_g_iterate_DEPENDENCIES) $(EXTRA_h5ex_g_iterate_DEPENDENCIES) + @rm -f h5ex_g_iterate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_g_iterate_OBJECTS) $(h5ex_g_iterate_LDADD) $(LIBS) + +h5ex_g_phase$(EXEEXT): $(h5ex_g_phase_OBJECTS) $(h5ex_g_phase_DEPENDENCIES) $(EXTRA_h5ex_g_phase_DEPENDENCIES) + @rm -f h5ex_g_phase$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_g_phase_OBJECTS) $(h5ex_g_phase_LDADD) $(LIBS) + +h5ex_g_traverse$(EXEEXT): $(h5ex_g_traverse_OBJECTS) $(h5ex_g_traverse_DEPENDENCIES) $(EXTRA_h5ex_g_traverse_DEPENDENCIES) + @rm -f h5ex_g_traverse$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_g_traverse_OBJECTS) $(h5ex_g_traverse_LDADD) $(LIBS) + +h5ex_g_visit$(EXEEXT): $(h5ex_g_visit_OBJECTS) $(h5ex_g_visit_DEPENDENCIES) $(EXTRA_h5ex_g_visit_DEPENDENCIES) + @rm -f h5ex_g_visit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_g_visit_OBJECTS) $(h5ex_g_visit_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_g_compact.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_g_corder.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_g_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_g_intermediate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_g_iterate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_g_phase.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_g_traverse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_g_visit.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +test.sh.log: test.sh + @p='test.sh'; \ + b='test.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-generic clean-noinstPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/hdfgroup/H5G/maketestref.sh b/examples/hdfgroup/H5G/maketestref.sh new file mode 100644 index 0000000000..657bacbf81 --- /dev/null +++ b/examples/hdfgroup/H5G/maketestref.sh @@ -0,0 +1,53 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. + +case $CC in +*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`; + test -x $H5DUMP || H5DUMP=h5dump;; +*) H5DUMP=h5dump;; +esac + +exout() { + $* +} + +dumpout() { + $H5DUMP $* +} + +./h5ex_g_create +dumpout h5ex_g_create.h5 >testfiles/h5ex_g_create.ddl +rm -f h5ex_g_create.h5 + +exout ./h5ex_g_iterate >testfiles/h5ex_g_iterate.tst + +exout ./h5ex_g_traverse >testfiles/h5ex_g_traverse.tst + +exout ./h5ex_g_visit >testfiles/h5ex_g_visit.tst + +exout ./h5ex_g_compact >testfiles/h5ex_g_compact.tst +dumpout h5ex_g_compact1.h5 >testfiles/h5ex_g_compact1.ddl +dumpout h5ex_g_compact2.h5 >testfiles/h5ex_g_compact2.ddl +rm -f h5ex_g_compact1.h5 +rm -f h5ex_g_compact2.h5 + +exout ./h5ex_g_phase >testfiles/h5ex_g_phase.tst +rm -f h5ex_g_phase.h5 + +exout ./h5ex_g_corder >testfiles/h5ex_g_corder.tst +rm -f h5ex_g_corder.h5 + +exout ./h5ex_g_intermediate >testfiles/h5ex_g_intermediate.tst +rm -f h5ex_g_intermediate.h5 diff --git a/examples/hdfgroup/H5G/test.sh.in b/examples/hdfgroup/H5G/test.sh.in new file mode 100644 index 0000000000..861e8b109b --- /dev/null +++ b/examples/hdfgroup/H5G/test.sh.in @@ -0,0 +1,197 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. + +srcdir=@srcdir@ + + +case $CC in +*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`; + test -x $H5DUMP || H5DUMP=h5dump;; +*) H5DUMP=h5dump;; +esac + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ;; + *c*,* ) ECHO_N=-n ECHO_C= ;; + *) ECHO_N= ECHO_C='\c' ;; +esac +ECHO_N="echo $ECHO_N" + + +exout() { + $* +} + +dumpout() { + $H5DUMP $* +} + + +return_val=0 + + +$ECHO_N "Testing 1_10/C/H5G/h5ex_g_create...$ECHO_C" +./h5ex_g_create +dumpout h5ex_g_create.h5 >tmp.test +rm -f h5ex_g_create.h5 +cmp -s tmp.test $srcdir/testfiles/h5ex_g_create.ddl +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + echo " Passed" +fi +return_val=`expr $status + $return_val` + + +$ECHO_N "Testing 1_10/C/H5G/h5ex_g_iterate...$ECHO_C" +if test -f h5ex_g_iterate.h5 +then + exout ./h5ex_g_iterate >tmp.test +else + cp $srcdir/h5ex_g_iterate.h5 h5ex_g_iterate.h5 + exout ./h5ex_g_iterate >tmp.test + rm -f h5ex_g_iterate.h5 +fi +cmp -s tmp.test $srcdir/testfiles/h5ex_g_iterate.tst +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + echo " Passed" +fi +return_val=`expr $status + $return_val` + + +$ECHO_N "Testing 1_10/C/H5G/h5ex_g_traverse...$ECHO_C" +if test -f h5ex_g_traverse.h5 +then + exout ./h5ex_g_traverse >tmp.test +else + cp $srcdir/h5ex_g_traverse.h5 h5ex_g_traverse.h5 + exout ./h5ex_g_traverse >tmp.test + rm -f h5ex_g_traverse.h5 +fi +cmp -s tmp.test $srcdir/testfiles/h5ex_g_traverse.tst +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + echo " Passed" +fi +return_val=`expr $status + $return_val` + + +$ECHO_N "Testing 1_10/C/H5G/h5ex_g_visit...$ECHO_C" +if test -f h5ex_g_visit.h5 +then + exout ./h5ex_g_visit >tmp.test +else + cp $srcdir/h5ex_g_visit.h5 h5ex_g_visit.h5 + exout ./h5ex_g_visit >tmp.test + rm -f h5ex_g_visit.h5 +fi +cmp -s tmp.test $srcdir/testfiles/h5ex_g_visit.tst +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + echo " Passed" +fi +return_val=`expr $status + $return_val` + + +$ECHO_N "Testing 1_10/C/H5G/h5ex_g_compact...$ECHO_C" +exout ./h5ex_g_compact >tmp.test +cmp -s tmp.test $srcdir/testfiles/h5ex_g_compact.tst +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + dumpout h5ex_g_compact1.h5 >tmp.test + cmp -s tmp.test $srcdir/testfiles/h5ex_g_compact1.ddl + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + dumpout h5ex_g_compact2.h5 >tmp.test + cmp -s tmp.test $srcdir/testfiles/h5ex_g_compact2.ddl + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + echo " Passed" + fi + fi +fi +return_val=`expr $status + $return_val` +rm -f h5ex_g_compact1.h5 +rm -f h5ex_g_compact2.h5 + + +$ECHO_N "Testing 1_10/C/H5G/h5ex_g_phase...$ECHO_C" +exout ./h5ex_g_phase >tmp.test +cmp -s tmp.test $srcdir/testfiles/h5ex_g_phase.tst +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + echo " Passed" +fi +return_val=`expr $status + $return_val` +rm -f h5ex_g_phase.h5 + + +$ECHO_N "Testing 1_10/C/H5G/h5ex_g_corder...$ECHO_C" +exout ./h5ex_g_corder >tmp.test +cmp -s tmp.test $srcdir/testfiles/h5ex_g_corder.tst +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + echo " Passed" +fi +return_val=`expr $status + $return_val` +rm -f h5ex_g_corder.h5 + + +$ECHO_N "Testing 1_10/C/H5G/h5ex_g_intermediate...$ECHO_C" +exout ./h5ex_g_intermediate >tmp.test +cmp -s tmp.test $srcdir/testfiles/h5ex_g_intermediate.tst +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + echo " Passed" +fi +return_val=`expr $status + $return_val` +rm -f h5ex_g_intermediate.h5 + + +rm -f tmp.test +echo "$return_val tests failed in 1_10/C/H5G/" +exit $return_val diff --git a/examples/hdfgroup/H5G/testfiles/h5ex_g_compact.tst b/examples/hdfgroup/H5G/testfiles/h5ex_g_compact.tst new file mode 100644 index 0000000000..8ced62db19 --- /dev/null +++ b/examples/hdfgroup/H5G/testfiles/h5ex_g_compact.tst @@ -0,0 +1,6 @@ +Group storage type for h5ex_g_compact1.h5 is: H5G_STORAGE_TYPE_SYMBOL_TABLE +File size for h5ex_g_compact1.h5 is: 1832 bytes + +Group storage type for h5ex_g_compact2.h5 is: H5G_STORAGE_TYPE_COMPACT +File size for h5ex_g_compact2.h5 is: 342 bytes + diff --git a/examples/hdfgroup/H5G/testfiles/h5ex_g_compact1.ddl b/examples/hdfgroup/H5G/testfiles/h5ex_g_compact1.ddl new file mode 100644 index 0000000000..9bcd0a0d86 --- /dev/null +++ b/examples/hdfgroup/H5G/testfiles/h5ex_g_compact1.ddl @@ -0,0 +1,6 @@ +HDF5 "h5ex_g_compact1.h5" { +GROUP "/" { + GROUP "G1" { + } +} +} diff --git a/examples/hdfgroup/H5G/testfiles/h5ex_g_compact2.ddl b/examples/hdfgroup/H5G/testfiles/h5ex_g_compact2.ddl new file mode 100644 index 0000000000..0016bb9dce --- /dev/null +++ b/examples/hdfgroup/H5G/testfiles/h5ex_g_compact2.ddl @@ -0,0 +1,6 @@ +HDF5 "h5ex_g_compact2.h5" { +GROUP "/" { + GROUP "G1" { + } +} +} diff --git a/examples/hdfgroup/H5G/testfiles/h5ex_g_corder.tst b/examples/hdfgroup/H5G/testfiles/h5ex_g_corder.tst new file mode 100644 index 0000000000..9c07737881 --- /dev/null +++ b/examples/hdfgroup/H5G/testfiles/h5ex_g_corder.tst @@ -0,0 +1,13 @@ +Traversing group using alphabetical indices: + +Index 0: 5 +Index 1: D +Index 2: F +Index 3: H + +Traversing group using creation order indices: + +Index 0: H +Index 1: D +Index 2: F +Index 3: 5 diff --git a/examples/hdfgroup/H5G/testfiles/h5ex_g_create.ddl b/examples/hdfgroup/H5G/testfiles/h5ex_g_create.ddl new file mode 100644 index 0000000000..d180d8263c --- /dev/null +++ b/examples/hdfgroup/H5G/testfiles/h5ex_g_create.ddl @@ -0,0 +1,6 @@ +HDF5 "h5ex_g_create.h5" { +GROUP "/" { + GROUP "G1" { + } +} +} diff --git a/examples/hdfgroup/H5G/testfiles/h5ex_g_intermediate.tst b/examples/hdfgroup/H5G/testfiles/h5ex_g_intermediate.tst new file mode 100644 index 0000000000..b524067cd3 --- /dev/null +++ b/examples/hdfgroup/H5G/testfiles/h5ex_g_intermediate.tst @@ -0,0 +1,5 @@ +Objects in the file: +/ (Group) +/G1 (Group) +/G1/G2 (Group) +/G1/G2/G3 (Group) diff --git a/examples/hdfgroup/H5G/testfiles/h5ex_g_iterate.tst b/examples/hdfgroup/H5G/testfiles/h5ex_g_iterate.tst new file mode 100644 index 0000000000..66a4ae927f --- /dev/null +++ b/examples/hdfgroup/H5G/testfiles/h5ex_g_iterate.tst @@ -0,0 +1,5 @@ +Objects in root group: + Dataset: DS1 + Datatype: DT1 + Group: G1 + Dataset: L1 diff --git a/examples/hdfgroup/H5G/testfiles/h5ex_g_phase.tst b/examples/hdfgroup/H5G/testfiles/h5ex_g_phase.tst new file mode 100644 index 0000000000..9e666d4cfe --- /dev/null +++ b/examples/hdfgroup/H5G/testfiles/h5ex_g_phase.tst @@ -0,0 +1,15 @@ +1 Group : Storage type is H5G_STORAGE_TYPE_COMPACT +2 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT +3 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT +4 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT +5 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT +6 Groups: Storage type is H5G_STORAGE_TYPE_DENSE +7 Groups: Storage type is H5G_STORAGE_TYPE_DENSE + +6 Groups: Storage type is H5G_STORAGE_TYPE_DENSE +5 Groups: Storage type is H5G_STORAGE_TYPE_DENSE +4 Groups: Storage type is H5G_STORAGE_TYPE_DENSE +3 Groups: Storage type is H5G_STORAGE_TYPE_DENSE +2 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT +1 Group : Storage type is H5G_STORAGE_TYPE_COMPACT +0 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT diff --git a/examples/hdfgroup/H5G/testfiles/h5ex_g_traverse.tst b/examples/hdfgroup/H5G/testfiles/h5ex_g_traverse.tst new file mode 100644 index 0000000000..9d44d2f053 --- /dev/null +++ b/examples/hdfgroup/H5G/testfiles/h5ex_g_traverse.tst @@ -0,0 +1,32 @@ +/ { + Group: group1 { + Dataset: dset1 + Group: group3 { + Dataset: dset2 + Group: group4 { + Group: group1 { + Group: group5 { + Warning: Loop detected! + } + } + Group: group2 { + } + } + } + } + Group: group2 { + Dataset: dset2 + Group: group4 { + Group: group1 { + Group: group5 { + Dataset: dset1 + Group: group3 { + Warning: Loop detected! + } + } + } + Group: group2 { + } + } + } +} diff --git a/examples/hdfgroup/H5G/testfiles/h5ex_g_visit.tst b/examples/hdfgroup/H5G/testfiles/h5ex_g_visit.tst new file mode 100644 index 0000000000..126a588840 --- /dev/null +++ b/examples/hdfgroup/H5G/testfiles/h5ex_g_visit.tst @@ -0,0 +1,19 @@ +Objects in the file: +/ (Group) +/group1 (Group) +/group1/dset1 (Dataset) +/group1/group3 (Group) +/group1/group3/group4 (Group) +/group1/group3/group4/group1 (Group) +/group1/group3/group4/group2 (Group) + +Links in the file: +/group1 (Group) +/group1/dset1 (Dataset) +/group1/group3 (Group) +/group1/group3/dset2 (Dataset) +/group1/group3/group4 (Group) +/group1/group3/group4/group1 (Group) +/group1/group3/group4/group1/group5 (Group) +/group1/group3/group4/group2 (Group) +/group2 (Group) diff --git a/examples/hdfgroup/H5T/CMakeLists.txt b/examples/hdfgroup/H5T/CMakeLists.txt new file mode 100644 index 0000000000..89fc3341aa --- /dev/null +++ b/examples/hdfgroup/H5T/CMakeLists.txt @@ -0,0 +1,11 @@ +add_executable(h5ex_t_array h5ex_t_array.cpp) +target_link_libraries(h5ex_t_array h5cpp) + +add_executable(h5ex_t_arrayatt h5ex_t_arrayatt.cpp) +target_link_libraries(h5ex_t_arrayatt h5cpp) + +add_executable(h5ex_t_cmpd h5ex_t_cmpd.cpp measurement.cpp) +target_link_libraries(h5ex_t_cmpd h5cpp) + +add_executable(h5ex_t_enum h5ex_t_enum.cpp phase.cpp) +target_link_libraries(h5ex_t_enum h5cpp) \ No newline at end of file diff --git a/examples/hdfgroup/H5T/C_sourcefiles.cmake b/examples/hdfgroup/H5T/C_sourcefiles.cmake new file mode 100644 index 0000000000..a09cc9dd4c --- /dev/null +++ b/examples/hdfgroup/H5T/C_sourcefiles.cmake @@ -0,0 +1,33 @@ +#----------------------------------------------------------------------------- +# Define Sources, one file per application +#----------------------------------------------------------------------------- +set (examples + h5ex_t_array.c + h5ex_t_arrayatt.c + h5ex_t_bit.c + h5ex_t_bitatt.c + h5ex_t_cmpd.c + h5ex_t_cmpdatt.c + h5ex_t_enum.c + h5ex_t_enumatt.c + h5ex_t_float.c + h5ex_t_floatatt.c + h5ex_t_int.c + h5ex_t_intatt.c + h5ex_t_objref.c + h5ex_t_objrefatt.c + h5ex_t_opaque.c + h5ex_t_opaqueatt.c + h5ex_t_regref.c + h5ex_t_regrefatt.c + h5ex_t_string.c + h5ex_t_stringatt.c + h5ex_t_vlen.c + h5ex_t_vlenatt.c + h5ex_t_vlstring.c + h5ex_t_vlstringatt.c + h5ex_t_cpxcmpd.c + h5ex_t_cpxcmpdatt.c + h5ex_t_commit.c + h5ex_t_convert.c +) diff --git a/examples/hdfgroup/H5T/h5ex_t_array.c b/examples/hdfgroup/H5T/h5ex_t_array.c new file mode 100644 index 0000000000..56f3d4398a --- /dev/null +++ b/examples/hdfgroup/H5T/h5ex_t_array.c @@ -0,0 +1,173 @@ +/************************************************************ + + This example shows how to read and write array datatypes + to a dataset. The program first writes integers arrays of + dimension ADIM0xADIM1 to a dataset with a dataspace of + DIM0, then closes the file. Next, it reopens the file, + reads back the data, and outputs it to the screen. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "h5ex_t_array.h5" +#define DATASET "DS1" +#define DIM0 4 +#define ADIM0 3 +#define ADIM1 5 + +int +main (void) +{ + hid_t file, filetype, memtype, space, dset; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}, + adims[2] = {ADIM0, ADIM1}; + int wdata[DIM0][ADIM0][ADIM1], /* Write buffer */ + ***rdata, /* Read buffer */ + ndims, + i, j, k; + + /* + * Initialize data. i is the element in the dataspace, j and k the + * elements within the array datatype. + */ + for (i=0; i +#include +#include +#include "t_array.hpp" + +#define FILE "h5ex_t_array.h5" +#define DATASET "DS1" + +#define DIM0 4 +#define ADIM0 3 +#define ADIM1 5 + +using namespace hdf5; +using Int32Item = DataItem; +using Int32Items = std::vector; + +void write_data() +{ + // Initialize data. i is the element in the dataspace, j and k the + // elements within the array datatype. + Int32Items wdata(DIM0); + for (int32_t i=0; i(),{ADIM0,ADIM1}); + + // Create dataspace. Setting maximum size to NULL sets the maximum + // size to be the current size. + dataspace::Simple space({DIM0}); + + // Create the dataset and write the array data to it. + node::Dataset dset(file.root(), DATASET, filetype, space); + std::cout<<"Write data"< +#include + +#define FILE "h5ex_t_arrayatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 4 +#define ADIM0 3 +#define ADIM1 5 + +int +main (void) +{ + hid_t file, filetype, memtype, space, dset, attr; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}, + adims[2] = {ADIM0, ADIM1}; + int wdata[DIM0][ADIM0][ADIM1], /* Write buffer */ + ***rdata, /* Read buffer */ + ndims, + i, j, k; + + /* + * Initialize data. i is the element in the dataspace, j and k the + * elements within the array datatype. + */ + for (i=0; i +#include +#include +#include "t_array.hpp" + +#define FILE "h5ex_t_arrayatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 4 +#define ADIM0 3 +#define ADIM1 5 + +using namespace hdf5; +using Int32Item = DataItem; +using Int32Items = std::vector; + +void write_attribute() +{ + // Initialize data. i is the element in the dataspace, j and k the + // elements within the array datatype. + Int32Items wdata(DIM0); + for (int32_t i = 0; i < DIM0; i++) + for (int32_t j = 0; j < ADIM0; j++) + for (int32_t k = 0; k < ADIM1; k++) + wdata[i](j,k) = i * j - j * k + i * k; + + + // Create a new file using the default properties. + file::File file = file::create (FILE, file::AccessFlags::TRUNCATE); + + // Create array datatypes for file and memory. + datatype::Array filetype = datatype::Array::create (datatype::create(),{ADIM0,ADIM1}); + + // Create dataspace. Setting maximum size to NULL sets the maximum + // size to be the current size. + dataspace::Simple space({DIM0}); + + // Create the attribute and write the array data to it. + attribute::Attribute attribute = file.root().attributes.create(ATTRIBUTE,filetype,space); + attribute.write(wdata); +} + +void read_attribute() +{ + // Open file, dataset, and attribute. + file::File file = file::open (FILE, file::AccessFlags::READONLY); + attribute::Attribute attribute = file.root().attributes[ATTRIBUTE]; + + // Get the datatype and its dimensions. + datatype::Array filetype = attribute.datatype(); + + // Get dataspace and allocate memory for read buffer. This is a + // three dimensional attribute when the array datatype is included + // so the dynamic allocation must be done in steps. + dataspace::Simple space = attribute.dataspace(); + + // Allocate array of pointers to two-dimensional arrays (the + // elements of the attribute. + Int32Items rdata(space.size()); + + // Read the data. + attribute.read(rdata); + std::for_each(rdata.begin(),rdata.end(), + [](const Int32Item &item) { std::cout< +#include + +#define FILE "h5ex_t_bit.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 + +int +main (void) +{ + hid_t file, space, dset; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + unsigned char wdata[DIM0][DIM1], /* Write buffer */ + **rdata; /* Read buffer */ + int ndims, A, B, C, D, + i, j; + + /* + * Initialize data. We will manually pack 4 2-bit integers into + * each unsigned char data element. + */ + for (i=0; i> 2) & 0x03; /* Retrieve field "B" */ + C = (rdata[i][j] >> 4) & 0x03; /* Retrieve field "C" */ + D = (rdata[i][j] >> 6) & 0x03; /* Retrieve field "D" */ + printf (" {%d, %d, %d, %d}", A, B, C, D); + } + printf (" ]\n"); + } + + /* + * Close and release resources. + */ + free (rdata[0]); + free (rdata); + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Fclose (file); + + return 0; +} diff --git a/examples/hdfgroup/H5T/h5ex_t_bitatt.c b/examples/hdfgroup/H5T/h5ex_t_bitatt.c new file mode 100644 index 0000000000..346505e4f4 --- /dev/null +++ b/examples/hdfgroup/H5T/h5ex_t_bitatt.c @@ -0,0 +1,153 @@ +/************************************************************ + + This example shows how to read and write bitfield + datatypes to an attribute. The program first writes bit + fields to an attribute with a dataspace of DIM0xDIM1, then + closes the file. Next, it reopens the file, reads back + the data, and outputs it to the screen. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "h5ex_t_bitatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 4 +#define DIM1 7 + +int +main (void) +{ + hid_t file, space, dset, attr; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + unsigned char wdata[DIM0][DIM1], /* Write buffer */ + **rdata; /* Read buffer */ + int ndims, A, B, C, D, + i, j; + + /* + * Initialize data. We will manually pack 4 2-bit integers into + * each unsigned char data element. + */ + for (i=0; i> 2) & 0x03; /* Retrieve field "B" */ + C = (rdata[i][j] >> 4) & 0x03; /* Retrieve field "C" */ + D = (rdata[i][j] >> 6) & 0x03; /* Retrieve field "D" */ + printf (" {%d, %d, %d, %d}", A, B, C, D); + } + printf (" ]\n"); + } + + /* + * Close and release resources. + */ + free (rdata[0]); + free (rdata); + status = H5Aclose (attr); + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Fclose (file); + + return 0; +} diff --git a/examples/hdfgroup/H5T/h5ex_t_cmpd.c b/examples/hdfgroup/H5T/h5ex_t_cmpd.c new file mode 100644 index 0000000000..ae31cc2463 --- /dev/null +++ b/examples/hdfgroup/H5T/h5ex_t_cmpd.c @@ -0,0 +1,170 @@ +/************************************************************ + + This example shows how to read and write compound + datatypes to a dataset. The program first writes + compound structures to a dataset with a dataspace of DIM0, + then closes the file. Next, it reopens the file, reads + back the data, and outputs it to the screen. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "h5ex_t_cmpd.h5" +#define DATASET "DS1" +#define DIM0 4 + +typedef struct { + int serial_no; + char *location; + double temperature; + double pressure; +} sensor_t; /* Compound type */ + +int +main (void) +{ + hid_t file, filetype, memtype, strtype, space, dset; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + sensor_t wdata[DIM0], /* Write buffer */ + *rdata; /* Read buffer */ + int ndims, + i; + + /* + * Initialize data. + */ + wdata[0].serial_no = 1153; + wdata[0].location = "Exterior (static)"; + wdata[0].temperature = 53.23; + wdata[0].pressure = 24.57; + wdata[1].serial_no = 1184; + wdata[1].location = "Intake"; + wdata[1].temperature = 55.12; + wdata[1].pressure = 22.95; + wdata[2].serial_no = 1027; + wdata[2].location = "Intake manifold"; + wdata[2].temperature = 103.55; + wdata[2].pressure = 31.23; + wdata[3].serial_no = 1313; + wdata[3].location = "Exhaust manifold"; + wdata[3].temperature = 1252.89; + wdata[3].pressure = 84.11; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create variable-length string datatype. + */ + strtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (strtype, H5T_VARIABLE); + + /* + * Create the compound datatype for memory. + */ + memtype = H5Tcreate (H5T_COMPOUND, sizeof (sensor_t)); + status = H5Tinsert (memtype, "Serial number", + HOFFSET (sensor_t, serial_no), H5T_NATIVE_INT); + status = H5Tinsert (memtype, "Location", HOFFSET (sensor_t, location), + strtype); + status = H5Tinsert (memtype, "Temperature (F)", + HOFFSET (sensor_t, temperature), H5T_NATIVE_DOUBLE); + status = H5Tinsert (memtype, "Pressure (inHg)", + HOFFSET (sensor_t, pressure), H5T_NATIVE_DOUBLE); + + /* + * Create the compound datatype for the file. Because the standard + * types we are using for the file may have different sizes than + * the corresponding native types, we must manually calculate the + * offset of each member. + */ + filetype = H5Tcreate (H5T_COMPOUND, 8 + sizeof (hvl_t) + 8 + 8); + status = H5Tinsert (filetype, "Serial number", 0, H5T_STD_I64BE); + status = H5Tinsert (filetype, "Location", 8, strtype); + status = H5Tinsert (filetype, "Temperature (F)", 8 + sizeof (hvl_t), + H5T_IEEE_F64BE); + status = H5Tinsert (filetype, "Pressure (inHg)", 8 + sizeof (hvl_t) + 8, + H5T_IEEE_F64BE); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the dataset and write the compound data to it. + */ + dset = H5Dcreate (file, DATASET, filetype, space, H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Dwrite (dset, memtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); + + /* + * Close and release resources. + */ + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Tclose (filetype); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. Here we assume + * the dataset has the same name and rank, but can have any size. + * Therefore we must allocate a new array to read in data using + * malloc(). For simplicity, we do not rebuild memtype. + */ + + /* + * Open file and dataset. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Get dataspace and allocate memory for read buffer. + */ + space = H5Dget_space (dset); + ndims = H5Sget_simple_extent_dims (space, dims, NULL); + rdata = (sensor_t *) malloc (dims[0] * sizeof (sensor_t)); + + /* + * Read the data. + */ + status = H5Dread (dset, memtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata); + + /* + * Output the data to the screen. + */ + for (i=0; i +#include +#include +#include "measurement_hdf5.hpp" + +#define FILE "h5ex_t_cmpd.h5" +#define DATASET "DS1" +#define DIM0 4 + +using namespace hdf5; +using Measurements = std::vector; + +void write_data() +{ + Measurements measurements{ + Measurement(1153,"Exterior (static)",53.23,24.57), + Measurement(1184,"Intake",55.12,22.95), + Measurement(1027,"Intake manifold",103.55,31.23), + Measurement(1313,"Exhaust manifold",1252.89,84.11) + }; + + // Create a new file using the default properties. + file::File file = file::create (FILE, file::AccessFlags::TRUNCATE); + + // Create dataspace. Setting maximum size to NULL sets the maximum + // size to be the current size. + dataspace::Simple space({DIM0}); + + // Create the dataset and write the compound data to it. + node::Dataset dset(file.root(), DATASET, datatype::create(), space); + dset.write(measurements); +} + +void read_data() +{ + /* + * Open file and dataset. + */ + file::File file = file::open (FILE, file::AccessFlags::READONLY); + node::Dataset dset = file.root().nodes[DATASET]; + + /* + * Get dataspace and allocate memory for read buffer. + */ + dataspace::Simple file_space = dset.dataspace(); + Measurements measurements(file_space.size()); + + /* + * Read the data. + */ + dset.read(measurements); + std::for_each(measurements.begin(),measurements.end(), + [](const Measurement &measurement) { std::cout< +#include + +#define FILE "h5ex_t_cmpdatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 4 + +typedef struct { + int serial_no; + char *location; + double temperature; + double pressure; +} sensor_t; /* Compound type */ + +int +main (void) +{ + hid_t file, filetype, memtype, strtype, space, dset, attr; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + sensor_t wdata[DIM0], /* Write buffer */ + *rdata; /* Read buffer */ + int ndims, + i; + + /* + * Initialize data. + */ + wdata[0].serial_no = 1153; + wdata[0].location = "Exterior (static)"; + wdata[0].temperature = 53.23; + wdata[0].pressure = 24.57; + wdata[1].serial_no = 1184; + wdata[1].location = "Intake"; + wdata[1].temperature = 55.12; + wdata[1].pressure = 22.95; + wdata[2].serial_no = 1027; + wdata[2].location = "Intake manifold"; + wdata[2].temperature = 103.55; + wdata[2].pressure = 31.23; + wdata[3].serial_no = 1313; + wdata[3].location = "Exhaust manifold"; + wdata[3].temperature = 1252.89; + wdata[3].pressure = 84.11; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create variable-length string datatype. + */ + strtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (strtype, H5T_VARIABLE); + + /* + * Create the compound datatype for memory. + */ + memtype = H5Tcreate (H5T_COMPOUND, sizeof (sensor_t)); + status = H5Tinsert (memtype, "Serial number", + HOFFSET (sensor_t, serial_no), H5T_NATIVE_INT); + status = H5Tinsert (memtype, "Location", HOFFSET (sensor_t, location), + strtype); + status = H5Tinsert (memtype, "Temperature (F)", + HOFFSET (sensor_t, temperature), H5T_NATIVE_DOUBLE); + status = H5Tinsert (memtype, "Pressure (inHg)", + HOFFSET (sensor_t, pressure), H5T_NATIVE_DOUBLE); + + /* + * Create the compound datatype for the file. Because the standard + * types we are using for the file may have different sizes than + * the corresponding native types, we must manually calculate the + * offset of each member. + */ + filetype = H5Tcreate (H5T_COMPOUND, 8 + sizeof (hvl_t) + 8 + 8); + status = H5Tinsert (filetype, "Serial number", 0, H5T_STD_I64BE); + status = H5Tinsert (filetype, "Location", 8, strtype); + status = H5Tinsert (filetype, "Temperature (F)", 8 + sizeof (hvl_t), + H5T_IEEE_F64BE); + status = H5Tinsert (filetype, "Pressure (inHg)", 8 + sizeof (hvl_t) + 8, + H5T_IEEE_F64BE); + + /* + * Create dataset with a null dataspace. + */ + space = H5Screate (H5S_NULL); + dset = H5Dcreate (file, DATASET, H5T_STD_I32LE, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Sclose (space); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the attribute and write the compound data to it. + */ + attr = H5Acreate (dset, ATTRIBUTE, filetype, space, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Awrite (attr, memtype, wdata); + + /* + * Close and release resources. + */ + status = H5Aclose (attr); + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Tclose (filetype); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. Here we assume + * the attribute has the same name and rank, but can have any size. + * Therefore we must allocate a new array to read in data using + * malloc(). For simplicity, we do not rebuild memtype. + */ + + /* + * Open file, dataset, and attribute. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + attr = H5Aopen (dset, ATTRIBUTE, H5P_DEFAULT); + + /* + * Get dataspace and allocate memory for read buffer. + */ + space = H5Aget_space (attr); + ndims = H5Sget_simple_extent_dims (space, dims, NULL); + rdata = (sensor_t *) malloc (dims[0] * sizeof (sensor_t)); + + /* + * Read the data. + */ + status = H5Aread (attr, memtype, rdata); + + /* + * Output the data to the screen. + */ + for (i=0; i +#include + +#define FILE "h5ex_t_commit.h5" +#define DATATYPE "Sensor_Type" + +int +main (void) +{ + hid_t file, filetype, strtype; + /* Handles */ + herr_t status; + H5T_class_t typeclass; + char *name; + int nmembs, + i; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create variable-length string datatype. + */ + strtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (strtype, H5T_VARIABLE); + + /* + * Create the compound datatype. Because the standard types we are + * using may have different sizes than the corresponding native + * types, we must manually calculate the offset of each member. + */ + filetype = H5Tcreate (H5T_COMPOUND, 8 + sizeof (char *) + 8 + 8); + status = H5Tinsert (filetype, "Serial number", 0, H5T_STD_I64BE); + status = H5Tinsert (filetype, "Location", 8, strtype); + status = H5Tinsert (filetype, "Temperature (F)", 8 + sizeof (char *), + H5T_IEEE_F64BE); + status = H5Tinsert (filetype, "Pressure (inHg)", 8 + sizeof (char *) + 8, + H5T_IEEE_F64BE); + + /* + * Commit the compound datatype to the file, creating a named + * datatype. + */ + status = H5Tcommit (file, DATATYPE, filetype, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + + /* + * Close and release resources. + */ + status = H5Tclose (filetype); + status = H5Tclose (strtype); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. + */ + + /* + * Open file. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + + /* + * Open the named datatype. + */ + filetype = H5Topen (file, DATATYPE, H5P_DEFAULT); + + /* + * Output the data to the screen. + */ + printf ("Named datatype: %s:\n", DATATYPE); + /* + * Get datatype class. If it isn't compound, we won't print + * anything. + */ + typeclass = H5Tget_class (filetype); + if (typeclass == H5T_COMPOUND) { + printf (" Class: H5T_COMPOUND\n"); + nmembs = H5Tget_nmembers (filetype); + /* + * Iterate over compound datatype members. + */ + for (i=0; i +#include + +#define DIM0 4 + +typedef struct { + double temperature; + double pressure; +} reading_t; /* Source type */ + +typedef struct { + int serial_no; + char *location; + double temperature; + double pressure; +} sensor_t; /* Destination type */ + +int +main (void) +{ + hid_t sourcetype, desttype, strtype, space; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + reading_t *reading; /* Conversion buffer */ + sensor_t *sensor, /* Conversion buffer */ + bkgrd[DIM0]; /* Background buffer */ + int i; + + /* + * Allocate memory for conversion buffer. We will allocate space + * for it to hold DIM0 elements of the destination type, as the + * type conversion is performed in place. Of course, if the + * destination type were smaller than the source type, we would + * allocate space to hold DIM0 elements of the source type. + */ + reading = (reading_t *) malloc (DIM0 * sizeof (sensor_t)); + + /* + * Assign the allocated space to a pointer of the destination type, + * to allow the buffer to be accessed correctly after the + * conversion has taken place. + */ + sensor = (sensor_t *) reading; + + /* + * Initialize data. + */ + bkgrd[0].serial_no = 1153; + bkgrd[0].location = "Exterior (static)"; + bkgrd[0].temperature = 53.23; + bkgrd[0].pressure = 24.57; + bkgrd[1].serial_no = 1184; + bkgrd[1].location = "Intake"; + bkgrd[1].temperature = 55.12; + bkgrd[1].pressure = 22.95; + bkgrd[2].serial_no = 1027; + bkgrd[2].location = "Intake manifold"; + bkgrd[2].temperature = 103.55; + bkgrd[2].pressure = 31.23; + bkgrd[3].serial_no = 1313; + bkgrd[3].location = "Exhaust manifold"; + bkgrd[3].temperature = 1252.89; + bkgrd[3].pressure = 84.11; + + reading[0].temperature = 54.84; + reading[0].pressure = 24.76; + reading[1].temperature = 56.63; + reading[1].pressure = 23.10; + reading[2].temperature = 102.69; + reading[2].pressure = 30.97; + reading[3].temperature = 1238.27; + reading[3].pressure = 82.15; + + /* + * Create variable-length string datatype. + */ + strtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (strtype, H5T_VARIABLE); + + /* + * Create the compound datatype for memory. + */ + sourcetype = H5Tcreate (H5T_COMPOUND, sizeof (reading_t)); + status = H5Tinsert (sourcetype, "Temperature (F)", + HOFFSET (reading_t, temperature), H5T_NATIVE_DOUBLE); + status = H5Tinsert (sourcetype, "Pressure (inHg)", + HOFFSET (reading_t, pressure), H5T_NATIVE_DOUBLE); + + desttype = H5Tcreate (H5T_COMPOUND, sizeof (sensor_t)); + status = H5Tinsert (desttype, "Serial number", + HOFFSET (sensor_t, serial_no), H5T_NATIVE_INT); + status = H5Tinsert (desttype, "Location", HOFFSET (sensor_t, location), + strtype); + status = H5Tinsert (desttype, "Temperature (F)", + HOFFSET (sensor_t, temperature), H5T_NATIVE_DOUBLE); + status = H5Tinsert (desttype, "Pressure (inHg)", + HOFFSET (sensor_t, pressure), H5T_NATIVE_DOUBLE); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Convert the buffer in reading from sourcetype to desttype. + * After this conversion we will use sensor to access the buffer, + * as the buffer now matches its type. + */ + status = H5Tconvert (sourcetype, desttype, DIM0, reading, bkgrd, + H5P_DEFAULT); + + /* + * Output the data to the screen. + */ + for (i=0; i +#include + +#define FILE "h5ex_t_cpxcmpd.h5" +#define DATASET "DS1" +#define DIM0 2 + +typedef struct { + int serial_no; + char *location; + double temperature; + double pressure; +} sensor_t; /* Nested compound type */ + +typedef enum { + RED, + GREEN, + BLUE +} color_t ; /* Enumerated type */ + +typedef struct { + hvl_t sensors; + char *name; + color_t color; + double location[3]; + hobj_ref_t group; + hdset_reg_ref_t surveyed_areas; +} vehicle_t; /* Main compound type */ + +typedef struct { + hvl_t sensors; + char *name; +} rvehicle_t; /* Read type */ + +int +main (void) +{ + hid_t file, vehicletype, colortype, sensortype, sensorstype, loctype, + strtype, rvehicletype, rsensortype, rsensorstype, space, dset, + group; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}, + adims[1] = {3}, + adims2[2] = {32, 32}, + start[2] = {8, 26}, + count[2] = {4, 3}, + coords[3][2] = { {3, 2}, + {3, 3}, + {4, 4} }; + vehicle_t wdata[2]; /* Write buffer */ + rvehicle_t *rdata; /* Read buffer */ + color_t val; + sensor_t *ptr; + double wdata2[32][32]; + int ndims, + i, j; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create dataset to use for region references. + */ + for (i=0; i<32; i++) + for (j=0; j<32; j++) + wdata2[i][j]= 70. + 0.1 * (i - 16.) + 0.1 * (j - 16.); + space = H5Screate_simple (2, adims2, NULL); + dset = H5Dcreate (file, "Ambient_Temperature", H5T_NATIVE_DOUBLE, space, + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite (dset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata2[0]); + status = H5Dclose (dset); + + /* + * Create groups to use for object references. + */ + group = H5Gcreate (file, "Land_Vehicles", H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Gclose (group); + group = H5Gcreate (file, "Air_Vehicles", H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Gclose (group); + + /* + * Initialize variable-length compound in the first data element. + */ + wdata[0].sensors.len = 4; + ptr = (sensor_t *) malloc (wdata[0].sensors.len * sizeof (sensor_t)); + ptr[0].serial_no = 1153; + ptr[0].location = "Exterior (static)"; + ptr[0].temperature = 53.23; + ptr[0].pressure = 24.57; + ptr[1].serial_no = 1184; + ptr[1].location = "Intake"; + ptr[1].temperature = 55.12; + ptr[1].pressure = 22.95; + ptr[2].serial_no = 1027; + ptr[2].location = "Intake manifold"; + ptr[2].temperature = 103.55; + ptr[2].pressure = 31.23; + ptr[3].serial_no = 1313; + ptr[3].location = "Exhaust manifold"; + ptr[3].temperature = 1252.89; + ptr[3].pressure = 84.11; + wdata[0].sensors.p = (void *) ptr; + + /* + * Initialize other fields in the first data element. + */ + wdata[0].name = "Airplane"; + wdata[0].color = GREEN; + wdata[0].location[0] = -103234.21; + wdata[0].location[1] = 422638.78; + wdata[0].location[2] = 5996.43; + status = H5Rcreate (&wdata[0].group, file, "Air_Vehicles", H5R_OBJECT, -1); + status = H5Sselect_elements (space, H5S_SELECT_SET, 3, coords[0]); + status = H5Rcreate (&wdata[0].surveyed_areas, file, "Ambient_Temperature", + H5R_DATASET_REGION, space); + + /* + * Initialize variable-length compound in the second data element. + */ + wdata[1].sensors.len = 1; + ptr = (sensor_t *) malloc (wdata[1].sensors.len * sizeof (sensor_t)); + ptr[0].serial_no = 3244; + ptr[0].location = "Roof"; + ptr[0].temperature = 83.82; + ptr[0].pressure = 29.92; + wdata[1].sensors.p = (void *) ptr; + + /* + * Initialize other fields in the second data element. + */ + wdata[1].name = "Automobile"; + wdata[1].color = RED; + wdata[1].location[0] = 326734.36; + wdata[1].location[1] = 221568.23; + wdata[1].location[2] = 432.36; + status = H5Rcreate (&wdata[1].group, file, "Land_Vehicles", H5R_OBJECT, -1); + status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, + NULL); + status = H5Rcreate (&wdata[1].surveyed_areas, file, "Ambient_Temperature", + H5R_DATASET_REGION, space); + + status = H5Sclose (space); + + /* + * Create variable-length string datatype. + */ + strtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (strtype, H5T_VARIABLE); + + /* + * Create the nested compound datatype. + */ + sensortype = H5Tcreate (H5T_COMPOUND, sizeof (sensor_t)); + status = H5Tinsert (sensortype, "Serial number", + HOFFSET (sensor_t, serial_no), H5T_NATIVE_INT); + status = H5Tinsert (sensortype, "Location", HOFFSET (sensor_t, location), + strtype); + status = H5Tinsert (sensortype, "Temperature (F)", + HOFFSET (sensor_t, temperature), H5T_NATIVE_DOUBLE); + status = H5Tinsert (sensortype, "Pressure (inHg)", + HOFFSET (sensor_t, pressure), H5T_NATIVE_DOUBLE); + + /* + * Create the variable-length datatype. + */ + sensorstype = H5Tvlen_create (sensortype); + + /* + * Create the enumerated datatype. + */ + colortype = H5Tenum_create (H5T_NATIVE_INT); + val = (color_t) RED; + status = H5Tenum_insert (colortype, "Red", &val); + val = (color_t) GREEN; + status = H5Tenum_insert (colortype, "Green", &val); + val = (color_t) BLUE; + status = H5Tenum_insert (colortype, "Blue", &val); + + /* + * Create the array datatype. + */ + loctype = H5Tarray_create (H5T_NATIVE_DOUBLE, 1, adims); + + /* + * Create the main compound datatype. + */ + vehicletype = H5Tcreate (H5T_COMPOUND, sizeof (vehicle_t)); + status = H5Tinsert (vehicletype, "Sensors", HOFFSET (vehicle_t, sensors), + sensorstype); + status = H5Tinsert (vehicletype, "Name", HOFFSET (vehicle_t, name), + strtype); + status = H5Tinsert (vehicletype, "Color", HOFFSET (vehicle_t, color), + colortype); + status = H5Tinsert (vehicletype, "Location", HOFFSET (vehicle_t, location), + loctype); + status = H5Tinsert (vehicletype, "Group", HOFFSET (vehicle_t, group), + H5T_STD_REF_OBJ); + status = H5Tinsert (vehicletype, "Surveyed areas", + HOFFSET (vehicle_t, surveyed_areas), H5T_STD_REF_DSETREG); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the dataset and write the compound data to it. + */ + dset = H5Dcreate (file, DATASET, vehicletype, space, H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Dwrite (dset, vehicletype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); + + /* + * Close and release resources. Note that we cannot use + * H5Dvlen_reclaim as it would attempt to free() the string + * constants used to initialize the name fields in wdata. We must + * therefore manually free() only the data previously allocated + * through malloc(). + */ + for (i=0; i +#include + +#define FILE "h5ex_t_cpxcmpdatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 2 + +typedef struct { + int serial_no; + char *location; + double temperature; + double pressure; +} sensor_t; /* Nested compound type */ + +typedef enum { + RED, + GREEN, + BLUE +} color_t ; /* Enumerated type */ + +typedef struct { + hvl_t sensors; + char *name; + color_t color; + double location[3]; + hobj_ref_t group; + hdset_reg_ref_t surveyed_areas; +} vehicle_t; /* Main compound type */ + +typedef struct { + hvl_t sensors; + char *name; +} rvehicle_t; /* Read type */ + +int +main (void) +{ + hid_t file, vehicletype, colortype, sensortype, sensorstype, loctype, + strtype, rvehicletype, rsensortype, rsensorstype, space, dset, + group, attr; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}, + adims[1] = {3}, + adims2[2] = {32, 32}, + start[2] = {8, 26}, + count[2] = {4, 3}, + coords[3][2] = { {3, 2}, + {3, 3}, + {4, 4} }; + vehicle_t wdata[2]; /* Write buffer */ + rvehicle_t *rdata; /* Read buffer */ + color_t val; + sensor_t *ptr; + double wdata2[32][32]; + int ndims, + i, j; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create dataset to use for region references. + */ + for (i=0; i<32; i++) + for (j=0; j<32; j++) + wdata2[i][j]= 70. + 0.1 * (i - 16.) + 0.1 * (j - 16.); + space = H5Screate_simple (2, adims2, NULL); + dset = H5Dcreate (file, "Ambient_Temperature", H5T_NATIVE_DOUBLE, space, + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite (dset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata2[0]); + status = H5Dclose (dset); + + /* + * Create groups to use for object references. + */ + group = H5Gcreate (file, "Land_Vehicles", H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Gclose (group); + group = H5Gcreate (file, "Air_Vehicles", H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Gclose (group); + + /* + * Initialize variable-length compound in the first data element. + */ + wdata[0].sensors.len = 4; + ptr = (sensor_t *) malloc (wdata[0].sensors.len * sizeof (sensor_t)); + ptr[0].serial_no = 1153; + ptr[0].location = "Exterior (static)"; + ptr[0].temperature = 53.23; + ptr[0].pressure = 24.57; + ptr[1].serial_no = 1184; + ptr[1].location = "Intake"; + ptr[1].temperature = 55.12; + ptr[1].pressure = 22.95; + ptr[2].serial_no = 1027; + ptr[2].location = "Intake manifold"; + ptr[2].temperature = 103.55; + ptr[2].pressure = 31.23; + ptr[3].serial_no = 1313; + ptr[3].location = "Exhaust manifold"; + ptr[3].temperature = 1252.89; + ptr[3].pressure = 84.11; + wdata[0].sensors.p = (void *) ptr; + + /* + * Initialize other fields in the first data element. + */ + wdata[0].name = "Airplane"; + wdata[0].color = GREEN; + wdata[0].location[0] = -103234.21; + wdata[0].location[1] = 422638.78; + wdata[0].location[2] = 5996.43; + status = H5Rcreate (&wdata[0].group, file, "Air_Vehicles", H5R_OBJECT, -1); + status = H5Sselect_elements (space, H5S_SELECT_SET, 3, coords[0]); + status = H5Rcreate (&wdata[0].surveyed_areas, file, "Ambient_Temperature", + H5R_DATASET_REGION, space); + + /* + * Initialize variable-length compound in the second data element. + */ + wdata[1].sensors.len = 1; + ptr = (sensor_t *) malloc (wdata[1].sensors.len * sizeof (sensor_t)); + ptr[0].serial_no = 3244; + ptr[0].location = "Roof"; + ptr[0].temperature = 83.82; + ptr[0].pressure = 29.92; + wdata[1].sensors.p = (void *) ptr; + + /* + * Initialize other fields in the second data element. + */ + wdata[1].name = "Automobile"; + wdata[1].color = RED; + wdata[1].location[0] = 326734.36; + wdata[1].location[1] = 221568.23; + wdata[1].location[2] = 432.36; + status = H5Rcreate (&wdata[1].group, file, "Land_Vehicles", H5R_OBJECT, -1); + status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, + NULL); + status = H5Rcreate (&wdata[1].surveyed_areas, file, "Ambient_Temperature", + H5R_DATASET_REGION, space); + + status = H5Sclose (space); + + /* + * Create variable-length string datatype. + */ + strtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (strtype, H5T_VARIABLE); + + /* + * Create the nested compound datatype. + */ + sensortype = H5Tcreate (H5T_COMPOUND, sizeof (sensor_t)); + status = H5Tinsert (sensortype, "Serial number", + HOFFSET (sensor_t, serial_no), H5T_NATIVE_INT); + status = H5Tinsert (sensortype, "Location", HOFFSET (sensor_t, location), + strtype); + status = H5Tinsert (sensortype, "Temperature (F)", + HOFFSET (sensor_t, temperature), H5T_NATIVE_DOUBLE); + status = H5Tinsert (sensortype, "Pressure (inHg)", + HOFFSET (sensor_t, pressure), H5T_NATIVE_DOUBLE); + + /* + * Create the variable-length datatype. + */ + sensorstype = H5Tvlen_create (sensortype); + + /* + * Create the enumerated datatype. + */ + colortype = H5Tenum_create (H5T_NATIVE_INT); + val = (color_t) RED; + status = H5Tenum_insert (colortype, "Red", &val); + val = (color_t) GREEN; + status = H5Tenum_insert (colortype, "Green", &val); + val = (color_t) BLUE; + status = H5Tenum_insert (colortype, "Blue", &val); + + /* + * Create the array datatype. + */ + loctype = H5Tarray_create (H5T_NATIVE_DOUBLE, 1, adims); + + /* + * Create the main compound datatype. + */ + vehicletype = H5Tcreate (H5T_COMPOUND, sizeof (vehicle_t)); + status = H5Tinsert (vehicletype, "Sensors", HOFFSET (vehicle_t, sensors), + sensorstype); + status = H5Tinsert (vehicletype, "Name", HOFFSET (vehicle_t, name), + strtype); + status = H5Tinsert (vehicletype, "Color", HOFFSET (vehicle_t, color), + colortype); + status = H5Tinsert (vehicletype, "Location", HOFFSET (vehicle_t, location), + loctype); + status = H5Tinsert (vehicletype, "Group", HOFFSET (vehicle_t, group), + H5T_STD_REF_OBJ); + status = H5Tinsert (vehicletype, "Surveyed areas", + HOFFSET (vehicle_t, surveyed_areas), H5T_STD_REF_DSETREG); + + /* + * Create dataset with a null dataspace. to serve as the parent for + * the attribute. + */ + space = H5Screate (H5S_NULL); + dset = H5Dcreate (file, DATASET, H5T_STD_I32LE, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Sclose (space); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the attribute and write the compound data to it. + */ + attr = H5Acreate (dset, ATTRIBUTE, vehicletype, space, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Awrite (attr, vehicletype, wdata); + + + /* + * Close and release resources. Note that we cannot use + * H5Dvlen_reclaim as it would attempt to free() the string + * constants used to initialize the name fields in wdata. We must + * therefore manually free() only the data previously allocated + * through malloc(). + */ + for (i=0; i +#include + +#define FILE "h5ex_t_enum.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define F_BASET H5T_STD_I16BE /* File base type */ +#define M_BASET H5T_NATIVE_INT /* Memory base type */ +#define NAME_BUF_SIZE 16 + +typedef enum { + SOLID, + LIQUID, + GAS, + PLASMA +} phase_t; /* Enumerated type */ + +int +main (void) +{ + hid_t file, filetype, memtype, space, dset; + /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + phase_t wdata[DIM0][DIM1], /* Write buffer */ + **rdata, /* Read buffer */ + val; + char *names[4] = {"SOLID", "LIQUID", "GAS", "PLASMA"}, + name[NAME_BUF_SIZE]; + int ndims, + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include "phase.hpp" +#include "../H5D/matrix_hdf5.hpp" +#include + +#define FILE "h5ex_t_enum.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 +#define F_BASET H5T_STD_I16BE /* File base type */ +#define M_BASET H5T_NATIVE_INT /* Memory base type */ +#define NAME_BUF_SIZE 16 + +using namespace hdf5; +using PhaseMatrix = Matrix; + +void write_data() +{ + // Initialize data. + PhaseMatrix phases; + for (unsigned char i = 0; i < DIM0; i++) + for (unsigned char j = 0; j < DIM1; j++) + phases(i,j) = static_cast(((i + 1) * j - j) % ((unsigned char) (Phase::PLASMA) + 1)); + + // Create a new file using the default properties. + file::File file = file::create(FILE,file::AccessFlags::TRUNCATE); + + // Create dataspace. Setting maximum size to NULL sets the maximum + // size to be the current size. + dataspace::Simple space({DIM0,DIM1}); + + // Create the dataset and write the enumerated data to it. + node::Dataset dset(file.root(), DATASET, datatype::create(), space); + dset.write(phases); +} + +void read_data() +{ + // Open file and dataset. + file::File file = file::open (FILE, file::AccessFlags::READONLY); + node::Dataset dset = file.root().nodes[DATASET]; + + // Get dataspace and allocate memory for read buffer. This is a + // two dimensional dataset so the dynamic allocation must be done + // in steps. + dataspace::Simple space = dset.dataspace(); + + // Read the data. + PhaseMatrix phases; + dset.read(phases); + + // Output the data to the screen. + std::cout< +#include + +#define FILE "h5ex_t_enumatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 4 +#define DIM1 7 +#define F_BASET H5T_STD_I16BE /* File base type */ +#define M_BASET H5T_NATIVE_INT /* Memory base type */ +#define NAME_BUF_SIZE 16 + +typedef enum { + SOLID, + LIQUID, + GAS, + PLASMA +} phase_t; /* Enumerated type */ + +int +main (void) +{ + hid_t file, filetype, memtype, space, dset, attr; + /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + phase_t wdata[DIM0][DIM1], /* Write buffer */ + **rdata, /* Read buffer */ + val; + char *names[4] = {"SOLID", "LIQUID", "GAS", "PLASMA"}, + name[NAME_BUF_SIZE]; + int ndims, + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_t_float.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 + +int +main (void) +{ + hid_t file, space, dset; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + double wdata[DIM0][DIM1], /* Write buffer */ + **rdata; /* Read buffer */ + int ndims, + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_t_floatatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 4 +#define DIM1 7 + +int +main (void) +{ + hid_t file, space, dset, attr; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + double wdata[DIM0][DIM1], /* Write buffer */ + **rdata; /* Read buffer */ + int ndims, + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_t_int.h5" +#define DATASET "DS1" +#define DIM0 4 +#define DIM1 7 + +int +main (void) +{ + hid_t file, space, dset; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + int wdata[DIM0][DIM1], /* Write buffer */ + **rdata, /* Read buffer */ + ndims, + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_t_intatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 4 +#define DIM1 7 + +int +main (void) +{ + hid_t file, space, dset, attr; /* Handles */ + herr_t status; + hsize_t dims[2] = {DIM0, DIM1}; + int wdata[DIM0][DIM1], /* Write buffer */ + **rdata, /* Read buffer */ + ndims, + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_t_objref.h5" +#define DATASET "DS1" +#define DIM0 2 + +int +main (void) +{ + hid_t file, space, dset, obj; /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + hobj_ref_t wdata[DIM0], /* Write buffer */ + *rdata; /* Read buffer */ + H5O_type_t objtype; + ssize_t size; + char *name; + int ndims, + i; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create a dataset with a null dataspace. + */ + space = H5Screate (H5S_NULL); + obj = H5Dcreate (file, "DS2", H5T_STD_I32LE, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Dclose (obj); + status = H5Sclose (space); + + /* + * Create a group. + */ + obj = H5Gcreate (file, "G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Gclose (obj); + + /* + * Create references to the previously created objects. Passing -1 + * as space_id causes this parameter to be ignored. Other values + * besides valid dataspaces result in an error. + */ + status = H5Rcreate (&wdata[0], file, "G1", H5R_OBJECT, -1); + status = H5Rcreate (&wdata[1], file, "DS2", H5R_OBJECT, -1); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the dataset and write the object references to it. + */ + dset = H5Dcreate (file, DATASET, H5T_STD_REF_OBJ, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite (dset, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata); + + /* + * Close and release resources. + */ + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. Here we assume + * the dataset has the same name and rank, but can have any size. + * Therefore we must allocate a new array to read in data using + * malloc(). + */ + + /* + * Open file and dataset. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Get dataspace and allocate memory for read buffer. + */ + space = H5Dget_space (dset); + ndims = H5Sget_simple_extent_dims (space, dims, NULL); + rdata = (hobj_ref_t *) malloc (dims[0] * sizeof (hobj_ref_t)); + + /* + * Read the data. + */ + status = H5Dread (dset, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, + rdata); + + /* + * Output the data to the screen. + */ + for (i=0; i", DATASET, i); + + /* + * Open the referenced object, get its name and type. + */ + obj = H5Rdereference (dset, H5P_DEFAULT, H5R_OBJECT, &rdata[i]); + status = H5Rget_obj_type (dset, H5R_OBJECT, &rdata[i], &objtype); + + /* + * Get the length of the name, allocate space, then retrieve + * the name. + */ + size = 1 + H5Iget_name (obj, NULL, 0); + name = (char *) malloc (size); + size = H5Iget_name (obj, name, size); + + /* + * Print the object type and close the object. + */ + switch (objtype) { + case H5O_TYPE_GROUP: + printf ("Group"); + break; + case H5O_TYPE_DATASET: + printf ("Dataset"); + break; + case H5O_TYPE_NAMED_DATATYPE: + printf ("Named Datatype"); + break; + case H5O_TYPE_UNKNOWN: + case H5O_TYPE_NTYPES: + printf ("Unknown"); + } + status = H5Oclose (obj); + + /* + * Print the name and deallocate space for the name. + */ + printf (": %s\n", name); + free (name); + } + + /* + * Close and release resources. + */ + free (rdata); + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Fclose (file); + + return 0; +} diff --git a/examples/hdfgroup/H5T/h5ex_t_objrefatt.c b/examples/hdfgroup/H5T/h5ex_t_objrefatt.c new file mode 100644 index 0000000000..b5c85ec779 --- /dev/null +++ b/examples/hdfgroup/H5T/h5ex_t_objrefatt.c @@ -0,0 +1,178 @@ +/************************************************************ + + This example shows how to read and write object references + to an attribute. The program first creates objects in the + file and writes references to those objects to an + attribute with a dataspace of DIM0, then closes the file. + Next, it reopens the file, dereferences the references, + and outputs the names of their targets to the screen. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "h5ex_t_objrefatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 2 + +int +main (void) +{ + hid_t file, space, dset, obj, attr; /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + hobj_ref_t wdata[DIM0], /* Write buffer */ + *rdata; /* Read buffer */ + H5O_type_t objtype; + ssize_t size; + char *name; + int ndims, + i; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create a dataset with a null dataspace. + */ + space = H5Screate (H5S_NULL); + obj = H5Dcreate (file, "DS2", H5T_STD_I32LE, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Dclose (obj); + status = H5Sclose (space); + + /* + * Create a group. + */ + obj = H5Gcreate (file, "G1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + status = H5Gclose (obj); + + /* + * Create references to the previously created objects. Passing -1 + * as space_id causes this parameter to be ignored. Other values + * besides valid dataspaces result in an error. + */ + status = H5Rcreate (&wdata[0], file, "G1", H5R_OBJECT, -1); + status = H5Rcreate (&wdata[1], file, "DS2", H5R_OBJECT, -1); + + /* + * Create dataset with a null dataspace to serve as the parent for + * the attribute. + */ + space = H5Screate (H5S_NULL); + dset = H5Dcreate (file, DATASET, H5T_STD_I32LE, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Sclose (space); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the attribute and write the object references to it. + */ + attr = H5Acreate (dset, ATTRIBUTE, H5T_STD_REF_OBJ, space, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Awrite (attr, H5T_STD_REF_OBJ, wdata); + + /* + * Close and release resources. + */ + status = H5Aclose (attr); + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. Here we assume + * the attribute has the same name and rank, but can have any size. + * Therefore we must allocate a new array to read in data using + * malloc(). + */ + + /* + * Open file, dataset, and attribute. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + attr = H5Aopen (dset, ATTRIBUTE, H5P_DEFAULT); + + /* + * Get dataspace and allocate memory for read buffer. + */ + space = H5Aget_space (attr); + ndims = H5Sget_simple_extent_dims (space, dims, NULL); + rdata = (hobj_ref_t *) malloc (dims[0] * sizeof (hobj_ref_t)); + + /* + * Read the data. + */ + status = H5Aread (attr, H5T_STD_REF_OBJ, rdata); + + /* + * Output the data to the screen. + */ + for (i=0; i", ATTRIBUTE, i); + + /* + * Open the referenced object, get its name and type. + */ + obj = H5Rdereference (dset, H5P_DEFAULT, H5R_OBJECT, &rdata[i]); + status = H5Rget_obj_type (dset, H5R_OBJECT, &rdata[i], &objtype); + + /* + * Get the length of the name, allocate space, then retrieve + * the name. + */ + size = 1 + H5Iget_name (obj, NULL, 0); + name = (char *) malloc (size); + size = H5Iget_name (obj, name, size); + + /* + * Print the object type and close the object. + */ + switch (objtype) { + case H5O_TYPE_GROUP: + printf ("Group"); + break; + case H5O_TYPE_DATASET: + printf ("Dataset"); + break; + case H5O_TYPE_NAMED_DATATYPE: + printf ("Named Datatype"); + break; + case H5O_TYPE_UNKNOWN: + case H5O_TYPE_NTYPES: + printf ("Unknown"); + } + status = H5Oclose (obj); + + /* + * Print the name and deallocate space for the name. + */ + printf (": %s\n", name); + free (name); + } + + /* + * Close and release resources. + */ + free (rdata); + status = H5Aclose (attr); + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Fclose (file); + + return 0; +} diff --git a/examples/hdfgroup/H5T/h5ex_t_opaque.c b/examples/hdfgroup/H5T/h5ex_t_opaque.c new file mode 100644 index 0000000000..d8f61da114 --- /dev/null +++ b/examples/hdfgroup/H5T/h5ex_t_opaque.c @@ -0,0 +1,136 @@ +/************************************************************ + + This example shows how to read and write opaque datatypes + to a dataset. The program first writes opaque data to a + dataset with a dataspace of DIM0, then closes the file. + Next, it reopens the file, reads back the data, and + outputs it to the screen. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "h5ex_t_opaque.h5" +#define DATASET "DS1" +#define DIM0 4 +#define LEN 7 + +int +main (void) +{ + hid_t file, space, dtype, dset; /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + size_t len; + char wdata[DIM0*LEN], /* Write buffer */ + *rdata, /* Read buffer */ + str[LEN] = "OPAQUE", + *tag; + int ndims, + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_t_opaqueatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 4 +#define LEN 7 + +int +main (void) +{ + hid_t file, space, dtype, dset, attr; /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + size_t len; + char wdata[DIM0*LEN], /* Write buffer */ + *rdata, /* Read buffer */ + str[LEN] = "OPAQUE", + *tag; + int ndims, + i, j; + + /* + * Initialize data. + */ + for (i=0; i +#include + +#define FILE "h5ex_t_regref.h5" +#define DATASET "DS1" +#define DATASET2 "DS2" +#define DIM0 2 +#define DS2DIM0 3 +#define DS2DIM1 16 + +int +main (void) +{ + hid_t file, space, memspace, dset, dset2; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}, + dims2[2] = {DS2DIM0, DS2DIM1}, + coords[4][2] = { {0, 1}, + {2, 11}, + {1, 0}, + {2, 4} }, + start[2] = {0, 0}, + stride[2] = {2, 11}, + count[2] = {2, 2}, + block[2] = {1, 3}; + hssize_t npoints; + hdset_reg_ref_t wdata[DIM0], /* Write buffer */ + *rdata; /* Read buffer */ + ssize_t size; + char wdata2[DS2DIM0][DS2DIM1] = {"The quick brown", + "fox jumps over ", + "the 5 lazy dogs"}, + *rdata2, + *name; + int ndims, + i; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create a dataset with character data. + */ + space = H5Screate_simple (2, dims2, NULL); + dset2 = H5Dcreate (file, DATASET2, H5T_STD_I8LE, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite (dset2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata2); + + /* + * Create reference to a list of elements in dset2. + */ + status = H5Sselect_elements (space, H5S_SELECT_SET, 4, coords[0]); + status = H5Rcreate (&wdata[0], file, DATASET2, H5R_DATASET_REGION, space); + + /* + * Create reference to a hyperslab in dset2, close dataspace. + */ + status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, stride, count, + block); + status = H5Rcreate (&wdata[1], file, DATASET2, H5R_DATASET_REGION, space); + status = H5Sclose (space); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the dataset and write the region references to it. + */ + dset = H5Dcreate (file, DATASET, H5T_STD_REF_DSETREG, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite (dset, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata); + + /* + * Close and release resources. + */ + status = H5Dclose (dset); + status = H5Dclose (dset2); + status = H5Sclose (space); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. Here we assume + * the dataset has the same name and rank, but can have any size. + * Therefore we must allocate a new array to read in data using + * malloc(). + */ + + /* + * Open file and dataset. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Get dataspace and allocate memory for read buffer. + */ + space = H5Dget_space (dset); + ndims = H5Sget_simple_extent_dims (space, dims, NULL); + rdata = (hdset_reg_ref_t *) malloc (dims[0] * sizeof (hdset_reg_ref_t)); + status = H5Sclose (space); + + /* + * Read the data. + */ + status = H5Dread (dset, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, + rdata); + + /* + * Output the data to the screen. + */ + for (i=0; i", DATASET, i); + + /* + * Open the referenced object, retrieve its region as a + * dataspace selection. + */ + dset2 = H5Rdereference (dset, H5P_DEFAULT, H5R_DATASET_REGION, &rdata[i]); + space = H5Rget_region (dset, H5R_DATASET_REGION, &rdata[i]); + + /* + * Get the length of the object's name, allocate space, then + * retrieve the name. + */ + size = 1 + H5Iget_name (dset2, NULL, 0); + name = (char *) malloc (size); + size = H5Iget_name (dset2, name, size); + + /* + * Allocate space for the read buffer. We will only allocate + * enough space for the selection, plus a null terminator. The + * read buffer will be 1-dimensional. + */ + npoints = H5Sget_select_npoints (space); + rdata2 = (char *) malloc (npoints + 1); + + /* + * Read the dataset region, and add a null terminator so we can + * print it as a string. + */ + memspace = H5Screate_simple (1, (hsize_t *) &npoints, NULL); + status = H5Dread (dset2, H5T_NATIVE_CHAR, memspace, space, H5P_DEFAULT, + rdata2); + rdata2[npoints] = '\0'; + + /* + * Print the name and region data, close and release resources. + */ + printf (" %s: %s\n", name, rdata2); + free (rdata2); + free (name); + status = H5Sclose (space); + status = H5Sclose (memspace); + status = H5Dclose (dset2); + } + + /* + * Close and release resources. + */ + free (rdata); + status = H5Dclose (dset); + status = H5Fclose (file); + + return 0; +} diff --git a/examples/hdfgroup/H5T/h5ex_t_regrefatt.c b/examples/hdfgroup/H5T/h5ex_t_regrefatt.c new file mode 100644 index 0000000000..5773c673bd --- /dev/null +++ b/examples/hdfgroup/H5T/h5ex_t_regrefatt.c @@ -0,0 +1,200 @@ +/************************************************************ + + This example shows how to read and write region references + to an attribute. The program first creates a dataset + containing characters and writes references to region of + the dataset to a new attribute with a dataspace of DIM0, + then closes the file. Next, it reopens the file, + dereferences the references, and outputs the referenced + regions to the screen. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "h5ex_t_regrefatt.h5" +#define DATASET "DS1" +#define DATASET2 "DS2" +#define ATTRIBUTE "A1" +#define DIM0 2 +#define DS2DIM0 3 +#define DS2DIM1 16 + +int +main (void) +{ + hid_t file, space, memspace, dset, dset2, attr; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}, + dims2[2] = {DS2DIM0, DS2DIM1}, + coords[4][2] = { {0, 1}, + {2, 11}, + {1, 0}, + {2, 4} }, + start[2] = {0, 0}, + stride[2] = {2, 11}, + count[2] = {2, 2}, + block[2] = {1, 3}; + hssize_t npoints; + hdset_reg_ref_t wdata[DIM0], /* Write buffer */ + *rdata; /* Read buffer */ + ssize_t size; + char wdata2[DS2DIM0][DS2DIM1] = {"The quick brown", + "fox jumps over ", + "the 5 lazy dogs"}, + *rdata2, + *name; + int ndims, + i; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create a dataset with character data. + */ + space = H5Screate_simple (2, dims2, NULL); + dset2 = H5Dcreate (file, DATASET2, H5T_STD_I8LE, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Dwrite (dset2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, + wdata2); + + /* + * Create reference to a list of elements in dset2. + */ + status = H5Sselect_elements (space, H5S_SELECT_SET, 4, coords[0]); + status = H5Rcreate (&wdata[0], file, DATASET2, H5R_DATASET_REGION, space); + + /* + * Create reference to a hyperslab in dset2, close dataspace. + */ + status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, stride, count, + block); + status = H5Rcreate (&wdata[1], file, DATASET2, H5R_DATASET_REGION, space); + status = H5Sclose (space); + + /* + * Create dataset with a null dataspace to serve as the parent for + * the attribute. + */ + space = H5Screate (H5S_NULL); + dset = H5Dcreate (file, DATASET, H5T_STD_I32LE, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Sclose (space); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the attribute and write the region references to it. + */ + attr = H5Acreate (dset, ATTRIBUTE, H5T_STD_REF_DSETREG, space, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Awrite (attr, H5T_STD_REF_DSETREG, wdata); + + /* + * Close and release resources. + */ + status = H5Aclose (attr); + status = H5Dclose (dset); + status = H5Dclose (dset2); + status = H5Sclose (space); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. Here we assume + * the attribute has the same name and rank, but can have any size. + * Therefore we must allocate a new array to read in data using + * malloc(). + */ + + /* + * Open file, dataset, and attribute. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + attr = H5Aopen (dset, ATTRIBUTE, H5P_DEFAULT); + + /* + * Get dataspace and allocate memory for read buffer. + */ + space = H5Aget_space (attr); + ndims = H5Sget_simple_extent_dims (space, dims, NULL); + rdata = (hdset_reg_ref_t *) malloc (dims[0] * sizeof (hdset_reg_ref_t)); + status = H5Sclose (space); + + /* + * Read the data. + */ + status = H5Aread (attr, H5T_STD_REF_DSETREG, rdata); + + /* + * Output the data to the screen. + */ + for (i=0; i", ATTRIBUTE, i); + + /* + * Open the referenced object, retrieve its region as a + * dataspace selection. + */ + dset2 = H5Rdereference (dset, H5P_DEFAULT, H5R_DATASET_REGION, &rdata[i]); + space = H5Rget_region (dset, H5R_DATASET_REGION, &rdata[i]); + + /* + * Get the length of the object's name, allocate space, then + * retrieve the name. + */ + size = 1 + H5Iget_name (dset2, NULL, 0); + name = (char *) malloc (size); + size = H5Iget_name (dset2, name, size); + + /* + * Allocate space for the read buffer. We will only allocate + * enough space for the selection, plus a null terminator. The + * read buffer will be 1-dimensional. + */ + npoints = H5Sget_select_npoints (space); + rdata2 = (char *) malloc (npoints + 1); + + /* + * Read the dataset region, and add a null terminator so we can + * print it as a string. + */ + memspace = H5Screate_simple (1, (hsize_t *) &npoints, NULL); + status = H5Dread (dset2, H5T_NATIVE_CHAR, memspace, space, H5P_DEFAULT, + rdata2); + rdata2[npoints] = '\0'; + + /* + * Print the name and region data, close and release resources. + */ + printf (" %s: %s\n", name, rdata2); + free (rdata2); + free (name); + status = H5Sclose (space); + status = H5Sclose (memspace); + status = H5Dclose (dset2); + } + + /* + * Close and release resources. + */ + free (rdata); + status = H5Aclose (attr); + status = H5Dclose (dset); + status = H5Fclose (file); + + return 0; +} diff --git a/examples/hdfgroup/H5T/h5ex_t_string.c b/examples/hdfgroup/H5T/h5ex_t_string.c new file mode 100644 index 0000000000..41bce74b51 --- /dev/null +++ b/examples/hdfgroup/H5T/h5ex_t_string.c @@ -0,0 +1,147 @@ +/************************************************************ + + This example shows how to read and write string datatypes + to a dataset. The program first writes strings to a + dataset with a dataspace of DIM0, then closes the file. + Next, it reopens the file, reads back the data, and + outputs it to the screen. + + This file is intended for use with HDF5 Library version 1.8 + + ************************************************************/ + +#include "hdf5.h" +#include +#include + +#define FILE "h5ex_t_string.h5" +#define DATASET "DS1" +#define DIM0 4 +#define SDIM 8 + +int +main (void) +{ + hid_t file, filetype, memtype, space, dset; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + size_t sdim; + char wdata[DIM0][SDIM] = {"Parting", "is such", "sweet", "sorrow."}, + /* Write buffer */ + **rdata; /* Read buffer */ + int ndims, + i; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create file and memory datatypes. For this example we will save + * the strings as FORTRAN strings, therefore they do not need space + * for the null terminator in the file. + */ + filetype = H5Tcopy (H5T_FORTRAN_S1); + status = H5Tset_size (filetype, SDIM - 1); + memtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (memtype, SDIM); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the dataset and write the string data to it. + */ + dset = H5Dcreate (file, DATASET, filetype, space, H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Dwrite (dset, memtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata[0]); + + /* + * Close and release resources. + */ + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Tclose (filetype); + status = H5Tclose (memtype); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. Here we assume + * the dataset and string have the same name and rank, but can have + * any size. Therefore we must allocate a new array to read in + * data using malloc(). + */ + + /* + * Open file and dataset. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Get the datatype and its size. + */ + filetype = H5Dget_type (dset); + sdim = H5Tget_size (filetype); + sdim++; /* Make room for null terminator */ + + /* + * Get dataspace and allocate memory for read buffer. This is a + * two dimensional dataset so the dynamic allocation must be done + * in steps. + */ + space = H5Dget_space (dset); + ndims = H5Sget_simple_extent_dims (space, dims, NULL); + + /* + * Allocate array of pointers to rows. + */ + rdata = (char **) malloc (dims[0] * sizeof (char *)); + + /* + * Allocate space for integer data. + */ + rdata[0] = (char *) malloc (dims[0] * sdim * sizeof (char)); + + /* + * Set the rest of the pointers to rows to the correct addresses. + */ + for (i=1; i +#include + +#define FILE "h5ex_t_stringatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 4 +#define SDIM 8 + +int +main (void) +{ + hid_t file, filetype, memtype, space, dset, attr; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + size_t sdim; + char wdata[DIM0][SDIM] = {"Parting", "is such", "sweet", "sorrow."}, + /* Write buffer */ + **rdata; /* Read buffer */ + int ndims, + i; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create file and memory datatypes. For this example we will save + * the strings as FORTRAN strings, therefore they do not need space + * for the null terminator in the file. + */ + filetype = H5Tcopy (H5T_FORTRAN_S1); + status = H5Tset_size (filetype, SDIM - 1); + memtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (memtype, SDIM); + + /* + * Create dataset with a null dataspace. + */ + space = H5Screate (H5S_NULL); + dset = H5Dcreate (file, DATASET, H5T_STD_I32LE, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Sclose (space); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the attribute and write the string data to it. + */ + attr = H5Acreate (dset, ATTRIBUTE, filetype, space, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Awrite (attr, memtype, wdata[0]); + + /* + * Close and release resources. + */ + status = H5Aclose (attr); + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Tclose (filetype); + status = H5Tclose (memtype); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. Here we assume + * the attribute and string have the same name and rank, but can + * have any size. Therefore we must allocate a new array to read + * in data using malloc(). + */ + + /* + * Open file, dataset, and attribute. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + attr = H5Aopen (dset, ATTRIBUTE, H5P_DEFAULT); + + /* + * Get the datatype and its size. + */ + filetype = H5Aget_type (attr); + sdim = H5Tget_size (filetype); + sdim++; /* Make room for null terminator */ + + /* + * Get dataspace and allocate memory for read buffer. This is a + * two dimensional attribute so the dynamic allocation must be done + * in steps. + */ + space = H5Aget_space (attr); + ndims = H5Sget_simple_extent_dims (space, dims, NULL); + + /* + * Allocate array of pointers to rows. + */ + rdata = (char **) malloc (dims[0] * sizeof (char *)); + + /* + * Allocate space for integer data. + */ + rdata[0] = (char *) malloc (dims[0] * sdim * sizeof (char)); + + /* + * Set the rest of the pointers to rows to the correct addresses. + */ + for (i=1; i +#include + +#define FILE "h5ex_t_vlen.h5" +#define DATASET "DS1" +#define LEN0 3 +#define LEN1 12 + +int +main (void) +{ + hid_t file, filetype, memtype, space, dset; + /* Handles */ + herr_t status; + hvl_t wdata[2], /* Array of vlen structures */ + *rdata; /* Pointer to vlen structures */ + hsize_t dims[1] = {2}; + int *ptr, + ndims, + i, j; + + /* + * Initialize variable-length data. wdata[0] is a countdown of + * length LEN0, wdata[1] is a Fibonacci sequence of length LEN1. + */ + wdata[0].len = LEN0; + ptr = (int *) malloc (wdata[0].len * sizeof (int)); + for (i=0; i +#include + +#define FILE "h5ex_t_vlenatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define LEN0 3 +#define LEN1 12 + +int +main (void) +{ + hid_t file, filetype, memtype, space, dset, attr; + /* Handles */ + herr_t status; + hvl_t wdata[2], /* Array of vlen structures */ + *rdata; /* Pointer to vlen structures */ + hsize_t dims[1] = {2}; + int *ptr, + ndims, + i, j; + + /* + * Initialize variable-length data. wdata[0] is a countdown of + * length LEN0, wdata[1] is a Fibonacci sequence of length LEN1. + */ + wdata[0].len = LEN0; + ptr = (int *) malloc (wdata[0].len * sizeof (int)); + for (i=0; i +#include + +#define FILE "h5ex_t_vlstring.h5" +#define DATASET "DS1" +#define DIM0 4 + +int +main (void) +{ + hid_t file, filetype, memtype, space, dset; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + char *wdata[DIM0] = {"Parting", "is such", "sweet", "sorrow."}, + /* Write buffer */ + **rdata; /* Read buffer */ + int ndims, + i; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create file and memory datatypes. For this example we will save + * the strings as FORTRAN strings. + */ + filetype = H5Tcopy (H5T_FORTRAN_S1); + status = H5Tset_size (filetype, H5T_VARIABLE); + memtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (memtype, H5T_VARIABLE); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the dataset and write the variable-length string data to + * it. + */ + dset = H5Dcreate (file, DATASET, filetype, space, H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Dwrite (dset, memtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); + + /* + * Close and release resources. + */ + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Tclose (filetype); + status = H5Tclose (memtype); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. Here we assume + * the dataset has the same name and rank, but can have any size. + * Therefore we must allocate a new array to read in data using + * malloc(). + */ + + /* + * Open file and dataset. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + + /* + * Get the datatype. + */ + filetype = H5Dget_type (dset); + + /* + * Get dataspace and allocate memory for read buffer. + */ + space = H5Dget_space (dset); + ndims = H5Sget_simple_extent_dims (space, dims, NULL); + rdata = (char **) malloc (dims[0] * sizeof (char *)); + + /* + * Create the memory datatype. + */ + memtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (memtype, H5T_VARIABLE); + + /* + * Read the data. + */ + status = H5Dread (dset, memtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata); + + /* + * Output the data to the screen. + */ + for (i=0; i +#include + +#define FILE "h5ex_t_vlstringatt.h5" +#define DATASET "DS1" +#define ATTRIBUTE "A1" +#define DIM0 4 + +int +main (void) +{ + hid_t file, filetype, memtype, space, dset, attr; + /* Handles */ + herr_t status; + hsize_t dims[1] = {DIM0}; + char *wdata[DIM0] = {"Parting", "is such", "sweet", "sorrow."}, + /* Write buffer */ + **rdata; /* Read buffer */ + int ndims, + i; + + /* + * Create a new file using the default properties. + */ + file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create file and memory datatypes. For this example we will save + * the strings as FORTRAN strings. + */ + filetype = H5Tcopy (H5T_FORTRAN_S1); + status = H5Tset_size (filetype, H5T_VARIABLE); + memtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (memtype, H5T_VARIABLE); + + /* + * Create dataset with a null dataspace. + */ + space = H5Screate (H5S_NULL); + dset = H5Dcreate (file, DATASET, H5T_STD_I32LE, space, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT); + status = H5Sclose (space); + + /* + * Create dataspace. Setting maximum size to NULL sets the maximum + * size to be the current size. + */ + space = H5Screate_simple (1, dims, NULL); + + /* + * Create the attribute and write the variable-length string data + * to it. + */ + attr = H5Acreate (dset, ATTRIBUTE, filetype, space, H5P_DEFAULT, + H5P_DEFAULT); + status = H5Awrite (attr, memtype, wdata); + + /* + * Close and release resources. + */ + status = H5Aclose (attr); + status = H5Dclose (dset); + status = H5Sclose (space); + status = H5Tclose (filetype); + status = H5Tclose (memtype); + status = H5Fclose (file); + + + /* + * Now we begin the read section of this example. Here we assume + * the attribute has the same name and rank, but can have any size. + * Therefore we must allocate a new array to read in data using + * malloc(). + */ + + /* + * Open file, dataset, and attribute. + */ + file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + dset = H5Dopen (file, DATASET, H5P_DEFAULT); + attr = H5Aopen (dset, ATTRIBUTE, H5P_DEFAULT); + + /* + * Get the datatype. + */ + filetype = H5Aget_type (attr); + + /* + * Get dataspace and allocate memory for read buffer. + */ + space = H5Aget_space (attr); + ndims = H5Sget_simple_extent_dims (space, dims, NULL); + rdata = (char **) malloc (dims[0] * sizeof (char *)); + + /* + * Create the memory datatype. + */ + memtype = H5Tcopy (H5T_C_S1); + status = H5Tset_size (memtype, H5T_VARIABLE); + + /* + * Read the data. + */ + status = H5Aread (attr, memtype, rdata); + + /* + * Output the data to the screen. + */ + for (i=0; i&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +noinst_PROGRAMS = h5ex_t_int$(EXEEXT) h5ex_t_intatt$(EXEEXT) \ + h5ex_t_float$(EXEEXT) h5ex_t_floatatt$(EXEEXT) \ + h5ex_t_enum$(EXEEXT) h5ex_t_enumatt$(EXEEXT) \ + h5ex_t_bit$(EXEEXT) h5ex_t_bitatt$(EXEEXT) \ + h5ex_t_opaque$(EXEEXT) h5ex_t_opaqueatt$(EXEEXT) \ + h5ex_t_array$(EXEEXT) h5ex_t_arrayatt$(EXEEXT) \ + h5ex_t_vlen$(EXEEXT) h5ex_t_vlenatt$(EXEEXT) \ + h5ex_t_string$(EXEEXT) h5ex_t_stringatt$(EXEEXT) \ + h5ex_t_vlstring$(EXEEXT) h5ex_t_vlstringatt$(EXEEXT) \ + h5ex_t_cmpd$(EXEEXT) h5ex_t_cmpdatt$(EXEEXT) \ + h5ex_t_cpxcmpd$(EXEEXT) h5ex_t_cpxcmpdatt$(EXEEXT) \ + h5ex_t_objref$(EXEEXT) h5ex_t_objrefatt$(EXEEXT) \ + h5ex_t_regref$(EXEEXT) h5ex_t_regrefatt$(EXEEXT) \ + h5ex_t_commit$(EXEEXT) h5ex_t_convert$(EXEEXT) +subdir = 1_10/C/H5T +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = test.sh +CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) +h5ex_t_array_SOURCES = h5ex_t_array.c +h5ex_t_array_OBJECTS = h5ex_t_array.$(OBJEXT) +h5ex_t_array_LDADD = $(LDADD) +h5ex_t_arrayatt_SOURCES = h5ex_t_arrayatt.c +h5ex_t_arrayatt_OBJECTS = h5ex_t_arrayatt.$(OBJEXT) +h5ex_t_arrayatt_LDADD = $(LDADD) +h5ex_t_bit_SOURCES = h5ex_t_bit.c +h5ex_t_bit_OBJECTS = h5ex_t_bit.$(OBJEXT) +h5ex_t_bit_LDADD = $(LDADD) +h5ex_t_bitatt_SOURCES = h5ex_t_bitatt.c +h5ex_t_bitatt_OBJECTS = h5ex_t_bitatt.$(OBJEXT) +h5ex_t_bitatt_LDADD = $(LDADD) +h5ex_t_cmpd_SOURCES = h5ex_t_cmpd.c +h5ex_t_cmpd_OBJECTS = h5ex_t_cmpd.$(OBJEXT) +h5ex_t_cmpd_LDADD = $(LDADD) +h5ex_t_cmpdatt_SOURCES = h5ex_t_cmpdatt.c +h5ex_t_cmpdatt_OBJECTS = h5ex_t_cmpdatt.$(OBJEXT) +h5ex_t_cmpdatt_LDADD = $(LDADD) +h5ex_t_commit_SOURCES = h5ex_t_commit.c +h5ex_t_commit_OBJECTS = h5ex_t_commit.$(OBJEXT) +h5ex_t_commit_LDADD = $(LDADD) +h5ex_t_convert_SOURCES = h5ex_t_convert.c +h5ex_t_convert_OBJECTS = h5ex_t_convert.$(OBJEXT) +h5ex_t_convert_LDADD = $(LDADD) +h5ex_t_cpxcmpd_SOURCES = h5ex_t_cpxcmpd.c +h5ex_t_cpxcmpd_OBJECTS = h5ex_t_cpxcmpd.$(OBJEXT) +h5ex_t_cpxcmpd_LDADD = $(LDADD) +h5ex_t_cpxcmpdatt_SOURCES = h5ex_t_cpxcmpdatt.c +h5ex_t_cpxcmpdatt_OBJECTS = h5ex_t_cpxcmpdatt.$(OBJEXT) +h5ex_t_cpxcmpdatt_LDADD = $(LDADD) +h5ex_t_enum_SOURCES = h5ex_t_enum.c +h5ex_t_enum_OBJECTS = h5ex_t_enum.$(OBJEXT) +h5ex_t_enum_LDADD = $(LDADD) +h5ex_t_enumatt_SOURCES = h5ex_t_enumatt.c +h5ex_t_enumatt_OBJECTS = h5ex_t_enumatt.$(OBJEXT) +h5ex_t_enumatt_LDADD = $(LDADD) +h5ex_t_float_SOURCES = h5ex_t_float.c +h5ex_t_float_OBJECTS = h5ex_t_float.$(OBJEXT) +h5ex_t_float_LDADD = $(LDADD) +h5ex_t_floatatt_SOURCES = h5ex_t_floatatt.c +h5ex_t_floatatt_OBJECTS = h5ex_t_floatatt.$(OBJEXT) +h5ex_t_floatatt_LDADD = $(LDADD) +h5ex_t_int_SOURCES = h5ex_t_int.c +h5ex_t_int_OBJECTS = h5ex_t_int.$(OBJEXT) +h5ex_t_int_LDADD = $(LDADD) +h5ex_t_intatt_SOURCES = h5ex_t_intatt.c +h5ex_t_intatt_OBJECTS = h5ex_t_intatt.$(OBJEXT) +h5ex_t_intatt_LDADD = $(LDADD) +h5ex_t_objref_SOURCES = h5ex_t_objref.c +h5ex_t_objref_OBJECTS = h5ex_t_objref.$(OBJEXT) +h5ex_t_objref_LDADD = $(LDADD) +h5ex_t_objrefatt_SOURCES = h5ex_t_objrefatt.c +h5ex_t_objrefatt_OBJECTS = h5ex_t_objrefatt.$(OBJEXT) +h5ex_t_objrefatt_LDADD = $(LDADD) +h5ex_t_opaque_SOURCES = h5ex_t_opaque.c +h5ex_t_opaque_OBJECTS = h5ex_t_opaque.$(OBJEXT) +h5ex_t_opaque_LDADD = $(LDADD) +h5ex_t_opaqueatt_SOURCES = h5ex_t_opaqueatt.c +h5ex_t_opaqueatt_OBJECTS = h5ex_t_opaqueatt.$(OBJEXT) +h5ex_t_opaqueatt_LDADD = $(LDADD) +h5ex_t_regref_SOURCES = h5ex_t_regref.c +h5ex_t_regref_OBJECTS = h5ex_t_regref.$(OBJEXT) +h5ex_t_regref_LDADD = $(LDADD) +h5ex_t_regrefatt_SOURCES = h5ex_t_regrefatt.c +h5ex_t_regrefatt_OBJECTS = h5ex_t_regrefatt.$(OBJEXT) +h5ex_t_regrefatt_LDADD = $(LDADD) +h5ex_t_string_SOURCES = h5ex_t_string.c +h5ex_t_string_OBJECTS = h5ex_t_string.$(OBJEXT) +h5ex_t_string_LDADD = $(LDADD) +h5ex_t_stringatt_SOURCES = h5ex_t_stringatt.c +h5ex_t_stringatt_OBJECTS = h5ex_t_stringatt.$(OBJEXT) +h5ex_t_stringatt_LDADD = $(LDADD) +h5ex_t_vlen_SOURCES = h5ex_t_vlen.c +h5ex_t_vlen_OBJECTS = h5ex_t_vlen.$(OBJEXT) +h5ex_t_vlen_LDADD = $(LDADD) +h5ex_t_vlenatt_SOURCES = h5ex_t_vlenatt.c +h5ex_t_vlenatt_OBJECTS = h5ex_t_vlenatt.$(OBJEXT) +h5ex_t_vlenatt_LDADD = $(LDADD) +h5ex_t_vlstring_SOURCES = h5ex_t_vlstring.c +h5ex_t_vlstring_OBJECTS = h5ex_t_vlstring.$(OBJEXT) +h5ex_t_vlstring_LDADD = $(LDADD) +h5ex_t_vlstringatt_SOURCES = h5ex_t_vlstringatt.c +h5ex_t_vlstringatt_OBJECTS = h5ex_t_vlstringatt.$(OBJEXT) +h5ex_t_vlstringatt_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = h5ex_t_array.c h5ex_t_arrayatt.c h5ex_t_bit.c \ + h5ex_t_bitatt.c h5ex_t_cmpd.c h5ex_t_cmpdatt.c h5ex_t_commit.c \ + h5ex_t_convert.c h5ex_t_cpxcmpd.c h5ex_t_cpxcmpdatt.c \ + h5ex_t_enum.c h5ex_t_enumatt.c h5ex_t_float.c \ + h5ex_t_floatatt.c h5ex_t_int.c h5ex_t_intatt.c h5ex_t_objref.c \ + h5ex_t_objrefatt.c h5ex_t_opaque.c h5ex_t_opaqueatt.c \ + h5ex_t_regref.c h5ex_t_regrefatt.c h5ex_t_string.c \ + h5ex_t_stringatt.c h5ex_t_vlen.c h5ex_t_vlenatt.c \ + h5ex_t_vlstring.c h5ex_t_vlstringatt.c +DIST_SOURCES = h5ex_t_array.c h5ex_t_arrayatt.c h5ex_t_bit.c \ + h5ex_t_bitatt.c h5ex_t_cmpd.c h5ex_t_cmpdatt.c h5ex_t_commit.c \ + h5ex_t_convert.c h5ex_t_cpxcmpd.c h5ex_t_cpxcmpdatt.c \ + h5ex_t_enum.c h5ex_t_enumatt.c h5ex_t_float.c \ + h5ex_t_floatatt.c h5ex_t_int.c h5ex_t_intatt.c h5ex_t_objref.c \ + h5ex_t_objrefatt.c h5ex_t_opaque.c h5ex_t_opaqueatt.c \ + h5ex_t_regref.c h5ex_t_regrefatt.c h5ex_t_string.c \ + h5ex_t_stringatt.c h5ex_t_vlen.c h5ex_t_vlenatt.c \ + h5ex_t_vlstring.c h5ex_t_vlstringatt.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/makefile.in $(srcdir)/test.sh.in \ + $(top_srcdir)/depcomp $(top_srcdir)/test-driver +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EXEEXT = @EXEEXT@ +FC = @FC@ +FCFLAGS = @FCFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_FC = @ac_ct_FC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = testfiles/h5ex_t_int.tst testfiles/h5ex_t_intatt.tst testfiles/h5ex_t_float.tst \ +testfiles/h5ex_t_floatatt.tst testfiles/h5ex_t_enum.tst testfiles/h5ex_t_enumatt.tst testfiles/h5ex_t_bit.tst \ +testfiles/h5ex_t_bitatt.tst testfiles/h5ex_t_opaque.tst testfiles/h5ex_t_opaqueatt.tst testfiles/h5ex_t_array.tst \ +testfiles/h5ex_t_arrayatt.tst testfiles/h5ex_t_vlen.tst testfiles/h5ex_t_vlenatt.tst testfiles/h5ex_t_string.tst \ +testfiles/h5ex_t_stringatt.tst testfiles/h5ex_t_vlstring.tst testfiles/h5ex_t_vlstringatt.tst \ +testfiles/h5ex_t_cmpd.tst testfiles/h5ex_t_cmpdatt.tst testfiles/h5ex_t_cpxcmpd.tst \ +testfiles/h5ex_t_cpxcmpdatt.tst testfiles/h5ex_t_objref.tst testfiles/h5ex_t_objrefatt.tst \ +testfiles/h5ex_t_regref.tst testfiles/h5ex_t_regrefatt.tst testfiles/h5ex_t_commit.tst \ +testfiles/h5ex_t_convert.tst \ +testfiles/h5ex_t_int.ddl testfiles/h5ex_t_intatt.ddl testfiles/h5ex_t_float.ddl \ +testfiles/h5ex_t_floatatt.ddl testfiles/h5ex_t_enum.ddl testfiles/h5ex_t_enumatt.ddl testfiles/h5ex_t_bit.ddl \ +testfiles/h5ex_t_bitatt.ddl testfiles/h5ex_t_opaque.ddl testfiles/h5ex_t_opaqueatt.ddl testfiles/h5ex_t_array.ddl \ +testfiles/h5ex_t_arrayatt.ddl testfiles/h5ex_t_vlen.ddl testfiles/h5ex_t_vlenatt.ddl testfiles/h5ex_t_string.ddl \ +testfiles/h5ex_t_stringatt.ddl testfiles/h5ex_t_vlstring.ddl testfiles/h5ex_t_vlstringatt.ddl \ +testfiles/h5ex_t_cmpd.ddl testfiles/h5ex_t_cmpdatt.ddl testfiles/h5ex_t_cpxcmpd.ddl \ +testfiles/h5ex_t_cpxcmpdatt.ddl testfiles/h5ex_t_objref.ddl testfiles/h5ex_t_objrefatt.ddl \ +testfiles/h5ex_t_regref.ddl testfiles/h5ex_t_regrefatt.ddl testfiles/h5ex_t_commit.ddl \ +testfiles/h5ex_t_convert.ddl test.sh + +AM_CPPFLAGS = '-D H5_USE_110_API' +TESTS = test.sh +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign 1_10/C/H5T/makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign 1_10/C/H5T/makefile +makefile: $(srcdir)/makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +test.sh: $(top_builddir)/config.status $(srcdir)/test.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + +h5ex_t_array$(EXEEXT): $(h5ex_t_array_OBJECTS) $(h5ex_t_array_DEPENDENCIES) $(EXTRA_h5ex_t_array_DEPENDENCIES) + @rm -f h5ex_t_array$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_array_OBJECTS) $(h5ex_t_array_LDADD) $(LIBS) + +h5ex_t_arrayatt$(EXEEXT): $(h5ex_t_arrayatt_OBJECTS) $(h5ex_t_arrayatt_DEPENDENCIES) $(EXTRA_h5ex_t_arrayatt_DEPENDENCIES) + @rm -f h5ex_t_arrayatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_arrayatt_OBJECTS) $(h5ex_t_arrayatt_LDADD) $(LIBS) + +h5ex_t_bit$(EXEEXT): $(h5ex_t_bit_OBJECTS) $(h5ex_t_bit_DEPENDENCIES) $(EXTRA_h5ex_t_bit_DEPENDENCIES) + @rm -f h5ex_t_bit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_bit_OBJECTS) $(h5ex_t_bit_LDADD) $(LIBS) + +h5ex_t_bitatt$(EXEEXT): $(h5ex_t_bitatt_OBJECTS) $(h5ex_t_bitatt_DEPENDENCIES) $(EXTRA_h5ex_t_bitatt_DEPENDENCIES) + @rm -f h5ex_t_bitatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_bitatt_OBJECTS) $(h5ex_t_bitatt_LDADD) $(LIBS) + +h5ex_t_cmpd$(EXEEXT): $(h5ex_t_cmpd_OBJECTS) $(h5ex_t_cmpd_DEPENDENCIES) $(EXTRA_h5ex_t_cmpd_DEPENDENCIES) + @rm -f h5ex_t_cmpd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_cmpd_OBJECTS) $(h5ex_t_cmpd_LDADD) $(LIBS) + +h5ex_t_cmpdatt$(EXEEXT): $(h5ex_t_cmpdatt_OBJECTS) $(h5ex_t_cmpdatt_DEPENDENCIES) $(EXTRA_h5ex_t_cmpdatt_DEPENDENCIES) + @rm -f h5ex_t_cmpdatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_cmpdatt_OBJECTS) $(h5ex_t_cmpdatt_LDADD) $(LIBS) + +h5ex_t_commit$(EXEEXT): $(h5ex_t_commit_OBJECTS) $(h5ex_t_commit_DEPENDENCIES) $(EXTRA_h5ex_t_commit_DEPENDENCIES) + @rm -f h5ex_t_commit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_commit_OBJECTS) $(h5ex_t_commit_LDADD) $(LIBS) + +h5ex_t_convert$(EXEEXT): $(h5ex_t_convert_OBJECTS) $(h5ex_t_convert_DEPENDENCIES) $(EXTRA_h5ex_t_convert_DEPENDENCIES) + @rm -f h5ex_t_convert$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_convert_OBJECTS) $(h5ex_t_convert_LDADD) $(LIBS) + +h5ex_t_cpxcmpd$(EXEEXT): $(h5ex_t_cpxcmpd_OBJECTS) $(h5ex_t_cpxcmpd_DEPENDENCIES) $(EXTRA_h5ex_t_cpxcmpd_DEPENDENCIES) + @rm -f h5ex_t_cpxcmpd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_cpxcmpd_OBJECTS) $(h5ex_t_cpxcmpd_LDADD) $(LIBS) + +h5ex_t_cpxcmpdatt$(EXEEXT): $(h5ex_t_cpxcmpdatt_OBJECTS) $(h5ex_t_cpxcmpdatt_DEPENDENCIES) $(EXTRA_h5ex_t_cpxcmpdatt_DEPENDENCIES) + @rm -f h5ex_t_cpxcmpdatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_cpxcmpdatt_OBJECTS) $(h5ex_t_cpxcmpdatt_LDADD) $(LIBS) + +h5ex_t_enum$(EXEEXT): $(h5ex_t_enum_OBJECTS) $(h5ex_t_enum_DEPENDENCIES) $(EXTRA_h5ex_t_enum_DEPENDENCIES) + @rm -f h5ex_t_enum$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_enum_OBJECTS) $(h5ex_t_enum_LDADD) $(LIBS) + +h5ex_t_enumatt$(EXEEXT): $(h5ex_t_enumatt_OBJECTS) $(h5ex_t_enumatt_DEPENDENCIES) $(EXTRA_h5ex_t_enumatt_DEPENDENCIES) + @rm -f h5ex_t_enumatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_enumatt_OBJECTS) $(h5ex_t_enumatt_LDADD) $(LIBS) + +h5ex_t_float$(EXEEXT): $(h5ex_t_float_OBJECTS) $(h5ex_t_float_DEPENDENCIES) $(EXTRA_h5ex_t_float_DEPENDENCIES) + @rm -f h5ex_t_float$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_float_OBJECTS) $(h5ex_t_float_LDADD) $(LIBS) + +h5ex_t_floatatt$(EXEEXT): $(h5ex_t_floatatt_OBJECTS) $(h5ex_t_floatatt_DEPENDENCIES) $(EXTRA_h5ex_t_floatatt_DEPENDENCIES) + @rm -f h5ex_t_floatatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_floatatt_OBJECTS) $(h5ex_t_floatatt_LDADD) $(LIBS) + +h5ex_t_int$(EXEEXT): $(h5ex_t_int_OBJECTS) $(h5ex_t_int_DEPENDENCIES) $(EXTRA_h5ex_t_int_DEPENDENCIES) + @rm -f h5ex_t_int$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_int_OBJECTS) $(h5ex_t_int_LDADD) $(LIBS) + +h5ex_t_intatt$(EXEEXT): $(h5ex_t_intatt_OBJECTS) $(h5ex_t_intatt_DEPENDENCIES) $(EXTRA_h5ex_t_intatt_DEPENDENCIES) + @rm -f h5ex_t_intatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_intatt_OBJECTS) $(h5ex_t_intatt_LDADD) $(LIBS) + +h5ex_t_objref$(EXEEXT): $(h5ex_t_objref_OBJECTS) $(h5ex_t_objref_DEPENDENCIES) $(EXTRA_h5ex_t_objref_DEPENDENCIES) + @rm -f h5ex_t_objref$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_objref_OBJECTS) $(h5ex_t_objref_LDADD) $(LIBS) + +h5ex_t_objrefatt$(EXEEXT): $(h5ex_t_objrefatt_OBJECTS) $(h5ex_t_objrefatt_DEPENDENCIES) $(EXTRA_h5ex_t_objrefatt_DEPENDENCIES) + @rm -f h5ex_t_objrefatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_objrefatt_OBJECTS) $(h5ex_t_objrefatt_LDADD) $(LIBS) + +h5ex_t_opaque$(EXEEXT): $(h5ex_t_opaque_OBJECTS) $(h5ex_t_opaque_DEPENDENCIES) $(EXTRA_h5ex_t_opaque_DEPENDENCIES) + @rm -f h5ex_t_opaque$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_opaque_OBJECTS) $(h5ex_t_opaque_LDADD) $(LIBS) + +h5ex_t_opaqueatt$(EXEEXT): $(h5ex_t_opaqueatt_OBJECTS) $(h5ex_t_opaqueatt_DEPENDENCIES) $(EXTRA_h5ex_t_opaqueatt_DEPENDENCIES) + @rm -f h5ex_t_opaqueatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_opaqueatt_OBJECTS) $(h5ex_t_opaqueatt_LDADD) $(LIBS) + +h5ex_t_regref$(EXEEXT): $(h5ex_t_regref_OBJECTS) $(h5ex_t_regref_DEPENDENCIES) $(EXTRA_h5ex_t_regref_DEPENDENCIES) + @rm -f h5ex_t_regref$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_regref_OBJECTS) $(h5ex_t_regref_LDADD) $(LIBS) + +h5ex_t_regrefatt$(EXEEXT): $(h5ex_t_regrefatt_OBJECTS) $(h5ex_t_regrefatt_DEPENDENCIES) $(EXTRA_h5ex_t_regrefatt_DEPENDENCIES) + @rm -f h5ex_t_regrefatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_regrefatt_OBJECTS) $(h5ex_t_regrefatt_LDADD) $(LIBS) + +h5ex_t_string$(EXEEXT): $(h5ex_t_string_OBJECTS) $(h5ex_t_string_DEPENDENCIES) $(EXTRA_h5ex_t_string_DEPENDENCIES) + @rm -f h5ex_t_string$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_string_OBJECTS) $(h5ex_t_string_LDADD) $(LIBS) + +h5ex_t_stringatt$(EXEEXT): $(h5ex_t_stringatt_OBJECTS) $(h5ex_t_stringatt_DEPENDENCIES) $(EXTRA_h5ex_t_stringatt_DEPENDENCIES) + @rm -f h5ex_t_stringatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_stringatt_OBJECTS) $(h5ex_t_stringatt_LDADD) $(LIBS) + +h5ex_t_vlen$(EXEEXT): $(h5ex_t_vlen_OBJECTS) $(h5ex_t_vlen_DEPENDENCIES) $(EXTRA_h5ex_t_vlen_DEPENDENCIES) + @rm -f h5ex_t_vlen$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_vlen_OBJECTS) $(h5ex_t_vlen_LDADD) $(LIBS) + +h5ex_t_vlenatt$(EXEEXT): $(h5ex_t_vlenatt_OBJECTS) $(h5ex_t_vlenatt_DEPENDENCIES) $(EXTRA_h5ex_t_vlenatt_DEPENDENCIES) + @rm -f h5ex_t_vlenatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_vlenatt_OBJECTS) $(h5ex_t_vlenatt_LDADD) $(LIBS) + +h5ex_t_vlstring$(EXEEXT): $(h5ex_t_vlstring_OBJECTS) $(h5ex_t_vlstring_DEPENDENCIES) $(EXTRA_h5ex_t_vlstring_DEPENDENCIES) + @rm -f h5ex_t_vlstring$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_vlstring_OBJECTS) $(h5ex_t_vlstring_LDADD) $(LIBS) + +h5ex_t_vlstringatt$(EXEEXT): $(h5ex_t_vlstringatt_OBJECTS) $(h5ex_t_vlstringatt_DEPENDENCIES) $(EXTRA_h5ex_t_vlstringatt_DEPENDENCIES) + @rm -f h5ex_t_vlstringatt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(h5ex_t_vlstringatt_OBJECTS) $(h5ex_t_vlstringatt_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_array.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_arrayatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_bit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_bitatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_cmpd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_cmpdatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_commit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_convert.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_cpxcmpd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_cpxcmpdatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_enum.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_enumatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_float.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_floatatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_int.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_intatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_objref.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_objrefatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_opaque.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_opaqueatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_regref.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_regrefatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_stringatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_vlen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_vlenatt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_vlstring.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5ex_t_vlstringatt.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +test.sh.log: test.sh + @p='test.sh'; \ + b='test.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-generic clean-noinstPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am + +.PRECIOUS: makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/hdfgroup/H5T/maketestref.sh b/examples/hdfgroup/H5T/maketestref.sh new file mode 100644 index 0000000000..f242fdd9ef --- /dev/null +++ b/examples/hdfgroup/H5T/maketestref.sh @@ -0,0 +1,71 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. + +case $CC in +*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`; + test -x $H5DUMP || H5DUMP=h5dump;; +*) H5DUMP=h5dump;; +esac + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ;; + *c*,* ) ECHO_N=-n ECHO_C= ;; + *) ECHO_N= ECHO_C='\c' ;; +esac +ECHO_N="echo $ECHO_N" + +exout() { + $* +} + +dumpout() { + $H5DUMP $* +} + +topics="int intatt float floatatt enum enumatt bit bitatt opaque opaqueatt \ +array arrayatt vlen vlenatt string stringatt vlstring vlstringatt \ +cmpd cmpdatt objref objrefatt regref regrefatt commit" + +for topic in $topics +do + fname=h5ex_t_$topic + $ECHO_N "Creating test reference file for 1.8/C/H5T/$fname...$ECHO_C" + exout ./$fname >testfiles/$fname.tst + dumpout $fname.h5 >testfiles/$fname.ddl + rm -f $fname.h5 + echo " Done." +done + +#######Non-standard tests####### + +fname=h5ex_t_cpxcmpd +$ECHO_N "Creating test reference file for 1.8/C/H5T/$fname...$ECHO_C" +exout ./$fname >testfiles/$fname.tst +dumpout -n $fname.h5 >testfiles/$fname.ddl +rm -f $fname.h5 +echo " Done." + +fname=h5ex_t_cpxcmpdatt +$ECHO_N "Creating test reference file for 1.8/C/H5T/$fname...$ECHO_C" +exout ./$fname >testfiles/$fname.tst +dumpout -n $fname.h5 >testfiles/$fname.ddl +rm -f $fname.h5 +echo " Done." + +fname=h5ex_t_convert +$ECHO_N "Creating test reference file for 1.8/C/H5T/$fname...$ECHO_C" +exout ./$fname >testfiles/$fname.tst +echo " Done." diff --git a/examples/hdfgroup/H5T/measurement.cpp b/examples/hdfgroup/H5T/measurement.cpp new file mode 100644 index 0000000000..cca2060ca2 --- /dev/null +++ b/examples/hdfgroup/H5T/measurement.cpp @@ -0,0 +1,67 @@ +// +// (c) Copyright 2019 DESY,ESS, Eugen Wintersberger +// +// This file is part of h5pp. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +// License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the +// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor +// Boston, MA 02110-1301 USA +// =========================================================================== +// +// Author: Eugen Wintersberger +// Created on: Jan 13, 2019 +// + +#include "measurement.hpp" + +Measurement::Measurement (int serial_no, const std::string &location, + double temperature, double pressure) : + serial_no_ (serial_no), + location_ (location), + temperature_ (temperature), + pressure_ ( pressure) +{ +} + +int Measurement::serial_no () const noexcept +{ + return serial_no_; +} + +std::string Measurement::location () const +{ + return location_; +} + +double Measurement::temperature () const noexcept +{ + return temperature_; +} + +double Measurement::pressure () const noexcept +{ + return pressure_; +} + +std::ostream &operator<<(std::ostream &stream,const Measurement &measurement) +{ + stream<<"Serial number: "< +// +// This file is part of h5pp. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +// License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the +// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor +// Boston, MA 02110-1301 USA +// =========================================================================== +// +// Author: Eugen Wintersberger +// Created on: Jan 13, 2019 +// + +#pragma once + +#include +#include + +class Measurement +{ + private: + int serial_no_; + std::string location_; + double temperature_; + double pressure_; + public: + Measurement() = default; + Measurement(int serial_no,const std::string &location,double temperature,double pressure); + + int serial_no() const noexcept; + std::string location() const; + double temperature() const noexcept; + double pressure() const noexcept; +}; + +std::ostream &operator<<(std::ostream &stream,const Measurement &measurement); diff --git a/examples/hdfgroup/H5T/measurement_hdf5.hpp b/examples/hdfgroup/H5T/measurement_hdf5.hpp new file mode 100644 index 0000000000..657a55557a --- /dev/null +++ b/examples/hdfgroup/H5T/measurement_hdf5.hpp @@ -0,0 +1,70 @@ +// +// (c) Copyright 2019 DESY,ESS, Eugen Wintersberger +// +// This file is part of h5pp. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +// License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the +// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor +// Boston, MA 02110-1301 USA +// =========================================================================== +// +// Author: Eugen Wintersberger +// Created on: Jan 13, 2019 +// + +#pragma once + +#include +#include "measurement.hpp" + + +namespace hdf5 { +namespace datatype { + + + +template<> + class TypeTrait + { + private: + struct buffer_struct + { + int serial_no_; + std::string location_; + double temperature_; + double pressure_; + }; + public: + using Type = Measurement; + using TypeClass = Compound; + + static TypeClass + create (const Type& = Type ()) + { + Compound type = Compound::create (sizeof(buffer_struct)); + type.insert ("serial_no", HOFFSET(buffer_struct, serial_no_), + datatype::create ()); + type.insert ("location", HOFFSET(buffer_struct, location_), + datatype::create ()); + type.insert ("temperature", HOFFSET(buffer_struct, temperature_), + datatype::create ()); + type.insert ("pressure", HOFFSET(buffer_struct, pressure_), + datatype::create ()); + + return type; + } +}; + +} // end of namespace datatype +} // end of namespace hdf5 diff --git a/examples/hdfgroup/H5T/phase.cpp b/examples/hdfgroup/H5T/phase.cpp new file mode 100644 index 0000000000..ce7877136b --- /dev/null +++ b/examples/hdfgroup/H5T/phase.cpp @@ -0,0 +1,42 @@ +// +// (c) Copyright 2019 DESY,ESS, Eugen Wintersberger +// +// This file is part of h5pp. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +// License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the +// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor +// Boston, MA 02110-1301 USA +// =========================================================================== +// +// Author: Eugen Wintersberger +// Created on: Jan 13, 2019 +// + +#include "phase.hpp" + +std::ostream &operator<<(std::ostream &stream,const Phase &phase) +{ + switch(phase) + { + case Phase::SOLID: return stream<<"SOLID"; + case Phase::LIQUID: return stream<<"LIQUID"; + case Phase::GAS: return stream<<"GAS"; + case Phase::PLASMA: return stream<<"PLASMA"; + default: + return stream; + } +} + + + diff --git a/examples/hdfgroup/H5T/phase.hpp b/examples/hdfgroup/H5T/phase.hpp new file mode 100644 index 0000000000..40c6ba33ae --- /dev/null +++ b/examples/hdfgroup/H5T/phase.hpp @@ -0,0 +1,67 @@ +// +// (c) Copyright 2019 DESY,ESS, Eugen Wintersberger +// +// This file is part of h5pp. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +// License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the +// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor +// Boston, MA 02110-1301 USA +// =========================================================================== +// +// Author: Eugen Wintersberger +// Created on: Jan 13, 2019 +// + +#pragma once + +#include +#include +#include +#include + +enum class Phase : unsigned char { + SOLID, + LIQUID, + GAS, + PLASMA +}; + +std::ostream &operator<<(std::ostream &stream,const Phase &phase); + + +namespace hdf5 { +namespace datatype { + +template<> +class TypeTrait +{ + public: + using Type = Phase; + using TypeClass = Enum; + + static TypeClass create(const Type& = Type()) + { + Enum type = Enum::create(Phase()); + type.insert("SOLID",Phase::SOLID); + type.insert("LIQUID",Phase::LIQUID); + type.insert("GAS",Phase::GAS); + type.insert("PLASMA",Phase::PLASMA); + + return type; + } + +}; + +} // end of namespace datatype +} // end of namespace hdf5 diff --git a/examples/hdfgroup/H5T/t_array.cpp b/examples/hdfgroup/H5T/t_array.cpp new file mode 100644 index 0000000000..939436001c --- /dev/null +++ b/examples/hdfgroup/H5T/t_array.cpp @@ -0,0 +1,32 @@ +// +// (c) Copyright 2019 DESY,ESS, Eugen Wintersberger +// +// This file is part of h5pp. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +// License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the +// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor +// Boston, MA 02110-1301 USA +// =========================================================================== +// +// Author: Eugen Wintersberger +// Created on: Jan 13, 2019 +// + +#include +#include "t_array.hpp" + + + + + diff --git a/examples/hdfgroup/H5T/t_array.hpp b/examples/hdfgroup/H5T/t_array.hpp new file mode 100644 index 0000000000..cf93cc9652 --- /dev/null +++ b/examples/hdfgroup/H5T/t_array.hpp @@ -0,0 +1,89 @@ +// +// (c) Copyright 2019 DESY,ESS, Eugen Wintersberger +// +// This file is part of h5pp. +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +// License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this library; if not, write to the +// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor +// Boston, MA 02110-1301 USA +// =========================================================================== +// +// Author: Eugen Wintersberger +// Created on: Jan 13, 2019 +// + +#pragma once + +#include +#include +#include "../H5D/matrix.hpp" + + +template +class DataItem : public Matrix +{ + public: + using Matrix::Matrix; +}; + + +namespace hdf5 { +namespace datatype { + +template +class TypeTrait> +{ + public: + using Type = DataItem; + using TypeClass = Array; + + static TypeClass create(const Type& = Type()) + { + return Array::create(datatype::create(),{D0,D1}); + } +}; + +} // end of namespace datatype + +namespace dataspace { + +template +class TypeTrait> +{ + public: + using DataspaceType = Scalar; + + static DataspaceType create(const Matrix &value) + { + return Scalar(); + } + + static void *ptr(Matrix &value) + { + return reinterpret_cast(value.data()); + } + + static const void *cptr(const Matrix &value) + { + return reinterpret_cast(value.data()); + } + +}; + +} // end of namespace dataspace +} // end of namespace hdf5 + + + + diff --git a/examples/hdfgroup/H5T/test.sh.in b/examples/hdfgroup/H5T/test.sh.in new file mode 100644 index 0000000000..a8728b492a --- /dev/null +++ b/examples/hdfgroup/H5T/test.sh.in @@ -0,0 +1,142 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. + +srcdir=@srcdir@ + + +case $CC in +*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`; + test -x $H5DUMP || H5DUMP=h5dump;; +*) H5DUMP=h5dump;; +esac + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ;; + *c*,* ) ECHO_N=-n ECHO_C= ;; + *) ECHO_N= ECHO_C='\c' ;; +esac +ECHO_N="echo $ECHO_N" + + +exout() { + $* +} + +dumpout() { + $H5DUMP $* +} + + +topics="int intatt float floatatt enum enumatt bit bitatt opaque opaqueatt \ +array arrayatt vlen vlenatt string stringatt vlstring vlstringatt \ +cmpd cmpdatt objref objrefatt regref regrefatt" + + +return_val=0 + + +for topic in $topics +do + fname=h5ex_t_$topic + $ECHO_N "Testing 1_10/C/H5T/$fname...$ECHO_C" + exout ./$fname >tmp.test + cmp -s tmp.test $srcdir/testfiles/$fname.tst + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + dumpout $fname.h5 >tmp.test + rm -f $fname.h5 + cmp -s tmp.test $srcdir/testfiles/$fname.ddl + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + echo " Passed" + fi + fi + return_val=`expr $status + $return_val` +done + + +#######Non-standard tests####### + +fname=h5ex_t_cpxcmpd +$ECHO_N "Testing 1_10/C/H5T/$fname...$ECHO_C" +exout ./$fname >tmp.test +cmp -s tmp.test $srcdir/testfiles/$fname.tst +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + dumpout -n $fname.h5 >tmp.test + rm -f $fname.h5 + cmp -s tmp.test $srcdir/testfiles/$fname.ddl + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + echo " Passed" + fi +fi +return_val=`expr $status + $return_val` + + +fname=h5ex_t_cpxcmpdatt +$ECHO_N "Testing 1_10/C/H5T/$fname...$ECHO_C" +exout ./$fname >tmp.test +cmp -s tmp.test $srcdir/testfiles/$fname.tst +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + dumpout -n $fname.h5 >tmp.test + rm -f $fname.h5 + cmp -s tmp.test $srcdir/testfiles/$fname.ddl + status=$? + if test $status -ne 0 + then + echo " FAILED!" + else + echo " Passed" + fi +fi +return_val=`expr $status + $return_val` + + +fname=h5ex_t_convert +$ECHO_N "Testing 1_10/C/H5T/$fname...$ECHO_C" +exout ./$fname >tmp.test +cmp -s tmp.test $srcdir/testfiles/$fname.tst +status=$? +if test $status -ne 0 +then + echo " FAILED!" +else + echo " Passed" +fi +return_val=`expr $status + $return_val` + + +rm -f tmp.test +echo "$return_val tests failed in 1_10/C/H5T/" +exit $return_val diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_array.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_array.ddl new file mode 100644 index 0000000000..44d82330fd --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_array.ddl @@ -0,0 +1,22 @@ +HDF5 "h5ex_t_array.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_ARRAY { [3][5] H5T_STD_I64LE } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): [ 0, 0, 0, 0, 0, + 0, -1, -2, -3, -4, + 0, -2, -4, -6, -8 ], + (1): [ 0, 1, 2, 3, 4, + 1, 1, 1, 1, 1, + 2, 1, 0, -1, -2 ], + (2): [ 0, 2, 4, 6, 8, + 2, 3, 4, 5, 6, + 4, 4, 4, 4, 4 ], + (3): [ 0, 3, 6, 9, 12, + 3, 5, 7, 9, 11, + 6, 7, 8, 9, 10 ] + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_array.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_array.tst new file mode 100644 index 0000000000..339bd16205 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_array.tst @@ -0,0 +1,20 @@ +DS1[0]: + [ 0 0 0 0 0] + [ 0 -1 -2 -3 -4] + [ 0 -2 -4 -6 -8] + +DS1[1]: + [ 0 1 2 3 4] + [ 1 1 1 1 1] + [ 2 1 0 -1 -2] + +DS1[2]: + [ 0 2 4 6 8] + [ 2 3 4 5 6] + [ 4 4 4 4 4] + +DS1[3]: + [ 0 3 6 9 12] + [ 3 5 7 9 11] + [ 6 7 8 9 10] + diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_arrayatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_arrayatt.ddl new file mode 100644 index 0000000000..9b6a209866 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_arrayatt.ddl @@ -0,0 +1,28 @@ +HDF5 "h5ex_t_arrayatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_ARRAY { [3][5] H5T_STD_I64LE } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): [ 0, 0, 0, 0, 0, + 0, -1, -2, -3, -4, + 0, -2, -4, -6, -8 ], + (1): [ 0, 1, 2, 3, 4, + 1, 1, 1, 1, 1, + 2, 1, 0, -1, -2 ], + (2): [ 0, 2, 4, 6, 8, + 2, 3, 4, 5, 6, + 4, 4, 4, 4, 4 ], + (3): [ 0, 3, 6, 9, 12, + 3, 5, 7, 9, 11, + 6, 7, 8, 9, 10 ] + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_arrayatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_arrayatt.tst new file mode 100644 index 0000000000..a42a358881 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_arrayatt.tst @@ -0,0 +1,20 @@ +A1[0]: + [ 0 0 0 0 0] + [ 0 -1 -2 -3 -4] + [ 0 -2 -4 -6 -8] + +A1[1]: + [ 0 1 2 3 4] + [ 1 1 1 1 1] + [ 2 1 0 -1 -2] + +A1[2]: + [ 0 2 4 6 8] + [ 2 3 4 5 6] + [ 4 4 4 4 4] + +A1[3]: + [ 0 3 6 9 12] + [ 3 5 7 9 11] + [ 6 7 8 9 10] + diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_bit.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_bit.ddl new file mode 100644 index 0000000000..0d88583d9b --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_bit.ddl @@ -0,0 +1,14 @@ +HDF5 "h5ex_t_bit.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_B8BE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0x00, 0x53, 0xa2, 0xf1, 0x00, 0x53, 0xa2, + (1,0): 0x44, 0x94, 0xe4, 0x34, 0x44, 0x94, 0xe4, + (2,0): 0x88, 0xd9, 0x2a, 0x7b, 0x88, 0xd9, 0x2a, + (3,0): 0xcc, 0x1e, 0x6c, 0xbe, 0xcc, 0x1e, 0x6c + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_bit.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_bit.tst new file mode 100644 index 0000000000..4c37071748 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_bit.tst @@ -0,0 +1,5 @@ +DS1: + [ {0, 0, 0, 0} {3, 0, 1, 1} {2, 0, 2, 2} {1, 0, 3, 3} {0, 0, 0, 0} {3, 0, 1, 1} {2, 0, 2, 2} ] + [ {0, 1, 0, 1} {0, 1, 1, 2} {0, 1, 2, 3} {0, 1, 3, 0} {0, 1, 0, 1} {0, 1, 1, 2} {0, 1, 2, 3} ] + [ {0, 2, 0, 2} {1, 2, 1, 3} {2, 2, 2, 0} {3, 2, 3, 1} {0, 2, 0, 2} {1, 2, 1, 3} {2, 2, 2, 0} ] + [ {0, 3, 0, 3} {2, 3, 1, 0} {0, 3, 2, 1} {2, 3, 3, 2} {0, 3, 0, 3} {2, 3, 1, 0} {0, 3, 2, 1} ] diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_bitatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_bitatt.ddl new file mode 100644 index 0000000000..f56e12d294 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_bitatt.ddl @@ -0,0 +1,20 @@ +HDF5 "h5ex_t_bitatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_STD_B8BE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0x00, 0x53, 0xa2, 0xf1, 0x00, 0x53, 0xa2, + (1,0): 0x44, 0x94, 0xe4, 0x34, 0x44, 0x94, 0xe4, + (2,0): 0x88, 0xd9, 0x2a, 0x7b, 0x88, 0xd9, 0x2a, + (3,0): 0xcc, 0x1e, 0x6c, 0xbe, 0xcc, 0x1e, 0x6c + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_bitatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_bitatt.tst new file mode 100644 index 0000000000..544acdafac --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_bitatt.tst @@ -0,0 +1,5 @@ +A1: + [ {0, 0, 0, 0} {3, 0, 1, 1} {2, 0, 2, 2} {1, 0, 3, 3} {0, 0, 0, 0} {3, 0, 1, 1} {2, 0, 2, 2} ] + [ {0, 1, 0, 1} {0, 1, 1, 2} {0, 1, 2, 3} {0, 1, 3, 0} {0, 1, 0, 1} {0, 1, 1, 2} {0, 1, 2, 3} ] + [ {0, 2, 0, 2} {1, 2, 1, 3} {2, 2, 2, 0} {3, 2, 3, 1} {0, 2, 0, 2} {1, 2, 1, 3} {2, 2, 2, 0} ] + [ {0, 3, 0, 3} {2, 3, 1, 0} {0, 3, 2, 1} {2, 3, 3, 2} {0, 3, 0, 3} {2, 3, 1, 0} {0, 3, 2, 1} ] diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpd.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpd.ddl new file mode 100644 index 0000000000..7a06ae1259 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpd.ddl @@ -0,0 +1,44 @@ +HDF5 "h5ex_t_cmpd.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_COMPOUND { + H5T_STD_I64BE "Serial number"; + H5T_STRING { + STRSIZE H5T_VARIABLE; + STRPAD H5T_STR_NULLTERM; + CSET H5T_CSET_ASCII; + CTYPE H5T_C_S1; + } "Location"; + H5T_IEEE_F64BE "Temperature (F)"; + H5T_IEEE_F64BE "Pressure (inHg)"; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): { + 1153, + "Exterior (static)", + 53.23, + 24.57 + }, + (1): { + 1184, + "Intake", + 55.12, + 22.95 + }, + (2): { + 1027, + "Intake manifold", + 103.55, + 31.23 + }, + (3): { + 1313, + "Exhaust manifold", + 1252.89, + 84.11 + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpd.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpd.tst new file mode 100644 index 0000000000..70dfad5f19 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpd.tst @@ -0,0 +1,24 @@ +DS1[0]: +Serial number : 1153 +Location : Exterior (static) +Temperature (F) : 53.230000 +Pressure (inHg) : 24.570000 + +DS1[1]: +Serial number : 1184 +Location : Intake +Temperature (F) : 55.120000 +Pressure (inHg) : 22.950000 + +DS1[2]: +Serial number : 1027 +Location : Intake manifold +Temperature (F) : 103.550000 +Pressure (inHg) : 31.230000 + +DS1[3]: +Serial number : 1313 +Location : Exhaust manifold +Temperature (F) : 1252.890000 +Pressure (inHg) : 84.110000 + diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpdatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpdatt.ddl new file mode 100644 index 0000000000..2c0ff93dd7 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpdatt.ddl @@ -0,0 +1,50 @@ +HDF5 "h5ex_t_cmpdatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_COMPOUND { + H5T_STD_I64BE "Serial number"; + H5T_STRING { + STRSIZE H5T_VARIABLE; + STRPAD H5T_STR_NULLTERM; + CSET H5T_CSET_ASCII; + CTYPE H5T_C_S1; + } "Location"; + H5T_IEEE_F64BE "Temperature (F)"; + H5T_IEEE_F64BE "Pressure (inHg)"; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): { + 1153, + "Exterior (static)", + 53.23, + 24.57 + }, + (1): { + 1184, + "Intake", + 55.12, + 22.95 + }, + (2): { + 1027, + "Intake manifold", + 103.55, + 31.23 + }, + (3): { + 1313, + "Exhaust manifold", + 1252.89, + 84.11 + } + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpdatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpdatt.tst new file mode 100644 index 0000000000..424c6f6d89 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_cmpdatt.tst @@ -0,0 +1,24 @@ +A1[0]: +Serial number : 1153 +Location : Exterior (static) +Temperature (F) : 53.230000 +Pressure (inHg) : 24.570000 + +A1[1]: +Serial number : 1184 +Location : Intake +Temperature (F) : 55.120000 +Pressure (inHg) : 22.950000 + +A1[2]: +Serial number : 1027 +Location : Intake manifold +Temperature (F) : 103.550000 +Pressure (inHg) : 31.230000 + +A1[3]: +Serial number : 1313 +Location : Exhaust manifold +Temperature (F) : 1252.890000 +Pressure (inHg) : 84.110000 + diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_commit.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_commit.ddl new file mode 100644 index 0000000000..fd0495d2a1 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_commit.ddl @@ -0,0 +1,15 @@ +HDF5 "h5ex_t_commit.h5" { +GROUP "/" { + DATATYPE "Sensor_Type" H5T_COMPOUND { + H5T_STD_I64BE "Serial number"; + H5T_STRING { + STRSIZE H5T_VARIABLE; + STRPAD H5T_STR_NULLTERM; + CSET H5T_CSET_ASCII; + CTYPE H5T_C_S1; + } "Location"; + H5T_IEEE_F64BE "Temperature (F)"; + H5T_IEEE_F64BE "Pressure (inHg)"; + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_commit.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_commit.tst new file mode 100644 index 0000000000..7d65d14643 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_commit.tst @@ -0,0 +1,6 @@ +Named datatype: Sensor_Type: + Class: H5T_COMPOUND + Serial number + Location + Temperature (F) + Pressure (inHg) diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_convert.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_convert.tst new file mode 100644 index 0000000000..b70906a56a --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_convert.tst @@ -0,0 +1,24 @@ +sensor[0]: +Serial number : 1153 +Location : Exterior (static) +Temperature (F) : 54.840000 +Pressure (inHg) : 24.760000 + +sensor[1]: +Serial number : 1184 +Location : Intake +Temperature (F) : 56.630000 +Pressure (inHg) : 23.100000 + +sensor[2]: +Serial number : 1027 +Location : Intake manifold +Temperature (F) : 102.690000 +Pressure (inHg) : 30.970000 + +sensor[3]: +Serial number : 1313 +Location : Exhaust manifold +Temperature (F) : 1238.270000 +Pressure (inHg) : 82.150000 + diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpd.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpd.ddl new file mode 100644 index 0000000000..3c5c8c8c69 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpd.ddl @@ -0,0 +1,9 @@ +HDF5 "h5ex_t_cpxcmpd.h5" { +FILE_CONTENTS { + group / + group /Air_Vehicles + dataset /Ambient_Temperature + dataset /DS1 + group /Land_Vehicles + } +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpd.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpd.tst new file mode 100644 index 0000000000..1b191d15ca --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpd.tst @@ -0,0 +1,13 @@ +DS1[0]: + Vehicle name : + Airplane + Sensor locations : + Exterior (static) + Intake + Intake manifold + Exhaust manifold +DS1[1]: + Vehicle name : + Automobile + Sensor locations : + Roof diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpdatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpdatt.ddl new file mode 100644 index 0000000000..fcdfcff004 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpdatt.ddl @@ -0,0 +1,9 @@ +HDF5 "h5ex_t_cpxcmpdatt.h5" { +FILE_CONTENTS { + group / + group /Air_Vehicles + dataset /Ambient_Temperature + dataset /DS1 + group /Land_Vehicles + } +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpdatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpdatt.tst new file mode 100644 index 0000000000..b22eca96dc --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_cpxcmpdatt.tst @@ -0,0 +1,13 @@ +A1[0]: + Vehicle name : + Airplane + Sensor locations : + Exterior (static) + Intake + Intake manifold + Exhaust manifold +A1[1]: + Vehicle name : + Automobile + Sensor locations : + Roof diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_enum.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_enum.ddl new file mode 100644 index 0000000000..c7f303dad9 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_enum.ddl @@ -0,0 +1,20 @@ +HDF5 "h5ex_t_enum.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_ENUM { + H5T_STD_I16BE; + "SOLID" 0; + "LIQUID" 1; + "GAS" 2; + "PLASMA" 3; + } + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): SOLID, SOLID, SOLID, SOLID, SOLID, SOLID, SOLID, + (1,0): SOLID, LIQUID, GAS, PLASMA, SOLID, LIQUID, GAS, + (2,0): SOLID, GAS, SOLID, GAS, SOLID, GAS, SOLID, + (3,0): SOLID, PLASMA, GAS, LIQUID, SOLID, PLASMA, GAS + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_enum.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_enum.tst new file mode 100644 index 0000000000..ee94ae6a01 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_enum.tst @@ -0,0 +1,5 @@ +DS1: + [ SOLID SOLID SOLID SOLID SOLID SOLID SOLID ] + [ SOLID LIQUID GAS PLASMA SOLID LIQUID GAS ] + [ SOLID GAS SOLID GAS SOLID GAS SOLID ] + [ SOLID PLASMA GAS LIQUID SOLID PLASMA GAS ] diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_enumatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_enumatt.ddl new file mode 100644 index 0000000000..c463cdf067 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_enumatt.ddl @@ -0,0 +1,26 @@ +HDF5 "h5ex_t_enumatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_ENUM { + H5T_STD_I16BE; + "SOLID" 0; + "LIQUID" 1; + "GAS" 2; + "PLASMA" 3; + } + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): SOLID, SOLID, SOLID, SOLID, SOLID, SOLID, SOLID, + (1,0): SOLID, LIQUID, GAS, PLASMA, SOLID, LIQUID, GAS, + (2,0): SOLID, GAS, SOLID, GAS, SOLID, GAS, SOLID, + (3,0): SOLID, PLASMA, GAS, LIQUID, SOLID, PLASMA, GAS + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_enumatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_enumatt.tst new file mode 100644 index 0000000000..73a22f5875 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_enumatt.tst @@ -0,0 +1,5 @@ +A1: + [ SOLID SOLID SOLID SOLID SOLID SOLID SOLID ] + [ SOLID LIQUID GAS PLASMA SOLID LIQUID GAS ] + [ SOLID GAS SOLID GAS SOLID GAS SOLID ] + [ SOLID PLASMA GAS LIQUID SOLID PLASMA GAS ] diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_float.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_float.ddl new file mode 100644 index 0000000000..0f9c9da360 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_float.ddl @@ -0,0 +1,14 @@ +HDF5 "h5ex_t_float.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_IEEE_F64LE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0, 1, 2, 3, 4, 5, 6, + (1,0): 2, 1.66667, 2.4, 3.28571, 4.22222, 5.18182, 6.15385, + (2,0): 4, 2.33333, 2.8, 3.57143, 4.44444, 5.36364, 6.30769, + (3,0): 6, 3, 3.2, 3.85714, 4.66667, 5.54545, 6.46154 + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_float.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_float.tst new file mode 100644 index 0000000000..89b963cd25 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_float.tst @@ -0,0 +1,5 @@ +DS1: + [ 0.0000 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000] + [ 2.0000 1.6667 2.4000 3.2857 4.2222 5.1818 6.1538] + [ 4.0000 2.3333 2.8000 3.5714 4.4444 5.3636 6.3077] + [ 6.0000 3.0000 3.2000 3.8571 4.6667 5.5455 6.4615] diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_floatatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_floatatt.ddl new file mode 100644 index 0000000000..ec110e9e31 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_floatatt.ddl @@ -0,0 +1,20 @@ +HDF5 "h5ex_t_floatatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_IEEE_F64LE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0, 1, 2, 3, 4, 5, 6, + (1,0): 2, 1.66667, 2.4, 3.28571, 4.22222, 5.18182, 6.15385, + (2,0): 4, 2.33333, 2.8, 3.57143, 4.44444, 5.36364, 6.30769, + (3,0): 6, 3, 3.2, 3.85714, 4.66667, 5.54545, 6.46154 + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_floatatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_floatatt.tst new file mode 100644 index 0000000000..ee96460a29 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_floatatt.tst @@ -0,0 +1,5 @@ +A1: + [ 0.0000 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000] + [ 2.0000 1.6667 2.4000 3.2857 4.2222 5.1818 6.1538] + [ 4.0000 2.3333 2.8000 3.5714 4.4444 5.3636 6.3077] + [ 6.0000 3.0000 3.2000 3.8571 4.6667 5.5455 6.4615] diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_int.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_int.ddl new file mode 100644 index 0000000000..ad45d9e44c --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_int.ddl @@ -0,0 +1,14 @@ +HDF5 "h5ex_t_int.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I64BE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, + (1,0): 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, + (3,0): 0, 2, 4, 6, 8, 10, 12 + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_int.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_int.tst new file mode 100644 index 0000000000..7d867d5ffa --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_int.tst @@ -0,0 +1,5 @@ +DS1: + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_intatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_intatt.ddl new file mode 100644 index 0000000000..42cdd72556 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_intatt.ddl @@ -0,0 +1,20 @@ +HDF5 "h5ex_t_intatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_STD_I64BE + DATASPACE SIMPLE { ( 4, 7 ) / ( 4, 7 ) } + DATA { + (0,0): 0, -1, -2, -3, -4, -5, -6, + (1,0): 0, 0, 0, 0, 0, 0, 0, + (2,0): 0, 1, 2, 3, 4, 5, 6, + (3,0): 0, 2, 4, 6, 8, 10, 12 + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_intatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_intatt.tst new file mode 100644 index 0000000000..8959a48f8d --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_intatt.tst @@ -0,0 +1,5 @@ +A1: + [ 0 -1 -2 -3 -4 -5 -6] + [ 0 0 0 0 0 0 0] + [ 0 1 2 3 4 5 6] + [ 0 2 4 6 8 10 12] diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_objref.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_objref.ddl new file mode 100644 index 0000000000..6ca96c7b27 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_objref.ddl @@ -0,0 +1,19 @@ +HDF5 "h5ex_t_objref.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_REFERENCE { H5T_STD_REF_OBJECT } + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): GROUP 1400 /G1 , DATASET 800 /DS2 + } + } + DATASET "DS2" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + } + GROUP "G1" { + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_objref.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_objref.tst new file mode 100644 index 0000000000..ba11ebb034 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_objref.tst @@ -0,0 +1,4 @@ +DS1[0]: + ->Group: /G1 +DS1[1]: + ->Dataset: /DS2 diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_objrefatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_objrefatt.ddl new file mode 100644 index 0000000000..7bf57d4a13 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_objrefatt.ddl @@ -0,0 +1,25 @@ +HDF5 "h5ex_t_objrefatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_REFERENCE { H5T_STD_REF_OBJECT } + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): GROUP 1400 /G1 , DATASET 800 /DS2 + } + } + } + DATASET "DS2" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + } + GROUP "G1" { + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_objrefatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_objrefatt.tst new file mode 100644 index 0000000000..7ea98e3add --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_objrefatt.tst @@ -0,0 +1,4 @@ +A1[0]: + ->Group: /G1 +A1[1]: + ->Dataset: /DS2 diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_opaque.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_opaque.ddl new file mode 100644 index 0000000000..124d1aa99c --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_opaque.ddl @@ -0,0 +1,14 @@ +HDF5 "h5ex_t_opaque.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_OPAQUE { + OPAQUE_TAG "Character array"; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): 4f:50:41:51:55:45:30, 4f:50:41:51:55:45:31, 4f:50:41:51:55:45:32, + (3): 4f:50:41:51:55:45:33 + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_opaque.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_opaque.tst new file mode 100644 index 0000000000..9c3ad12c90 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_opaque.tst @@ -0,0 +1,5 @@ +Datatype tag for DS1 is: "Character array" +DS1[0]: OPAQUE0 +DS1[1]: OPAQUE1 +DS1[2]: OPAQUE2 +DS1[3]: OPAQUE3 diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_opaqueatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_opaqueatt.ddl new file mode 100644 index 0000000000..97d6f5a94b --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_opaqueatt.ddl @@ -0,0 +1,20 @@ +HDF5 "h5ex_t_opaqueatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_OPAQUE { + OPAQUE_TAG "Character array"; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): 4f:50:41:51:55:45:30, 4f:50:41:51:55:45:31, + (2): 4f:50:41:51:55:45:32, 4f:50:41:51:55:45:33 + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_opaqueatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_opaqueatt.tst new file mode 100644 index 0000000000..2acf16a365 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_opaqueatt.tst @@ -0,0 +1,5 @@ +Datatype tag for A1 is: "Character array" +A1[0]: OPAQUE0 +A1[1]: OPAQUE1 +A1[2]: OPAQUE2 +A1[3]: OPAQUE3 diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_regref.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_regref.ddl new file mode 100644 index 0000000000..bbfe511098 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_regref.ddl @@ -0,0 +1,24 @@ +HDF5 "h5ex_t_regref.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_REFERENCE { H5T_STD_REF_DSETREG } + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + DATASET /DS2 {(0,1), (2,11), (1,0), (2,4)}, + DATASET /DS2 {(0,0)-(0,2), (0,11)-(0,13), (2,0)-(2,2), (2,11)-(2,13)} + } + } + DATASET "DS2" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 3, 16 ) / ( 3, 16 ) } + DATA { + (0,0): 84, 104, 101, 32, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, + (0,14): 110, 0, + (1,0): 102, 111, 120, 32, 106, 117, 109, 112, 115, 32, 111, 118, 101, + (1,13): 114, 32, 0, + (2,0): 116, 104, 101, 32, 53, 32, 108, 97, 122, 121, 32, 100, 111, 103, + (2,14): 115, 0 + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_regref.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_regref.tst new file mode 100644 index 0000000000..63c1f9ebed --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_regref.tst @@ -0,0 +1,4 @@ +DS1[0]: + -> /DS2: hdf5 +DS1[1]: + -> /DS2: Therowthedog diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_regrefatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_regrefatt.ddl new file mode 100644 index 0000000000..24811ae43d --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_regrefatt.ddl @@ -0,0 +1,31 @@ +HDF5 "h5ex_t_regrefatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_REFERENCE { H5T_STD_REF_DSETREG } + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): DATASET /DS2 {(0,1), (2,11), (1,0), (2,4)}, + (1): DATASET /DS2 {(0,0)-(0,2), (0,11)-(0,13), (2,0)-(2,2), + (1): (2,11)-(2,13)} + } + } + } + DATASET "DS2" { + DATATYPE H5T_STD_I8LE + DATASPACE SIMPLE { ( 3, 16 ) / ( 3, 16 ) } + DATA { + (0,0): 84, 104, 101, 32, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119, + (0,14): 110, 0, + (1,0): 102, 111, 120, 32, 106, 117, 109, 112, 115, 32, 111, 118, 101, + (1,13): 114, 32, 0, + (2,0): 116, 104, 101, 32, 53, 32, 108, 97, 122, 121, 32, 100, 111, 103, + (2,14): 115, 0 + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_regrefatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_regrefatt.tst new file mode 100644 index 0000000000..d50fc760f9 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_regrefatt.tst @@ -0,0 +1,4 @@ +A1[0]: + -> /DS2: hdf5 +A1[1]: + -> /DS2: Therowthedog diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_string.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_string.ddl new file mode 100644 index 0000000000..6a1262a19a --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_string.ddl @@ -0,0 +1,16 @@ +HDF5 "h5ex_t_string.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STRING { + STRSIZE 7; + STRPAD H5T_STR_SPACEPAD; + CSET H5T_CSET_ASCII; + CTYPE H5T_C_S1; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): "Parting", "is such", "sweet ", "sorrow." + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_string.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_string.tst new file mode 100644 index 0000000000..9516b1afb3 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_string.tst @@ -0,0 +1,4 @@ +DS1[0]: Parting +DS1[1]: is such +DS1[2]: sweet +DS1[3]: sorrow. diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_stringatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_stringatt.ddl new file mode 100644 index 0000000000..0e0c7f4ee5 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_stringatt.ddl @@ -0,0 +1,22 @@ +HDF5 "h5ex_t_stringatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_STRING { + STRSIZE 7; + STRPAD H5T_STR_SPACEPAD; + CSET H5T_CSET_ASCII; + CTYPE H5T_C_S1; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): "Parting", "is such", "sweet ", "sorrow." + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_stringatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_stringatt.tst new file mode 100644 index 0000000000..1365c6a3ac --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_stringatt.tst @@ -0,0 +1,4 @@ +A1[0]: Parting +A1[1]: is such +A1[2]: sweet +A1[3]: sorrow. diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_vlen.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlen.ddl new file mode 100644 index 0000000000..53f48630b1 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlen.ddl @@ -0,0 +1,11 @@ +HDF5 "h5ex_t_vlen.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_VLEN { H5T_STD_I32LE} + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_vlen.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlen.tst new file mode 100644 index 0000000000..f11bf93e52 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlen.tst @@ -0,0 +1,4 @@ +DS1[0]: + { 3, 2, 1 } +DS1[1]: + { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 } diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_vlenatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlenatt.ddl new file mode 100644 index 0000000000..a2b32e878c --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlenatt.ddl @@ -0,0 +1,17 @@ +HDF5 "h5ex_t_vlenatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_VLEN { H5T_STD_I32LE} + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_vlenatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlenatt.tst new file mode 100644 index 0000000000..4709eda9c3 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlenatt.tst @@ -0,0 +1,4 @@ +A1[0]: + { 3, 2, 1 } +A1[1]: + { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 } diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstring.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstring.ddl new file mode 100644 index 0000000000..dc79af12d5 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstring.ddl @@ -0,0 +1,16 @@ +HDF5 "h5ex_t_vlstring.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STRING { + STRSIZE H5T_VARIABLE; + STRPAD H5T_STR_SPACEPAD; + CSET H5T_CSET_ASCII; + CTYPE H5T_C_S1; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): "Parting", "is such", "sweet", "sorrow." + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstring.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstring.tst new file mode 100644 index 0000000000..9516b1afb3 --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstring.tst @@ -0,0 +1,4 @@ +DS1[0]: Parting +DS1[1]: is such +DS1[2]: sweet +DS1[3]: sorrow. diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstringatt.ddl b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstringatt.ddl new file mode 100644 index 0000000000..08e298b3ae --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstringatt.ddl @@ -0,0 +1,22 @@ +HDF5 "h5ex_t_vlstringatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_STRING { + STRSIZE H5T_VARIABLE; + STRPAD H5T_STR_SPACEPAD; + CSET H5T_CSET_ASCII; + CTYPE H5T_C_S1; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): "Parting", "is such", "sweet", "sorrow." + } + } + } +} +} diff --git a/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstringatt.tst b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstringatt.tst new file mode 100644 index 0000000000..1365c6a3ac --- /dev/null +++ b/examples/hdfgroup/H5T/testfiles/h5ex_t_vlstringatt.tst @@ -0,0 +1,4 @@ +A1[0]: Parting +A1[1]: is such +A1[2]: sweet +A1[3]: sorrow. diff --git a/examples/hdfgroup/Performance/CMakeLists.txt b/examples/hdfgroup/Performance/CMakeLists.txt new file mode 100644 index 0000000000..abf04877ee --- /dev/null +++ b/examples/hdfgroup/Performance/CMakeLists.txt @@ -0,0 +1,68 @@ +cmake_minimum_required (VERSION 3.10) +PROJECT (HDF5Examples_C_PERFORM) + +#----------------------------------------------------------------------------- +# Define Sources +#----------------------------------------------------------------------------- +include (C_sourcefiles.cmake) + +foreach (example ${examples}) + get_filename_component (example_name ${example} NAME_WE) + add_executable (${example_name} ${PROJECT_SOURCE_DIR}/${example}) + if (H5_HAVE_PARALLEL) + target_include_directories (${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS}) + endif () + target_link_libraries (${example_name} ${LINK_LIBS}) +endforeach () + +if (BUILD_TESTING) + macro (ADD_H5_TEST testname) + add_test ( + NAME ${testname}-clearall + COMMAND ${CMAKE_COMMAND} + -E remove + ${testname}.h5 + ) + add_test ( + NAME ${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_EXPECT=0" + -D "TEST_OUTPUT=${testname}.out" + -D "TEST_REFERENCE=${testname}.tst" + -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}" + -P "${HDF5EX_RESOURCES_DIR}/runTest.cmake" + ) + set_tests_properties (${testname} PROPERTIES DEPENDS ${testname}-clearall) + if (HDF5_BUILD_TOOLS) + add_test ( + NAME H5DUMP-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN};${testname}.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${testname}.dmp.out" + -D "TEST_EXPECT=0" + -D "TEST_REFERENCE=${testname}.dmp" + -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}" + -P "${HDF5EX_RESOURCES_DIR}/runTest.cmake" + ) + set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS ${testname}) + endif () + endmacro () + + foreach (example ${examples}) + get_filename_component (example_name ${example} NAME_WE) + set (testdest "${PROJECT_BINARY_DIR}/${example_name}.test") + #message (STATUS " Copying ${example_name}.test") + add_custom_command ( + TARGET ${example_name} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${example_name}.test ${testdest} + ) + ADD_H5_TEST (${example_name}) + endforeach () +endif () diff --git a/examples/hdfgroup/Performance/C_sourcefiles.cmake b/examples/hdfgroup/Performance/C_sourcefiles.cmake new file mode 100644 index 0000000000..ac8a01dd45 --- /dev/null +++ b/examples/hdfgroup/Performance/C_sourcefiles.cmake @@ -0,0 +1,8 @@ +#----------------------------------------------------------------------------- +# Define Sources, one file per application +#----------------------------------------------------------------------------- +set (examples + h5slabread.c + h5slabwrite.c + h5efc.c +) diff --git a/examples/hdfgroup/Performance/h5efc.c b/examples/hdfgroup/Performance/h5efc.c new file mode 100644 index 0000000000..da62663a7e --- /dev/null +++ b/examples/hdfgroup/Performance/h5efc.c @@ -0,0 +1,92 @@ +/************************************************************ + + This example shows how to use the external file cache. + + This file is intended for use with HDF5 Library version + 1.8.7 or newer + + ************************************************************/ + +#include "hdf5.h" + +#define FILE "h5efc.h5" +#define EXT_FILE1 "h5efc1.h5" +#define EXT_FILE2 "h5efc2.h5" +#define EXT_FILE3 "h5efc3.h5" + +int +main(void) +{ + hid_t file1, file2, group, fapl; /* Handles */ + herr_t status; + + /* + * Create file access property list and set it to allow caching of open + * files visited through external links. + */ + fapl = H5Pcreate (H5P_FILE_ACCESS); + status = H5Pset_elink_file_cache_size (fapl, 8); + + /* + * Create a new file using the file access property list. + */ + file1 = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + + /* + * Create files to serve as targets for external links. + */ + file2 = H5Fcreate (EXT_FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + status = H5Fclose (file2); + file2 = H5Fcreate (EXT_FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + status = H5Fclose (file2); + file2 = H5Fcreate (EXT_FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + status = H5Fclose (file2); + + /* + * Create external links to the target files. + */ + status = H5Lcreate_external (EXT_FILE1, "/", file1, "link_to_1", + H5P_DEFAULT, H5P_DEFAULT); + status = H5Lcreate_external (EXT_FILE2, "/", file1, "link_to_2", + H5P_DEFAULT, H5P_DEFAULT); + status = H5Lcreate_external (EXT_FILE3, "/", file1, "link_to_3", + H5P_DEFAULT, H5P_DEFAULT); + + /* + * Open and close the targets of all three external links (these will be the + * root groups of the target files). The target files should be held open + * by the root file's external file cache after traversal. + */ + group = H5Gopen (file1, "/link_to_1", H5P_DEFAULT); + status = H5Gclose(group); + group = H5Gopen (file1, "/link_to_2", H5P_DEFAULT); + status = H5Gclose(group); + group = H5Gopen (file1, "/link_to_3", H5P_DEFAULT); + status = H5Gclose(group); + + /* + * Open and close the targets of all three external links again. The target + * files should already be held open by the root file's external file cache, + * so the library will not actually have to issue an "open" system call. + */ + group = H5Gopen (file1, "/link_to_1", H5P_DEFAULT); + status = H5Gclose(group); + group = H5Gopen (file1, "/link_to_2", H5P_DEFAULT); + status = H5Gclose(group); + group = H5Gopen (file1, "/link_to_3", H5P_DEFAULT); + status = H5Gclose(group); + + /* + * Release the root file's external file cache. This will close all the + * external link target files. + */ + status = H5Frelease_file_cache(file1); + + /* + * Close and release resources. + */ + status = H5Pclose (fapl); + status = H5Fclose (file1); + + return 0; +} diff --git a/examples/hdfgroup/Performance/h5slab.h b/examples/hdfgroup/Performance/h5slab.h new file mode 100644 index 0000000000..f8bac8aa9a --- /dev/null +++ b/examples/hdfgroup/Performance/h5slab.h @@ -0,0 +1,25 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* Common definitions used by h5slab example programs (h5slabread, h5slabwrite). + * + * Created by Albert Cheng 2010/7/13. + */ +#include +#include +#include "hdf5.h" +#if 1 +#define NX 65536 +#define NY 65536 /* dataset dimensions */ +#define CX 256 /* height of hyperslab */ +#define CY 4096 /* width of hyperslab */ +#else +#define NX 256 +#define NY 256 /* dataset dimensions */ +#define CX 32 /* height of hyperslab */ +#define CY 16 /* width of hyperslab */ +#endif +#define RC (NX/CX) +#define CC (NY/CY) diff --git a/examples/hdfgroup/Performance/h5slabread.c b/examples/hdfgroup/Performance/h5slabread.c new file mode 100644 index 0000000000..046517b870 --- /dev/null +++ b/examples/hdfgroup/Performance/h5slabread.c @@ -0,0 +1,48 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include +#include +#include "hdf5.h" +#include "h5slab.h" + +/* Read the chunks in a row pattern. + * + * Created by Albert Cheng and Christian Chilan 2010/7/13. + */ +int main (int argc, char **argv) { + hid_t file_id, dset_id, filespace, memspace, fapl, dxpl; + hsize_t dimsf[2], count[2], offset[2], chunk_dims[2]={CX, CY}; + char *data, table[RC]; + unsigned long i, j, cx; + + fapl = H5Pcreate(H5P_FILE_ACCESS); + dxpl = H5Pcreate(H5P_DATASET_XFER); + fapl = dxpl = H5P_DEFAULT; + file_id = H5Fopen(argv[1], H5F_ACC_RDONLY, fapl); + dset_id = H5Dopen(file_id, "dataset1", H5P_DEFAULT); + filespace = H5Dget_space(dset_id); + count[0] = CX; + count[1] = NY; + memspace = H5Screate_simple(2, count, NULL); + + data = (char *)malloc(count[0]*count[1]*sizeof(char)); + for (i=0; i +#include +#include "hdf5.h" +#include "h5slab.h" + +/* Write the chunks in the row order. This provides good and bad read + * performance if the read pattern is by row and by column respectivly. + * + * Created by Albert Cheng and Christian Chilan 2010/7/13. + */ +int +createfilebyrow(void) +{ + hid_t file_id, dset_id, filespace, memspace, fapl, dxpl, dcpl; + hsize_t dimsf[2], count[2], offset[2], chunk_dims[2]={CX, CY}; + char *data, dataval, table[RC]; + unsigned long i, j, l, cx; + fapl = H5Pcreate(H5P_FILE_ACCESS); + dcpl = H5Pcreate(H5P_DATASET_CREATE); + dxpl = H5Pcreate(H5P_DATASET_XFER); + H5Pset_chunk ( dcpl, 2, chunk_dims); + fapl = dxpl = H5P_DEFAULT; + file_id = H5Fcreate("row_alloc.h5", H5F_ACC_TRUNC, H5P_DEFAULT, fapl); + dimsf[0] = NX; + dimsf[1] = NY; + filespace = H5Screate_simple(2, dimsf, NULL); + dset_id = H5Dcreate(file_id, "dataset1", H5T_NATIVE_CHAR, filespace, + H5P_DEFAULT, dcpl, H5P_DEFAULT); + count[0] = CX; + count[1] = NY; + memspace = H5Screate_simple(2, count, NULL); + + data = (char *)malloc(count[0]*count[1]*sizeof(char)); + + /* writing the whole chunked rows each time. */ + for (l=0; l