37 #ifndef TEMPLATE_LAPACK_LASR_HEADER
38 #define TEMPLATE_LAPACK_LASR_HEADER
43 const integer *n,
const Treal *c__,
const Treal *s, Treal *a,
const integer *
147 integer a_dim1, a_offset, i__1, i__2;
153 #define a_ref(a_1,a_2) a[(a_2)*a_dim1 + a_1]
158 a_offset = 1 + a_dim1 * 1;
185 if (*m == 0 || *n == 0) {
195 for (j = 1; j <= i__1; ++j) {
198 if (ctemp != 1. || stemp != 0.) {
200 for (i__ = 1; i__ <= i__2; ++i__) {
201 temp =
a_ref(j + 1, i__);
202 a_ref(j + 1, i__) = ctemp * temp - stemp *
a_ref(
204 a_ref(j, i__) = stemp * temp + ctemp *
a_ref(j,
212 for (j = *m - 1; j >= 1; --j) {
215 if (ctemp != 1. || stemp != 0.) {
217 for (i__ = 1; i__ <= i__1; ++i__) {
218 temp =
a_ref(j + 1, i__);
219 a_ref(j + 1, i__) = ctemp * temp - stemp *
a_ref(
221 a_ref(j, i__) = stemp * temp + ctemp *
a_ref(j,
232 for (j = 2; j <= i__1; ++j) {
235 if (ctemp != 1. || stemp != 0.) {
237 for (i__ = 1; i__ <= i__2; ++i__) {
238 temp =
a_ref(j, i__);
239 a_ref(j, i__) = ctemp * temp - stemp *
a_ref(1,
241 a_ref(1, i__) = stemp * temp + ctemp *
a_ref(1,
249 for (j = *m; j >= 2; --j) {
252 if (ctemp != 1. || stemp != 0.) {
254 for (i__ = 1; i__ <= i__1; ++i__) {
255 temp =
a_ref(j, i__);
256 a_ref(j, i__) = ctemp * temp - stemp *
a_ref(1,
258 a_ref(1, i__) = stemp * temp + ctemp *
a_ref(1,
269 for (j = 1; j <= i__1; ++j) {
272 if (ctemp != 1. || stemp != 0.) {
274 for (i__ = 1; i__ <= i__2; ++i__) {
275 temp =
a_ref(j, i__);
276 a_ref(j, i__) = stemp *
a_ref(*m, i__) + ctemp *
278 a_ref(*m, i__) = ctemp *
a_ref(*m, i__) - stemp *
286 for (j = *m - 1; j >= 1; --j) {
289 if (ctemp != 1. || stemp != 0.) {
291 for (i__ = 1; i__ <= i__1; ++i__) {
292 temp =
a_ref(j, i__);
293 a_ref(j, i__) = stemp *
a_ref(*m, i__) + ctemp *
295 a_ref(*m, i__) = ctemp *
a_ref(*m, i__) - stemp *
311 for (j = 1; j <= i__1; ++j) {
314 if (ctemp != 1. || stemp != 0.) {
316 for (i__ = 1; i__ <= i__2; ++i__) {
317 temp =
a_ref(i__, j + 1);
318 a_ref(i__, j + 1) = ctemp * temp - stemp *
a_ref(
320 a_ref(i__, j) = stemp * temp + ctemp *
a_ref(i__,
328 for (j = *n - 1; j >= 1; --j) {
331 if (ctemp != 1. || stemp != 0.) {
333 for (i__ = 1; i__ <= i__1; ++i__) {
334 temp =
a_ref(i__, j + 1);
335 a_ref(i__, j + 1) = ctemp * temp - stemp *
a_ref(
337 a_ref(i__, j) = stemp * temp + ctemp *
a_ref(i__,
348 for (j = 2; j <= i__1; ++j) {
351 if (ctemp != 1. || stemp != 0.) {
353 for (i__ = 1; i__ <= i__2; ++i__) {
354 temp =
a_ref(i__, j);
355 a_ref(i__, j) = ctemp * temp - stemp *
a_ref(i__,
357 a_ref(i__, 1) = stemp * temp + ctemp *
a_ref(i__,
365 for (j = *n; j >= 2; --j) {
368 if (ctemp != 1. || stemp != 0.) {
370 for (i__ = 1; i__ <= i__1; ++i__) {
371 temp =
a_ref(i__, j);
372 a_ref(i__, j) = ctemp * temp - stemp *
a_ref(i__,
374 a_ref(i__, 1) = stemp * temp + ctemp *
a_ref(i__,
385 for (j = 1; j <= i__1; ++j) {
388 if (ctemp != 1. || stemp != 0.) {
390 for (i__ = 1; i__ <= i__2; ++i__) {
391 temp =
a_ref(i__, j);
392 a_ref(i__, j) = stemp *
a_ref(i__, *n) + ctemp *
394 a_ref(i__, *n) = ctemp *
a_ref(i__, *n) - stemp *
402 for (j = *n - 1; j >= 1; --j) {
405 if (ctemp != 1. || stemp != 0.) {
407 for (i__ = 1; i__ <= i__1; ++i__) {
408 temp =
a_ref(i__, j);
409 a_ref(i__, j) = stemp *
a_ref(i__, *n) + ctemp *
411 a_ref(i__, *n) = ctemp *
a_ref(i__, *n) - stemp *