summaryrefslogtreecommitdiffstats
path: root/src/H5HFdtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5HFdtable.c')
-rw-r--r--src/H5HFdtable.c69
1 files changed, 25 insertions, 44 deletions
diff --git a/src/H5HFdtable.c b/src/H5HFdtable.c
index 6e9429a..4fff348 100644
--- a/src/H5HFdtable.c
+++ b/src/H5HFdtable.c
@@ -15,7 +15,7 @@
*
* Created: H5HFdtable.c
* Apr 10 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Quincey Koziol
*
* Purpose: "Doubling table" routines for fractal heaps.
*
@@ -75,27 +75,26 @@
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_init
+ * Function: H5HF__dtable_init
*
* Purpose: Initialize values for doubling table
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_dtable_init(H5HF_dtable_t *dtable)
+H5HF__dtable_init(H5HF_dtable_t *dtable)
{
hsize_t tmp_block_size; /* Temporary block size */
hsize_t acc_block_off; /* Accumulated block offset */
size_t u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -133,26 +132,25 @@ H5HF_dtable_init(H5HF_dtable_t *dtable)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5HF_dtable_init() */
+} /* end H5HF__dtable_init() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_lookup
+ * Function: H5HF__dtable_lookup
*
* Purpose: Compute the row & col of an offset in a doubling-table
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 6 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, unsigned *col)
+H5HF__dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, unsigned *col)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -160,9 +158,6 @@ H5HF_dtable_lookup(const H5HF_dtable_t *dtable, hsize_t off, unsigned *row, unsi
HDassert(dtable);
HDassert(row);
HDassert(col);
-#ifdef QAK
-HDfprintf(stderr, "%s: off = %Hu\n", "H5HF_dtable_lookup", off);
-#endif /* QAK */
/* Check for offset in first row */
if(off < dtable->num_id_first_row) {
@@ -173,34 +168,30 @@ HDfprintf(stderr, "%s: off = %Hu\n", "H5HF_dtable_lookup", off);
unsigned high_bit = H5VM_log2_gen(off); /* Determine the high bit in the offset */
hsize_t off_mask = ((hsize_t)1) << high_bit; /* Compute mask for determining column */
-#ifdef QAK
-HDfprintf(stderr, "%s: high_bit = %u, off_mask = %Hu\n", "H5HF_dtable_lookup", high_bit, off_mask);
-#endif /* QAK */
*row = (high_bit - dtable->first_row_bits) + 1;
H5_CHECKED_ASSIGN(*col, unsigned, ((off - off_mask) / dtable->row_block_size[*row]), hsize_t);
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_dtable_lookup() */
+} /* end H5HF__dtable_lookup() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_dest
+ * Function: H5HF__dtable_dest
*
* Purpose: Release information for doubling table
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Mar 27 2006
*
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_dtable_dest(H5HF_dtable_t *dtable)
+H5HF__dtable_dest(H5HF_dtable_t *dtable)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -220,28 +211,27 @@ H5HF_dtable_dest(H5HF_dtable_t *dtable)
H5MM_xfree(dtable->row_max_dblock_free);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_dtable_dest() */
+} /* end H5HF__dtable_dest() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_size_to_row
+ * Function: H5HF__dtable_size_to_row
*
* Purpose: Compute row that can hold block of a certain size
*
* Return: Non-negative on success (can't fail)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* Apr 25 2006
*
*-------------------------------------------------------------------------
*/
unsigned
-H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
+H5HF__dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
{
unsigned row = 0; /* Row where block will fit */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -254,28 +244,27 @@ H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
row = (H5VM_log2_of2((uint32_t)block_size) - H5VM_log2_of2((uint32_t)dtable->cparam.start_block_size)) + 1;
FUNC_LEAVE_NOAPI(row)
-} /* end H5HF_dtable_size_to_row() */
+} /* end H5HF__dtable_size_to_row() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_size_to_rows
+ * Function: H5HF__dtable_size_to_rows
*
* Purpose: Compute # of rows of indirect block of a given size
*
* Return: Non-negative on success (can't fail)
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* May 31 2006
*
*-------------------------------------------------------------------------
*/
unsigned
-H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
+H5HF__dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
{
unsigned rows = 0; /* # of rows required for indirect block */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -285,24 +274,23 @@ H5HF_dtable_size_to_rows(const H5HF_dtable_t *dtable, hsize_t size)
rows = (H5VM_log2_gen(size) - dtable->first_row_bits) + 1;
FUNC_LEAVE_NOAPI(rows)
-} /* end H5HF_dtable_size_to_rows() */
+} /* end H5HF__dtable_size_to_rows() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_span_size
+ * Function: H5HF__dtable_span_size
*
* Purpose: Compute the size covered by a span of entries
*
* Return: Non-zero span size on success/zero on failure
*
* Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
* July 25 2006
*
*-------------------------------------------------------------------------
*/
hsize_t
-H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
+H5HF__dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
unsigned start_col, unsigned num_entries)
{
unsigned start_entry; /* Entry for first block covered */
@@ -311,7 +299,7 @@ H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
unsigned end_entry; /* Entry for last block covered */
hsize_t acc_span_size = 0; /* Accumulated span size */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/*
* Check arguments.
@@ -326,10 +314,6 @@ H5HF_dtable_span_size(const H5HF_dtable_t *dtable, unsigned start_row,
end_entry = (start_entry + num_entries) - 1;
end_row = end_entry / dtable->cparam.width;
end_col = end_entry % dtable->cparam.width;
-#ifdef QAK
-HDfprintf(stderr, "%s: start_row = %u, start_col = %u, start_entry = %u\n", "H5HF_sect_indirect_span_size", start_row, start_col, start_entry);
-HDfprintf(stderr, "%s: end_row = %u, end_col = %u, end_entry = %u\n", "H5HF_sect_indirect_span_size", end_row, end_col, end_entry);
-#endif /* QAK */
/* Initialize accumulated span size */
acc_span_size = 0;
@@ -362,9 +346,6 @@ HDfprintf(stderr, "%s: end_row = %u, end_col = %u, end_entry = %u\n", "H5HF_sect
((end_col - start_col) + 1);
} /* end else */
-#ifdef QAK
-HDfprintf(stderr, "%s: acc_span_size = %Hu\n", "H5HF_dtable_span_size", acc_span_size);
-#endif /* QAK */
FUNC_LEAVE_NOAPI(acc_span_size)
-} /* end H5HF_sect_indirect_span_size() */
+} /* end H5HF__dtable_span_size() */