From 8190a5e4b36c92997f7e1a6f079636386b04874b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 6 Nov 2013 13:28:12 -0500 Subject: [svn-r24408] Add compound integer tests files Tested: local linux cmake --- MANIFEST | 4 + tools/h5dump/CMakeTests.cmake | 10 + tools/h5dump/h5dumpgentest.c | 490 +++++++++++++ tools/testfiles/tcmpdintarray.ddl | 64 ++ tools/testfiles/tcmpdintarray.h5 | Bin 0 -> 9888 bytes tools/testfiles/tcmpdints.ddl | 1444 +++++++++++++++++++++++++++++++++++++ tools/testfiles/tcmpdints.h5 | Bin 0 -> 9312 bytes 7 files changed, 2012 insertions(+) create mode 100644 tools/testfiles/tcmpdintarray.ddl create mode 100644 tools/testfiles/tcmpdintarray.h5 create mode 100644 tools/testfiles/tcmpdints.ddl create mode 100644 tools/testfiles/tcmpdints.h5 diff --git a/MANIFEST b/MANIFEST index 8d74fb6..68aac79 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1467,8 +1467,12 @@ ./tools/testfiles/tcontents.ddl ./tools/testfiles/tcontiguos.ddl ./tools/testfiles/tcmpdattrintsize.ddl +./tools/testfiles/tcmpdintarray.ddl +./tools/testfiles/tcmpdints.ddl ./tools/testfiles/tcmpdintsize.ddl ./tools/testfiles/tcmpdattrintsize.h5 +./tools/testfiles/tcmpdintarray.h5 +./tools/testfiles/tcmpdints.h5 ./tools/testfiles/tcmpdintsize.h5 ./tools/testfiles/tcomp-1.ddl ./tools/testfiles/tcomp-2.ddl diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake index c88495d..6edc9e4 100644 --- a/tools/h5dump/CMakeTests.cmake +++ b/tools/h5dump/CMakeTests.cmake @@ -57,6 +57,8 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar1.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tchunked.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintarray.ddl + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdints.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ddl ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-2.ddl @@ -202,6 +204,8 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinary.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintarray.h5 + ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdints.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5 @@ -809,6 +813,10 @@ tchunked.out.err tcmpdattrintsize.out tcmpdattrintsize.out.err + tcmpdintarray.out + tcmpdintarray.out.err + tcmpdints.out + tcmpdints.out.err tcmpdintsize.out tcmpdintsize.out.err tcomp-1.out @@ -1058,6 +1066,8 @@ # test for signed/unsigned datasets ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5) # test for compound signed/unsigned datasets + ADD_H5_TEST (tcmpdintarray 0 --enable-error-stack tcmpdintarray.h5) + ADD_H5_TEST (tcmpdints 0 --enable-error-stack tcmpdints.h5) ADD_H5_TEST (tcmpdintsize 0 --enable-error-stack tcmpdintsize.h5) # test for signed/unsigned scalar datasets ADD_H5_TEST (tscalarintsize 0 --enable-error-stack tscalarintsize.h5) diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 88035a2..7c3ddf4 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -105,6 +105,8 @@ #define FILE73 "tscalarintsize.h5" #define FILE74 "tscalarattrintsize.h5" #define FILE75 "tscalarstring.h5" +#define FILE76 "tcmpdintarray.h5" +#define FILE77 "tcmpdints.h5" /*------------------------------------------------------------------------- * prototypes @@ -321,6 +323,30 @@ typedef struct s1_t { #define F73_YDIM64 64 #define F73_DUMMYDBL "DummyDBL" +/* "FILE76 and FILE77 */ +/* Name of dataset to create in datafile */ +#define F76_DATASETNAME "CompoundIntArray" +#define F76_LENGTH 4 +#define F76_RANK 1 +#define F76_ARRAY_RANK 1 +#define F76_DATASETU08 "DU08BITS" +#define F76_DATASETS08 "DS08BITS" +#define F76_DIM8 8 +#define F76_DATASETU16 "DU16BITS" +#define F76_DATASETS16 "DS16BITS" +#define F76_DIM16 16 +#define F76_DATASETU32 "DU32BITS" +#define F76_DATASETS32 "DS32BITS" +#define F76_DIM32 32 +#define F76_DATASETU64 "DU64BITS" +#define F76_DATASETS64 "DS64BITS" +#define F76_DIM64 64 +#define F76_DUMMYDBL "DummyDBL" +/* Name of dataset to create in datafile */ +#define F77_DATASETNAME1 "CompoundInts" +#define F77_DATASETNAME2 "CompoundRInts" +#define F77_LENGTH 64 + static void gent_group(void) { @@ -8573,6 +8599,468 @@ gent_string_scalars(void) H5Fclose(fid); } +static void gent_compound_int_array(void) { + hid_t fid, dataset, space; + hsize_t dims[1]; + uint8_t valu8bits; + uint16_t valu16bits; + uint32_t valu32bits; + uint64_t valu64bits; + int8_t val8bits; + int16_t val16bits; + int32_t val32bits; + int64_t val64bits; + hsize_t array_dim8[]={F76_DIM8}; /* Array dimensions */ + hsize_t array_dim16[]={F76_DIM16}; /* Array dimensions */ + hsize_t array_dim32[]={F76_DIM32}; /* Array dimensions */ + hsize_t array_dim64[]={F76_DIM64}; /* Array dimensions */ + hid_t arrayu8_tid; /* Array datatype handle */ + hid_t arrayu16_tid; /* Array datatype handle */ + hid_t arrayu32_tid; /* Array datatype handle */ + hid_t arrayu64_tid; /* Array datatype handle */ + hid_t array8_tid; /* Array datatype handle */ + hid_t array16_tid; /* Array datatype handle */ + hid_t array32_tid; /* Array datatype handle */ + hid_t array64_tid; /* Array datatype handle */ + hid_t arraydbl_tid; /* Array datatype handle */ + /* Structure and array for compound types */ + typedef struct Cmpd1Struct { + uint8_t dsetu8[F76_DIM8]; + uint16_t dsetu16[F76_DIM16]; + uint32_t dsetu32[F76_DIM32]; + uint64_t dsetu64[F76_DIM64]; + int8_t dset8[F76_DIM8]; + int16_t dset16[F76_DIM16]; + int32_t dset32[F76_DIM32]; + int64_t dset64[F76_DIM64]; + double dsetdbl[F76_DIM8]; + } Cmpd1Struct; + Cmpd1Struct Cmpd1[F76_LENGTH]; + + hid_t Cmpd1Structid; /* File datatype identifier */ + herr_t status; /* Error checking variable */ + hsize_t dim[] = { F76_LENGTH }; /* Dataspace dimensions */ + + int m, n, o; /* Array init loop vars */ + + /* Initialize the data in the arrays/datastructure */ + for (m = 0; m < F76_LENGTH; m++) { + + /* Array of 8 bits unsigned int */ + dims[0] = F76_DIM8; + + valu8bits = (uint8_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dsetu8[n] = valu8bits; + valu8bits <<= 1; + } + + /* Array of 16 bits unsigned int */ + dims[0] = F76_DIM16; + + valu16bits = (uint16_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dsetu16[n] = valu16bits; + valu16bits <<= 1; + } + + /* Array of 32 bits unsigned int */ + dims[0] = F76_DIM32; + + valu32bits = (uint32_t) ~0u; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dsetu32[n] = valu32bits; + valu32bits <<= 1; + } + + /* Array of 64 bits unsigned int */ + dims[0] = F76_DIM64; + + valu64bits = (uint64_t) ~0Lu; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dsetu64[n] = valu64bits; + valu64bits <<= 1; + } + + /* Array of 8 bits signed int */ + dims[0] = F76_DIM8; + + val8bits = (int8_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dset8[n] = val8bits; + val8bits <<= 1; + } + + /* Array of 16 bits signed int */ + dims[0] = F76_DIM16; + + val16bits = (int16_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dset16[n] = val16bits; + val16bits <<= 1; + } + + /* Array of 32 bits signed int */ + dims[0] = F76_DIM32; + + val32bits = (int32_t) ~0; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dset32[n] = val32bits; + val32bits <<= 1; + } + + /* Array of 64 bits signed int */ + dims[0] = F76_DIM64; + + val64bits = (int64_t) ~0L; /* all 1s */ + for(n = 0; n < dims[0]; n++){ + Cmpd1[m].dset64[n] = val64bits; + val64bits <<= 1; + } + + /* Double Dummy set for failure tests */ + dims[0] = F76_DIM8; + + for(n = 0; n < dims[0]; n++) + Cmpd1[m].dsetdbl[n] = 0.0001 + n; + } + + /* Create the array data type for the 8 bits signed int array */ + array8_tid = H5Tarray_create2(H5T_NATIVE_SCHAR, F76_ARRAY_RANK, array_dim8); + HDassert(array8_tid >= 0); + + /* Create the array data type for the 16 bits signed int array */ + array16_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F76_ARRAY_RANK, array_dim16); + HDassert(array16_tid >= 0); + + /* Create the array data type for the 32 bits signed int array */ + array32_tid = H5Tarray_create2(H5T_NATIVE_INT, F76_ARRAY_RANK, array_dim32); + HDassert(array32_tid >= 0); + + /* Create the array data type for the 64 bits signed int array */ + array64_tid = H5Tarray_create2(H5T_NATIVE_LONG, F76_ARRAY_RANK, array_dim64); + HDassert(array64_tid >= 0); + + /* Create the array data type for the 8 bits signed int array */ + arrayu8_tid = H5Tarray_create2(H5T_NATIVE_UCHAR, F76_ARRAY_RANK, array_dim8); + HDassert(arrayu8_tid >= 0); + + /* Create the array data type for the 16 bits signed int array */ + arrayu16_tid = H5Tarray_create2(H5T_NATIVE_USHORT, F76_ARRAY_RANK, array_dim16); + HDassert(arrayu16_tid >= 0); + + /* Create the array data type for the 32 bits signed int array */ + arrayu32_tid = H5Tarray_create2(H5T_NATIVE_UINT, F76_ARRAY_RANK, array_dim32); + HDassert(arrayu32_tid >= 0); + + /* Create the array data type for the 64 bits signed int array */ + arrayu64_tid = H5Tarray_create2(H5T_NATIVE_ULONG, F76_ARRAY_RANK, array_dim64); + HDassert(arrayu64_tid >= 0); + + /* Create the array data type for the 32 bits double array */ + arraydbl_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F76_ARRAY_RANK, array_dim8); + HDassert(arraydbl_tid >= 0); + + /* Create the dataspace */ + space = H5Screate_simple(F76_RANK, dim, NULL); + HDassert(space >= 0); + + /* Create the file */ + fid = H5Fcreate(FILE76, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + HDassert(fid >= 0); + + /* Create the memory data type */ + Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct)); + HDassert(Cmpd1Structid >= 0); + + /* Insert the arrays and variables into the structure */ + status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), arrayu8_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), arrayu16_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), arrayu32_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), arrayu64_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), array8_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), array16_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), array32_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), array64_tid); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), arraydbl_tid); + HDassert(status >= 0); + + /* Create the dataset */ + dataset = H5Dcreate2(fid, F76_DATASETNAME, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* Write data to the dataset */ + status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1); + HDassert(status >= 0); + + /* Release resources */ + status = H5Tclose(Cmpd1Structid); + HDassert(status >= 0); + + status = H5Tclose(arrayu8_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu16_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu32_tid); + HDassert(status >= 0); + + status = H5Tclose(arrayu64_tid); + HDassert(status >= 0); + + status = H5Tclose(array8_tid); + HDassert(status >= 0); + + status = H5Tclose(array16_tid); + HDassert(status >= 0); + + status = H5Tclose(array32_tid); + HDassert(status >= 0); + + status = H5Tclose(array64_tid); + HDassert(status >= 0); + + status = H5Tclose(arraydbl_tid); + HDassert(status >= 0); + + status = H5Sclose(space); + HDassert(status >= 0); + + status = H5Dclose(dataset); + HDassert(status >= 0); + + status = H5Fclose(fid); + HDassert(status >= 0); +} + +static void gent_compound_ints(void) { + hid_t fid, dataset, space; + hsize_t dims[1]; + uint8_t valu8bits; + uint16_t valu16bits; + uint32_t valu32bits; + uint64_t valu64bits; + int8_t val8bits; + int16_t val16bits; + int32_t val32bits; + int64_t val64bits; + /* Structure and array for compound types */ + typedef struct Cmpd1Struct { + uint8_t dsetu8; + uint16_t dsetu16; + uint32_t dsetu32; + uint64_t dsetu64; + int8_t dset8; + int16_t dset16; + int32_t dset32; + int64_t dset64; + double dsetdbl; + } Cmpd1Struct; + Cmpd1Struct Cmpd1[F77_LENGTH]; + typedef struct Cmpd2Struct { + uint64_t dsetu64; + uint32_t dsetu32; + uint16_t dsetu16; + uint8_t dsetu8; + int64_t dset64; + int32_t dset32; + int16_t dset16; + int8_t dset8; + double dsetdbl; + } Cmpd2Struct; + Cmpd2Struct Cmpd2[F77_LENGTH]; + + hid_t Cmpd1Structid; /* File datatype identifier */ + hid_t Cmpd2Structid; /* File datatype identifier */ + herr_t status; /* Error checking variable */ + hsize_t dim[] = { F77_LENGTH }; /* Dataspace dimensions */ + + int m, n, o; /* Array init loop vars */ + + /* Initialize the data in the arrays/datastructure */ + for (m = 0; m < F77_LENGTH; m++) { + + /* Array of 8 bits unsigned int */ + if((m % F76_DIM8) == 0) + valu8bits = (uint8_t) ~0u; /* all 1s */ + Cmpd1[m].dsetu8 = valu8bits; + Cmpd2[m].dsetu8 = valu8bits; + valu8bits <<= 1; + + /* Array of 16 bits unsigned int */ + if((m % F76_DIM16) == 0) + valu16bits = (uint16_t) ~0u; /* all 1s */ + Cmpd1[m].dsetu16 = valu16bits; + Cmpd2[m].dsetu16 = valu16bits; + valu16bits <<= 1; + + /* Array of 32 bits unsigned int */ + if((m % F76_DIM32) == 0) + valu32bits = (uint32_t) ~0u; /* all 1s */ + Cmpd1[m].dsetu32 = valu32bits; + Cmpd2[m].dsetu32 = valu32bits; + valu32bits <<= 1; + + /* Array of 64 bits unsigned int */ + if((m % F76_DIM64) == 0) + valu64bits = (uint64_t) ~0Lu; /* all 1s */ + Cmpd1[m].dsetu64 = valu64bits; + Cmpd2[m].dsetu64 = valu64bits; + valu64bits <<= 1; + + /* Array of 8 bits signed int */ + if((m % F76_DIM8) == 0) + val8bits = (int8_t) ~0; /* all 1s */ + Cmpd1[m].dset8 = val8bits; + Cmpd2[m].dset8 = val8bits; + val8bits <<= 1; + + /* Array of 16 bits signed int */ + if((m % F76_DIM16) == 0) + val16bits = (int16_t) ~0; /* all 1s */ + Cmpd1[m].dset16 = val16bits; + Cmpd2[m].dset16 = val16bits; + val16bits <<= 1; + + /* Array of 32 bits signed int */ + if((m % F76_DIM32) == 0) + val32bits = (int32_t) ~0; /* all 1s */ + Cmpd1[m].dset32 = val32bits; + Cmpd2[m].dset32 = val32bits; + val32bits <<= 1; + + /* Array of 64 bits signed int */ + if((m % F76_DIM64) == 0) + val64bits = (int64_t) ~0L; /* all 1s */ + Cmpd1[m].dset64 = val64bits; + Cmpd2[m].dset64 = val64bits; + val64bits <<= 1; + + /* Double Dummy set for failure tests */ + Cmpd1[m].dsetdbl = 0.0001 + m; + Cmpd2[m].dsetdbl = 0.0001 + m; + } + + /* Create the dataspace */ + space = H5Screate_simple(F76_RANK, dim, NULL); + HDassert(space >= 0); + + /* Create the file */ + fid = H5Fcreate(FILE77, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + HDassert(fid >= 0); + + /* Create the memory data type */ + Cmpd1Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd1Struct)); + HDassert(Cmpd1Structid >= 0); + + /* Insert the arrays and variables into the structure */ + status = H5Tinsert(Cmpd1Structid, F76_DATASETU08, HOFFSET(Cmpd1Struct, dsetu8), H5T_NATIVE_UCHAR); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU16, HOFFSET(Cmpd1Struct, dsetu16), H5T_NATIVE_USHORT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU32, HOFFSET(Cmpd1Struct, dsetu32), H5T_NATIVE_UINT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETU64, HOFFSET(Cmpd1Struct, dsetu64), H5T_NATIVE_ULONG); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS08, HOFFSET(Cmpd1Struct, dset8), H5T_NATIVE_SCHAR); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS16, HOFFSET(Cmpd1Struct, dset16), H5T_NATIVE_SHORT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS32, HOFFSET(Cmpd1Struct, dset32), H5T_NATIVE_INT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DATASETS64, HOFFSET(Cmpd1Struct, dset64), H5T_NATIVE_LONG); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd1Structid, F76_DUMMYDBL, HOFFSET(Cmpd1Struct, dsetdbl), H5T_NATIVE_DOUBLE); + HDassert(status >= 0); + + /* Create the dataset */ + dataset = H5Dcreate2(fid, F77_DATASETNAME1, Cmpd1Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* Write data to the dataset */ + status = H5Dwrite(dataset, Cmpd1Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1); + HDassert(status >= 0); + + /* Release resources */ + status = H5Tclose(Cmpd1Structid); + HDassert(status >= 0); + + /* Create the memory data type */ + Cmpd2Structid = H5Tcreate(H5T_COMPOUND, sizeof(Cmpd2Struct)); + HDassert(Cmpd2Structid >= 0); + + /* Insert the arrays and variables into the structure */ + status = H5Tinsert(Cmpd2Structid, F76_DATASETU64, HOFFSET(Cmpd2Struct, dsetu64), H5T_NATIVE_ULONG); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETU32, HOFFSET(Cmpd2Struct, dsetu32), H5T_NATIVE_UINT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETU16, HOFFSET(Cmpd2Struct, dsetu16), H5T_NATIVE_USHORT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETU08, HOFFSET(Cmpd2Struct, dsetu8), H5T_NATIVE_UCHAR); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETS64, HOFFSET(Cmpd2Struct, dset64), H5T_NATIVE_LONG); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETS32, HOFFSET(Cmpd2Struct, dset32), H5T_NATIVE_INT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETS16, HOFFSET(Cmpd2Struct, dset16), H5T_NATIVE_SHORT); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DATASETS08, HOFFSET(Cmpd2Struct, dset8), H5T_NATIVE_SCHAR); + HDassert(status >= 0); + + status = H5Tinsert(Cmpd2Structid, F76_DUMMYDBL, HOFFSET(Cmpd2Struct, dsetdbl), H5T_NATIVE_DOUBLE); + HDassert(status >= 0); + + /* Create the dataset */ + dataset = H5Dcreate2(fid, F77_DATASETNAME2, Cmpd2Structid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + /* Write data to the dataset */ + status = H5Dwrite(dataset, Cmpd2Structid, H5S_ALL, H5S_ALL, H5P_DEFAULT, Cmpd1); + HDassert(status >= 0); + + /* Release resources */ + status = H5Tclose(Cmpd2Structid); + HDassert(status >= 0); + + status = H5Sclose(space); + HDassert(status >= 0); + + status = H5Dclose(dataset); + HDassert(status >= 0); + + status = H5Fclose(fid); + HDassert(status >= 0); +} + /*------------------------------------------------------------------------- * Function: main * @@ -8658,6 +9146,8 @@ int main(void) gent_intscalars(); gent_attr_intscalars(); gent_string_scalars(); + gent_compound_int_array(); + gent_compound_ints(); return 0; } diff --git a/tools/testfiles/tcmpdintarray.ddl b/tools/testfiles/tcmpdintarray.ddl new file mode 100644 index 0000000..ef21cd2 --- /dev/null +++ b/tools/testfiles/tcmpdintarray.ddl @@ -0,0 +1,64 @@ +HDF5 "tcmpdintarray.h5" { +GROUP "/" { + DATASET "CompoundIntArray" { + DATATYPE H5T_COMPOUND { + H5T_ARRAY { [8] H5T_STD_U8LE } "DU08BITS"; + H5T_ARRAY { [16] H5T_STD_U16LE } "DU16BITS"; + H5T_ARRAY { [32] H5T_STD_U32LE } "DU32BITS"; + H5T_ARRAY { [64] H5T_STD_U64LE } "DU64BITS"; + H5T_ARRAY { [8] H5T_STD_I8LE } "DS08BITS"; + H5T_ARRAY { [16] H5T_STD_I16LE } "DS16BITS"; + H5T_ARRAY { [32] H5T_STD_I32LE } "DS32BITS"; + H5T_ARRAY { [64] H5T_STD_I64LE } "DS64BITS"; + H5T_ARRAY { [8] H5T_IEEE_F64LE } "DummyDBL"; + } + DATASPACE SIMPLE { ( 4 ) / ( 4 ) } + DATA { + (0): { + [ 255, 254, 252, 248, 240, 224, 192, 128 ], + [ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768 ], + [ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648 ], + [ 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808 ], + [ -1, -2, -4, -8, -16, -32, -64, -128 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808 ], + [ 0.0001, 1.0001, 2.0001, 3.0001, 4.0001, 5.0001, 6.0001, 7.0001 ] + }, + (1): { + [ 255, 254, 252, 248, 240, 224, 192, 128 ], + [ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768 ], + [ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648 ], + [ 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808 ], + [ -1, -2, -4, -8, -16, -32, -64, -128 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808 ], + [ 0.0001, 1.0001, 2.0001, 3.0001, 4.0001, 5.0001, 6.0001, 7.0001 ] + }, + (2): { + [ 255, 254, 252, 248, 240, 224, 192, 128 ], + [ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768 ], + [ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648 ], + [ 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808 ], + [ -1, -2, -4, -8, -16, -32, -64, -128 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808 ], + [ 0.0001, 1.0001, 2.0001, 3.0001, 4.0001, 5.0001, 6.0001, 7.0001 ] + }, + (3): { + [ 255, 254, 252, 248, 240, 224, 192, 128 ], + [ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768 ], + [ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648 ], + [ 18446744073709551615, 18446744073709551614, 18446744073709551612, 18446744073709551608, 18446744073709551600, 18446744073709551584, 18446744073709551552, 18446744073709551488, 18446744073709551360, 18446744073709551104, 18446744073709550592, 18446744073709549568, 18446744073709547520, 18446744073709543424, 18446744073709535232, 18446744073709518848, 18446744073709486080, 18446744073709420544, 18446744073709289472, 18446744073709027328, 18446744073708503040, 18446744073707454464, 18446744073705357312, 18446744073701163008, 18446744073692774400, 18446744073675997184, 18446744073642442752, 18446744073575333888, 18446744073441116160, 18446744073172680704, 18446744072635809792, 18446744071562067968, 18446744069414584320, 18446744065119617024, 18446744056529682432, 18446744039349813248, 18446744004990074880, 18446743936270598144, 18446743798831644672, 18446743523953737728, 18446742974197923840, 18446741874686296064, 18446739675663040512, 18446735277616529408, 18446726481523507200, 18446708889337462784, 18446673704965373952, 18446603336221196288, 18446462598732840960, 18446181123756130304, 18445618173802708992, 18444492273895866368, 18442240474082181120, 18437736874454810624, 18428729675200069632, 18410715276690587648, 18374686479671623680, 18302628885633695744, 18158513697557839872, 17870283321406128128, 17293822569102704640, 16140901064495857664, 13835058055282163712, 9223372036854775808 ], + [ -1, -2, -4, -8, -16, -32, -64, -128 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648 ], + [ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904, -9223372036854775808 ], + [ 0.0001, 1.0001, 2.0001, 3.0001, 4.0001, 5.0001, 6.0001, 7.0001 ] + } + } + } +} +} diff --git a/tools/testfiles/tcmpdintarray.h5 b/tools/testfiles/tcmpdintarray.h5 new file mode 100644 index 0000000..17798fe Binary files /dev/null and b/tools/testfiles/tcmpdintarray.h5 differ diff --git a/tools/testfiles/tcmpdints.ddl b/tools/testfiles/tcmpdints.ddl new file mode 100644 index 0000000..f62f588 --- /dev/null +++ b/tools/testfiles/tcmpdints.ddl @@ -0,0 +1,1444 @@ +HDF5 "tcmpdints.h5" { +GROUP "/" { + DATASET "CompoundInts" { + DATATYPE H5T_COMPOUND { + H5T_STD_U8LE "DU08BITS"; + H5T_STD_U16LE "DU16BITS"; + H5T_STD_U32LE "DU32BITS"; + H5T_STD_U64LE "DU64BITS"; + H5T_STD_I8LE "DS08BITS"; + H5T_STD_I16LE "DS16BITS"; + H5T_STD_I32LE "DS32BITS"; + H5T_STD_I64LE "DS64BITS"; + H5T_IEEE_F64LE "DummyDBL"; + } + DATASPACE SIMPLE { ( 64 ) / ( 64 ) } + DATA { + (0): { + 255, + 65535, + 4294967295, + 18446744073709551615, + -1, + -1, + -1, + -1, + 0.0001 + }, + (1): { + 254, + 65534, + 4294967294, + 18446744073709551614, + -2, + -2, + -2, + -2, + 1.0001 + }, + (2): { + 252, + 65532, + 4294967292, + 18446744073709551612, + -4, + -4, + -4, + -4, + 2.0001 + }, + (3): { + 248, + 65528, + 4294967288, + 18446744073709551608, + -8, + -8, + -8, + -8, + 3.0001 + }, + (4): { + 240, + 65520, + 4294967280, + 18446744073709551600, + -16, + -16, + -16, + -16, + 4.0001 + }, + (5): { + 224, + 65504, + 4294967264, + 18446744073709551584, + -32, + -32, + -32, + -32, + 5.0001 + }, + (6): { + 192, + 65472, + 4294967232, + 18446744073709551552, + -64, + -64, + -64, + -64, + 6.0001 + }, + (7): { + 128, + 65408, + 4294967168, + 18446744073709551488, + -128, + -128, + -128, + -128, + 7.0001 + }, + (8): { + 255, + 65280, + 4294967040, + 18446744073709551360, + -1, + -256, + -256, + -256, + 8.0001 + }, + (9): { + 254, + 65024, + 4294966784, + 18446744073709551104, + -2, + -512, + -512, + -512, + 9.0001 + }, + (10): { + 252, + 64512, + 4294966272, + 18446744073709550592, + -4, + -1024, + -1024, + -1024, + 10.0001 + }, + (11): { + 248, + 63488, + 4294965248, + 18446744073709549568, + -8, + -2048, + -2048, + -2048, + 11.0001 + }, + (12): { + 240, + 61440, + 4294963200, + 18446744073709547520, + -16, + -4096, + -4096, + -4096, + 12.0001 + }, + (13): { + 224, + 57344, + 4294959104, + 18446744073709543424, + -32, + -8192, + -8192, + -8192, + 13.0001 + }, + (14): { + 192, + 49152, + 4294950912, + 18446744073709535232, + -64, + -16384, + -16384, + -16384, + 14.0001 + }, + (15): { + 128, + 32768, + 4294934528, + 18446744073709518848, + -128, + -32768, + -32768, + -32768, + 15.0001 + }, + (16): { + 255, + 65535, + 4294901760, + 18446744073709486080, + -1, + -1, + -65536, + -65536, + 16.0001 + }, + (17): { + 254, + 65534, + 4294836224, + 18446744073709420544, + -2, + -2, + -131072, + -131072, + 17.0001 + }, + (18): { + 252, + 65532, + 4294705152, + 18446744073709289472, + -4, + -4, + -262144, + -262144, + 18.0001 + }, + (19): { + 248, + 65528, + 4294443008, + 18446744073709027328, + -8, + -8, + -524288, + -524288, + 19.0001 + }, + (20): { + 240, + 65520, + 4293918720, + 18446744073708503040, + -16, + -16, + -1048576, + -1048576, + 20.0001 + }, + (21): { + 224, + 65504, + 4292870144, + 18446744073707454464, + -32, + -32, + -2097152, + -2097152, + 21.0001 + }, + (22): { + 192, + 65472, + 4290772992, + 18446744073705357312, + -64, + -64, + -4194304, + -4194304, + 22.0001 + }, + (23): { + 128, + 65408, + 4286578688, + 18446744073701163008, + -128, + -128, + -8388608, + -8388608, + 23.0001 + }, + (24): { + 255, + 65280, + 4278190080, + 18446744073692774400, + -1, + -256, + -16777216, + -16777216, + 24.0001 + }, + (25): { + 254, + 65024, + 4261412864, + 18446744073675997184, + -2, + -512, + -33554432, + -33554432, + 25.0001 + }, + (26): { + 252, + 64512, + 4227858432, + 18446744073642442752, + -4, + -1024, + -67108864, + -67108864, + 26.0001 + }, + (27): { + 248, + 63488, + 4160749568, + 18446744073575333888, + -8, + -2048, + -134217728, + -134217728, + 27.0001 + }, + (28): { + 240, + 61440, + 4026531840, + 18446744073441116160, + -16, + -4096, + -268435456, + -268435456, + 28.0001 + }, + (29): { + 224, + 57344, + 3758096384, + 18446744073172680704, + -32, + -8192, + -536870912, + -536870912, + 29.0001 + }, + (30): { + 192, + 49152, + 3221225472, + 18446744072635809792, + -64, + -16384, + -1073741824, + -1073741824, + 30.0001 + }, + (31): { + 128, + 32768, + 2147483648, + 18446744071562067968, + -128, + -32768, + -2147483648, + -2147483648, + 31.0001 + }, + (32): { + 255, + 65535, + 4294967295, + 18446744069414584320, + -1, + -1, + -1, + -4294967296, + 32.0001 + }, + (33): { + 254, + 65534, + 4294967294, + 18446744065119617024, + -2, + -2, + -2, + -8589934592, + 33.0001 + }, + (34): { + 252, + 65532, + 4294967292, + 18446744056529682432, + -4, + -4, + -4, + -17179869184, + 34.0001 + }, + (35): { + 248, + 65528, + 4294967288, + 18446744039349813248, + -8, + -8, + -8, + -34359738368, + 35.0001 + }, + (36): { + 240, + 65520, + 4294967280, + 18446744004990074880, + -16, + -16, + -16, + -68719476736, + 36.0001 + }, + (37): { + 224, + 65504, + 4294967264, + 18446743936270598144, + -32, + -32, + -32, + -137438953472, + 37.0001 + }, + (38): { + 192, + 65472, + 4294967232, + 18446743798831644672, + -64, + -64, + -64, + -274877906944, + 38.0001 + }, + (39): { + 128, + 65408, + 4294967168, + 18446743523953737728, + -128, + -128, + -128, + -549755813888, + 39.0001 + }, + (40): { + 255, + 65280, + 4294967040, + 18446742974197923840, + -1, + -256, + -256, + -1099511627776, + 40.0001 + }, + (41): { + 254, + 65024, + 4294966784, + 18446741874686296064, + -2, + -512, + -512, + -2199023255552, + 41.0001 + }, + (42): { + 252, + 64512, + 4294966272, + 18446739675663040512, + -4, + -1024, + -1024, + -4398046511104, + 42.0001 + }, + (43): { + 248, + 63488, + 4294965248, + 18446735277616529408, + -8, + -2048, + -2048, + -8796093022208, + 43.0001 + }, + (44): { + 240, + 61440, + 4294963200, + 18446726481523507200, + -16, + -4096, + -4096, + -17592186044416, + 44.0001 + }, + (45): { + 224, + 57344, + 4294959104, + 18446708889337462784, + -32, + -8192, + -8192, + -35184372088832, + 45.0001 + }, + (46): { + 192, + 49152, + 4294950912, + 18446673704965373952, + -64, + -16384, + -16384, + -70368744177664, + 46.0001 + }, + (47): { + 128, + 32768, + 4294934528, + 18446603336221196288, + -128, + -32768, + -32768, + -140737488355328, + 47.0001 + }, + (48): { + 255, + 65535, + 4294901760, + 18446462598732840960, + -1, + -1, + -65536, + -281474976710656, + 48.0001 + }, + (49): { + 254, + 65534, + 4294836224, + 18446181123756130304, + -2, + -2, + -131072, + -562949953421312, + 49.0001 + }, + (50): { + 252, + 65532, + 4294705152, + 18445618173802708992, + -4, + -4, + -262144, + -1125899906842624, + 50.0001 + }, + (51): { + 248, + 65528, + 4294443008, + 18444492273895866368, + -8, + -8, + -524288, + -2251799813685248, + 51.0001 + }, + (52): { + 240, + 65520, + 4293918720, + 18442240474082181120, + -16, + -16, + -1048576, + -4503599627370496, + 52.0001 + }, + (53): { + 224, + 65504, + 4292870144, + 18437736874454810624, + -32, + -32, + -2097152, + -9007199254740992, + 53.0001 + }, + (54): { + 192, + 65472, + 4290772992, + 18428729675200069632, + -64, + -64, + -4194304, + -18014398509481984, + 54.0001 + }, + (55): { + 128, + 65408, + 4286578688, + 18410715276690587648, + -128, + -128, + -8388608, + -36028797018963968, + 55.0001 + }, + (56): { + 255, + 65280, + 4278190080, + 18374686479671623680, + -1, + -256, + -16777216, + -72057594037927936, + 56.0001 + }, + (57): { + 254, + 65024, + 4261412864, + 18302628885633695744, + -2, + -512, + -33554432, + -144115188075855872, + 57.0001 + }, + (58): { + 252, + 64512, + 4227858432, + 18158513697557839872, + -4, + -1024, + -67108864, + -288230376151711744, + 58.0001 + }, + (59): { + 248, + 63488, + 4160749568, + 17870283321406128128, + -8, + -2048, + -134217728, + -576460752303423488, + 59.0001 + }, + (60): { + 240, + 61440, + 4026531840, + 17293822569102704640, + -16, + -4096, + -268435456, + -1152921504606846976, + 60.0001 + }, + (61): { + 224, + 57344, + 3758096384, + 16140901064495857664, + -32, + -8192, + -536870912, + -2305843009213693952, + 61.0001 + }, + (62): { + 192, + 49152, + 3221225472, + 13835058055282163712, + -64, + -16384, + -1073741824, + -4611686018427387904, + 62.0001 + }, + (63): { + 128, + 32768, + 2147483648, + 9223372036854775808, + -128, + -32768, + -2147483648, + -9223372036854775808, + 63.0001 + } + } + } + DATASET "CompoundRInts" { + DATATYPE H5T_COMPOUND { + H5T_STD_U64LE "DU64BITS"; + H5T_STD_U32LE "DU32BITS"; + H5T_STD_U16LE "DU16BITS"; + H5T_STD_U8LE "DU08BITS"; + H5T_STD_I64LE "DS64BITS"; + H5T_STD_I32LE "DS32BITS"; + H5T_STD_I16LE "DS16BITS"; + H5T_STD_I8LE "DS08BITS"; + H5T_IEEE_F64LE "DummyDBL"; + } + DATASPACE SIMPLE { ( 64 ) / ( 64 ) } + DATA { + (0): { + 18446744073709519103, + 4294967295, + 65535, + 255, + -65281, + -1, + -1, + -1, + 0.0001 + }, + (1): { + 18446744069414453502, + 4294967294, + 65535, + 255, + -4295098114, + -2, + -1, + -1, + 1.0001 + }, + (2): { + 18446744060824387836, + 4294967292, + 65535, + 255, + -12885163780, + -4, + -1, + -1, + 2.0001 + }, + (3): { + 18446744043644256504, + 4294967288, + 65535, + 255, + -30065295112, + -8, + -1, + -1, + 3.0001 + }, + (4): { + 18446744009283993840, + 4294967280, + 65535, + 255, + -64425557776, + -16, + -1, + -1, + 4.0001 + }, + (5): { + 18446743940563468512, + 4294967264, + 65535, + 255, + -133146083104, + -32, + -1, + -1, + 5.0001 + }, + (6): { + 18446743803122417856, + 4294967232, + 65535, + 255, + -270587133760, + -64, + -1, + -1, + 6.0001 + }, + (7): { + 18446743528240316544, + 4294967168, + 65535, + 255, + -545469235072, + -128, + -1, + -1, + 7.0001 + }, + (8): { + 18446742978476114175, + 4294967040, + 65535, + 255, + -1095233437441, + -256, + -1, + -1, + 8.0001 + }, + (9): { + 18446741878947709182, + 4294966784, + 65535, + 255, + -2194761842434, + -512, + -1, + -1, + 9.0001 + }, + (10): { + 18446739679890964476, + 4294966272, + 65535, + 255, + -4393818587140, + -1024, + -1, + -1, + 10.0001 + }, + (11): { + 18446735281777344504, + 4294965248, + 65535, + 255, + -8791932207112, + -2048, + -1, + -1, + 11.0001 + }, + (12): { + 18446726485550100720, + 4294963200, + 65535, + 255, + -17588159512336, + -4096, + -1, + -1, + 12.0001 + }, + (13): { + 18446708893095559392, + 4294959104, + 65535, + 255, + -35180613992224, + -8192, + -1, + -1, + 13.0001 + }, + (14): { + 18446673708186664896, + 4294950912, + 65535, + 255, + -70365522886720, + -16384, + -1, + -1, + 14.0001 + }, + (15): { + 18446603338368745344, + 4294934528, + 65535, + 255, + -140735340806272, + -32768, + -1, + -1, + 15.0001 + }, + (16): { + 18446462603027807487, + 4294901760, + 65535, + 255, + -281470681747201, + -65536, + -1, + -1, + 16.0001 + }, + (17): { + 18446181128050999550, + 4294836224, + 65535, + 255, + -562945658584834, + -131072, + -1, + -1, + 17.0001 + }, + (18): { + 18445618178097414396, + 4294705152, + 65535, + 255, + -1125895612137220, + -262144, + -1, + -1, + 18.0001 + }, + (19): { + 18444492278190309624, + 4294443008, + 65535, + 255, + -2251795519241992, + -524288, + -1, + -1, + 19.0001 + }, + (20): { + 18442240478376100080, + 4293918720, + 65535, + 255, + -4503595333451536, + -1048576, + -1, + -1, + 20.0001 + }, + (21): { + 18437736878747680992, + 4292870144, + 65535, + 255, + -9007194961870624, + -2097152, + -1, + -1, + 21.0001 + }, + (22): { + 18428729679490842816, + 4290772992, + 65535, + 255, + -18014394218708800, + -4194304, + -1, + -1, + 22.0001 + }, + (23): { + 18410715280977166464, + 4286578688, + 65535, + 255, + -36028792732385152, + -8388608, + -1, + -1, + 23.0001 + }, + (24): { + 18374686483949814015, + 4278190080, + 65535, + 255, + -72057589759737601, + -16777216, + -1, + -1, + 24.0001 + }, + (25): { + 18302628889895108862, + 4261412864, + 65535, + 255, + -144115183814442754, + -33554432, + -1, + -1, + 25.0001 + }, + (26): { + 18158513701785698556, + 4227858432, + 65535, + 255, + -288230371923853060, + -67108864, + -1, + -1, + 26.0001 + }, + (27): { + 17870283325566921976, + 4160749568, + 65535, + 255, + -576460748142618888, + -134217728, + -1, + -1, + 27.0001 + }, + (28): { + 17293822573129296880, + 4026531840, + 65535, + 255, + -1152921500580249872, + -268435456, + -1, + -1, + 28.0001 + }, + (29): { + 16140901068254019552, + 3758096384, + 65535, + 255, + -2305843005455532064, + -536870912, + -1, + -1, + 29.0001 + }, + (30): { + 13835058058503454656, + 3221225472, + 65535, + 255, + -4611686015206097728, + -1073741824, + -1, + -1, + 30.0001 + }, + (31): { + 9223372039002259584, + 2147483648, + 65535, + 255, + -9223372034707292032, + -2147483648, + -1, + -1, + 31.0001 + }, + (32): { + 18446744073709486335, + 0, + 65535, + 255, + -65281, + 0, + -1, + -1, + 32.0001 + }, + (33): { + 18446744069414518782, + 0, + 65534, + 255, + -4295032834, + 0, + -2, + -1, + 33.0001 + }, + (34): { + 18446744060824453116, + 0, + 65532, + 255, + -12885098756, + 0, + -4, + -1, + 34.0001 + }, + (35): { + 18446744043644317944, + 0, + 65528, + 255, + -30065245960, + 0, + -8, + -1, + 35.0001 + }, + (36): { + 18446744009283993840, + 0, + 65520, + 255, + -64425557776, + 0, + -16, + -1, + 36.0001 + }, + (37): { + 18446743940563468512, + 0, + 65504, + 255, + -133146083104, + 0, + -32, + -1, + 37.0001 + }, + (38): { + 18446743803122417856, + 0, + 65472, + 255, + -270587133760, + 0, + -64, + -1, + 38.0001 + }, + (39): { + 18446743528240316544, + 0, + 65408, + 255, + -545469235072, + 0, + -128, + -1, + 39.0001 + }, + (40): { + 18446742978476114175, + 0, + 65280, + 255, + -1095233437441, + 0, + -256, + -1, + 40.0001 + }, + (41): { + 18446741878947709182, + 0, + 65024, + 255, + -2194761842434, + 0, + -512, + -1, + 41.0001 + }, + (42): { + 18446739679890899196, + 0, + 64512, + 255, + -4393818652420, + 0, + -1024, + -1, + 42.0001 + }, + (43): { + 18446735281777279224, + 0, + 63488, + 255, + -8791932272392, + 0, + -2048, + -1, + 43.0001 + }, + (44): { + 18446726485550039280, + 0, + 61440, + 255, + -17588159512336, + 0, + -4096, + -1, + 44.0001 + }, + (45): { + 18446708893095559392, + 0, + 57344, + 255, + -35180613927200, + 0, + -8192, + -1, + 45.0001 + }, + (46): { + 18446673708186664896, + 0, + 49152, + 255, + -70365522886720, + 0, + -16384, + -1, + 46.0001 + }, + (47): { + 18446603338368745344, + 0, + 32768, + 255, + -140735340807040, + 0, + -32768, + -1, + 47.0001 + }, + (48): { + 18446462603027742975, + 0, + 0, + 255, + -281470681808641, + 0, + 0, + -1, + 48.0001 + }, + (49): { + 18446181128050966782, + 0, + 0, + 254, + -562945658584834, + 0, + 0, + -2, + 49.0001 + }, + (50): { + 18445618178097479676, + 0, + 0, + 252, + -1125895612071940, + 0, + 0, + -4, + 50.0001 + }, + (51): { + 18444492278190374904, + 0, + 0, + 248, + -2251795519176968, + 0, + 0, + -8, + 51.0001 + }, + (52): { + 18442240478376161520, + 0, + 0, + 240, + -4503595333402384, + 0, + 0, + -16, + 52.0001 + }, + (53): { + 18437736878747680992, + 0, + 0, + 224, + -9007194961870624, + 0, + 0, + -32, + 53.0001 + }, + (54): { + 18428729679490842816, + 0, + 0, + 192, + -18014394218708800, + 0, + 0, + -64, + 54.0001 + }, + (55): { + 18410715280977166464, + 0, + 0, + 128, + -36028792732385152, + 0, + 0, + -128, + 55.0001 + }, + (56): { + 18374686483949814015, + 0, + 0, + 0, + -72057589759737601, + 0, + 0, + 0, + 56.0001 + }, + (57): { + 18302628889895108862, + 0, + 0, + 0, + -144115183814442754, + 0, + 0, + 0, + 57.0001 + }, + (58): { + 18158513701785698556, + 0, + 0, + 0, + -288230371923853060, + 0, + 0, + 0, + 58.0001 + }, + (59): { + 17870283325566877944, + 0, + 0, + 0, + -576460748142673672, + 0, + 0, + 0, + 59.0001 + }, + (60): { + 17293822573129236720, + 0, + 0, + 0, + -1152921500580314896, + 0, + 0, + 0, + 60.0001 + }, + (61): { + 16140901068253954272, + 0, + 0, + 0, + -2305843005455597344, + 0, + 0, + 0, + 61.0001 + }, + (62): { + 13835058058503389376, + 0, + 0, + 0, + -4611686015206145088, + 0, + 0, + 0, + 62.0001 + }, + (63): { + 9223372039002314368, + 0, + 0, + 0, + -9223372034707231872, + 0, + 0, + 0, + 63.0001 + } + } + } +} +} diff --git a/tools/testfiles/tcmpdints.h5 b/tools/testfiles/tcmpdints.h5 new file mode 100644 index 0000000..15b0aa8 Binary files /dev/null and b/tools/testfiles/tcmpdints.h5 differ -- cgit v0.12