summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:32:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:32:06 (GMT)
commit37232bd4f0f8199f956c823cdff72ece2ca9aa16 (patch)
tree38e37f7208355500b7f223e90bf014424c63300b /src/H5S.c
parent20146575aaeead9e05af73977dee863de63bf50f (diff)
downloadhdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.zip
hdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.tar.gz
hdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.tar.bz2
[svn-r9729] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update:
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c48
1 files changed, 37 insertions, 11 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 273676a..09f5f8e 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -14,6 +14,9 @@
#define H5S_PACKAGE /*suppress error about including H5Spkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5S_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5S_mask
@@ -33,11 +36,6 @@ static herr_t H5S_set_extent_simple (H5S_t *space, unsigned rank,
const hsize_t *dims, const hsize_t *max);
static htri_t H5S_is_simple(const H5S_t *sdim);
-/* Interface initialization */
-#define INTERFACE_INIT H5S_init_interface
-static int interface_initialize_g = 0;
-static herr_t H5S_init_interface(void);
-
#ifdef H5S_DEBUG
/* Names of the selection names, for debugging */
static const char *H5S_sel_names[]={
@@ -64,9 +62,6 @@ H5FL_DEFINE(H5S_t);
/* Declare a free list to manage the array's of hsize_t's */
H5FL_ARR_DEFINE(hsize_t,H5S_MAX_RANK);
-/* Declare a free list to manage the array's of hssize_t's */
-H5FL_ARR_DEFINE(hssize_t,H5S_MAX_RANK);
-
/*--------------------------------------------------------------------------
NAME
@@ -132,11 +127,11 @@ H5S_term_interface(void)
int j, nprints=0;
H5S_iostats_t *path=NULL;
char buf[256];
-#endif
+#endif /* H5S_DEBUG */
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_term_interface);
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
if ((n=H5I_nmembers(H5I_DATASPACE))) {
H5I_clear_group(H5I_DATASPACE, FALSE);
} else {
@@ -269,7 +264,7 @@ H5S_term_interface(void)
#endif /* H5S_DEBUG */
/* Shut down interface */
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1; /*H5I*/
}
}
@@ -1653,6 +1648,37 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5S_raw_size
+ *
+ * Purpose: Compute the 'raw' size of the extent, as stored on disk.
+ *
+ * Return: Success: non-zero
+ * Failure: zero
+ *
+ * Programmer: Quincey Koziol
+ * koziol@ncsa.uiuc.edu
+ * October 14, 2004
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+size_t
+H5S_raw_size(const H5F_t *f, const H5S_t *space)
+{
+ size_t ret_value;
+
+ FUNC_ENTER_NOAPI(H5S_raw_size, 0);
+
+ /* Find out the size of buffer needed for extent */
+ ret_value=H5O_raw_size(H5O_SDSPACE_ID, f, &(space->extent));
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* end H5S_raw_size() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5S_get_simple_extent_type
*
* Purpose: Internal function for retrieving the type of extent for a dataspace object