diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-20 15:31:12 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-20 15:31:12 (GMT) |
commit | 70686065d082ad5f3bbce84decc066a9028a0a01 (patch) | |
tree | 41e2df2eeca460e3da44ed7a7f114bb4b1430035 /src/H5Shyper.c | |
parent | aec19e771d2b5de4a38cddbfaf0cd87e0a7ff0a1 (diff) | |
download | hdf5-70686065d082ad5f3bbce84decc066a9028a0a01.zip hdf5-70686065d082ad5f3bbce84decc066a9028a0a01.tar.gz hdf5-70686065d082ad5f3bbce84decc066a9028a0a01.tar.bz2 |
[svn-r8543] Purpose:
Code optimization
Description:
Expand the use of macros to inline trivial function pointer lookup and
calls to reduce the overall number of functions invoked during normal operation
of the library.
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.9 (sleipnir) w/parallel
Too minor to require h5committest
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r-- | src/H5Shyper.c | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c index b5c87a2..cb7c5d7 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -980,41 +980,6 @@ H5S_hyper_iter_release (H5S_sel_iter_t *iter) /*-------------------------------------------------------------------------- NAME - H5S_hyper_npoints - PURPOSE - Compute number of elements in current selection - USAGE - hsize_t H5S_hyper_npoints(space) - H5S_t *space; IN: Pointer to dataspace - RETURNS - The number of elements in selection on success, 0 on failure - DESCRIPTION - Compute number of elements in current selection. - GLOBAL VARIABLES - COMMENTS, BUGS, ASSUMPTIONS - EXAMPLES - REVISION LOG ---------------------------------------------------------------------------*/ -hsize_t -H5S_hyper_npoints (const H5S_t *space) -{ - hsize_t ret_value; /* Return value */ - - FUNC_ENTER_NOAPI(H5S_hyper_npoints, 0); - - /* Check args */ - assert (space); - - /* Set return value */ - ret_value=space->select.num_elem; - -done: - FUNC_LEAVE_NOAPI(ret_value); -} /* H5S_hyper_npoints() */ - - -/*-------------------------------------------------------------------------- - NAME H5S_hyper_new_span PURPOSE Make a new hyperslab span node @@ -3392,7 +3357,6 @@ H5S_hyper_add_span_element(H5S_t *space, unsigned rank, hssize_t *coords) /* Set selection methods */ space->select.get_seq_list=H5S_hyper_get_seq_list; - space->select.get_npoints=H5S_hyper_npoints; space->select.release=H5S_hyper_release; space->select.is_valid=H5S_hyper_is_valid; space->select.serial_size=H5S_hyper_serial_size; @@ -5749,7 +5713,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, if(op==H5S_SELECT_SET) { /* If we are setting a new selection, remove current selection first */ - if((*space->select.release)(space)<0) + if(H5S_SELECT_RELEASE(space)<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release hyperslab"); /* Save the diminfo */ @@ -5797,7 +5761,6 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, /* Set selection methods */ space->select.get_seq_list=H5S_hyper_get_seq_list; - space->select.get_npoints=H5S_hyper_npoints; space->select.release=H5S_hyper_release; space->select.is_valid=H5S_hyper_is_valid; space->select.serial_size=H5S_hyper_serial_size; @@ -5853,7 +5816,7 @@ H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hssize_t start[], /* Check args */ if (NULL == (space=H5I_object_verify(space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); - if (H5S_SCALAR==H5S_get_simple_extent_type(space)) + if (H5S_SCALAR==H5S_GET_SIMPLE_EXTENT_TYPE(space)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hyperslab doesn't support H5S_SCALAR space"); if(start==NULL || count==NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "hyperslab not specified"); |