Skip to content

Commit 7d407ca

Browse files
committed
Revert merge of dot.c due to test failures
1 parent e875a9c commit 7d407ca

File tree

6 files changed

+67
-9
lines changed

6 files changed

+67
-9
lines changed

kernel/mips/KERNEL.P5600

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ DDOTKERNEL = ../mips/ddot_msa.c
4040
CDOTKERNEL = ../mips/cdot_msa.c
4141
ZDOTKERNEL = ../mips/zdot_msa.c
4242
else
43-
SDOTKERNEL = ../arm/dot.c
44-
DDOTKERNEL = ../arm/dot.c
43+
SDOTKERNEL = ../mips/dot.c
44+
DDOTKERNEL = ../mips/dot.c
4545
CDOTKERNEL = ../arm/zdot.c
4646
ZDOTKERNEL = ../arm/zdot.c
4747
endif

kernel/mips/KERNEL.generic

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ DCOPYKERNEL = ../arm/copy.c
105105
CCOPYKERNEL = ../arm/zcopy.c
106106
ZCOPYKERNEL = ../arm/zcopy.c
107107

108-
SDOTKERNEL = ../arm/dot.c
109-
DDOTKERNEL = ../arm/dot.c
108+
SDOTKERNEL = ../mips/dot.c
109+
DDOTKERNEL = ../mips/dot.c
110110
CDOTKERNEL = ../arm/zdot.c
111111
ZDOTKERNEL = ../arm/zdot.c
112112

kernel/mips/dot.c

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/***************************************************************************
2+
Copyright (c) 2016, The OpenBLAS Project
3+
All rights reserved.
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are
6+
met:
7+
1. Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
2. Redistributions in binary form must reproduce the above copyright
10+
notice, this list of conditions and the following disclaimer in
11+
the documentation and/or other materials provided with the
12+
distribution.
13+
3. Neither the name of the OpenBLAS project nor the names of
14+
its contributors may be used to endorse or promote products
15+
derived from this software without specific prior written permission.
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19+
ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
20+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
25+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26+
*****************************************************************************/
27+
28+
#include "common.h"
29+
30+
#if defined(DSDOT)
31+
double CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
32+
#else
33+
FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
34+
#endif
35+
{
36+
BLASLONG i=0;
37+
BLASLONG ix=0,iy=0;
38+
double dot = 0.0 ;
39+
40+
if ( n < 0 ) return(dot);
41+
42+
while(i < n)
43+
{
44+
#if defined(DSDOT)
45+
dot += (double)y[iy] * (double)x[ix] ;
46+
#else
47+
dot += y[iy] * x[ix];
48+
#endif
49+
ix += inc_x ;
50+
iy += inc_y ;
51+
i++ ;
52+
53+
}
54+
return(dot);
55+
56+
}
57+
58+

kernel/mips64/KERNEL.LOONGSON3R3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ ZTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
6363
ZTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
6464
ZTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
6565

66-
DSDOTKERNEL = ../arm/dot.c
66+
DSDOTKERNEL = ../mips/dot.c

kernel/mips64/KERNEL.MIPS64_GENERIC

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ DCOPYKERNEL = ../arm/copy.c
105105
CCOPYKERNEL = ../arm/zcopy.c
106106
ZCOPYKERNEL = ../arm/zcopy.c
107107

108-
SDOTKERNEL = ../arm/dot.c
109-
DDOTKERNEL = ../arm/dot.c
108+
SDOTKERNEL = ../mips/dot.c
109+
DDOTKERNEL = ../mips/dot.c
110110
CDOTKERNEL = ../arm/zdot.c
111111
ZDOTKERNEL = ../arm/zdot.c
112112

kernel/mips64/KERNEL.generic

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ DCOPYKERNEL = ../arm/copy.c
105105
CCOPYKERNEL = ../arm/zcopy.c
106106
ZCOPYKERNEL = ../arm/zcopy.c
107107

108-
SDOTKERNEL = ../arm/dot.c
109-
DDOTKERNEL = ../arm/dot.c
108+
SDOTKERNEL = ../mips/dot.c
109+
DDOTKERNEL = ../mips/dot.c
110110
CDOTKERNEL = ../arm/zdot.c
111111
ZDOTKERNEL = ../arm/zdot.c
112112

0 commit comments

Comments
 (0)