[libclc] r236941 - math: limit half_sqrt to single precision
Jan Vesely
jan.vesely at rutgers.edu
Sat May 9 15:31:04 PDT 2015
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 <jan.vesely at rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
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
More information about the cfe-commits
mailing list