summaryrefslogtreecommitdiffstats
path: root/src/H5VMprivate.h
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-21 16:57:33 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-21 16:57:33 (GMT)
commit11b19627b9ac9a97af2970dac92e378baeb9fc1e (patch)
tree78988ac90fce00ca5270c93d47a7d5235e97efe5 /src/H5VMprivate.h
parent6813b25007280afa9b8bec13c19c134029acd26c (diff)
parentb32caab787236a72c25dcb1c895c32da8832deab (diff)
downloadhdf5-11b19627b9ac9a97af2970dac92e378baeb9fc1e.zip
hdf5-11b19627b9ac9a97af2970dac92e378baeb9fc1e.tar.gz
hdf5-11b19627b9ac9a97af2970dac92e378baeb9fc1e.tar.bz2
[svn-r26867] svn merge -r26837:26866 https://svn.hdfgroup.uiuc.edu/hdf5/trunk
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