summaryrefslogtreecommitdiffstats
path: root/src/H5Osdspace.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-10-10 07:43:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-10-10 07:43:38 (GMT)
commitba28c64ba7b36ee8a98c2f312f87fa1424f9a07c (patch)
tree3e890bc815dc7417676b608423d39f2b4294ce82 /src/H5Osdspace.c
parent428f04e82a7bff2e4a7600db9616ff3a5ecd07a8 (diff)
downloadhdf5-ba28c64ba7b36ee8a98c2f312f87fa1424f9a07c.zip
hdf5-ba28c64ba7b36ee8a98c2f312f87fa1424f9a07c.tar.gz
hdf5-ba28c64ba7b36ee8a98c2f312f87fa1424f9a07c.tar.bz2
[svn-r2652] Purpose:
Maintainance & performance enhancements Description: Re-arranged header files to protect private symbols better. Changed optimized regular hyperslab I/O to compute the offsets more efficiently from previous method of using matrix operations. Added sequential I/O operations at a more abstract level (at the same level as H5F_arr_read/write), to support the optimized hyperslab I/O. Platforms tested: Solaris 2.6 (baldric) & FreeBSD 4.1.1 (hawkwind)
Diffstat (limited to 'src/H5Osdspace.c')
-rw-r--r--src/H5Osdspace.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 1a7e0a8..ae156c4 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -16,12 +16,15 @@ static char RcsId[] = "@(#)$Revision$";
/* $Id$ */
+#define H5S_PACKAGE /*prevent warning from including H5Spkg.h */
+
#include <H5private.h>
#include <H5Eprivate.h>
#include <H5FLprivate.h> /*Free Lists */
#include <H5Gprivate.h>
#include <H5MMprivate.h>
#include <H5Oprivate.h>
+#include <H5Spkg.h>
#define PABLO_MASK H5O_sdspace_mask
@@ -125,7 +128,7 @@ H5O_sdspace_decode(H5F_t *f, const uint8_t *p, H5O_shared_t UNUSED *sh)
"memory allocation failed");
}
for (u = 0; u < sdim->rank; u++) {
- H5F_decode_length (f, p, sdim->size[u]);
+ H5F_DECODE_LENGTH (f, p, sdim->size[u]);
}
if (flags & H5S_VALID_MAX) {
if (NULL==(sdim->max=H5FL_ARR_ALLOC(hsize_t,sdim->rank,0))) {
@@ -133,7 +136,7 @@ H5O_sdspace_decode(H5F_t *f, const uint8_t *p, H5O_shared_t UNUSED *sh)
"memory allocation failed");
}
for (u = 0; u < sdim->rank; u++) {
- H5F_decode_length (f, p, sdim->max[u]);
+ H5F_DECODE_LENGTH (f, p, sdim->max[u]);
}
}
#ifdef LATER
@@ -212,11 +215,11 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *mesg)
if (sdim->rank > 0) {
for (u = 0; u < sdim->rank; u++) {
- H5F_encode_length (f, p, sdim->size[u]);
+ H5F_ENCODE_LENGTH (f, p, sdim->size[u]);
}
if (flags & H5S_VALID_MAX) {
for (u = 0; u < sdim->rank; u++) {
- H5F_encode_length (f, p, sdim->max[u]);
+ H5F_ENCODE_LENGTH (f, p, sdim->max[u]);
}
}
#ifdef LATER
@@ -313,7 +316,7 @@ H5O_sdspace_copy(const void *mesg, void *dest)
static size_t
H5O_sdspace_size(H5F_t *f, const void *mesg)
{
- const H5S_simple_t *sdim = (const H5S_simple_t *) mesg;
+ const H5S_simple_t *space = (const H5S_simple_t *) mesg;
/*
* All dimensionality messages are at least 8 bytes long.
@@ -323,14 +326,14 @@ H5O_sdspace_size(H5F_t *f, const void *mesg)
FUNC_ENTER(H5O_sdspace_size, 0);
/* add in the dimension sizes */
- ret_value += sdim->rank * H5F_SIZEOF_SIZE (f);
+ ret_value += space->rank * H5F_SIZEOF_SIZE (f);
/* add in the space for the maximum dimensions, if they are present */
- ret_value += sdim->max ? sdim->rank * H5F_SIZEOF_SIZE (f) : 0;
+ ret_value += space->max ? space->rank * H5F_SIZEOF_SIZE (f) : 0;
#ifdef LATER
/* add in the space for the dimension permutations, if they are present */
- ret_value += sdim->perm ? sdim->rank * 4 : 0;
+ ret_value += space->perm ? space->rank * 4 : 0;
#endif
FUNC_LEAVE(ret_value);