diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-05 21:52:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 21:52:30 (GMT) |
commit | 8253ab9ebf6a082dc07eb931f27b169d6a45d577 (patch) | |
tree | 47630856491e54f5d28e1608ffa5e2f976dc9c95 /src/H5mpi.c | |
parent | 920869796031ed4ee9c1fbea8aaccda3592a88b3 (diff) | |
download | hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.zip hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.gz hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.bz2 |
Convert hbool_t --> bool in src (#3496)
* hbool_t --> bool in src
* Does not remove TRUE/FALSE
* Public header files are unchanged
* Public API calls are unchanged
* TRUE/FALSE --> true/false in src
* Add deprecation notice for hbool_t
Diffstat (limited to 'src/H5mpi.c')
-rw-r--r-- | src/H5mpi.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/H5mpi.c b/src/H5mpi.c index 8fd7252..29c9f39 100644 --- a/src/H5mpi.c +++ b/src/H5mpi.c @@ -335,11 +335,11 @@ done: herr_t H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result) { - hbool_t same = FALSE; - char *key = NULL; - char *value1 = NULL; - char *value2 = NULL; - herr_t ret_value = SUCCEED; + bool same = false; + char *key = NULL; + char *value1 = NULL; + char *value2 = NULL; + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(FAIL) @@ -350,12 +350,12 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result) /* Check for MPI_INFO_NULL */ if (MPI_INFO_NULL == info1 && MPI_INFO_NULL == info2) { /* Special case of both info objects being MPI_INFO_NULL */ - same = TRUE; + same = true; } else if (MPI_INFO_NULL == info1 || MPI_INFO_NULL == info2) { /* Special case of one info object being MPI_INFO_NULL */ - same = FALSE; + same = false; } else { int mpi_code; @@ -369,9 +369,9 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result) HMPI_GOTO_ERROR(FAIL, "MPI_Info_get_nkeys failed", mpi_code) if (nkeys_1 != nkeys_2) - same = FALSE; + same = false; else if (0 == nkeys_1 && 0 == nkeys_2) - same = TRUE; + same = true; else { int i; int flag1 = -1; @@ -388,7 +388,7 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result) /* Iterate over the keys, comparing them */ for (i = 0; i < nkeys_1; i++) { - same = TRUE; + same = true; /* Memset the buffers to zero */ memset(key, 0, MPI_MAX_INFO_KEY); @@ -407,7 +407,7 @@ H5_mpi_info_cmp(MPI_Info info1, MPI_Info info2, int *result) /* Compare values and flags */ if (!flag1 || !flag2 || memcmp(value1, value2, MPI_MAX_INFO_VAL)) { - same = FALSE; + same = false; break; } @@ -576,8 +576,8 @@ done: * MPI_(All)gatherv's `recvtype` parameter. * * `allgather` - Specifies whether the gather operation to be - * performed should be MPI_Allgatherv (TRUE) or - * MPI_Gatherv (FALSE). + * performed should be MPI_Allgatherv (true) or + * MPI_Gatherv (false). * * `root` - For MPI_Gatherv operations, specifies the rank * that will receive the data sent by other ranks. @@ -616,7 +616,7 @@ done: */ herr_t H5_mpio_gatherv_alloc(void *send_buf, int send_count, MPI_Datatype send_type, const int recv_counts[], - const int displacements[], MPI_Datatype recv_type, hbool_t allgather, int root, + const int displacements[], MPI_Datatype recv_type, bool allgather, int root, MPI_Comm comm, int mpi_rank, int mpi_size, void **out_buf, size_t *out_buf_num_entries) { size_t recv_buf_num_entries = 0; @@ -710,7 +710,7 @@ done: */ herr_t H5_mpio_gatherv_alloc_simple(void *send_buf, int send_count, MPI_Datatype send_type, MPI_Datatype recv_type, - hbool_t allgather, int root, MPI_Comm comm, int mpi_rank, int mpi_size, + bool allgather, int root, MPI_Comm comm, int mpi_rank, int mpi_size, void **out_buf, size_t *out_buf_num_entries) { int *recv_counts_disps_array = NULL; @@ -791,7 +791,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required) +H5_mpio_get_file_sync_required(MPI_File fh, bool *file_sync_required) { MPI_Info info_used; int flag; @@ -803,7 +803,7 @@ H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required) assert(file_sync_required); - *file_sync_required = FALSE; + *file_sync_required = false; if (MPI_SUCCESS != MPI_File_get_info(fh, &info_used)) HGOTO_ERROR(H5E_LIB, H5E_CANTGET, FAIL, "can't get MPI info"); @@ -813,7 +813,7 @@ H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required) HGOTO_ERROR(H5E_LIB, H5E_CANTGET, FAIL, "can't get MPI info"); if (flag && !HDstrcmp(value, "false")) - *file_sync_required = TRUE; + *file_sync_required = true; if (MPI_SUCCESS != MPI_Info_free(&info_used)) HGOTO_ERROR(H5E_LIB, H5E_CANTFREE, FAIL, "can't free MPI info"); @@ -821,9 +821,9 @@ H5_mpio_get_file_sync_required(MPI_File fh, hbool_t *file_sync_required) /* Force setting the flag via env variable (temp solution before the flag is implemented in MPI) */ sync_env_var = HDgetenv("HDF5_DO_MPI_FILE_SYNC"); if (sync_env_var && (!HDstrcmp(sync_env_var, "TRUE") || !HDstrcmp(sync_env_var, "1"))) - *file_sync_required = TRUE; + *file_sync_required = true; if (sync_env_var && (!HDstrcmp(sync_env_var, "FALSE") || !HDstrcmp(sync_env_var, "0"))) - *file_sync_required = FALSE; + *file_sync_required = false; done: FUNC_LEAVE_NOAPI(ret_value) |