37 #ifndef TEMPLATE_BLAS_SPR2_HEADER 38 #define TEMPLATE_BLAS_SPR2_HEADER 44 const Treal *x,
const integer *incx,
const Treal *y,
const integer *incy,
53 integer kk, ix, iy, jx, jy, kx, ky;
124 jx = jy = kx = ky = 0;
131 }
else if (*incx == 0) {
133 }
else if (*incy == 0) {
141 if (*n == 0 || *alpha == 0.) {
146 if (*incx != 1 || *incy != 1) {
150 kx = 1 - (*n - 1) * *incx;
155 ky = 1 - (*n - 1) * *incy;
165 if (*incx == 1 && *incy == 1) {
167 for (j = 1; j <= i__1; ++j) {
168 if (x[j] != 0. || y[j] != 0.) {
169 temp1 = *alpha * y[j];
170 temp2 = *alpha * x[j];
173 for (i__ = 1; i__ <= i__2; ++i__) {
174 ap[k] = ap[k] + x[i__] * temp1 + y[i__] * temp2;
184 for (j = 1; j <= i__1; ++j) {
185 if (x[jx] != 0. || y[jy] != 0.) {
186 temp1 = *alpha * y[jy];
187 temp2 = *alpha * x[jx];
191 for (k = kk; k <= i__2; ++k) {
192 ap[k] = ap[k] + x[ix] * temp1 + y[iy] * temp2;
206 if (*incx == 1 && *incy == 1) {
208 for (j = 1; j <= i__1; ++j) {
209 if (x[j] != 0. || y[j] != 0.) {
210 temp1 = *alpha * y[j];
211 temp2 = *alpha * x[j];
214 for (i__ = j; i__ <= i__2; ++i__) {
215 ap[k] = ap[k] + x[i__] * temp1 + y[i__] * temp2;
220 kk = kk + *n - j + 1;
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 (k = kk; k <= i__2; ++k) {
233 ap[k] = ap[k] + x[ix] * temp1 + y[iy] * temp2;
241 kk = kk + *n - j + 1;
int integer
Definition: template_blas_common.h:40
int template_blas_erbla(const char *srname, integer *info)
Definition: template_blas_common.cc:146
int template_blas_spr2(const char *uplo, const integer *n, const Treal *alpha, const Treal *x, const integer *incx, const Treal *y, const integer *incy, Treal *ap)
Definition: template_blas_spr2.h:43
logical template_blas_lsame(const char *ca, const char *cb)
Definition: template_blas_common.cc:46