[libclc] 158/291: Fix isnan definition for vector results

Andreas Beckmann anbe at moszumanska.debian.org
Tue Sep 8 10:53:44 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 ad77ffae2dfbbb44f91ba1926791407df1084c1d
Author: Aaron Watry <awatry at gmail.com>
Date:   Thu Jul 17 22:05:22 2014 +0000

    Fix isnan definition for vector results
    
    Vector true is -1, not 1, which means we need to use the relational unary
    macro instead of the normal unary builtin one.
    
    Signed-off-by: Aaron Watry <awatry at gmail.com>
    Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@213316 91177308-0d34-0410-b5e6-96231b3b80d8
---
 generic/lib/relational/isnan.cl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/generic/lib/relational/isnan.cl b/generic/lib/relational/isnan.cl
index ab5d58a..f82dc5d 100644
--- a/generic/lib/relational/isnan.cl
+++ b/generic/lib/relational/isnan.cl
@@ -1,7 +1,7 @@
 #include <clc/clc.h>
-#include "../clcmacro.h"
+#include "relational.h"
 
-_CLC_DEFINE_UNARY_BUILTIN(int, isnan, __builtin_isnan, float)
+_CLC_DEFINE_RELATIONAL_UNARY(int, isnan, __builtin_isnan, float)
 
 #ifdef cl_khr_fp64
 
@@ -13,6 +13,6 @@ _CLC_DEF _CLC_OVERLOAD int isnan(double x) {
   return __builtin_isnan(x);
 }
 
-_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, long, isnan, double)
+_CLC_DEFINE_RELATIONAL_UNARY_VEC_ALL(long, isnan, double)
 
 #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