35 #ifndef TEMPLATE_BLAS_SYR2_HEADER
36 #define TEMPLATE_BLAS_SYR2_HEADER
41 const Treal *x,
const integer *incx,
const 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]
123 a_offset = 1 + a_dim1 * 1;
126 jx = jy = kx = ky = 0;
133 }
else if (*incx == 0) {
135 }
else if (*incy == 0) {
145 if (*n == 0 || *alpha == 0.) {
150 if (*incx != 1 || *incy != 1) {
154 kx = 1 - (*n - 1) * *incx;
159 ky = 1 - (*n - 1) * *incy;
169 if (*incx == 1 && *incy == 1) {
171 for (j = 1; j <= i__1; ++j) {
172 if (x[j] != 0. || y[j] != 0.) {
173 temp1 = *alpha * y[j];
174 temp2 = *alpha * x[j];
176 for (i__ = 1; i__ <= i__2; ++i__) {
177 a_ref(i__, j) =
a_ref(i__, j) + x[i__] * temp1 + y[
186 for (j = 1; j <= i__1; ++j) {
187 if (x[jx] != 0. || y[jy] != 0.) {
188 temp1 = *alpha * y[jy];
189 temp2 = *alpha * x[jx];
193 for (i__ = 1; i__ <= i__2; ++i__) {
194 a_ref(i__, j) =
a_ref(i__, j) + x[ix] * temp1 + y[iy]
208 if (*incx == 1 && *incy == 1) {
210 for (j = 1; j <= i__1; ++j) {
211 if (x[j] != 0. || y[j] != 0.) {
212 temp1 = *alpha * y[j];
213 temp2 = *alpha * x[j];
215 for (i__ = j; i__ <= i__2; ++i__) {
216 a_ref(i__, j) =
a_ref(i__, j) + x[i__] * temp1 + y[
225 for (j = 1; j <= i__1; ++j) {
226 if (x[jx] != 0. || y[jy] != 0.) {
227 temp1 = *alpha * y[jy];
228 temp2 = *alpha * x[jx];
232 for (i__ = j; i__ <= i__2; ++i__) {
233 a_ref(i__, j) =
a_ref(i__, j) + x[ix] * temp1 + y[iy]
int integer
Definition: template_blas_common.h:38
int template_blas_syr2(const char *uplo, const integer *n, const Treal *alpha, const Treal *x, const integer *incx, const Treal *y, const integer *incy, Treal *a, const integer *lda)
Definition: template_blas_syr2.h:40
#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
logical template_blas_lsame(const char *ca, const char *cb)
Definition: template_blas_common.cc:44