diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-07-26 21:45:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 21:45:46 (GMT) |
commit | ae414872f50187e64cbd6cc8f076c22cf5df2d53 (patch) | |
tree | b616f33f5daa89f213e7c64e04c63afde906e939 /tools/src/h5perf | |
parent | 213eac2588369f75a11df6bb1788dde33c4b82e2 (diff) | |
download | hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.zip hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.tar.gz hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.tar.bz2 |
Develop clang 13 format (#1933)
* Update format source to clang 13
* More format changes
Diffstat (limited to 'tools/src/h5perf')
-rw-r--r-- | tools/src/h5perf/pio_engine.c | 40 | ||||
-rw-r--r-- | tools/src/h5perf/pio_perf.c | 6 | ||||
-rw-r--r-- | tools/src/h5perf/pio_perf.h | 2 | ||||
-rw-r--r-- | tools/src/h5perf/sio_engine.c | 12 | ||||
-rw-r--r-- | tools/src/h5perf/sio_perf.c | 4 | ||||
-rw-r--r-- | tools/src/h5perf/sio_perf.h | 2 |
6 files changed, 32 insertions, 34 deletions
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c index b546c43..26968e3 100644 --- a/tools/src/h5perf/pio_engine.c +++ b/tools/src/h5perf/pio_engine.c @@ -118,7 +118,7 @@ typedef union _file_descr { } file_descr; /* local functions */ -static char * pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size); +static char *pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size); static herr_t do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nelmts, size_t buf_size, void *buffer); static herr_t do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nelmts, @@ -153,7 +153,7 @@ do_pio(parameters param) off_t snbytes; /*general dataset size */ /*for 1D, it is the actual dataset size */ /*for 2D, it is the size of a side of the dataset square */ - char * buffer = NULL; /*data buffer pointer */ + char *buffer = NULL; /*data buffer pointer */ size_t buf_size; /*general buffer size in bytes */ /*for 1D, it is the actual buffer size */ /*for 2D, it is the length of the buffer rectangle */ @@ -388,7 +388,7 @@ static char * pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size) { const char *prefix, *suffix = ""; - char * ptr, last = '\0'; + char *ptr, last = '\0'; size_t i, j; if (!base_name || !fullname || size < 1) @@ -1222,15 +1222,14 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby /* Interleaved access pattern */ else { /* Compute offset in file */ - mpi_offset = - mpi_file_offset + - (MPI_Offset)( - ((((size_t)nbytes_xfer / buf_size) * (size_t)pio_mpi_nprocs_g) / - (size_t)snbytes) * - (buf_size * (size_t)snbytes)) + - (MPI_Offset)( - (((size_t)nbytes_xfer / buf_size) * (size_t)pio_mpi_nprocs_g) % - (size_t)snbytes); + mpi_offset = mpi_file_offset + + (MPI_Offset)(((((size_t)nbytes_xfer / buf_size) * + (size_t)pio_mpi_nprocs_g) / + (size_t)snbytes) * + (buf_size * (size_t)snbytes)) + + (MPI_Offset)((((size_t)nbytes_xfer / buf_size) * + (size_t)pio_mpi_nprocs_g) % + (size_t)snbytes); /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size; @@ -2191,15 +2190,14 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt /* Interleaved access pattern */ else { /* Compute offset in file */ - mpi_offset = - mpi_file_offset + - (MPI_Offset)( - ((((size_t)nbytes_xfer / buf_size) * (size_t)pio_mpi_nprocs_g) / - (size_t)snbytes) * - (buf_size * (size_t)snbytes)) + - (MPI_Offset)( - (((size_t)nbytes_xfer / buf_size) * (size_t)pio_mpi_nprocs_g) % - (size_t)snbytes); + mpi_offset = mpi_file_offset + + (MPI_Offset)(((((size_t)nbytes_xfer / buf_size) * + (size_t)pio_mpi_nprocs_g) / + (size_t)snbytes) * + (buf_size * (size_t)snbytes)) + + (MPI_Offset)((((size_t)nbytes_xfer / buf_size) * + (size_t)pio_mpi_nprocs_g) % + (size_t)snbytes); /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size; diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c index 37108d7..3c54214 100644 --- a/tools/src/h5perf/pio_perf.c +++ b/tools/src/h5perf/pio_perf.c @@ -91,7 +91,7 @@ #endif /* FALSE */ /* global variables */ -FILE * output; /* output file */ +FILE *output; /* output file */ int comm_world_rank_g; /* my rank in MPI_COMM_RANK */ int comm_world_nprocs_g; /* num. of processes of MPI_COMM_WORLD */ MPI_Comm pio_comm_g; /* Communicator to run the PIO */ @@ -111,7 +111,7 @@ static const char *progname = "h5perf"; #ifndef HDF5_PARAPREFIX #define HDF5_PARAPREFIX "" #endif -char * paraprefix = NULL; /* for command line option para-prefix */ +char *paraprefix = NULL; /* for command line option para-prefix */ MPI_Info h5_io_info_g = MPI_INFO_NULL; /* MPI INFO object for IO */ /* @@ -766,7 +766,7 @@ h5_set_info_object(void) do { size_t len; - char * key_val, *endp, *namep; + char *key_val, *endp, *namep; if (*valp == ';') valp++; diff --git a/tools/src/h5perf/pio_perf.h b/tools/src/h5perf/pio_perf.h index 89541bf..05f8d5b 100644 --- a/tools/src/h5perf/pio_perf.h +++ b/tools/src/h5perf/pio_perf.h @@ -71,7 +71,7 @@ typedef struct results_ { #define FAIL -1 #endif /* !FAIL */ -extern FILE * output; /* output file */ +extern FILE *output; /* output file */ extern io_time_t *timer_g; /* timer: global for stub functions */ extern int comm_world_rank_g; /* my rank in MPI_COMM_RANK */ extern int comm_world_nprocs_g; /* num. of processes of MPI_COMM_WORLD */ diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c index eff5f61..376fc0b 100644 --- a/tools/src/h5perf/sio_engine.c +++ b/tools/src/h5perf/sio_engine.c @@ -84,7 +84,7 @@ typedef union { } file_descr; /* local functions */ -static char * sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size, +static char *sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size, parameters *param); static herr_t do_write(results *res, file_descr *fd, parameters *parms, void *buffer); static herr_t do_read(results *res, file_descr *fd, parameters *parms, void *buffer); @@ -107,7 +107,7 @@ static int cont_dim; /* lowest dimension for contigu static size_t cont_size; /* size of contiguous POSIX access */ static hid_t fapl; /* file access list */ static unsigned char *buf_p; /* buffer pointer */ -static const char * multi_letters = "msbrglo"; /* string for multi driver */ +static const char *multi_letters = "msbrglo"; /* string for multi driver */ /* HDF5 global variables */ static hsize_t h5count[MAX_DIMS]; /*selection count */ @@ -127,7 +127,7 @@ static hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property void do_sio(parameters param, results *res) { - char * buffer = NULL; /*data buffer pointer */ + char *buffer = NULL; /*data buffer pointer */ size_t buf_size[MAX_DIMS]; /* general buffer size in bytes */ file_descr fd; /* file handles */ iotype iot; /* API type */ @@ -288,7 +288,7 @@ static char * sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size, parameters *param) { const char *prefix, *suffix = ""; - char * ptr, last = '\0'; + char *ptr, last = '\0'; size_t i, j; vfdtype vfd; vfd = param->vfd; @@ -767,7 +767,7 @@ done: static herr_t do_read(results *res, file_descr *fd, parameters *parms, void *buffer) { - char * buffer2 = NULL; /* Buffer for data verification */ + char *buffer2 = NULL; /* Buffer for data verification */ int ret_code = SUCCESS; char dname[64]; int i; @@ -1274,7 +1274,7 @@ done: static void do_cleanupfile(iotype iot, char *filename) { - char * temp = NULL; + char *temp = NULL; size_t temp_sz; int j; hid_t driver; diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c index c85ee42..fc300fb 100644 --- a/tools/src/h5perf/sio_perf.c +++ b/tools/src/h5perf/sio_perf.c @@ -97,7 +97,7 @@ static const char *progname = "h5perf_serial"; * It seems that only the options that accept additional information * such as dataset size (-e) require the colon next to it. */ -static const char * s_opts = "a:A:B:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:v:wx:X:"; +static const char *s_opts = "a:A:B:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:v:wx:X:"; static struct h5_long_options l_opts[] = {{"align", require_arg, 'a'}, {"api", require_arg, 'A'}, #if 0 @@ -1187,7 +1187,7 @@ static hsize_t parse_size_directive(const char *size) { hsize_t s; - char * endptr; + char *endptr; s = HDstrtoull(size, &endptr, 10); diff --git a/tools/src/h5perf/sio_perf.h b/tools/src/h5perf/sio_perf.h index bff737f..a417bdb 100644 --- a/tools/src/h5perf/sio_perf.h +++ b/tools/src/h5perf/sio_perf.h @@ -77,7 +77,7 @@ typedef struct results_ { #define FAIL -1 #endif /* !FAIL */ -extern FILE * output; /* output file */ +extern FILE *output; /* output file */ extern io_time_t *timer_g; /* timer: global for stub functions */ extern int sio_debug_level; /* The debug level: * 0 - Off |