4 #include <types/simple.h>
8 F77_FUNC(sgemv
,SGEMV
)(const char *trans
,
20 const char ch
=toupper(*trans
);
27 float alpha
= *alpha__
;
33 if(n
<=0 || m
<=0 || (fabs(alpha
)<GMX_FLOAT_MIN
&& fabs(beta
-1.0)<GMX_FLOAT_EPS
))
47 kx
= 1 - (lenx
-1)*(incx
);
52 ky
= 1 - (leny
-1)*(incy
);
54 if(fabs(beta
-1.0)>GMX_FLOAT_EPS
) {
56 if(fabs(beta
)<GMX_FLOAT_MIN
)
65 if(fabs(beta
)<GMX_FLOAT_MIN
)
66 for(i
=0;i
<leny
;i
++,iy
+=incy
)
69 for(i
=0;i
<leny
;i
++,iy
+=incy
)
74 if(fabs(alpha
)<GMX_FLOAT_MIN
)
80 for(j
=1;j
<=n
;j
++,jx
+=incx
)
81 if( fabs(x
[jx
-1])>GMX_FLOAT_MIN
) {
82 temp
= alpha
* x
[jx
-1];
84 y
[i
-1] += temp
* a
[(j
-1)*(lda
)+(i
-1)];
87 /* non-unit y incr. */
88 for(j
=1;j
<=n
;j
++,jx
+=incx
)
89 if( fabs(x
[jx
-1])>GMX_FLOAT_MIN
) {
90 temp
= alpha
* x
[jx
-1];
92 for(i
=1;i
<=m
;i
++,iy
+=incy
)
93 y
[iy
-1] += temp
* a
[(j
-1)*(lda
)+(i
-1)];
100 for(j
=1;j
<=n
;j
++,jy
+=incy
) {
103 temp
+= a
[(j
-1)*(lda
)+(i
-1)] * x
[i
-1];
104 y
[jy
-1] += alpha
* temp
;
107 /* non-unit y incr. */
108 for(j
=1;j
<=n
;j
++,jy
+=incy
) {
111 for(i
=1;i
<=m
;i
++,ix
+=incx
)
112 temp
+= a
[(j
-1)*(lda
)+(i
-1)] * x
[ix
-1];
113 y
[jy
-1] += alpha
* temp
;