Move unary_instrinsic.inc to private headers.
authorJan Vesely <jan.vesely@rutgers.edu>
Wed, 13 Mar 2019 07:06:19 +0000 (07:06 +0000)
committerJan Vesely <jan.vesely@rutgers.edu>
Wed, 13 Mar 2019 07:06:19 +0000 (07:06 +0000)
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356021

libclc/generic/include/clc/math/unary_intrin.inc [deleted file]
libclc/generic/include/math/unary_intrin.inc [new file with mode: 0644]
libclc/generic/lib/math/ceil.cl
libclc/generic/lib/math/clc_sqrt.cl
libclc/generic/lib/math/fabs.cl
libclc/generic/lib/math/floor.cl
libclc/generic/lib/math/native_unary_intrinsic.inc
libclc/generic/lib/math/rint.cl
libclc/generic/lib/math/round.cl
libclc/generic/lib/math/trunc.cl

diff --git a/libclc/generic/include/clc/math/unary_intrin.inc b/libclc/generic/include/clc/math/unary_intrin.inc
deleted file mode 100644 (file)
index 532bb1f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-_CLC_OVERLOAD float __CLC_FUNCTION(float f) __asm(__CLC_INTRINSIC ".f32");
-_CLC_OVERLOAD float2 __CLC_FUNCTION(float2 f) __asm(__CLC_INTRINSIC ".v2f32");
-_CLC_OVERLOAD float3 __CLC_FUNCTION(float3 f) __asm(__CLC_INTRINSIC ".v3f32");
-_CLC_OVERLOAD float4 __CLC_FUNCTION(float4 f) __asm(__CLC_INTRINSIC ".v4f32");
-_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");
-_CLC_OVERLOAD double4 __CLC_FUNCTION(double4 d) __asm(__CLC_INTRINSIC ".v4f64");
-_CLC_OVERLOAD double8 __CLC_FUNCTION(double8 d) __asm(__CLC_INTRINSIC ".v8f64");
-_CLC_OVERLOAD double16 __CLC_FUNCTION(double16 d) __asm(__CLC_INTRINSIC ".v16f64");
-#endif
-
-#ifdef cl_khr_fp16
-#pragma OPENCL EXTENSION cl_khr_fp16: enable
-_CLC_OVERLOAD half __CLC_FUNCTION(half d) __asm(__CLC_INTRINSIC ".f16");
-_CLC_OVERLOAD half2 __CLC_FUNCTION(half2 d) __asm(__CLC_INTRINSIC ".v2f16");
-_CLC_OVERLOAD half3 __CLC_FUNCTION(half3 d) __asm(__CLC_INTRINSIC ".v3f16");
-_CLC_OVERLOAD half4 __CLC_FUNCTION(half4 d) __asm(__CLC_INTRINSIC ".v4f16");
-_CLC_OVERLOAD half8 __CLC_FUNCTION(half8 d) __asm(__CLC_INTRINSIC ".v8f16");
-_CLC_OVERLOAD half16 __CLC_FUNCTION(half16 d) __asm(__CLC_INTRINSIC ".v16f16");
-#endif
-
-#undef __CLC_FUNCTION
-#undef __CLC_INTRINSIC
diff --git a/libclc/generic/include/math/unary_intrin.inc b/libclc/generic/include/math/unary_intrin.inc
new file mode 100644 (file)
index 0000000..532bb1f
--- /dev/null
@@ -0,0 +1,29 @@
+_CLC_OVERLOAD float __CLC_FUNCTION(float f) __asm(__CLC_INTRINSIC ".f32");
+_CLC_OVERLOAD float2 __CLC_FUNCTION(float2 f) __asm(__CLC_INTRINSIC ".v2f32");
+_CLC_OVERLOAD float3 __CLC_FUNCTION(float3 f) __asm(__CLC_INTRINSIC ".v3f32");
+_CLC_OVERLOAD float4 __CLC_FUNCTION(float4 f) __asm(__CLC_INTRINSIC ".v4f32");
+_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");
+_CLC_OVERLOAD double4 __CLC_FUNCTION(double4 d) __asm(__CLC_INTRINSIC ".v4f64");
+_CLC_OVERLOAD double8 __CLC_FUNCTION(double8 d) __asm(__CLC_INTRINSIC ".v8f64");
+_CLC_OVERLOAD double16 __CLC_FUNCTION(double16 d) __asm(__CLC_INTRINSIC ".v16f64");
+#endif
+
+#ifdef cl_khr_fp16
+#pragma OPENCL EXTENSION cl_khr_fp16: enable
+_CLC_OVERLOAD half __CLC_FUNCTION(half d) __asm(__CLC_INTRINSIC ".f16");
+_CLC_OVERLOAD half2 __CLC_FUNCTION(half2 d) __asm(__CLC_INTRINSIC ".v2f16");
+_CLC_OVERLOAD half3 __CLC_FUNCTION(half3 d) __asm(__CLC_INTRINSIC ".v3f16");
+_CLC_OVERLOAD half4 __CLC_FUNCTION(half4 d) __asm(__CLC_INTRINSIC ".v4f16");
+_CLC_OVERLOAD half8 __CLC_FUNCTION(half8 d) __asm(__CLC_INTRINSIC ".v8f16");
+_CLC_OVERLOAD half16 __CLC_FUNCTION(half16 d) __asm(__CLC_INTRINSIC ".v16f16");
+#endif
+
+#undef __CLC_FUNCTION
+#undef __CLC_INTRINSIC
index 3402f6fa8a9a00bc01d546782cdc17ed50cc4a8a..9f7154c6e6e477af7741473ae522f71089cec22b 100644 (file)
@@ -4,7 +4,7 @@
 // Map the llvm intrinsic to an OpenCL function.
 #define __CLC_FUNCTION __clc_ceil
 #define __CLC_INTRINSIC "llvm.ceil"
-#include <clc/math/unary_intrin.inc>
+#include "math/unary_intrin.inc"
 
 #undef __CLC_FUNCTION
 #define __CLC_FUNCTION ceil
index 92c7f6e73b11ee7dadc3403e245a9db17324053c..14a48aa82f23e57f6fd9e736cd40ff16221d87ce 100644 (file)
@@ -25,7 +25,7 @@
 // Map the llvm sqrt intrinsic to an OpenCL function.
 #define __CLC_FUNCTION __clc_llvm_intr_sqrt
 #define __CLC_INTRINSIC "llvm.sqrt"
-#include <clc/math/unary_intrin.inc>
+#include <math/unary_intrin.inc>
 #undef __CLC_FUNCTION
 #undef __CLC_INTRINSIC
 
index 9f740c7d7501e62f94f232bb6bce2bfff69a5c5e..0a7037088b2e7f670f7a8c7f0010cd6dfe16fc43 100644 (file)
@@ -4,7 +4,7 @@
 // Map the llvm intrinsic to an OpenCL function.
 #define __CLC_FUNCTION __clc_fabs
 #define __CLC_INTRINSIC "llvm.fabs"
-#include <clc/math/unary_intrin.inc>
+#include "math/unary_intrin.inc"
 
 #undef __CLC_FUNCTION
 #define __CLC_FUNCTION fabs
index 333707cc10a1f38a933c59a922fa227892894008..de215e437474b167bb629165e35f9dfda9c69de7 100644 (file)
@@ -4,7 +4,7 @@
 // Map the llvm intrinsic to an OpenCL function.
 #define __CLC_FUNCTION __clc_floor
 #define __CLC_INTRINSIC "llvm.floor"
-#include <clc/math/unary_intrin.inc>
+#include "math/unary_intrin.inc"
 
 #undef __CLC_FUNCTION
 #define __CLC_FUNCTION floor
index dbea2882a128ecf9976572e42afd6adc182f7155..5640141ed61936d949e08415c38b3937236fe6b9 100644 (file)
@@ -27,7 +27,7 @@
 #define __CLC_INTRINSIC "llvm." __CLC_XSTR(__CLC_NATIVE_INTRINSIC)
 
 #undef cl_khr_fp64
-#include <clc/math/unary_intrin.inc>
+#include <math/unary_intrin.inc>
 
 #endif
 
index eb0a209297e06920269addf808b77db6d3b20d79..5d9f4b119af85e68d37a526ee212e15b8f59e3bc 100644 (file)
@@ -3,7 +3,7 @@
 // Map the llvm intrinsic to an OpenCL function.
 #define __CLC_FUNCTION __clc_rint
 #define __CLC_INTRINSIC "llvm.rint"
-#include <clc/math/unary_intrin.inc>
+#include "math/unary_intrin.inc"
 
 #undef __CLC_FUNCTION
 #define __CLC_FUNCTION rint
index 285328aaa5d563e95aee44dfe352ca2aaf811aa7..17c72c985fef97d7c40b1e4220006e9b07a290aa 100644 (file)
@@ -3,7 +3,7 @@
 // Map the llvm intrinsic to an OpenCL function.
 #define __CLC_FUNCTION __clc_round
 #define __CLC_INTRINSIC "llvm.round"
-#include <clc/math/unary_intrin.inc>
+#include "math/unary_intrin.inc"
 
 #undef __CLC_FUNCTION
 #define __CLC_FUNCTION round
index 930bf78d234c4e6e1d347a47eef8156a5c474f27..62c7b18bdaa704ffc7e3b0e09c9122660fa6ed3f 100644 (file)
@@ -3,7 +3,7 @@
 // Map the llvm intrinsic to an OpenCL function.
 #define __CLC_FUNCTION __clc_trunc
 #define __CLC_INTRINSIC "llvm.trunc"
-#include <clc/math/unary_intrin.inc>
+#include "math/unary_intrin.inc"
 
 #undef __CLC_FUNCTION
 #define __CLC_FUNCTION trunc