summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h
index f919491..cc9274f 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -313,6 +313,9 @@
/* (from: http://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2) */
# define POWER_OF_TWO(n) (!(n & (n - 1)) && n)
+/* Raise an integer to a power of 2 */
+# define H5_EXP2(n) (1 << (n))
+
/*
* HDF Boolean type.
*/
@@ -645,6 +648,9 @@ typedef struct {
#ifndef HDexp
#define HDexp(X) exp(X)
#endif /* HDexp */
+#ifndef HDexp2
+ #define HDexp2(X) exp2(X)
+#endif /* HDexp2 */
#ifndef HDfabs
#define HDfabs(X) fabs(X)
#endif /* HDfabs */