[libclc] r211496 - Protect functions taking double by #ifdef cl_khr_fp64
Jeroen Ketema
j.ketema at imperial.ac.uk
Mon Jun 23 07:15:40 PDT 2014
Author: jketema
Date: Mon Jun 23 09:15:39 2014
New Revision: 211496
URL: http://llvm.org/viewvc/llvm-project?rev=211496&view=rev
Log:
Protect functions taking double by #ifdef cl_khr_fp64
Also change the order of the functions to be consistent with
the order in the header files.
Modified:
libclc/trunk/generic/lib/math/binary_impl.inc
Modified: libclc/trunk/generic/lib/math/binary_impl.inc
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/binary_impl.inc?rev=211496&r1=211495&r2=211496&view=diff
==============================================================================
--- libclc/trunk/generic/lib/math/binary_impl.inc (original)
+++ libclc/trunk/generic/lib/math/binary_impl.inc Mon Jun 23 09:15:39 2014
@@ -7,12 +7,16 @@ _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUN
#endif
-_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, double y) {
+_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, float y) {
__CLC_GENTYPE vec_y = (__CLC_GENTYPE) (y);
return FUNCTION_IMPL(x, vec_y);
}
-_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, float y) {
+#ifdef cl_khr_fp64
+
+_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, double y) {
__CLC_GENTYPE vec_y = (__CLC_GENTYPE) (y);
return FUNCTION_IMPL(x, vec_y);
}
+
+#endif
More information about the cfe-commits
mailing list