summaryrefslogtreecommitdiffstats
path: root/libclc/generic/lib/math/math.h
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-10-07 20:22:42 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-10-07 20:22:42 +0000
commitbf9f76fbe0fb8b8af3377d2c6ce7d7cc290894ad (patch)
treeb3d92821d2860b0893abe8e8e6148730f1e58eb4 /libclc/generic/lib/math/math.h
parent64d491e488f1aabd862bc787b9cab6c64fc9d04b (diff)
downloadbcm5719-llvm-bf9f76fbe0fb8b8af3377d2c6ce7d7cc290894ad.tar.gz
bcm5719-llvm-bf9f76fbe0fb8b8af3377d2c6ce7d7cc290894ad.zip
Implement log1p builtin
llvm-svn: 219230
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