From: Zhang Xianyi Date: Wed, 6 Apr 2016 17:44:18 +0000 (+0800) Subject: Refs xianyi/OpenBLAS-CI#10 , Fix sdot for scipy test_iterative.test_convergence test... X-Git-Tag: v0.2.18^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4380c1fe4b9c292092145f85bcd70a2728581d2;p=platform%2Fupstream%2Fopenblas.git Refs xianyi/OpenBLAS-CI#10 , Fix sdot for scipy test_iterative.test_convergence test failure on AMD bulldozer and piledriver. --- diff --git a/kernel/x86_64/sdot.c b/kernel/x86_64/sdot.c index a6da1fe..a3d20d2 100644 --- a/kernel/x86_64/sdot.c +++ b/kernel/x86_64/sdot.c @@ -72,18 +72,20 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) { BLASLONG i=0; BLASLONG ix=0,iy=0; + double dot = 0.0 ; - FLOAT dot = 0.0 ; + FLOAT mydot=0.0; + BLASLONG n1; if ( n <= 0 ) return(dot); if ( (inc_x == 1) && (inc_y == 1) ) { - BLASLONG n1 = n & -32; + n1 = n & (BLASLONG)(-32); if ( n1 ) - sdot_kernel_16(n1, x, y , &dot ); + sdot_kernel_16(n1, x, y , &mydot ); i = n1; @@ -94,12 +96,13 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) i++ ; } + dot+=mydot; return(dot); } - BLASLONG n1 = n & -2; + n1 = n & (BLASLONG)(-2); while(i < n1) { @@ -124,4 +127,3 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) } -