summaryrefslogtreecommitdiffstats
path: root/src/H5HL.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/H5HL.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/H5HL.c')
-rw-r--r--src/H5HL.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/H5HL.c b/src/H5HL.c
index 1b72e81..05431f6 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -18,10 +18,12 @@
*
*-------------------------------------------------------------------------
*/
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+
#include <H5private.h> /*library */
#include <H5ACprivate.h> /*cache */
#include <H5Eprivate.h> /*error handling */
-#include <H5Fprivate.h> /*file access */
+#include <H5Fpkg.h> /*file access */
#include <H5FLprivate.h> /*Free Lists */
#include <H5HLprivate.h> /*self */
#include <H5MFprivate.h> /*file memory management */
@@ -239,11 +241,11 @@ H5HL_load(H5F_t *f, haddr_t addr, const void UNUSED *udata1,
p += 4;
/* heap data size */
- H5F_decode_length(f, p, heap->disk_alloc);
+ H5F_DECODE_LENGTH(f, p, heap->disk_alloc);
heap->mem_alloc = heap->disk_alloc;
/* free list head */
- H5F_decode_length(f, p, free_block);
+ H5F_DECODE_LENGTH(f, p, free_block);
if (free_block != H5HL_FREE_NULL && free_block >= heap->disk_alloc) {
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL,
"bad heap free list");
@@ -281,8 +283,8 @@ H5HL_load(H5F_t *f, haddr_t addr, const void UNUSED *udata1,
if (!heap->freelist) heap->freelist = fl;
p = heap->chunk + H5HL_SIZEOF_HDR(f) + free_block;
- H5F_decode_length(f, p, free_block);
- H5F_decode_length(f, p, fl->size);
+ H5F_DECODE_LENGTH(f, p, free_block);
+ H5F_DECODE_LENGTH(f, p, fl->size);
if (fl->offset + fl->size > heap->disk_alloc) {
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL,
@@ -366,8 +368,8 @@ H5HL_flush(H5F_t *f, hbool_t destroy, haddr_t addr, H5HL_t *heap)
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
- H5F_encode_length(f, p, heap->mem_alloc);
- H5F_encode_length(f, p, fl ? fl->offset : H5HL_FREE_NULL);
+ H5F_ENCODE_LENGTH(f, p, heap->mem_alloc);
+ H5F_ENCODE_LENGTH(f, p, fl ? fl->offset : H5HL_FREE_NULL);
H5F_addr_encode(f, &p, heap->addr);
/*
@@ -377,11 +379,11 @@ H5HL_flush(H5F_t *f, hbool_t destroy, haddr_t addr, H5HL_t *heap)
assert (fl->offset == H5HL_ALIGN (fl->offset));
p = heap->chunk + H5HL_SIZEOF_HDR(f) + fl->offset;
if (fl->next) {
- H5F_encode_length(f, p, fl->next->offset);
+ H5F_ENCODE_LENGTH(f, p, fl->next->offset);
} else {
- H5F_encode_length(f, p, H5HL_FREE_NULL);
+ H5F_ENCODE_LENGTH(f, p, H5HL_FREE_NULL);
}
- H5F_encode_length(f, p, fl->size);
+ H5F_ENCODE_LENGTH(f, p, fl->size);
fl = fl->next;
}