From fc3f1537425becee4792992cfd176ec030cf4bd7 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Mon, 28 Jul 2025 09:34:22 -0500 Subject: [PATCH] Add/update plugins examples (#5670) * Fixed all incorrect control char * Synch filter examples to other examples --- HDF5Examples/C/H5FLT/CMakeLists.txt | 8 ++ HDF5Examples/C/H5FLT/h5ex_d_bitgroom.c | 56 ++++----- HDF5Examples/C/H5FLT/h5ex_d_blosc.c | 30 ++--- HDF5Examples/C/H5FLT/h5ex_d_blosc2.c | 30 ++--- HDF5Examples/C/H5FLT/h5ex_d_bshuf.c | 30 ++--- HDF5Examples/C/H5FLT/h5ex_d_bzip2.c | 30 ++--- .../{h5ex_d_mafisc.c => h5ex_d_granularbr.c} | 106 ++++++++---------- HDF5Examples/C/H5FLT/h5ex_d_jpeg.c | 75 +++++-------- HDF5Examples/C/H5FLT/h5ex_d_lz4.c | 30 ++--- HDF5Examples/C/H5FLT/h5ex_d_lzf.c | 30 ++--- HDF5Examples/C/H5FLT/h5ex_d_zfp.c | 30 ++--- HDF5Examples/C/H5FLT/h5ex_d_zstd.c | 20 +--- .../C/H5FLT/tfiles/h5ex_d_bitgroom.tst | 2 +- .../C/H5FLT/tfiles/h5ex_d_granularbr.ddl | 26 +++++ .../C/H5FLT/tfiles/h5ex_d_granularbr.h5 | Bin 0 -> 12208 bytes .../C/H5FLT/tfiles/h5ex_d_granularbr.tst | 11 ++ config/cmake/HDF5PluginCache.cmake | 1 + 17 files changed, 209 insertions(+), 306 deletions(-) rename HDF5Examples/C/H5FLT/{h5ex_d_mafisc.c => h5ex_d_granularbr.c} (54%) create mode 100644 HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.ddl create mode 100644 HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.h5 create mode 100644 HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.tst diff --git a/HDF5Examples/C/H5FLT/CMakeLists.txt b/HDF5Examples/C/H5FLT/CMakeLists.txt index 1f1231f43c8..70bde1701f1 100644 --- a/HDF5Examples/C/H5FLT/CMakeLists.txt +++ b/HDF5Examples/C/H5FLT/CMakeLists.txt @@ -40,6 +40,14 @@ else () set (BITGROOM_AVAILABLE 0) endif () +option (ENABLE_BITROUND "Enable Library Building for bitround plugin" ON) +if (ENABLE_BITROUND) + set (BITROUND_AVAILABLE 1) + set (dyn_examples ${dyn_examples} h5ex_d_granularbr) +else () + set (BITROUND_AVAILABLE 0) +endif () + option (ENABLE_BSHUF "Enable Library Building for bshuf plugin" ON) if (ENABLE_BSHUF) if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel") diff --git a/HDF5Examples/C/H5FLT/h5ex_d_bitgroom.c b/HDF5Examples/C/H5FLT/h5ex_d_bitgroom.c index 506049e8a10..64dd238ff46 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_bitgroom.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_bitgroom.c @@ -1,29 +1,18 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 BitGroom filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file COPYING, which can be found at the root of the BITGROOM source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset using BitGroom quantization. - The BitGroom filter is not available by default in HDF5. + The BitGroom filter is not available in HDF5. The example uses a new feature available in HDF5 version 1.8.11 to discover, load and register filters at run time. ************************************************************/ + #include "hdf5.h" #include #include -#define FILE "h5ex_d_bitgroom.h5" +#define FILENAME "h5ex_d_bitgroom.h5" #define DATASET "DS1" #define DIM0 32 #define DIM1 64 @@ -34,40 +23,39 @@ int main(void) { - hid_t file_id = -1; /* Handles */ - hid_t space_id = -1; /* Handles */ - hid_t dset_id = -1; /* Handles */ - hid_t dcpl_id = -1; /* Handles */ - herr_t status; - htri_t avail; - H5Z_filter_t filter_id = 0; - char filter_name[80]; - hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; - size_t nelmts = 5; - /* number of elements in cd_values */ /* NB: Must equal H5Zbitgroom.c: CCR_FLT_PRM_NBR */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; + herr_t status; + htri_t avail; + H5Z_filter_t filter_id = 0; + char filter_name[80]; + hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; + size_t nelmts = 5; /* number of elements in cd_values */ unsigned int flags; unsigned filter_config; const unsigned int cd_values[5] = { 3, 4, 0, 0, 0}; /* BitGroom argument ordering is NSD,sizeof(data),has_mss_val,mss_val_byt_1to4[,mss_val_byt_5to8] */ unsigned int values_out[5] = {99, 99, 99, 99, 99}; - float wdata[DIM0][DIM1], /* Write buffer */ - rdata[DIM0][DIM1], /* Read buffer */ - max; - hsize_t i, j; - int ret_value = 1; + float wdata[DIM0][DIM1]; /* Write buffer */ + float rdata[DIM0][DIM1]; /* Read buffer */ + float max; + hsize_t i, j; + int ret_value = 1; /* * Initialize data. */ for (i = 0; i < DIM0; i++) for (j = 0; j < DIM1; j++) - wdata[i][j] = i * j - j; + wdata[i][j] = (float)(i * j) - (float)(j); /* * Create a new file using the default properties. */ - file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + file_id = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if (file_id < 0) goto done; @@ -156,7 +144,7 @@ main(void) /* * Open file and dataset using the default properties. */ - file_id = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + file_id = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT); if (file_id < 0) goto done; @@ -205,7 +193,7 @@ main(void) max = rdata[0][0]; for (i = 0; i < DIM0; i++) for (j = 0; j < DIM1; j++) { - /*printf("%d \n", rdata[i][j]); */ + /*printf("%f \n", rdata[i][j]); */ if (max < rdata[i][j]) max = rdata[i][j]; } diff --git a/HDF5Examples/C/H5FLT/h5ex_d_blosc.c b/HDF5Examples/C/H5FLT/h5ex_d_blosc.c index c8535ccdd9e..7cb1036679c 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_blosc.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_blosc.c @@ -1,15 +1,3 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 BLOSC filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file LICENSE, which can be found at the root of the BLOSC source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset @@ -35,10 +23,10 @@ int main(void) { - hid_t file_id = H5I_INVALID_HID; /* Handles */ - hid_t space_id = H5I_INVALID_HID; /* Handles */ - hid_t dset_id = H5I_INVALID_HID; /* Handles */ - hid_t dcpl_id = H5I_INVALID_HID; /* Handles */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; @@ -49,11 +37,11 @@ main(void) unsigned filter_config; const unsigned int cd_values[7] = {0, 0, 0, 0, 4, 1, 2}; /* blosc parameters */ unsigned int values_out[7] = {99, 99, 99, 99, 99, 99, 99}; - int wdata[DIM0][DIM1], /* Write buffer */ - rdata[DIM0][DIM1], /* Read buffer */ - max; - hsize_t i, j; - int ret_value = 1; + int wdata[DIM0][DIM1]; /* Write buffer */ + int rdata[DIM0][DIM1]; /* Read buffer */ + int max; + hsize_t i, j; + int ret_value = 1; /* * Initialize data. diff --git a/HDF5Examples/C/H5FLT/h5ex_d_blosc2.c b/HDF5Examples/C/H5FLT/h5ex_d_blosc2.c index 3f091fbd086..7451bbb244b 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_blosc2.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_blosc2.c @@ -1,15 +1,3 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 BLOSC2 filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file LICENSE, which can be found at the root of the BLOSC2 source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset @@ -35,10 +23,10 @@ int main(void) { - hid_t file_id = H5I_INVALID_HID; /* Handles */ - hid_t space_id = H5I_INVALID_HID; /* Handles */ - hid_t dset_id = H5I_INVALID_HID; /* Handles */ - hid_t dcpl_id = H5I_INVALID_HID; /* Handles */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; @@ -49,11 +37,11 @@ main(void) unsigned filter_config; const unsigned int cd_values[10] = {0, 0, 0, 0, 4, 1, 2, 2, 4, 8}; /* blosc parameters */ unsigned int values_out[10] = {99, 99, 99, 99, 99, 99, 99, 99, 99, 99}; - int wdata[DIM0][DIM1], /* Write buffer */ - rdata[DIM0][DIM1], /* Read buffer */ - max; - hsize_t i, j; - int ret_value = 1; + int wdata[DIM0][DIM1]; /* Write buffer */ + int rdata[DIM0][DIM1]; /* Read buffer */ + int max; + hsize_t i, j; + int ret_value = 1; /* * Initialize data. diff --git a/HDF5Examples/C/H5FLT/h5ex_d_bshuf.c b/HDF5Examples/C/H5FLT/h5ex_d_bshuf.c index 46a9d0277c0..7e6d944b82d 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_bshuf.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_bshuf.c @@ -1,15 +1,3 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 BSHUF filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file LICENSE, which can be found at the root of the BSHUF source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset @@ -35,10 +23,10 @@ int main(void) { - hid_t file_id = H5I_INVALID_HID; /* Handles */ - hid_t space_id = H5I_INVALID_HID; /* Handles */ - hid_t dset_id = H5I_INVALID_HID; /* Handles */ - hid_t dcpl_id = H5I_INVALID_HID; /* Handles */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; @@ -49,11 +37,11 @@ main(void) unsigned filter_config; const unsigned int cd_values[3] = {0, 0, 0}; unsigned int values_out[3] = {99, 99, 99}; - int wdata[DIM0][DIM1], /* Write buffer */ - rdata[DIM0][DIM1], /* Read buffer */ - max; - hsize_t i, j; - int ret_value = 1; + int wdata[DIM0][DIM1]; /* Write buffer */ + int rdata[DIM0][DIM1]; /* Read buffer */ + int max; + hsize_t i, j; + int ret_value = 1; /* * Initialize data. diff --git a/HDF5Examples/C/H5FLT/h5ex_d_bzip2.c b/HDF5Examples/C/H5FLT/h5ex_d_bzip2.c index 6ad52bcdd4a..71f3be027b0 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_bzip2.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_bzip2.c @@ -1,15 +1,3 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 BZIP2 filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file LICENSE, which can be found at the root of the BZIP2 source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset @@ -35,10 +23,10 @@ int main(void) { - hid_t file_id = H5I_INVALID_HID; /* Handles */ - hid_t space_id = H5I_INVALID_HID; /* Handles */ - hid_t dset_id = H5I_INVALID_HID; /* Handles */ - hid_t dcpl_id = H5I_INVALID_HID; /* Handles */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; @@ -49,11 +37,11 @@ main(void) unsigned filter_config; const unsigned int cd_values[1] = {2}; /* bzip2 default level is 2 */ unsigned int values_out[1] = {99}; - int wdata[DIM0][DIM1], /* Write buffer */ - rdata[DIM0][DIM1], /* Read buffer */ - max; - hsize_t i, j; - int ret_value = 1; + int wdata[DIM0][DIM1]; /* Write buffer */ + int rdata[DIM0][DIM1]; /* Read buffer */ + int max; + hsize_t i, j; + int ret_value = 1; /* * Initialize data. diff --git a/HDF5Examples/C/H5FLT/h5ex_d_mafisc.c b/HDF5Examples/C/H5FLT/h5ex_d_granularbr.c similarity index 54% rename from HDF5Examples/C/H5FLT/h5ex_d_mafisc.c rename to HDF5Examples/C/H5FLT/h5ex_d_granularbr.c index 22255d2bb28..7b433a08c0f 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_mafisc.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_granularbr.c @@ -1,20 +1,8 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 MAFISC filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file LICENSE, which can be found at the root of the MAFISC source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset - using mafisc compression. - mafisc filter is not available in HDF5. + using Granular BitRound quantization. + The Granular BitRound filter is not available in HDF5. The example uses a new feature available in HDF5 version 1.8.11 to discover, load and register filters at run time. @@ -24,36 +12,38 @@ #include #include -#define FILENAME "h5ex_d_mafisc.h5" -#define DATASET "DS1" -#define DIM0 32 -#define DIM1 64 -#define CHUNK0 4 -#define CHUNK1 8 -#define H5Z_FILTER_MAFISC 32002 +#define FILENAME "h5ex_d_granularbr.h5" +#define DATASET "DS1" +#define DIM0 32 +#define DIM1 64 +#define CHUNK0 4 +#define CHUNK1 8 +#define H5Z_FILTER_GRANULARBR 32023 int main(void) { - hid_t file_id = H5I_INVALID_HID; /* Handles */ - hid_t space_id = H5I_INVALID_HID; /* Handles */ - hid_t dset_id = H5I_INVALID_HID; /* Handles */ - hid_t dcpl_id = H5I_INVALID_HID; /* Handles */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[128]; + char filter_name[80]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; - size_t nelmts = 8; /* number of elements in cd_values */ + size_t nelmts = 5; /* number of elements in cd_values */ unsigned int flags; unsigned filter_config; - const unsigned int cd_values[8]; /* mafisc default is 6 + rank */ - unsigned int values_out[8] = {99, 99, 99, 99, 99, 99, 99, 99}; - int wdata[DIM0][DIM1], /* Write buffer */ - rdata[DIM0][DIM1], /* Read buffer */ - max; - hsize_t i, j; - int ret_value = 1; + const unsigned int cd_values[5] = { + 3, 4, 0, 0, 0}; /* Granular BitRound argument ordering is + NSD,sizeof(data),has_mss_val,mss_val_byt_1to4[,mss_val_byt_5to8] */ + unsigned int values_out[5] = {99, 99, 99, 99, 99}; + float wdata[DIM0][DIM1]; /* Write buffer */ + float rdata[DIM0][DIM1]; /* Read buffer */ + float max; + hsize_t i, j; + int ret_value = 1; /* * Initialize data. @@ -78,14 +68,16 @@ main(void) goto done; /* - * Create the dataset creation property list, add the gzip - * compression filter and set the chunk size. + * Create the dataset creation property list, add the Granular BitRound + * quantization filter and set the chunk size. */ dcpl_id = H5Pcreate(H5P_DATASET_CREATE); if (dcpl_id < 0) goto done; - status = H5Pset_filter(dcpl_id, H5Z_FILTER_MAFISC, H5Z_FLAG_MANDATORY, nelmts, cd_values); + /* 20200929: csz change this to H5Z_FLAG_OPTIONAL, so that can_apply() can reject filter for + integers without causing program to exit()? */ + status = H5Pset_filter(dcpl_id, H5Z_FILTER_GRANULARBR, H5Z_FLAG_MANDATORY, nelmts, cd_values); if (status < 0) goto done; @@ -93,12 +85,12 @@ main(void) * Check that filter is registered with the library now. * If it is registered, retrieve filter's configuration. */ - avail = H5Zfilter_avail(H5Z_FILTER_MAFISC); + avail = H5Zfilter_avail(H5Z_FILTER_GRANULARBR); if (avail) { - status = H5Zget_filter_info(H5Z_FILTER_MAFISC, &filter_config); + status = H5Zget_filter_info(H5Z_FILTER_GRANULARBR, &filter_config); if ((filter_config & H5Z_FILTER_CONFIG_ENCODE_ENABLED) && (filter_config & H5Z_FILTER_CONFIG_DECODE_ENABLED)) - printf("mafisc filter is available for encoding and decoding.\n"); + printf("Granular BitRound filter is available for quantization and decoding.\n"); } else { printf("H5Zfilter_avail - not found.\n"); @@ -112,7 +104,7 @@ main(void) * Create the dataset. */ printf("....Create dataset ................\n"); - dset_id = H5Dcreate(file_id, DATASET, H5T_STD_I32LE, space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT); + dset_id = H5Dcreate(file_id, DATASET, H5T_IEEE_F32LE, space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT); if (dset_id < 0) { printf("failed to create dataset.\n"); goto done; @@ -121,8 +113,8 @@ main(void) /* * Write the data to the dataset. */ - printf("....Writing mafisc compressed data ................\n"); - status = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata[0]); + printf("....Writing Granular BitRound-quantized data ................\n"); + status = H5Dwrite(dset_id, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)wdata); if (status < 0) printf("failed to write data.\n"); @@ -167,27 +159,17 @@ main(void) goto done; /* - * Retrieve and print the filter id, compression level and filter's name for mafisc. + * Retrieve and print the filter id, quantization level and filter's name for Granular BitRound. */ - /* Format of the cd_values array: - cd_values[0] = version = 0; - cd_values[1] = datasetId (created randomly); - cd_values[2] = dataTypeSize (in bytes); - cd_values[3] = isFloat (true, if the datatype is a float type); - cd_values[4] = byteOrder (same as H5T_order_t); - cd_values[5] = rank (# of dimension of a chunk); - cd_values[6] = Size of first dimension (the size of the chunk!); - ... - cd_values[6+rank-1] = Size of last dimension; */ filter_id = H5Pget_filter2(dcpl_id, (unsigned)0, &flags, &nelmts, values_out, sizeof(filter_name), filter_name, NULL); printf("Filter info is available from the dataset creation property \n "); printf(" Filter identifier is "); switch (filter_id) { - case H5Z_FILTER_MAFISC: + case H5Z_FILTER_GRANULARBR: printf("%d\n", filter_id); - printf(" Number of parameters is %d with rank %u values %u %u\n", nelmts, values_out[5], - values_out[6], values_out[7]); + printf(" Number of parameters is %lu with the values %u, %u, %u, %u, %u\n", nelmts, + values_out[0], values_out[1], values_out[2], values_out[3], values_out[4]); printf(" To find more about the filter check %s\n", filter_name); break; default: @@ -198,8 +180,8 @@ main(void) /* * Read the data using the default properties. */ - printf("....Reading mafisc compressed data ................\n"); - status = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata[0]); + printf("....Reading Granular BitRound-quantized data ................\n"); + status = H5Dread(dset_id, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata[0]); if (status < 0) printf("failed to read data.\n"); @@ -217,13 +199,13 @@ main(void) /* * Print the maximum value. */ - printf("Maximum value in %s is %d\n", DATASET, max); + printf("Maximum value in %s is %g\n", DATASET, max); /* * Check that filter is registered with the library now. */ - avail = H5Zfilter_avail(H5Z_FILTER_MAFISC); + avail = H5Zfilter_avail(H5Z_FILTER_GRANULARBR); if (avail) - printf("mafisc filter is available now since H5Dread triggered loading of the filter.\n"); + printf("Granular BitRound filter is available now since H5Dread triggered loading of the filter.\n"); ret_value = 0; diff --git a/HDF5Examples/C/H5FLT/h5ex_d_jpeg.c b/HDF5Examples/C/H5FLT/h5ex_d_jpeg.c index 7c6c66023e7..07f43dae421 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_jpeg.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_jpeg.c @@ -1,15 +1,3 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 JPEG filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file LICENSE, which can be found at the root of the JPEG source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset @@ -38,10 +26,10 @@ int main(void) { - hid_t file_id = H5I_INVALID_HID; /* Handles */ - hid_t space_id = H5I_INVALID_HID; /* Handles */ - hid_t dset_id = H5I_INVALID_HID; /* Handles */ - hid_t dcpl_id = H5I_INVALID_HID; /* Handles */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; @@ -59,11 +47,11 @@ main(void) /* Color mode (0=Mono, 1=RGB) */ const unsigned int cd_values[4] = {JPEG_QUALITY, DIM1, DIM0, 0}; /* jpeg default level is 2 */ unsigned int values_out[4] = {99, 99, 99, 99}; - unsigned char *wdata, /* Write buffer */ - *rdata; /* Read buffer */ - int num_diff = 0; - hsize_t i; - int ret_value = 1; + unsigned char *wdata; /* Write buffer */ + unsigned char *rdata; /* Read buffer */ + int num_diff = 0; + hsize_t i; + int ret_value = 1; wdata = (unsigned char *)malloc(sizeof(unsigned char) * data_size); rdata = (unsigned char *)malloc(sizeof(unsigned char) * data_size); @@ -108,35 +96,33 @@ main(void) status = H5Zget_filter_info(H5Z_FILTER_JPEG, &filter_config); if ((filter_config & H5Z_FILTER_CONFIG_ENCODE_ENABLED) && (filter_config & H5Z_FILTER_CONFIG_DECODE_ENABLED)) - fprintf(stdout, "jpeg filter is available for encoding and decoding.\n"); + printf("jpeg filter is available for encoding and decoding.\n"); } else { - fprintf(stdout, "H5Zfilter_avail - not found.\n"); + printf("H5Zfilter_avail - not found.\n"); goto done; } status = H5Pset_chunk(dcpl_id, 3, chunk); if (status < 0) - fprintf(stdout, "failed to set chunk.\n"); + printf("failed to set chunk.\n"); /* * Create the dataset. */ - fprintf(stdout, "....Create dataset ................\n"); + printf("....Create dataset ................\n"); dset_id = H5Dcreate(file_id, DATASET, H5T_NATIVE_UINT8, space_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT); if (dset_id < 0) { - fprintf(stdout, "failed to create dataset.\n"); + printf("failed to create dataset.\n"); goto done; } - fflush(stdout); /* * Write the data to the dataset. */ - fprintf(stdout, "....Writing jpeg compressed data ................\n"); + printf("....Writing jpeg compressed data ................\n"); status = H5Dwrite(dset_id, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata); if (status < 0) - fprintf(stdout, "failed to write data.\n"); - fflush(stdout); + printf("failed to write data.\n"); /* * Close and release resources. @@ -151,11 +137,11 @@ main(void) file_id = -1; status = H5close(); if (status < 0) { - fprintf(stdout, "\nFAILED to close library\n"); + printf("\nFAILED to close library\n"); goto done; } - fprintf(stdout, "....Close the file and reopen for reading ........\n"); + printf("....Close the file and reopen for reading ........\n"); /* * Now we begin the read section of this example. */ @@ -183,28 +169,26 @@ main(void) */ filter_id = H5Pget_filter2(dcpl_id, (unsigned)0, &flags, &nelmts, values_out, sizeof(filter_name), filter_name, NULL); - fprintf(stdout, "Filter info is available from the dataset creation property \n "); - fprintf(stdout, " Filter identifier is "); + printf("Filter info is available from the dataset creation property \n "); + printf(" Filter identifier is "); switch (filter_id) { case H5Z_FILTER_JPEG: - fprintf(stdout, "%d\n", filter_id); - fprintf(stdout, " Number of parameters is %d with the value %u\n", nelmts, values_out[0]); - fprintf(stdout, " To find more about the filter check %s\n", filter_name); + printf("%d\n", filter_id); + printf(" Number of parameters is %d with the value %u\n", nelmts, values_out[0]); + printf(" To find more about the filter check %s\n", filter_name); break; default: - fprintf(stdout, "Not expected filter\n"); + printf("Not expected filter\n"); break; } - fflush(stdout); /* * Read the data using the default properties. */ - fprintf(stdout, "....Reading jpeg compressed data ................\n"); + printf("....Reading jpeg compressed data ................\n"); status = H5Dread(dset_id, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata); if (status < 0) - fprintf(stdout, "failed to read data.\n"); - fflush(stdout); + printf("failed to read data.\n"); /* * Find the maximum value in the dataset, to verify that it was @@ -218,19 +202,18 @@ main(void) /* * Print the number of differences. */ - fprintf(stdout, "JPEG quality=%d, percent of differing array elements=%f\n", JPEG_QUALITY, - 100. * (double)num_diff / data_size); + printf("JPEG quality=%d, percent of differing array elements=%f\n", JPEG_QUALITY, + 100. * (double)num_diff / data_size); /* * Check that filter is registered with the library now. */ avail = H5Zfilter_avail(H5Z_FILTER_JPEG); if (avail) - fprintf(stdout, "jpeg filter is available now since H5Dread triggered loading of the filter.\n"); + printf("jpeg filter is available now since H5Dread triggered loading of the filter.\n"); ret_value = 0; done: - fflush(stdout); free(rdata); free(wdata); /* diff --git a/HDF5Examples/C/H5FLT/h5ex_d_lz4.c b/HDF5Examples/C/H5FLT/h5ex_d_lz4.c index e1cd5bb0bbb..8b5c80968ba 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_lz4.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_lz4.c @@ -1,15 +1,3 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 LZ4 filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file LICENSE, which can be found at the root of the LZ4 source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset @@ -35,10 +23,10 @@ int main(void) { - hid_t file_id = H5I_INVALID_HID; /* Handles */ - hid_t space_id = H5I_INVALID_HID; /* Handles */ - hid_t dset_id = H5I_INVALID_HID; /* Handles */ - hid_t dcpl_id = H5I_INVALID_HID; /* Handles */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; @@ -49,11 +37,11 @@ main(void) unsigned filter_config; const unsigned int cd_values[1] = {3}; /* lz4 default is 3 */ unsigned int values_out[1] = {99}; - int wdata[DIM0][DIM1], /* Write buffer */ - rdata[DIM0][DIM1], /* Read buffer */ - max; - hsize_t i, j; - int ret_value = 1; + int wdata[DIM0][DIM1]; /* Write buffer */ + int rdata[DIM0][DIM1]; /* Read buffer */ + int max; + hsize_t i, j; + int ret_value = 1; /* * Initialize data. diff --git a/HDF5Examples/C/H5FLT/h5ex_d_lzf.c b/HDF5Examples/C/H5FLT/h5ex_d_lzf.c index 41f5776494a..3a038fd594a 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_lzf.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_lzf.c @@ -1,15 +1,3 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 LZF filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file LICENSE, which can be found at the root of the LZF source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset @@ -35,10 +23,10 @@ int main(void) { - hid_t file_id = H5I_INVALID_HID; /* Handles */ - hid_t space_id = H5I_INVALID_HID; /* Handles */ - hid_t dset_id = H5I_INVALID_HID; /* Handles */ - hid_t dcpl_id = H5I_INVALID_HID; /* Handles */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; @@ -49,11 +37,11 @@ main(void) unsigned filter_config; const unsigned int cd_values[3] = {0, 0, 0}; unsigned int values_out[3] = {99, 99, 99}; - int wdata[DIM0][DIM1], /* Write buffer */ - rdata[DIM0][DIM1], /* Read buffer */ - max; - hsize_t i, j; - int ret_value = 1; + int wdata[DIM0][DIM1]; /* Write buffer */ + int rdata[DIM0][DIM1]; /* Read buffer */ + int max; + hsize_t i, j; + int ret_value = 1; /* * Initialize data. diff --git a/HDF5Examples/C/H5FLT/h5ex_d_zfp.c b/HDF5Examples/C/H5FLT/h5ex_d_zfp.c index f4bb6a97694..3ba29c50a57 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_zfp.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_zfp.c @@ -1,15 +1,3 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 ZFP filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file LICENSE, which can be found at the root of the ZFP source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset @@ -35,10 +23,10 @@ int main(void) { - hid_t file_id = H5I_INVALID_HID; /* Handles */ - hid_t space_id = H5I_INVALID_HID; /* Handles */ - hid_t dset_id = H5I_INVALID_HID; /* Handles */ - hid_t dcpl_id = H5I_INVALID_HID; /* Handles */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; @@ -49,11 +37,11 @@ main(void) unsigned filter_config; const unsigned int cd_values[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; unsigned int values_out[10] = {99, 99, 99, 99, 99, 99, 99, 99, 99, 99}; - float wdata[DIM0][DIM1], /* Write buffer */ - rdata[DIM0][DIM1]; /* Read buffer */ - float max; - hsize_t i, j; - int ret_value = 1; + float wdata[DIM0][DIM1]; /* Write buffer */ + float rdata[DIM0][DIM1]; /* Read buffer */ + float max; + hsize_t i, j; + int ret_value = 1; /* * Initialize data. diff --git a/HDF5Examples/C/H5FLT/h5ex_d_zstd.c b/HDF5Examples/C/H5FLT/h5ex_d_zstd.c index 183686fafa4..48f1d2f42bd 100644 --- a/HDF5Examples/C/H5FLT/h5ex_d_zstd.c +++ b/HDF5Examples/C/H5FLT/h5ex_d_zstd.c @@ -1,15 +1,3 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of the HDF5 ZSTD filter plugin source. The full * - * copyright notice, including terms governing use, modification, and * - * terms governing use, modification, and redistribution, is contained in * - * the file LICENSE, which can be found at the root of the ZSTD source code * - * distribution tree. If you do not have access to this file, you may * - * request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /************************************************************ This example shows how to write data and read it from a dataset @@ -37,10 +25,10 @@ int main(void) { - hid_t file_id = H5I_INVALID_HID; /* Handles */ - hid_t space_id = H5I_INVALID_HID; /* Handles */ - hid_t dset_id = H5I_INVALID_HID; /* Handles */ - hid_t dcpl_id = H5I_INVALID_HID; /* Handles */ + hid_t file_id = H5I_INVALID_HID; + hid_t space_id = H5I_INVALID_HID; + hid_t dset_id = H5I_INVALID_HID; + hid_t dcpl_id = H5I_INVALID_HID; herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; diff --git a/HDF5Examples/C/H5FLT/tfiles/h5ex_d_bitgroom.tst b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_bitgroom.tst index bf368d5abdf..44b6b701270 100644 --- a/HDF5Examples/C/H5FLT/tfiles/h5ex_d_bitgroom.tst +++ b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_bitgroom.tst @@ -2,7 +2,7 @@ BitGroom filter is available for quantization and decoding. ....Create dataset ................ ....Writing BitGroom-quantized data ................ ....Close the file and reopen for reading ........ -Filter info is available from the dataset creation property +Filter info is available from the dataset creation property Filter identifier is 32022 Number of parameters is 5 with the values 3, 4, 0, 0, 0 To find more about the filter check BitGroom filter (Zender, 2016 GMD: http://www.geosci-model-dev.net/9/3199/2016) diff --git a/HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.ddl b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.ddl new file mode 100644 index 00000000000..2e111e26f64 --- /dev/null +++ b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.ddl @@ -0,0 +1,26 @@ +HDF5 "h5ex_d_granularbr.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_IEEE_F32LE + DATASPACE SIMPLE { ( 32, 64 ) / ( 32, 64 ) } + STORAGE_LAYOUT { + CHUNKED ( 4, 8 ) + SIZE 8192 (1.000:1 COMPRESSION) + } + FILTERS { + USER_DEFINED_FILTER { + FILTER_ID 32023 + COMMENT Granular BitRound filter + PARAMS { 3 4 0 0 0 } + } + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + } +} +} diff --git a/HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.h5 b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.h5 new file mode 100644 index 0000000000000000000000000000000000000000..4082d08203267715f0d1484d7373538386452992 GIT binary patch literal 12208 zcmeI0e{`2s9mgNWh>1go5KNr;Wr51o3w?{lw>@3Tiv{acT|_}tIu ze(vXap8LJ;@4erxudkaka>V!%fv&Q$pfsqkP5;k7-4#tuBHs7?O|CJ-*>%o#l_ZTJ zf&L4EN*5pH>KErNTyVx20hzwOw{BRFFHKryKJb70KQ#mOXUuBQ3pcvA_N%nVtusFv zb!VS!n|?jk`;Pz84he?a^_%>o61*5#s8lDsrhwMvBj%R{^J?Y_uY^nOnu*(LsW{6OcILo{O93^=bb=`^So|+UX+pNzps5>epJ#bu9x!( z&PEw|HAQ*(qmqCrju-h+MqX`EUVd~EFfKlr7St7GWd!RzIHA!nnEywv=SJGfr)eE70aMqY7#-c5j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-@l{ z)yJi$CtwRa4ASbOpm+>B;AxOv2kP=k7k>u(b12UD@n6vQD^Q&tQ2beV4qkv4;bka} WzvSY-!R`g0KQR6(@!!Flb^ikVi{ab= literal 0 HcmV?d00001 diff --git a/HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.tst b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.tst new file mode 100644 index 00000000000..d934eb1651c --- /dev/null +++ b/HDF5Examples/C/H5FLT/tfiles/h5ex_d_granularbr.tst @@ -0,0 +1,11 @@ +Granular BitRound filter is available for quantization and decoding. +....Create dataset ................ +....Writing Granular BitRound-quantized data ................ +....Close the file and reopen for reading ........ +Filter info is available from the dataset creation property + Filter identifier is 32023 + Number of parameters is 5 with the values 3, 4, 0, 0, 0 + To find more about the filter check Granular BitRound filter +....Reading Granular BitRound-quantized data ................ +Maximum value in DS1 is 1.84467e+19 +Granular BitRound filter is available now since H5Dread triggered loading of the filter. diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake index a1089dcb089..4aedbbca509 100644 --- a/config/cmake/HDF5PluginCache.cmake +++ b/config/cmake/HDF5PluginCache.cmake @@ -24,6 +24,7 @@ endif () if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT") set (ENABLE_BITGROOM OFF CACHE BOOL "" FORCE) + set (ENABLE_BITROUND OFF CACHE BOOL "" FORCE) set (ENABLE_JPEG OFF CACHE BOOL "" FORCE) set (ENABLE_LZF OFF CACHE BOOL "" FORCE) endif ()