Author: jvesely
Date: Sat May  9 17:31:03 2015
New Revision: 236941

URL: http://llvm.org/viewvc/llvm-project?rev=236941&view=rev
Log:
math: limit half_sqrt to single precision

Signed-off-by: Jan Vesely <[email protected]>
Reviewed-by: Tom Stellard <[email protected]>

Modified:
    libclc/trunk/generic/include/clc/math/half_sqrt.h
    libclc/trunk/generic/lib/math/half_sqrt.cl

Modified: libclc/trunk/generic/include/clc/math/half_sqrt.h
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/half_sqrt.h?rev=236941&r1=236940&r2=236941&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/math/half_sqrt.h (original)
+++ libclc/trunk/generic/include/clc/math/half_sqrt.h Sat May  9 17:31:03 2015
@@ -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

Modified: libclc/trunk/generic/lib/math/half_sqrt.cl
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/half_sqrt.cl?rev=236941&r1=236940&r2=236941&view=diff
==============================================================================
--- libclc/trunk/generic/lib/math/half_sqrt.cl (original)
+++ libclc/trunk/generic/lib/math/half_sqrt.cl Sat May  9 17:31:03 2015
@@ -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


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to