summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r--src/H5Dio.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 8e5a034..543bb56 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -88,7 +88,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
/* projected to a rank equal to that of file_space. */
/* */
/* This field is only used if */
- /* H5S_select_shape_same() returns TRUE when */
+ /* H5S_select_shape_same() returns true when */
/* comparing at least one mem_space and data_space, */
/* and the mem_space has a different rank. */
/* */
@@ -189,7 +189,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
* well.
*/
if (dset_info[i].nelmts > 0 &&
- TRUE == H5S_SELECT_SHAPE_SAME(dset_info[i].mem_space, dset_info[i].file_space) &&
+ true == H5S_SELECT_SHAPE_SAME(dset_info[i].mem_space, dset_info[i].file_space) &&
H5S_GET_EXTENT_NDIMS(dset_info[i].mem_space) != H5S_GET_EXTENT_NDIMS(dset_info[i].file_space)) {
ptrdiff_t buf_adj = 0;
@@ -255,7 +255,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "filling buf failed");
/* No need to perform any more I/O for this dataset */
- dset_info[i].skip_io = TRUE;
+ dset_info[i].skip_io = true;
io_skipped = io_skipped + 1;
} /* end if */
else {
@@ -277,7 +277,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
if (dset_info[i].layout_ops.io_init &&
(dset_info[i].layout_ops.io_init)(&io_info, &(dset_info[i])) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info");
- dset_info[i].skip_io = FALSE;
+ dset_info[i].skip_io = false;
io_op_init++;
/* Reset metadata tagging */
@@ -495,7 +495,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
/* projected to a rank equal to that of file_space. */
/* */
/* This field is only used if */
- /* H5S_select_shape_same() returns TRUE when */
+ /* H5S_select_shape_same() returns true when */
/* comparing at least one mem_space and data_space, */
/* and the mem_space has a different rank. */
/* */
@@ -523,7 +523,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
/* iterate over all dsets and construct I/O information */
for (i = 0; i < count; i++) {
- hbool_t should_alloc_space = FALSE; /* Whether or not to initialize dataset's storage */
+ bool should_alloc_space = false; /* Whether or not to initialize dataset's storage */
haddr_t prev_tag = HADDR_UNDEF;
/* check args */
@@ -540,7 +540,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (H5Z_can_apply(dset_info[i].dset->shared->dcpl_id, dset_info[i].dset->shared->type_id) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "can't apply filters");
- dset_info[i].dset->shared->checked_filters = TRUE;
+ dset_info[i].dset->shared->checked_filters = true;
} /* end if */
/* Check if we are allowed to write to this file */
@@ -615,7 +615,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
* as well.
*/
if (dset_info[i].nelmts > 0 &&
- TRUE == H5S_SELECT_SHAPE_SAME(dset_info[i].mem_space, dset_info[i].file_space) &&
+ true == H5S_SELECT_SHAPE_SAME(dset_info[i].mem_space, dset_info[i].file_space) &&
H5S_GET_EXTENT_NDIMS(dset_info[i].mem_space) != H5S_GET_EXTENT_NDIMS(dset_info[i].file_space)) {
ptrdiff_t buf_adj = 0;
@@ -672,7 +672,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (should_alloc_space) {
hssize_t file_nelmts; /* Number of elements in file dataset's dataspace */
- hbool_t full_overwrite; /* Whether we are over-writing all the elements */
+ bool full_overwrite; /* Whether we are over-writing all the elements */
/* Get the number of elements in file dataset's dataspace */
if ((file_nelmts = H5S_GET_EXTENT_NPOINTS(dset_info[i].file_space)) < 0)
@@ -680,10 +680,10 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
"can't retrieve number of elements in file dataset");
/* Always allow fill values to be written if the dataset has a VL datatype */
- if (H5T_detect_class(dset_info[i].dset->shared->type, H5T_VLEN, FALSE))
- full_overwrite = FALSE;
+ if (H5T_detect_class(dset_info[i].dset->shared->type, H5T_VLEN, false))
+ full_overwrite = false;
else
- full_overwrite = (hbool_t)((hsize_t)file_nelmts == dset_info[i].nelmts ? TRUE : FALSE);
+ full_overwrite = (bool)((hsize_t)file_nelmts == dset_info[i].nelmts ? true : false);
/* Allocate storage */
if (H5D__alloc_storage(dset_info[i].dset, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0)
@@ -695,7 +695,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
if (dset_info[i].layout_ops.io_init &&
(*dset_info[i].layout_ops.io_init)(&io_info, &(dset_info[i])) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize I/O info");
- dset_info[i].skip_io = FALSE;
+ dset_info[i].skip_io = false;
io_op_init++;
/* Reset metadata tagging */
@@ -940,7 +940,7 @@ H5D__ioinfo_init(size_t count, H5D_io_op_type_t op_type, H5D_dset_io_info_t *dse
/* Check if we could potentially use in-place type conversion */
if (op_type == H5D_IO_OP_READ)
/* Always on for read (modulo other restrictions that are handled in layout callbacks) */
- io_info->may_use_in_place_tconv = TRUE;
+ io_info->may_use_in_place_tconv = true;
else
/* Only enable in-place type conversion if we're allowed to modify the write buffer */
H5CX_get_modify_write_buf(&io_info->may_use_in_place_tconv);
@@ -1093,7 +1093,7 @@ H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, hid_t
MAX3(io_info->max_tconv_type_size, type_info->src_type_size, type_info->dst_type_size);
/* Check if we need a background buffer */
- if ((io_info->op_type == H5D_IO_OP_WRITE) && H5T_detect_class(dset->shared->type, H5T_VLEN, FALSE))
+ if ((io_info->op_type == H5D_IO_OP_WRITE) && H5T_detect_class(dset->shared->type, H5T_VLEN, false))
type_info->need_bkg = H5T_BKG_YES;
else {
H5T_bkg_t path_bkg; /* Type conversion's background info */
@@ -1169,7 +1169,7 @@ H5D__typeinfo_init_phase2(H5D_io_info_t *io_info)
/* Check if we need to fill the background buffer with the destination contents */
if (type_info->need_bkg == H5T_BKG_YES)
- io_info->must_fill_bkg = TRUE;
+ io_info->must_fill_bkg = true;
}
}
@@ -1183,14 +1183,14 @@ H5D__typeinfo_init_phase2(H5D_io_info_t *io_info)
io_info->no_selection_io_cause |= H5D_SEL_IO_TCONV_BUF_TOO_SMALL;
io_info->tconv_buf_size = 0;
io_info->bkg_buf_size = 0;
- io_info->must_fill_bkg = FALSE;
+ io_info->must_fill_bkg = false;
}
if (io_info->bkg_buf_size > max_temp_buf) {
io_info->use_select_io = H5D_SELECTION_IO_MODE_OFF;
io_info->no_selection_io_cause |= H5D_SEL_IO_BKG_BUF_TOO_SMALL;
io_info->tconv_buf_size = 0;
io_info->bkg_buf_size = 0;
- io_info->must_fill_bkg = FALSE;
+ io_info->must_fill_bkg = false;
}
}
@@ -1252,7 +1252,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid check for direct IO dataspace ");
/* Check if we can use the optimized parallel I/O routines */
- if (opt == TRUE) {
+ if (opt == true) {
/* Override the I/O op pointers to the MPI-specific routines, unless
* selection I/O is to be used - in this case the file driver will
* handle collective I/O */
@@ -1267,7 +1267,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info)
else {
/* Fail when file sync is required, since it requires collective write */
if (io_info->op_type == H5D_IO_OP_WRITE) {
- hbool_t mpi_file_sync_required = FALSE;
+ bool mpi_file_sync_required = false;
if (H5F_shared_get_mpi_file_sync_required(io_info->f_sh, &mpi_file_sync_required) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get MPI file_sync_required flag");
@@ -1380,7 +1380,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
if (NULL == (io_info->tconv_buf = H5FL_BLK_MALLOC(type_conv, io_info->tconv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion");
- io_info->tconv_buf_allocated = TRUE;
+ io_info->tconv_buf_allocated = true;
}
/* Allocate global background buffer (if any) */
@@ -1388,7 +1388,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
if (NULL == (io_info->bkg_buf = H5FL_BLK_MALLOC(type_conv, io_info->bkg_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion");
- io_info->bkg_buf_allocated = TRUE;
+ io_info->bkg_buf_allocated = true;
}
}
else {
@@ -1410,11 +1410,11 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
/* If the buffer is too small to hold even one element (in the dataset with the largest , try to
* make it bigger */
if (target_size < io_info->max_tconv_type_size) {
- hbool_t default_buffer_info; /* Whether the buffer information are the defaults */
+ bool default_buffer_info; /* Whether the buffer information are the defaults */
/* Detect if we have all default settings for buffers */
- default_buffer_info = (hbool_t)((H5D_TEMP_BUF_SIZE == max_temp_buf) && (NULL == tconv_buf) &&
- (NULL == bkgr_buf));
+ default_buffer_info =
+ (bool)((H5D_TEMP_BUF_SIZE == max_temp_buf) && (NULL == tconv_buf) && (NULL == bkgr_buf));
/* Check if we are using the default buffer info */
if (default_buffer_info)
@@ -1434,7 +1434,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
if (NULL == (io_info->tconv_buf = H5FL_BLK_MALLOC(type_conv, target_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for type conversion");
- io_info->tconv_buf_allocated = TRUE;
+ io_info->tconv_buf_allocated = true;
} /* end if */
/* Iterate over datasets */
@@ -1455,7 +1455,7 @@ H5D__typeinfo_init_phase3(H5D_io_info_t *io_info)
if (NULL == (io_info->bkg_buf = H5FL_BLK_MALLOC(type_conv, target_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for background conversion");
- io_info->bkg_buf_allocated = TRUE;
+ io_info->bkg_buf_allocated = true;
}
}
}