optimized sgemv_t_4.c for uneven sizes

This commit is contained in:
wernsaar 2014-08-31 14:33:15 +02:00
parent 848c0f16f7
commit bc99faef1b
1 changed files with 12 additions and 16 deletions

View File

@ -273,28 +273,24 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *a, BLASLO
} }
if ( m3 == 0 ) return(0); if ( m3 == 0 ) return(0);
xbuffer = buffer;
x_ptr = x; x_ptr = x;
a_ptr = a;
for ( i=0; i< m3; i++ ) for ( i=0; i< m3; i++ )
{ {
xbuffer[i] = *x_ptr; FLOAT xtemp = *x_ptr * alpha;
x_ptr += inc_x; FLOAT *aj = a_ptr;
} y_ptr = y;
j=0; for ( j=0; j<n; j++ )
a_ptr = a;
y_ptr = y;
while ( j < n)
{
FLOAT temp = 0.0;
for( i = 0; i < m3; i++ )
{ {
temp += a_ptr[i] * xbuffer[i]; *y_ptr += *aj * xtemp;
y_ptr += inc_y;
aj += lda;
} }
a_ptr += lda; x_ptr += inc_x;
y_ptr[0] += alpha * temp; a_ptr++ ;
y_ptr += inc_y;
j++;
} }
return(0); return(0);
} }