[libclc] 147/291: Protect functions taking double by #ifdef cl_khr_fp64

Andreas Beckmann anbe at moszumanska.debian.org
Tue Sep 8 10:53:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository libclc.

commit e32fc55a06bd04a1bb0e61919b90ec0c58e845ea
Author: Jeroen Ketema <j.ketema at imperial.ac.uk>
Date:   Mon Jun 23 14:15:39 2014 +0000

    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.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@211496 91177308-0d34-0410-b5e6-96231b3b80d8
---
 generic/lib/math/binary_impl.inc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/generic/lib/math/binary_impl.inc b/generic/lib/math/binary_impl.inc
index 83872d2..c9bf972 100644
--- a/generic/lib/math/binary_impl.inc
+++ b/generic/lib/math/binary_impl.inc
@@ -7,12 +7,16 @@ _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE FUNCTION(__CLC_GENTYPE x, __CLC_GENTYPE y)
 
 #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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git



More information about the Pkg-opencl-commits mailing list