Skip to content

Commit

Permalink
Jan ws changes (#282)
Browse files Browse the repository at this point in the history
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* OESS-98 fix tools test for plugins

* Keep doxygen comments under 100 chars long - format hint

* Whitespace

* HDFFV-11144 - Reclassify CMake messages

* HDFFV-11099/11100 added help text

* Reworked switch statement to compare string instead

* Fix typo

* Whitespace fixes except for H5Tprivate.h typo fix
  • Loading branch information
byrnHDF authored Jan 27, 2021
1 parent 799ec0f commit 9524dc4
Show file tree
Hide file tree
Showing 11 changed files with 114 additions and 108 deletions.
182 changes: 94 additions & 88 deletions src/H5Fpublic.h

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/H5Spkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ struct H5S_pnt_list_t {
H5S_pnt_node_t *head; /* Pointer to head of point list */
H5S_pnt_node_t *tail; /* Pointer to tail of point list */

hsize_t last_idx; /* Index of the point after the last returned from H5S__get_select_elem_pointlist() */
hsize_t last_idx; /* Index of the point after the last returned from H5S__get_select_elem_pointlist() */
H5S_pnt_node_t *last_idx_pnt; /* Point after the last returned from H5S__get_select_elem_pointlist().
* If we ever add a way to remove points or add points in the middle of
* the pointlist we will need to invalidate these fields. */
* If we ever add a way to remove points or add points in the middle of
* the pointlist we will need to invalidate these fields. */
};

/* Information about hyperslab spans */
Expand Down
16 changes: 8 additions & 8 deletions src/H5Spoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ H5S__copy_pnt_list(const H5S_pnt_list_t *src, unsigned rank)
H5MM_memcpy(dst->low_bounds, src->low_bounds, (rank * sizeof(hsize_t)));

/* Clear cached iteration point */
dst->last_idx = 0;
dst->last_idx = 0;
dst->last_idx_pnt = NULL;

/* Set return value */
Expand Down Expand Up @@ -1516,8 +1516,8 @@ static herr_t
H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t numpoints, hsize_t *buf)
{
const hsize_t endpoint = startpoint + numpoints; /* Index of last point in iteration */
H5S_pnt_node_t *node; /* Point node */
unsigned rank; /* Dataspace rank */
H5S_pnt_node_t *node; /* Point node */
unsigned rank; /* Dataspace rank */

FUNC_ENTER_STATIC_NOERR

Expand All @@ -1528,8 +1528,8 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n
rank = space->extent.rank;

/* Check for cached point at the correct index */
if(space->select.sel_info.pnt_lst->last_idx_pnt
&& startpoint == space->select.sel_info.pnt_lst->last_idx)
if (space->select.sel_info.pnt_lst->last_idx_pnt &&
startpoint == space->select.sel_info.pnt_lst->last_idx)
node = space->select.sel_info.pnt_lst->last_idx_pnt;
else {
/* Get the head of the point list */
Expand All @@ -1540,7 +1540,7 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n
startpoint--;
node = node->next;
} /* end while */
} /* end else */
} /* end else */

/* Iterate through the node, copying each point's information */
while (node != NULL && numpoints > 0) {
Expand All @@ -1551,7 +1551,7 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n
} /* end while */

/* Cached next point in iteration */
space->select.sel_info.pnt_lst->last_idx = endpoint;
space->select.sel_info.pnt_lst->last_idx = endpoint;
space->select.sel_info.pnt_lst->last_idx_pnt = node;

FUNC_LEAVE_NOAPI(SUCCEED)
Expand Down Expand Up @@ -2347,7 +2347,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of
} /* end else */

/* Clear cached iteration point */
new_space->select.sel_info.pnt_lst->last_idx = 0;
new_space->select.sel_info.pnt_lst->last_idx = 0;
new_space->select.sel_info.pnt_lst->last_idx_pnt = NULL;

/* Number of elements selected will be the same */
Expand Down
2 changes: 1 addition & 1 deletion src/H5T.c
Original file line number Diff line number Diff line change
Expand Up @@ -3498,7 +3498,7 @@ H5T__initiate_copy(const H5T_t *old_dt)
(void)H5VL_object_inc_rc(new_dt->shared->owned_vol_obj);

/* Reset vol_obj field */
new_dt->vol_obj = NULL;
new_dt->vol_obj = NULL;

/* Set return value */
ret_value = new_dt;
Expand Down
3 changes: 1 addition & 2 deletions src/H5TS.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,7 @@ H5TS__mutex_acquire(H5TS_mutex_t *mutex, unsigned int lock_count, hbool_t *acqui
*--------------------------------------------------------------------------
*/
herr_t
H5TSmutex_acquire(unsigned int lock_count, hbool_t *acquired)
{
H5TSmutex_acquire(unsigned int lock_count, hbool_t *acquired){
FUNC_ENTER_API_NAMECHECK_ONLY

/*NO TRACE*/
Expand Down
2 changes: 1 addition & 1 deletion src/H5Tprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ typedef struct H5T_t H5T_t;
#define H5T_GET_SHARED(T) ((T)->shared)
#define H5T_GET_MEMBER_OFFSET(T, I) ((T)->u.compnd.memb[I].offset)
#define H5T_GET_MEMBER_SIZE(T, I) ((T)->u.compnd.memb[I].shared->size)
#define H5T_GET_FORCE_CONV(T) ((T)>shared->force_conv)
#define H5T_GET_FORCE_CONV(T) ((T)->shared->force_conv)
#else /* H5T_MODULE */
#define H5T_GET_SIZE(T) (H5T_get_size(T))
#define H5T_GET_SHARED(T) (H5T_get_shared(T))
Expand Down
2 changes: 1 addition & 1 deletion src/H5Tref.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)

/* Release owned file */
if (dt->shared->owned_vol_obj) {
if(H5VL_free_object(dt->shared->owned_vol_obj) < 0)
if (H5VL_free_object(dt->shared->owned_vol_obj) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object")
dt->shared->owned_vol_obj = NULL;
} /* end if */
Expand Down
2 changes: 1 addition & 1 deletion src/H5Tvlen.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc)

/* Release owned file */
if (dt->shared->owned_vol_obj) {
if(H5VL_free_object(dt->shared->owned_vol_obj) < 0)
if (H5VL_free_object(dt->shared->owned_vol_obj) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close owned VOL object")
dt->shared->owned_vol_obj = NULL;
} /* end if */
Expand Down
3 changes: 2 additions & 1 deletion src/H5VL.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,8 @@ H5VLget_file_type(void *file_obj, hid_t connector_id, hid_t dtype_id)

/* Create VOL object for file if necessary (force_conv will be TRUE if and
* only if file needs to be passed to H5T_set_loc) */
if (H5T_GET_FORCE_CONV(dtype) && (NULL == (file_vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file_obj, connector_id))))
if (H5T_GET_FORCE_CONV(dtype) &&
(NULL == (file_vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file_obj, connector_id))))
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "can't create VOL object")

/* Copy the datatype */
Expand Down
2 changes: 1 addition & 1 deletion src/H5VLint.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ H5VL_free_object(H5VL_object_t *vol_obj)
/* Check arguments */
HDassert(vol_obj);

if(--vol_obj->rc == 0) {
if (--vol_obj->rc == 0) {
/* Decrement refcount on connector */
if (H5VL_conn_dec_rc(vol_obj->connector) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTDEC, FAIL, "unable to decrement ref count on VOL connector")
Expand Down
2 changes: 1 addition & 1 deletion src/H5VLprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typedef struct H5VL_t {
typedef struct H5VL_object_t {
void * data; /* Pointer to connector-managed data for this object */
H5VL_t *connector; /* Pointer to VOL connector struct */
size_t rc; /* Reference count */
size_t rc; /* Reference count */
} H5VL_object_t;

/* Internal structure to hold the connector ID & info for FAPLs */
Expand Down

0 comments on commit 9524dc4

Please sign in to comment.