4 #include "types/simple.h"
5 #include "../gmx_blas.h"
8 F77_FUNC(ssymv,SSYMV)(const char *uplo,
19 const char ch=toupper(*uplo);
20 int kx,ky,i,j,ix,iy,jx,jy;
27 float alpha = *alpha__;
30 if(n<=0 || incx==0 || incy==0)
36 kx = 1 - (n -1)*(incx);
41 ky = 1 - (n -1)*(incy);
43 if(fabs(beta-1.0)>GMX_FLOAT_EPS) {
45 if(fabs(beta)<GMX_FLOAT_MIN)
54 if(fabs(beta)<GMX_FLOAT_MIN)
67 if(fabs(alpha)<GMX_FLOAT_MIN)
71 if(incx==1 && incy==1) {
73 temp1 = alpha * x[j-1];
76 y[i-1] += temp1*a[(j-1)*(lda)+(i-1)];
77 temp2 += a[(j-1)*(lda)+(i-1)] * x[i-1];
79 y[j-1] += temp1*a[(j-1)*(lda)+(j-1)] + alpha *temp2;
86 temp1 = alpha * x[jx-1];
91 y[iy-1] += temp1 * a[(j-1)*(lda)+(i-1)];
92 temp2 += a[(j-1)*(lda)+(i-1)] * x[ix-1];
96 y[jy-1] += temp1*a[(j-1)*(lda)+(j-1)] + alpha*temp2;
103 if(incx==1 && incy==1) {
105 temp1 = alpha * x[j-1];
107 y[j-1] += temp1 * a[(j-1)*(lda)+(j-1)];
108 for(i=j+1;i<=n;i++) {
109 y[i-1] += temp1*a[(j-1)*(lda)+(i-1)];
110 temp2 += a[(j-1)*(lda)+(i-1)] * x[i-1];
112 y[j-1] += alpha *temp2;
119 temp1 = alpha * x[jx-1];
121 y[jy-1] += temp1 * a[(j-1)*(lda)+(j-1)];
124 for(i=j+1;i<=n;i++) {
127 y[iy-1] += temp1 * a[(j-1)*(lda)+(i-1)];
128 temp2 += a[(j-1)*(lda)+(i-1)] * x[ix-1];
130 y[jy-1] += alpha*temp2;