diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-20 15:32:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-20 15:32:09 (GMT) |
commit | 910e19c646f7ca16a1415f2e64f745b43013cded (patch) | |
tree | 677d6f241120e73a73102dbbd256a6e1d6a125cc /src/H5R.c | |
parent | acb2b222a8d4ad7a5f4a5ce94c7e86ea8522b957 (diff) | |
download | hdf5-910e19c646f7ca16a1415f2e64f745b43013cded.zip hdf5-910e19c646f7ca16a1415f2e64f745b43013cded.tar.gz hdf5-910e19c646f7ca16a1415f2e64f745b43013cded.tar.bz2 |
[svn-r8544] 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/H5R.c')
-rw-r--r-- | src/H5R.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -12,10 +12,7 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* $Id$ */ - #define H5F_PACKAGE /*suppress error about including H5Fpkg */ -#define H5S_PACKAGE /*suppress error about including H5Spkg */ #include "H5private.h" /* Generic Functions */ #include "H5Iprivate.h" /* ID Functions */ @@ -26,7 +23,7 @@ #include "H5HGprivate.h" /* Global Heaps */ #include "H5MMprivate.h" /* Memory Management */ #include "H5Rprivate.h" /* References */ -#include "H5Spkg.h" /* Dataspaces */ +#include "H5Sprivate.h" /* Dataspace functions */ #include "H5Tprivate.h" /* Datatypes */ /* Interface initialization */ @@ -192,7 +189,7 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type, HDmemset(ref->heapid,H5R_DSET_REG_REF_BUF_SIZE,0); /* Get the amount of space required to serialize the selection */ - if ((buf_size = (*space->select.serial_size)(space)) < 0) + if ((buf_size = H5S_SELECT_SERIAL_SIZE(space)) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "Invalid amount of space for serializing selection"); /* Increase buffer size to allow for the dataset OID */ @@ -208,7 +205,7 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type, H5F_addr_encode(loc->file,&p,sb.objno); /* Serialize the selection */ - if ((*space->select.serialize)(space,p) < 0) + if (H5S_SELECT_SERIALIZE(space,p) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection"); /* Save the serialized buffer for later */ |