[libclc] 29/58: math: Use single precision fmax in sp path

Andreas Boll aboll-guest at moszumanska.debian.org
Thu Oct 6 08:16:31 UTC 2016


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

aboll-guest pushed a commit to branch master
in repository libclc.

commit 8243e979a42c48c6b018995d35e8a371014b59da
Author: Jan Vesely <jan.vesely at rutgers.edu>
Date:   Tue May 17 19:44:01 2016 +0000

    math: Use single precision fmax in sp path
    
    Fixes fdim piglit on Turks
    
    v2: use CL fmax instead of __builtin
    
    Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
    Reviewed-by: Tom Stellard <tom.stellard at amd.com>
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@269807 91177308-0d34-0410-b5e6-96231b3b80d8
---
 generic/lib/math/fdim.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/generic/lib/math/fdim.inc b/generic/lib/math/fdim.inc
index a67c76e..9aa3496 100644
--- a/generic/lib/math/fdim.inc
+++ b/generic/lib/math/fdim.inc
@@ -25,7 +25,7 @@
 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE fdim(__CLC_GENTYPE x, __CLC_GENTYPE y) {
     if (__builtin_isnan(x) || __builtin_isnan(y))
         return as_float(QNANBITPATT_SP32);
-    return __builtin_fmax(x - y, 0);
+    return fmax(x - y, 0.0f);
 }
 #define __CLC_FDIM_VEC(width) \
 _CLC_OVERLOAD _CLC_DEF float##width fdim(float##width x, float##width y) { \

-- 
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