summaryrefslogtreecommitdiffstats
path: root/libclc/generic/lib/math/math.h
diff options
context:
space:
mode:
Diffstat (limited to 'libclc/generic/lib/math/math.h')
-rw-r--r--libclc/generic/lib/math/math.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libclc/generic/lib/math/math.h b/libclc/generic/lib/math/math.h
index 53ed38a78a5..f46c7ea7a7d 100644
--- a/libclc/generic/lib/math/math.h
+++ b/libclc/generic/lib/math/math.h
@@ -61,4 +61,30 @@
#define MANTLENGTH_SP32 24
#define BASEDIGITS_SP32 7
+#ifdef cl_khr_fp64
+
+#define SIGNBIT_DP64 0x8000000000000000L
+#define EXSIGNBIT_DP64 0x7fffffffffffffffL
+#define EXPBITS_DP64 0x7ff0000000000000L
+#define MANTBITS_DP64 0x000fffffffffffffL
+#define ONEEXPBITS_DP64 0x3ff0000000000000L
+#define TWOEXPBITS_DP64 0x4000000000000000L
+#define HALFEXPBITS_DP64 0x3fe0000000000000L
+#define IMPBIT_DP64 0x0010000000000000L
+#define QNANBITPATT_DP64 0x7ff8000000000000L
+#define INDEFBITPATT_DP64 0xfff8000000000000L
+#define PINFBITPATT_DP64 0x7ff0000000000000L
+#define NINFBITPATT_DP64 0xfff0000000000000L
+#define EXPBIAS_DP64 1023
+#define EXPSHIFTBITS_DP64 52
+#define BIASEDEMIN_DP64 1
+#define EMIN_DP64 -1022
+#define BIASEDEMAX_DP64 2046 /* 0x7fe */
+#define EMAX_DP64 1023 /* 0x3ff */
+#define LAMBDA_DP64 1.0e300
+#define MANTLENGTH_DP64 53
+#define BASEDIGITS_DP64 15
+
+#endif // cl_khr_fp64
+
#define ALIGNED(x) __attribute__((aligned(x)))
OpenPOWER on IntegriCloud