Skip to content

Commit 6a5d214

Browse files
committed
Fix dsdot precision for arm/dot.c
1 parent e875a9c commit 6a5d214

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

kernel/arm/dot.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
Copyright (c) 2013, The OpenBLAS Project
2+
Copyright (c) 2013-2026, The OpenBLAS Project
33
All rights reserved.
44
Redistribution and use in source and binary forms, with or without
55
modification, are permitted provided that the following conditions are
@@ -50,8 +50,11 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
5050

5151
while(i < n)
5252
{
53-
54-
dot += y[iy] * x[ix] ;
53+
#if defined(DSDOT)
54+
dot += (double)y[iy] * (double)x[ix] ;
55+
#else
56+
dot += y[iy] * x[ix];
57+
#endif
5558
ix += inc_x ;
5659
iy += inc_y ;
5760
i++ ;

kernel/mips64/KERNEL.LOONGSON3R4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ DDOTKERNEL = ../mips/ddot_msa.c
2121
CDOTKERNEL = ../mips/cdot_msa.c
2222
ZDOTKERNEL = ../mips/zdot_msa.c
2323
endif
24-
DSDOTKERNEL = ../mips/dot.c
24+
DSDOTKERNEL = ../arm/dot.c
2525

2626
ifndef NO_MSA
2727
SROTKERNEL = ../mips/srot_msa.c

0 commit comments

Comments
 (0)