Skip to content

Commit

Permalink
Move hl example into HDF5Examples (#5057)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Nov 4, 2024
1 parent 35df4fb commit ad3ea26
Show file tree
Hide file tree
Showing 253 changed files with 51,237 additions and 1,645 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,16 @@ set (HDF5_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/test)
set (HDF5_TEST_PAR_DIR ${HDF5_SOURCE_DIR}/testpar)
set (HDF5_TEST_API_SRC_DIR ${HDF5_SOURCE_DIR}/test/API)
set (HDF5_TEST_API_PAR_SRC_DIR ${HDF5_SOURCE_DIR}/testpar/API)
set (HDF5_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/c++)
set (HDF5_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/c++/src)
set (HDF5_CPP_TST_DIR ${HDF5_SOURCE_DIR}/c++/test)
set (HDF5_HL_SRC_DIR ${HDF5_SOURCE_DIR}/hl)
set (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++)
set (HDF5_HL_SRC_DIR ${HDF5_SOURCE_DIR}/hl/src)
set (HDF5_HL_TST_DIR ${HDF5_SOURCE_DIR}/hl/test)
set (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++/src)
set (HDF5_HL_CPP_TST_DIR ${HDF5_SOURCE_DIR}/hl/c++/test)
set (HDF5_HL_TOOLS_DIR ${HDF5_SOURCE_DIR}/hl/tools)
set (HDF5_TOOLS_ROOT_DIR ${HDF5_SOURCE_DIR}/tools)
set (HDF5_TOOLS_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src)
set (HDF5_TOOLS_TST_DIR ${HDF5_SOURCE_DIR}/tools/test)
set (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src/perform)
set (HDF5_UTILS_DIR ${HDF5_SOURCE_DIR}/utils)
set (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran)
set (HDF5_JAVA_JNI_SRC_DIR ${HDF5_SOURCE_DIR}/java/src/jni)
Expand Down
8 changes: 7 additions & 1 deletion HDF5Examples/C/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ if (${H5_LIBVER_DIR} GREATER 110)
add_subdirectory (${PROJECT_SOURCE_DIR}/H5VDS)
endif ()

if (H5_HAVE_PARALLEL AND HDF5_ENABLE_PARALLEL)
if (H5EX_ENABLE_PARALLEL AND H5_HAVE_PARALLEL AND HDF5_ENABLE_PARALLEL)
add_subdirectory (${PROJECT_SOURCE_DIR}/H5PAR)
endif ()

#-- Add High Level Examples
if (H5EX_BUILD_HL AND HDF5_BUILD_HL_LIB)
add_subdirectory (HL)
endif ()

4 changes: 2 additions & 2 deletions HDF5Examples/C/H5D/16/h5ex_d_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <stdio.h>
#include <stdlib.h>

#define FILE "h5ex_d_alloc.h5"
#define FILENAME "h5ex_d_alloc.h5"
#define DATASET1 "DS1"
#define DATASET2 "DS2"
#define DIM0 4
Expand Down Expand Up @@ -49,7 +49,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace. Setting maximum size to NULL sets the maximum
Expand Down
16 changes: 8 additions & 8 deletions HDF5Examples/C/H5D/16/h5ex_d_checksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#include <stdio.h>
#include <stdlib.h>

#define FILE "h5ex_d_checksum.h5"
#define DATASET "DS1"
#define DIM0 32
#define DIM1 64
#define CHUNK0 4
#define CHUNK1 8
#define FILENAME "h5ex_d_checksum.h5"
#define DATASET "DS1"
#define DIM0 32
#define DIM1 64
#define CHUNK0 4
#define CHUNK1 8

int
main(void)
Expand Down Expand Up @@ -72,7 +72,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace. Setting maximum size to NULL sets the maximum
Expand Down Expand Up @@ -113,7 +113,7 @@ main(void)
/*
* Open file and dataset using the default properties.
*/
file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
file = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dset = H5Dopen(file, DATASET);

/*
Expand Down
16 changes: 8 additions & 8 deletions HDF5Examples/C/H5D/16/h5ex_d_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#include <stdio.h>
#include <stdlib.h>

#define FILE "h5ex_d_chunk.h5"
#define DATASET "DS1"
#define DIM0 6
#define DIM1 8
#define CHUNK0 4
#define CHUNK1 4
#define FILENAME "h5ex_d_chunk.h5"
#define DATASET "DS1"
#define DIM0 6
#define DIM1 8
#define CHUNK0 4
#define CHUNK1 4

int
main(void)
Expand Down Expand Up @@ -64,7 +64,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace. Setting maximum size to NULL sets the maximum
Expand Down Expand Up @@ -126,7 +126,7 @@ main(void)
/*
* Open file and dataset using the default properties.
*/
file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
file = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dset = H5Dopen(file, DATASET);

/*
Expand Down
12 changes: 6 additions & 6 deletions HDF5Examples/C/H5D/16/h5ex_d_compact.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include <stdio.h>
#include <stdlib.h>

#define FILE "h5ex_d_compact.h5"
#define DATASET "DS1"
#define DIM0 4
#define DIM1 7
#define FILENAME "h5ex_d_compact.h5"
#define DATASET "DS1"
#define DIM0 4
#define DIM1 7

int
main(void)
Expand All @@ -43,7 +43,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace. Setting maximum size to NULL sets the maximum
Expand Down Expand Up @@ -84,7 +84,7 @@ main(void)
/*
* Open file and dataset using the default properties.
*/
file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
file = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dset = H5Dopen(file, DATASET);

/*
Expand Down
6 changes: 3 additions & 3 deletions HDF5Examples/C/H5D/16/h5ex_d_extern.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <stdio.h>
#include <stdlib.h>

#define FILE "h5ex_d_extern.h5"
#define FILENAME "h5ex_d_extern.h5"
#define EXTERNAL "h5ex_d_extern.data"
#define DATASET "DS1"
#define DIM0 4
Expand Down Expand Up @@ -46,7 +46,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace. Setting maximum size to NULL sets the maximum
Expand Down Expand Up @@ -86,7 +86,7 @@ main(void)
/*
* Open file and dataset using the default properties.
*/
file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
file = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dset = H5Dopen(file, DATASET);

/*
Expand Down
20 changes: 10 additions & 10 deletions HDF5Examples/C/H5D/16/h5ex_d_fillval.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
#include <stdio.h>
#include <stdlib.h>

#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
#define FILENAME "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)
Expand Down Expand Up @@ -55,7 +55,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace with unlimited dimensions.
Expand Down
16 changes: 8 additions & 8 deletions HDF5Examples/C/H5D/16/h5ex_d_gzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
#include <stdio.h>
#include <stdlib.h>

#define FILE "h5ex_d_gzip.h5"
#define DATASET "DS1"
#define DIM0 32
#define DIM1 64
#define CHUNK0 4
#define CHUNK1 8
#define FILENAME "h5ex_d_gzip.h5"
#define DATASET "DS1"
#define DIM0 32
#define DIM1 64
#define CHUNK0 4
#define CHUNK1 8

int
main(void)
Expand Down Expand Up @@ -72,7 +72,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace. Setting maximum size to NULL sets the maximum
Expand Down Expand Up @@ -113,7 +113,7 @@ main(void)
/*
* Open file and dataset using the default properties.
*/
file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
file = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dset = H5Dopen(file, DATASET);

/*
Expand Down
12 changes: 6 additions & 6 deletions HDF5Examples/C/H5D/16/h5ex_d_hyper.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#include <stdio.h>
#include <stdlib.h>

#define FILE "h5ex_d_hyper.h5"
#define DATASET "DS1"
#define DIM0 6
#define DIM1 8
#define FILENAME "h5ex_d_hyper.h5"
#define DATASET "DS1"
#define DIM0 6
#define DIM1 8

int
main(void)
Expand Down Expand Up @@ -59,7 +59,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace. Setting maximum size to NULL sets the maximum
Expand Down Expand Up @@ -114,7 +114,7 @@ main(void)
/*
* Open file and dataset using the default properties.
*/
file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
file = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dset = H5Dopen(file, DATASET);

/*
Expand Down
12 changes: 6 additions & 6 deletions HDF5Examples/C/H5D/16/h5ex_d_rdwr.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include <stdio.h>
#include <stdlib.h>

#define FILE "h5ex_d_rdwr.h5"
#define DATASET "DS1"
#define DIM0 4
#define DIM1 7
#define FILENAME "h5ex_d_rdwr.h5"
#define DATASET "DS1"
#define DIM0 4
#define DIM1 7

int
main(void)
Expand All @@ -41,7 +41,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace. Setting maximum size to NULL sets the maximum
Expand Down Expand Up @@ -74,7 +74,7 @@ main(void)
/*
* Open file and dataset using the default properties.
*/
file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
file = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dset = H5Dopen(file, DATASET);

/*
Expand Down
16 changes: 8 additions & 8 deletions HDF5Examples/C/H5D/16/h5ex_d_shuffle.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#include <stdio.h>
#include <stdlib.h>

#define FILE "h5ex_d_shuffle.h5"
#define DATASET "DS1"
#define DIM0 32
#define DIM1 64
#define CHUNK0 4
#define CHUNK1 8
#define FILENAME "h5ex_d_shuffle.h5"
#define DATASET "DS1"
#define DIM0 32
#define DIM1 64
#define CHUNK0 4
#define CHUNK1 8

int
main(void)
Expand Down Expand Up @@ -88,7 +88,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace. Setting maximum size to NULL sets the maximum
Expand Down Expand Up @@ -135,7 +135,7 @@ main(void)
/*
* Open file and dataset using the default properties.
*/
file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
file = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dset = H5Dopen(file, DATASET);

/*
Expand Down
16 changes: 8 additions & 8 deletions HDF5Examples/C/H5D/16/h5ex_d_szip.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
#include <stdio.h>
#include <stdlib.h>

#define FILE "h5ex_d_szip.h5"
#define DATASET "DS1"
#define DIM0 32
#define DIM1 64
#define CHUNK0 4
#define CHUNK1 8
#define FILENAME "h5ex_d_szip.h5"
#define DATASET "DS1"
#define DIM0 32
#define DIM1 64
#define CHUNK0 4
#define CHUNK1 8

int
main(void)
Expand Down Expand Up @@ -73,7 +73,7 @@ main(void)
/*
* Create a new file using the default properties.
*/
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);

/*
* Create dataspace. Setting maximum size to NULL sets the maximum
Expand Down Expand Up @@ -114,7 +114,7 @@ main(void)
/*
* Open file and dataset using the default properties.
*/
file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
file = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dset = H5Dopen(file, DATASET);

/*
Expand Down
Loading

0 comments on commit ad3ea26

Please sign in to comment.