Skip to content

Commit 2ca0faf

Browse files
authored
Merge pull request #1515 from martin-frbg/mipsdot
Correct precision of mips dsdot
2 parents 15c437e + 0fe4345 commit 2ca0faf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

kernel/mips/dot.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
4141

4242
while(i < n)
4343
{
44-
45-
dot += y[iy] * x[ix] ;
44+
#if defined(DSDOT)
45+
dot += (double)(y[iy] * (double)x[ix] ;
46+
#else
47+
dot += y[iy] * x[ix];
48+
#endif
4649
ix += inc_x ;
4750
iy += inc_y ;
4851
i++ ;

0 commit comments

Comments
 (0)