summaryrefslogtreecommitdiffstats
path: root/src/H5VMprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-04-19 02:48:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-04-19 02:48:06 (GMT)
commit371a27f01eecd3bdd456d24ee630f5f281fbfb93 (patch)
treead36698ed88a10946f6160a792e0bf5f2d30c161 /src/H5VMprivate.h
parent1eaaae98214d9042e979209e93e31c490efa4d79 (diff)
downloadhdf5-371a27f01eecd3bdd456d24ee630f5f281fbfb93.zip
hdf5-371a27f01eecd3bdd456d24ee630f5f281fbfb93.tar.gz
hdf5-371a27f01eecd3bdd456d24ee630f5f281fbfb93.tar.bz2
[svn-r26843] Description:
Minor code & warning cleanups. Tested on: MacOSX/64 10.10.2 (amazon) w/serial & parallel Linux/32 2.6.18 (jam) w/serial & parallel
Diffstat (limited to 'src/H5VMprivate.h')
-rw-r--r--src/H5VMprivate.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index 20821b2..dbe39ca 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -410,6 +410,29 @@ H5VM_log2_of2(uint32_t n)
/*-------------------------------------------------------------------------
+ * Function: H5VM_power2up
+ *
+ * Purpose: Round up a number to the next power of 2
+ *
+ * Return: Return the number which is a power of 2
+ *
+ * Programmer: Vailin Choi; Nov 2014
+ *
+ *-------------------------------------------------------------------------
+ */
+static H5_inline hsize_t UNUSED
+H5VM_power2up(hsize_t n)
+{
+ hsize_t ret_value = 1; /* Return value */
+
+ while(ret_value < n)
+ ret_value <<= 1;
+
+ return(ret_value);
+} /* H5VM_power2up */
+
+
+/*-------------------------------------------------------------------------
* Function: H5VM_limit_enc_size
*
* Purpose: Determine the # of bytes needed to encode values within a