Browse Source

optimized sdot.c for increments != 1

tags/v0.2.15^2
Werner Saar 10 years ago
parent
commit
c22068c406
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      kernel/x86_64/sdot.c

+ 13
- 1
kernel/x86_64/sdot.c View File

@@ -80,7 +80,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
if ( (inc_x == 1) && (inc_y == 1) )
{

int n1 = n & -32;
BLASLONG n1 = n & -32;

if ( n1 )
sdot_kernel_16(n1, x, y , &dot );
@@ -99,6 +99,18 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)

}

BLASLONG n1 = n & -2;

while(i < n1)
{

dot += y[iy] * x[ix] + y[iy+inc_y] * x[ix+inc_x];
ix += inc_x*2 ;
iy += inc_y*2 ;
i+=2 ;

}

while(i < n)
{



Loading…
Cancel
Save