35 #ifndef TEMPLATE_BLAS_SYMV_HEADER
36 #define TEMPLATE_BLAS_SYMV_HEADER
41 const Treal *a,
const integer *lda,
const Treal *x,
const integer *incx,
const Treal
42 *beta, Treal *y,
const integer *incy)
45 integer a_dim1, a_offset, i__1, i__2;
51 #define a_ref(a_1,a_2) a[(a_2)*a_dim1 + a_1]
122 a_offset = 1 + a_dim1 * 1;
134 }
else if (*incx == 0) {
136 }
else if (*incy == 0) {
144 if (*n == 0 || (*alpha == 0. && *beta == 1.) ) {
151 kx = 1 - (*n - 1) * *incx;
156 ky = 1 - (*n - 1) * *incy;
166 for (i__ = 1; i__ <= i__1; ++i__) {
172 for (i__ = 1; i__ <= i__1; ++i__) {
173 y[i__] = *beta * y[i__];
181 for (i__ = 1; i__ <= i__1; ++i__) {
188 for (i__ = 1; i__ <= i__1; ++i__) {
189 y[iy] = *beta * y[iy];
201 if (*incx == 1 && *incy == 1) {
203 for (j = 1; j <= i__1; ++j) {
204 temp1 = *alpha * x[j];
207 for (i__ = 1; i__ <= i__2; ++i__) {
208 y[i__] += temp1 *
a_ref(i__, j);
209 temp2 +=
a_ref(i__, j) * x[i__];
212 y[j] = y[j] + temp1 *
a_ref(j, j) + *alpha * temp2;
219 for (j = 1; j <= i__1; ++j) {
220 temp1 = *alpha * x[jx];
225 for (i__ = 1; i__ <= i__2; ++i__) {
226 y[iy] += temp1 *
a_ref(i__, j);
227 temp2 +=
a_ref(i__, j) * x[ix];
232 y[jy] = y[jy] + temp1 *
a_ref(j, j) + *alpha * temp2;
240 if (*incx == 1 && *incy == 1) {
242 for (j = 1; j <= i__1; ++j) {
243 temp1 = *alpha * x[j];
245 y[j] += temp1 *
a_ref(j, j);
247 for (i__ = j + 1; i__ <= i__2; ++i__) {
248 y[i__] += temp1 *
a_ref(i__, j);
249 temp2 +=
a_ref(i__, j) * x[i__];
252 y[j] += *alpha * temp2;
259 for (j = 1; j <= i__1; ++j) {
260 temp1 = *alpha * x[jx];
262 y[jy] += temp1 *
a_ref(j, j);
266 for (i__ = j + 1; i__ <= i__2; ++i__) {
269 y[iy] += temp1 *
a_ref(i__, j);
270 temp2 +=
a_ref(i__, j) * x[ix];
273 y[jy] += *alpha * temp2;
int integer
Definition: template_blas_common.h:38
#define maxMACRO(a, b)
Definition: template_blas_common.h:43
int template_blas_erbla(const char *srname, integer *info)
Definition: template_blas_common.cc:144
int template_blas_symv(const char *uplo, const integer *n, const Treal *alpha, const Treal *a, const integer *lda, const Treal *x, const integer *incx, const Treal *beta, Treal *y, const integer *incy)
Definition: template_blas_symv.h:40
logical template_blas_lsame(const char *ca, const char *cb)
Definition: template_blas_common.cc:44