summaryrefslogtreecommitdiffstats
path: root/src/H5HFdtable.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-08-06 20:56:04 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2020-08-06 20:56:04 (GMT)
commit07e4ef9da47eda1f23ca72c748fbb6d4b309540b (patch)
tree56917d007a31e919a6ff9055d872dc88bd4e0834 /src/H5HFdtable.c
parent302dfeb11b4bb5d204683dbfd6824586b3863122 (diff)
downloadhdf5-07e4ef9da47eda1f23ca72c748fbb6d4b309540b.zip
hdf5-07e4ef9da47eda1f23ca72c748fbb6d4b309540b.tar.gz
hdf5-07e4ef9da47eda1f23ca72c748fbb6d4b309540b.tar.bz2
Clean up private / package / static namespace issues (function naming, which
header file, FUNC_ENTER / LEAVE, etc). Removed remaining personal email addresses from library source code (still needs cleaned from other directories). Misc. warning, style, and whitespace cleanup.
Diffstat (limited to 'src/H5HFdtable.c')
-rw-r--r--src/H5HFdtable.c81
1 files changed, 31 insertions, 50 deletions
diff --git a/src/H5HFdtable.c b/src/H5HFdtable.c
index 6e9429a..ad317c9 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.
@@ -103,10 +102,10 @@ H5HF_dtable_init(H5HF_dtable_t *dtable)
HDassert(dtable);
/* Compute/cache some values */
- dtable->start_bits = H5VM_log2_of2((uint32_t)dtable->cparam.start_block_size);
- dtable->first_row_bits = dtable->start_bits + H5VM_log2_of2(dtable->cparam.width);
+ dtable->start_bits = H5VM__log2_of2((uint32_t)dtable->cparam.start_block_size);
+ dtable->first_row_bits = dtable->start_bits + H5VM__log2_of2(dtable->cparam.width);
dtable->max_root_rows = (dtable->cparam.max_index - dtable->first_row_bits) + 1;
- dtable->max_direct_bits = H5VM_log2_of2((uint32_t)dtable->cparam.max_direct_size);
+ dtable->max_direct_bits = H5VM__log2_of2((uint32_t)dtable->cparam.max_direct_size);
dtable->max_direct_rows = (dtable->max_direct_bits - dtable->start_bits) + 2;
dtable->num_id_first_row = dtable->cparam.start_block_size * dtable->cparam.width;
dtable->max_dir_blk_off_size = H5HF_SIZEOF_OFFSET_LEN(dtable->cparam.max_direct_size);
@@ -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) {
@@ -170,37 +165,33 @@ HDfprintf(stderr, "%s: off = %Hu\n", "H5HF_dtable_lookup", off);
H5_CHECKED_ASSIGN(*col, unsigned, (off / dtable->cparam.start_block_size), hsize_t);
} /* end if */
else {
- unsigned high_bit = H5VM_log2_gen(off); /* Determine the high bit in the offset */
+ 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.
@@ -251,58 +241,56 @@ H5HF_dtable_size_to_row(const H5HF_dtable_t *dtable, size_t block_size)
if(block_size == dtable->cparam.start_block_size)
row = 0;
else
- row = (H5VM_log2_of2((uint32_t)block_size) - H5VM_log2_of2((uint32_t)dtable->cparam.start_block_size)) + 1;
+ 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.
*/
HDassert(dtable);
- rows = (H5VM_log2_gen(size) - dtable->first_row_bits) + 1;
+ 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() */