summaryrefslogtreecommitdiffstats
path: root/src/H5Vprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-06-18 18:20:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-06-18 18:20:31 (GMT)
commit8a75f17670000b64440890e710b2f9053d2ae31e (patch)
tree6b705b544427f7cbb82ed15fda7a121fdb1e6428 /src/H5Vprivate.h
parent3c3a1388df917a17e863a59675e2d4ba4606af15 (diff)
downloadhdf5-8a75f17670000b64440890e710b2f9053d2ae31e.zip
hdf5-8a75f17670000b64440890e710b2f9053d2ae31e.tar.gz
hdf5-8a75f17670000b64440890e710b2f9053d2ae31e.tar.bz2
[svn-r15232] Description:
Bring back revisions 14700:14800 from the trunk Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.5.2 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Vprivate.h')
-rw-r--r--src/H5Vprivate.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h
index 94b3699..b92266c 100644
--- a/src/H5Vprivate.h
+++ b/src/H5Vprivate.h
@@ -410,5 +410,25 @@ H5V_log2_of2(uint32_t n)
return(MultiplyDeBruijnBitPosition[(n * (uint32_t)0x077CB531UL) >> 27]);
} /* H5V_log2_of2() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5V_limit_enc_size
+ *
+ * Purpose: Determine the # of bytes needed to encode values within a
+ * range from 0 to a given limit
+ *
+ * Return: Number of bytes needed
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, March 13, 2008
+ *
+ *-------------------------------------------------------------------------
+ */
+static H5_inline unsigned UNUSED
+H5V_limit_enc_size(uint64_t limit)
+{
+ return (H5V_log2_gen(limit) / 8) + 1;
+} /* end H5V_limit_enc_size() */
+
#endif /* H5Vprivate_H */