Browse Source

Move a conditionally used variable

tags/v0.3.18
Martin Kroeker GitHub 4 years ago
parent
commit
ef24712030
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      kernel/generic/dot.c

+ 2
- 1
kernel/generic/dot.c View File

@@ -47,7 +47,6 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)

if ( (inc_x == 1) && (inc_y == 1) )
{
int n1 = n & -4;
#if V_SIMD && !defined(DSDOT)
const int vstep = v_nlanes_f32;
const int unrollx4 = n & (-vstep * 4);
@@ -84,6 +83,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
}
dot = v_sum_f32(vsum0);
#elif defined(DSDOT)
int n1 = n & -4;
for (; i < n1; i += 4)
{
dot += (double) y[i] * (double) x[i]
@@ -92,6 +92,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
+ (double) y[i+3] * (double) x[i+3] ;
}
#else
int n1 = n & -4;
for (; i < n1; i += 4)
{
dot += y[i] * x[i]


Loading…
Cancel
Save