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;
for ( i=0; i< m3; i++ )
{
xbuffer[i] = *x_ptr;
x_ptr += inc_x;
}
j=0;
a_ptr = a; a_ptr = a;
y_ptr = y;
while ( j < n)
{
FLOAT temp = 0.0;
for ( i=0; i< m3; i++ ) for ( i=0; i< m3; i++ )
{ {
temp += a_ptr[i] * xbuffer[i]; FLOAT xtemp = *x_ptr * alpha;
} FLOAT *aj = a_ptr;
a_ptr += lda; y_ptr = y;
y_ptr[0] += alpha * temp; for ( j=0; j<n; j++ )
{
*y_ptr += *aj * xtemp;
y_ptr += inc_y; y_ptr += inc_y;
j++; aj += lda;
} }
x_ptr += inc_x;
a_ptr++ ;
}
return(0); return(0);
} }