35 #ifndef TEMPLATE_LAPACK_LASR_HEADER
36 #define TEMPLATE_LAPACK_LASR_HEADER
41 const integer *n,
const Treal *c__,
const Treal *s, Treal *a,
const integer *
145 integer a_dim1, a_offset, i__1, i__2;
151 #define a_ref(a_1,a_2) a[(a_2)*a_dim1 + a_1]
156 a_offset = 1 + a_dim1 * 1;
183 if (*m == 0 || *n == 0) {
193 for (j = 1; j <= i__1; ++j) {
196 if (ctemp != 1. || stemp != 0.) {
198 for (i__ = 1; i__ <= i__2; ++i__) {
199 temp =
a_ref(j + 1, i__);
200 a_ref(j + 1, i__) = ctemp * temp - stemp *
a_ref(
202 a_ref(j, i__) = stemp * temp + ctemp * a_ref(j,
210 for (j = *m - 1; j >= 1; --j) {
213 if (ctemp != 1. || stemp != 0.) {
215 for (i__ = 1; i__ <= i__1; ++i__) {
216 temp =
a_ref(j + 1, i__);
217 a_ref(j + 1, i__) = ctemp * temp - stemp *
a_ref(
219 a_ref(j, i__) = stemp * temp + ctemp * a_ref(j,
230 for (j = 2; j <= i__1; ++j) {
233 if (ctemp != 1. || stemp != 0.) {
235 for (i__ = 1; i__ <= i__2; ++i__) {
236 temp =
a_ref(j, i__);
237 a_ref(j, i__) = ctemp * temp - stemp *
a_ref(1,
239 a_ref(1, i__) = stemp * temp + ctemp * a_ref(1,
247 for (j = *m; j >= 2; --j) {
250 if (ctemp != 1. || stemp != 0.) {
252 for (i__ = 1; i__ <= i__1; ++i__) {
253 temp =
a_ref(j, i__);
254 a_ref(j, i__) = ctemp * temp - stemp *
a_ref(1,
256 a_ref(1, i__) = stemp * temp + ctemp * a_ref(1,
267 for (j = 1; j <= i__1; ++j) {
270 if (ctemp != 1. || stemp != 0.) {
272 for (i__ = 1; i__ <= i__2; ++i__) {
273 temp =
a_ref(j, i__);
274 a_ref(j, i__) = stemp *
a_ref(*m, i__) + ctemp *
276 a_ref(*m, i__) = ctemp *
a_ref(*m, i__) - stemp *
284 for (j = *m - 1; j >= 1; --j) {
287 if (ctemp != 1. || stemp != 0.) {
289 for (i__ = 1; i__ <= i__1; ++i__) {
290 temp =
a_ref(j, i__);
291 a_ref(j, i__) = stemp *
a_ref(*m, i__) + ctemp *
293 a_ref(*m, i__) = ctemp *
a_ref(*m, i__) - stemp *
309 for (j = 1; j <= i__1; ++j) {
312 if (ctemp != 1. || stemp != 0.) {
314 for (i__ = 1; i__ <= i__2; ++i__) {
315 temp =
a_ref(i__, j + 1);
316 a_ref(i__, j + 1) = ctemp * temp - stemp *
a_ref(
318 a_ref(i__, j) = stemp * temp + ctemp * a_ref(i__,
326 for (j = *n - 1; j >= 1; --j) {
329 if (ctemp != 1. || stemp != 0.) {
331 for (i__ = 1; i__ <= i__1; ++i__) {
332 temp =
a_ref(i__, j + 1);
333 a_ref(i__, j + 1) = ctemp * temp - stemp *
a_ref(
335 a_ref(i__, j) = stemp * temp + ctemp * a_ref(i__,
346 for (j = 2; j <= i__1; ++j) {
349 if (ctemp != 1. || stemp != 0.) {
351 for (i__ = 1; i__ <= i__2; ++i__) {
352 temp =
a_ref(i__, j);
353 a_ref(i__, j) = ctemp * temp - stemp *
a_ref(i__,
355 a_ref(i__, 1) = stemp * temp + ctemp * a_ref(i__,
363 for (j = *n; j >= 2; --j) {
366 if (ctemp != 1. || stemp != 0.) {
368 for (i__ = 1; i__ <= i__1; ++i__) {
369 temp =
a_ref(i__, j);
370 a_ref(i__, j) = ctemp * temp - stemp *
a_ref(i__,
372 a_ref(i__, 1) = stemp * temp + ctemp * a_ref(i__,
383 for (j = 1; j <= i__1; ++j) {
386 if (ctemp != 1. || stemp != 0.) {
388 for (i__ = 1; i__ <= i__2; ++i__) {
389 temp =
a_ref(i__, j);
390 a_ref(i__, j) = stemp *
a_ref(i__, *n) + ctemp *
392 a_ref(i__, *n) = ctemp *
a_ref(i__, *n) - stemp *
400 for (j = *n - 1; j >= 1; --j) {
403 if (ctemp != 1. || stemp != 0.) {
405 for (i__ = 1; i__ <= i__1; ++i__) {
406 temp =
a_ref(i__, j);
407 a_ref(i__, j) = stemp *
a_ref(i__, *n) + ctemp *
409 a_ref(i__, *n) = ctemp *
a_ref(i__, *n) - stemp *