math: limit half_sqrt to single precision
authorJan Vesely <jan.vesely@rutgers.edu>
Sat, 9 May 2015 22:31:03 +0000 (22:31 +0000)
committerJan Vesely <jan.vesely@rutgers.edu>
Sat, 9 May 2015 22:31:03 +0000 (22:31 +0000)
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 236941

libclc/generic/include/clc/math/half_sqrt.h
libclc/generic/lib/math/half_sqrt.cl

index 5e9c8a9..cec80f5 100644 (file)
@@ -24,8 +24,8 @@
 
 #define __CLC_BODY <clc/math/unary_decl.inc>
 #define __CLC_FUNCTION half_sqrt
-
+#define __FLOAT_ONLY
 #include <clc/math/gentype.inc>
-
+#undef __FLOAT_ONLY
 #undef __CLC_BODY
 #undef __CLC_FUNCTION
index e1716cf..a02896a 100644 (file)
@@ -22,9 +22,7 @@
 
 #include <clc/clc.h>
 
-#ifdef cl_khr_fp64
-#pragma OPENCL EXTENSION cl_khr_fp64 : enable
-#endif
-
 #define __CLC_BODY <half_sqrt.inc>
+#define __FLOAT_ONLY
 #include <clc/math/gentype.inc>
+#undef __FLOAT_ONLY