diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-07-27 17:28:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 17:28:11 (GMT) |
commit | a0a1959c58973095194f2d9ac5f9b13bb7b14fb4 (patch) | |
tree | 3f36cbd14d9ede9f00c4c26affb9ecab5d1a860f /tools/src/h5perf | |
parent | f0690f13fb914ff39a32d88801eabcef759a0163 (diff) | |
download | hdf5-a0a1959c58973095194f2d9ac5f9b13bb7b14fb4.zip hdf5-a0a1959c58973095194f2d9ac5f9b13bb7b14fb4.tar.gz hdf5-a0a1959c58973095194f2d9ac5f9b13bb7b14fb4.tar.bz2 |
clang 13 format #1933 (#1939)
Diffstat (limited to 'tools/src/h5perf')
-rw-r--r-- | tools/src/h5perf/perf.c | 8 | ||||
-rw-r--r-- | tools/src/h5perf/pio_engine.c | 40 | ||||
-rw-r--r-- | tools/src/h5perf/pio_perf.c | 30 | ||||
-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 | 20 | ||||
-rw-r--r-- | tools/src/h5perf/sio_perf.h | 2 |
7 files changed, 56 insertions, 58 deletions
diff --git a/tools/src/h5perf/perf.c b/tools/src/h5perf/perf.c index 48f76f2..64e1fb5 100644 --- a/tools/src/h5perf/perf.c +++ b/tools/src/h5perf/perf.c @@ -91,7 +91,7 @@ hid_t dataset; /* Dataset ID */ hsize_t opt_alignment = 1; hsize_t opt_threshold = 1; int opt_split_vfd = 0; -char * meta_ext, *raw_ext; /* holds the meta and raw file extension if */ +char *meta_ext, *raw_ext; /* holds the meta and raw file extension if */ /* opt_split_vfd is set */ /* DEFAULT VALUES FOR OPTIONS */ @@ -117,7 +117,7 @@ extern char *optarg; #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 */ static char *h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fullname, @@ -126,7 +126,7 @@ static char *h5_fixname_real(const char *base_name, hid_t fapl, const char *_suf int main(int argc, char **argv) { - char * buf = NULL, *tmp = NULL, *buf2 = NULL, *tmp2 = NULL, *check = NULL; + char *buf = NULL, *tmp = NULL, *buf2 = NULL, *tmp2 = NULL, *check = NULL; int i, j, mynod = 0, nprocs = 1, my_correct = 1, correct, myerrno; double stim, etim; double write_tim = 0; @@ -583,7 +583,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu { const char *prefix = NULL; const char *env = NULL; /* HDF5_DRIVER environment variable */ - char * ptr, last = '\0'; + char *ptr, last = '\0'; const char *suffix = _suffix; size_t i, j; hid_t driver = -1; diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c index 90d63c8..1562aac 100644 --- a/tools/src/h5perf/pio_engine.c +++ b/tools/src/h5perf/pio_engine.c @@ -120,7 +120,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, @@ -155,7 +155,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 */ @@ -387,7 +387,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) @@ -1223,15 +1223,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; @@ -2194,15 +2193,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 948eec5..aea7337 100644 --- a/tools/src/h5perf/pio_perf.c +++ b/tools/src/h5perf/pio_perf.c @@ -96,7 +96,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 */ @@ -116,7 +116,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 */ /* @@ -415,18 +415,18 @@ run_test(iotype iot, parameters parms, struct options *opts) register int i, ret_value = SUCCESS; int comm_size; off_t raw_size; - minmax * write_mpi_mm_table = NULL; - minmax * write_mm_table = NULL; - minmax * write_gross_mm_table = NULL; - minmax * write_raw_mm_table = NULL; - minmax * read_mpi_mm_table = NULL; - minmax * read_mm_table = NULL; - minmax * read_gross_mm_table = NULL; - minmax * read_raw_mm_table = NULL; - minmax * read_open_mm_table = NULL; - minmax * read_close_mm_table = NULL; - minmax * write_open_mm_table = NULL; - minmax * write_close_mm_table = NULL; + minmax *write_mpi_mm_table = NULL; + minmax *write_mm_table = NULL; + minmax *write_gross_mm_table = NULL; + minmax *write_raw_mm_table = NULL; + minmax *read_mpi_mm_table = NULL; + minmax *read_mm_table = NULL; + minmax *read_gross_mm_table = NULL; + minmax *read_raw_mm_table = NULL; + minmax *read_open_mm_table = NULL; + minmax *read_close_mm_table = NULL; + minmax *write_open_mm_table = NULL; + minmax *write_close_mm_table = NULL; minmax write_mpi_mm = {0.0, 0.0, 0.0, 0}; minmax write_mm = {0.0, 0.0, 0.0, 0}; minmax write_gross_mm = {0.0, 0.0, 0.0, 0}; @@ -773,7 +773,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 8924c20..b12996f 100644 --- a/tools/src/h5perf/pio_perf.h +++ b/tools/src/h5perf/pio_perf.h @@ -76,7 +76,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 008023c..4b39545 100644 --- a/tools/src/h5perf/sio_engine.c +++ b/tools/src/h5perf/sio_engine.c @@ -86,7 +86,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); @@ -109,7 +109,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 */ @@ -129,7 +129,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 */ @@ -290,7 +290,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; @@ -769,7 +769,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; @@ -1276,7 +1276,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 f299c04..227ee4e 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 long_options l_opts[] = {{"align", require_arg, 'a'}, {"api", require_arg, 'A'}, #if 0 @@ -302,14 +302,14 @@ run_test(iotype iot, parameters parms, struct options *opts) results res; register int i, ret_value = SUCCESS; off_t raw_size; - minmax * write_sys_mm_table = NULL; - minmax * write_mm_table = NULL; - minmax * write_gross_mm_table = NULL; - minmax * write_raw_mm_table = NULL; - minmax * read_sys_mm_table = NULL; - minmax * read_mm_table = NULL; - minmax * read_gross_mm_table = NULL; - minmax * read_raw_mm_table = NULL; + minmax *write_sys_mm_table = NULL; + minmax *write_mm_table = NULL; + minmax *write_gross_mm_table = NULL; + minmax *write_raw_mm_table = NULL; + minmax *read_sys_mm_table = NULL; + minmax *read_mm_table = NULL; + minmax *read_gross_mm_table = NULL; + minmax *read_raw_mm_table = NULL; minmax write_sys_mm = {0.0, 0.0, 0.0, 0}; minmax write_mm = {0.0, 0.0, 0.0, 0}; minmax write_gross_mm = {0.0, 0.0, 0.0, 0}; @@ -1188,7 +1188,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 d998377..cb4af1f 100644 --- a/tools/src/h5perf/sio_perf.h +++ b/tools/src/h5perf/sio_perf.h @@ -82,7 +82,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 |