summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2018-03-06 17:48:35 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2018-03-06 17:48:35 +0000
commitdbaf6d0f7ce8d4f590e0ec929726b3085ffc1799 (patch)
tree56a2ea9d06b1e4cb88dd63163d53700acb828370 /libclc/generic/include
parent1d6c6ee1cf98d260b486242b288a9d8fa0e4e7e1 (diff)
downloadbcm5719-llvm-dbaf6d0f7ce8d4f590e0ec929726b3085ffc1799.tar.gz
bcm5719-llvm-dbaf6d0f7ce8d4f590e0ec929726b3085ffc1799.zip
Move cl_khr_fp64 exntension enablement to gentype include lists
This will make adding cl_khr_fp16 support easier Reviewed-by: Aaron Watry <awatry@gmail.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 326816
Diffstat (limited to 'libclc/generic/include')
-rw-r--r--libclc/generic/include/clc/async/gentype.inc3
-rw-r--r--libclc/generic/include/clc/geometric/floatn.inc1
-rw-r--r--libclc/generic/include/clc/math/binary_intrin.inc1
-rw-r--r--libclc/generic/include/clc/math/ternary_intrin.inc1
-rw-r--r--libclc/generic/include/clc/math/unary_intrin.inc1
5 files changed, 7 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/async/gentype.inc b/libclc/generic/include/clc/async/gentype.inc
index 6b79acdff17..c08bb6fa6eb 100644
--- a/libclc/generic/include/clc/async/gentype.inc
+++ b/libclc/generic/include/clc/async/gentype.inc
@@ -180,6 +180,7 @@
#undef __CLC_GENTYPE
#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#define __CLC_GENTYPE double
#include __CLC_BODY
@@ -202,3 +203,5 @@
#undef __CLC_GENTYPE
#endif
+
+#undef __CLC_BODY
diff --git a/libclc/generic/include/clc/geometric/floatn.inc b/libclc/generic/include/clc/geometric/floatn.inc
index fe5fba69ab4..f1ec38cc3c1 100644
--- a/libclc/generic/include/clc/geometric/floatn.inc
+++ b/libclc/generic/include/clc/geometric/floatn.inc
@@ -24,6 +24,7 @@
#ifndef __FLOAT_ONLY
#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#define __CLC_FLOAT double
#define __CLC_FPSIZE 64
diff --git a/libclc/generic/include/clc/math/binary_intrin.inc b/libclc/generic/include/clc/math/binary_intrin.inc
index cfbe74159ec..dd4440af124 100644
--- a/libclc/generic/include/clc/math/binary_intrin.inc
+++ b/libclc/generic/include/clc/math/binary_intrin.inc
@@ -6,6 +6,7 @@ _CLC_OVERLOAD float8 __CLC_FUNCTION(float8, float8) __asm(__CLC_INTRINSIC ".v8f3
_CLC_OVERLOAD float16 __CLC_FUNCTION(float16, float16) __asm(__CLC_INTRINSIC ".v16f32");
#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
_CLC_OVERLOAD double __CLC_FUNCTION(double, double) __asm(__CLC_INTRINSIC ".f64");
_CLC_OVERLOAD double2 __CLC_FUNCTION(double2, double2) __asm(__CLC_INTRINSIC ".v2f64");
_CLC_OVERLOAD double3 __CLC_FUNCTION(double3, double3) __asm(__CLC_INTRINSIC ".v3f64");
diff --git a/libclc/generic/include/clc/math/ternary_intrin.inc b/libclc/generic/include/clc/math/ternary_intrin.inc
index 9633696ed9c..58ce36b0ed8 100644
--- a/libclc/generic/include/clc/math/ternary_intrin.inc
+++ b/libclc/generic/include/clc/math/ternary_intrin.inc
@@ -6,6 +6,7 @@ _CLC_OVERLOAD float8 __CLC_FUNCTION(float8, float8, float8) __asm(__CLC_INTRINSI
_CLC_OVERLOAD float16 __CLC_FUNCTION(float16, float16, float16) __asm(__CLC_INTRINSIC ".v16f32");
#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
_CLC_OVERLOAD double __CLC_FUNCTION(double, double, double) __asm(__CLC_INTRINSIC ".f64");
_CLC_OVERLOAD double2 __CLC_FUNCTION(double2, double2, double2) __asm(__CLC_INTRINSIC ".v2f64");
_CLC_OVERLOAD double3 __CLC_FUNCTION(double3, double3, double3) __asm(__CLC_INTRINSIC ".v3f64");
diff --git a/libclc/generic/include/clc/math/unary_intrin.inc b/libclc/generic/include/clc/math/unary_intrin.inc
index 8c62d8827fe..8e42109d938 100644
--- a/libclc/generic/include/clc/math/unary_intrin.inc
+++ b/libclc/generic/include/clc/math/unary_intrin.inc
@@ -6,6 +6,7 @@ _CLC_OVERLOAD float8 __CLC_FUNCTION(float8 f) __asm(__CLC_INTRINSIC ".v8f32");
_CLC_OVERLOAD float16 __CLC_FUNCTION(float16 f) __asm(__CLC_INTRINSIC ".v16f32");
#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
_CLC_OVERLOAD double __CLC_FUNCTION(double d) __asm(__CLC_INTRINSIC ".f64");
_CLC_OVERLOAD double2 __CLC_FUNCTION(double2 d) __asm(__CLC_INTRINSIC ".v2f64");
_CLC_OVERLOAD double3 __CLC_FUNCTION(double3 d) __asm(__CLC_INTRINSIC ".v3f64");
OpenPOWER on IntegriCloud