summaryrefslogtreecommitdiffstats
path: root/src/H5HFhuge.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-01 16:45:27 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-01 16:45:27 (GMT)
commit71a9d507255366be01c25e458ac4c953d4481f45 (patch)
tree511f2662e8cc85010434af4a64812da147848317 /src/H5HFhuge.c
parent1bc79f977be67f734a44fd237be6f05b5fb25f53 (diff)
downloadhdf5-71a9d507255366be01c25e458ac4c953d4481f45.zip
hdf5-71a9d507255366be01c25e458ac4c953d4481f45.tar.gz
hdf5-71a9d507255366be01c25e458ac4c953d4481f45.tar.bz2
[svn-r17943] Description:
Finish refactoring v2 B-trees so that they can have client callback context provided to the encode/decode callbacks. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5HFhuge.c')
-rw-r--r--src/H5HFhuge.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index 353ceb3..5490c22 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -128,12 +128,12 @@ H5HF_huge_bt2_create(H5HF_hdr_t *hdr, hid_t dxpl_id)
+ hdr->sizeof_size /* Length of object */
+ 4 /* Filter mask for filtered object */
+ hdr->sizeof_size); /* Size of de-filtered object in memory */
- bt2_cparam.cls = H5HF_BT2_FILT_DIR;
+ bt2_cparam.cls = H5HF_HUGE_BT2_FILT_DIR;
} /* end if */
else {
bt2_cparam.rrec_size = (size_t)(hdr->sizeof_addr /* Address of object */
+ hdr->sizeof_size); /* Length of object */
- bt2_cparam.cls = H5HF_BT2_DIR;
+ bt2_cparam.cls = H5HF_HUGE_BT2_DIR;
} /* end else */
} /* end if */
else {
@@ -143,13 +143,13 @@ H5HF_huge_bt2_create(H5HF_hdr_t *hdr, hid_t dxpl_id)
+ 4 /* Filter mask for filtered object */
+ hdr->sizeof_size /* Size of de-filtered object in memory */
+ hdr->sizeof_size); /* Unique ID for object */
- bt2_cparam.cls = H5HF_BT2_FILT_INDIR;
+ bt2_cparam.cls = H5HF_HUGE_BT2_FILT_INDIR;
} /* end if */
else {
bt2_cparam.rrec_size = (size_t)(hdr->sizeof_addr /* Address of object */
+ hdr->sizeof_size /* Length of object */
+ hdr->sizeof_size); /* Unique ID for object */
- bt2_cparam.cls = H5HF_BT2_INDIR;
+ bt2_cparam.cls = H5HF_HUGE_BT2_INDIR;
} /* end else */
} /* end else */
bt2_cparam.node_size = (size_t)H5HF_HUGE_BT2_NODE_SIZE;
@@ -157,7 +157,7 @@ H5HF_huge_bt2_create(H5HF_hdr_t *hdr, hid_t dxpl_id)
bt2_cparam.merge_percent = H5HF_HUGE_BT2_MERGE_PERC;
/* Create v2 B-tree for tracking 'huge' objects */
- if(NULL == (hdr->huge_bt2 = H5B2_create(hdr->f, dxpl_id, &bt2_cparam)))
+ if(NULL == (hdr->huge_bt2 = H5B2_create(hdr->f, dxpl_id, &bt2_cparam, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create v2 B-tree for tracking 'huge' heap objects")
/* Retrieve the v2 B-tree's address in the file */
@@ -339,7 +339,7 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
} /* end else */
@@ -545,7 +545,7 @@ H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
@@ -636,7 +636,7 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
@@ -784,7 +784,7 @@ H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
@@ -914,7 +914,7 @@ H5HF_huge_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
@@ -1037,7 +1037,7 @@ H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id)
/* Delete the v2 B-tree */
/* (any v2 B-tree class will work here) */
- if(H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, NULL, NULL) < 0)
+ if(H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL, NULL) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree")
/* Reset the information about 'huge' objects in the file */
@@ -1105,7 +1105,7 @@ H5HF_huge_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
} /* end else */
/* Delete the v2 B-tree */
- if(H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, op, &udata) < 0)
+ if(H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, op, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree")
done: