14 typedef long long BLASLONG;
15 typedef unsigned long long BLASULONG;
17 typedef long BLASLONG;
18 typedef unsigned long BLASULONG;
22 typedef BLASLONG blasint;
24 #define blasabs(x) llabs(x)
26 #define blasabs(x) labs(x)
30 #define blasabs(x) abs(x)
33 typedef blasint integer;
35 typedef unsigned int uinteger;
36 typedef char *address;
37 typedef short int shortint;
39 typedef double doublereal;
40 typedef struct { real r, i; } complex;
41 typedef struct { doublereal r, i; } doublecomplex;
43 static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
44 static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
45 static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
46 static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
48 static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
49 static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
50 static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
51 static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
53 #define pCf(z) (*_pCf(z))
54 #define pCd(z) (*_pCd(z))
56 typedef short int shortlogical;
57 typedef char logical1;
58 typedef char integer1;
63 /* Extern is for use with -E */
74 /*external read, write*/
83 /*internal read, write*/
113 /*rewind, backspace, endfile*/
125 ftnint *inex; /*parameters in standard's order*/
151 union Multitype { /* for multiple entry points */
162 typedef union Multitype Multitype;
164 struct Vardesc { /* for Namelist */
170 typedef struct Vardesc Vardesc;
177 typedef struct Namelist Namelist;
179 #define abs(x) ((x) >= 0 ? (x) : -(x))
180 #define dabs(x) (fabs(x))
181 #define f2cmin(a,b) ((a) <= (b) ? (a) : (b))
182 #define f2cmax(a,b) ((a) >= (b) ? (a) : (b))
183 #define dmin(a,b) (f2cmin(a,b))
184 #define dmax(a,b) (f2cmax(a,b))
185 #define bit_test(a,b) ((a) >> (b) & 1)
186 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
187 #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
189 #define abort_() { sig_die("Fortran abort routine called", 1); }
190 #define c_abs(z) (cabsf(Cf(z)))
191 #define c_cos(R,Z) { pCf(R)=ccos(Cf(Z)); }
193 #define c_div(c, a, b) {Cf(c)._Val[0] = (Cf(a)._Val[0]/Cf(b)._Val[0]); Cf(c)._Val[1]=(Cf(a)._Val[1]/Cf(b)._Val[1]);}
194 #define z_div(c, a, b) {Cd(c)._Val[0] = (Cd(a)._Val[0]/Cd(b)._Val[0]); Cd(c)._Val[1]=(Cd(a)._Val[1]/df(b)._Val[1]);}
196 #define c_div(c, a, b) {pCf(c) = Cf(a)/Cf(b);}
197 #define z_div(c, a, b) {pCd(c) = Cd(a)/Cd(b);}
199 #define c_exp(R, Z) {pCf(R) = cexpf(Cf(Z));}
200 #define c_log(R, Z) {pCf(R) = clogf(Cf(Z));}
201 #define c_sin(R, Z) {pCf(R) = csinf(Cf(Z));}
202 //#define c_sqrt(R, Z) {*(R) = csqrtf(Cf(Z));}
203 #define c_sqrt(R, Z) {pCf(R) = csqrtf(Cf(Z));}
204 #define d_abs(x) (fabs(*(x)))
205 #define d_acos(x) (acos(*(x)))
206 #define d_asin(x) (asin(*(x)))
207 #define d_atan(x) (atan(*(x)))
208 #define d_atn2(x, y) (atan2(*(x),*(y)))
209 #define d_cnjg(R, Z) { pCd(R) = conj(Cd(Z)); }
210 #define r_cnjg(R, Z) { pCf(R) = conjf(Cf(Z)); }
211 #define d_cos(x) (cos(*(x)))
212 #define d_cosh(x) (cosh(*(x)))
213 #define d_dim(__a, __b) ( *(__a) > *(__b) ? *(__a) - *(__b) : 0.0 )
214 #define d_exp(x) (exp(*(x)))
215 #define d_imag(z) (cimag(Cd(z)))
216 #define r_imag(z) (cimagf(Cf(z)))
217 #define d_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
218 #define r_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
219 #define d_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
220 #define r_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
221 #define d_log(x) (log(*(x)))
222 #define d_mod(x, y) (fmod(*(x), *(y)))
223 #define u_nint(__x) ((__x)>=0 ? floor((__x) + .5) : -floor(.5 - (__x)))
224 #define d_nint(x) u_nint(*(x))
225 #define u_sign(__a,__b) ((__b) >= 0 ? ((__a) >= 0 ? (__a) : -(__a)) : -((__a) >= 0 ? (__a) : -(__a)))
226 #define d_sign(a,b) u_sign(*(a),*(b))
227 #define r_sign(a,b) u_sign(*(a),*(b))
228 #define d_sin(x) (sin(*(x)))
229 #define d_sinh(x) (sinh(*(x)))
230 #define d_sqrt(x) (sqrt(*(x)))
231 #define d_tan(x) (tan(*(x)))
232 #define d_tanh(x) (tanh(*(x)))
233 #define i_abs(x) abs(*(x))
234 #define i_dnnt(x) ((integer)u_nint(*(x)))
235 #define i_len(s, n) (n)
236 #define i_nint(x) ((integer)u_nint(*(x)))
237 #define i_sign(a,b) ((integer)u_sign((integer)*(a),(integer)*(b)))
238 #define pow_dd(ap, bp) ( pow(*(ap), *(bp)))
239 #define pow_si(B,E) spow_ui(*(B),*(E))
240 #define pow_ri(B,E) spow_ui(*(B),*(E))
241 #define pow_di(B,E) dpow_ui(*(B),*(E))
242 #define pow_zi(p, a, b) {pCd(p) = zpow_ui(Cd(a), *(b));}
243 #define pow_ci(p, a, b) {pCf(p) = cpow_ui(Cf(a), *(b));}
244 #define pow_zz(R,A,B) {pCd(R) = cpow(Cd(A),*(B));}
245 #define s_cat(lpp, rpp, rnp, np, llp) { ftnlen i, nc, ll; char *f__rp, *lp; ll = (llp); lp = (lpp); for(i=0; i < (int)*(np); ++i) { nc = ll; if((rnp)[i] < nc) nc = (rnp)[i]; ll -= nc; f__rp = (rpp)[i]; while(--nc >= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
246 #define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
247 #define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
248 #define sig_die(s, kill) { exit(1); }
249 #define s_stop(s, n) {exit(0);}
250 static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
251 #define z_abs(z) (cabs(Cd(z)))
252 #define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
253 #define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
254 #define myexit_() break;
255 #define mycycle() continue;
256 #define myceiling(w) {ceil(w)}
257 #define myhuge(w) {HUGE_VAL}
258 //#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
259 #define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
261 /* procedure parameter types for -A and -C++ */
263 #define F2C_proc_par_types 1
265 typedef logical (*L_fp)(...);
267 typedef logical (*L_fp)();
270 static float spow_ui(float x, integer n) {
271 float pow=1.0; unsigned long int u;
273 if(n < 0) n = -n, x = 1/x;
282 static double dpow_ui(double x, integer n) {
283 double pow=1.0; unsigned long int u;
285 if(n < 0) n = -n, x = 1/x;
295 static _Fcomplex cpow_ui(complex x, integer n) {
296 complex pow={1.0,0.0}; unsigned long int u;
298 if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
300 if(u & 01) pow.r *= x.r, pow.i *= x.i;
301 if(u >>= 1) x.r *= x.r, x.i *= x.i;
305 _Fcomplex p={pow.r, pow.i};
309 static _Complex float cpow_ui(_Complex float x, integer n) {
310 _Complex float pow=1.0; unsigned long int u;
312 if(n < 0) n = -n, x = 1/x;
323 static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
324 _Dcomplex pow={1.0,0.0}; unsigned long int u;
326 if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
328 if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
329 if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
333 _Dcomplex p = {pow._Val[0], pow._Val[1]};
337 static _Complex double zpow_ui(_Complex double x, integer n) {
338 _Complex double pow=1.0; unsigned long int u;
340 if(n < 0) n = -n, x = 1/x;
350 static integer pow_ii(integer x, integer n) {
351 integer pow; unsigned long int u;
353 if (n == 0 || x == 1) pow = 1;
354 else if (x != -1) pow = x == 0 ? 1/x : 0;
357 if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
367 static integer dmaxloc_(double *w, integer s, integer e, integer *n)
369 double m; integer i, mi;
370 for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
371 if (w[i-1]>m) mi=i ,m=w[i-1];
374 static integer smaxloc_(float *w, integer s, integer e, integer *n)
376 float m; integer i, mi;
377 for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
378 if (w[i-1]>m) mi=i ,m=w[i-1];
381 static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
382 integer n = *n_, incx = *incx_, incy = *incy_, i;
384 _Fcomplex zdotc = {0.0, 0.0};
385 if (incx == 1 && incy == 1) {
386 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
387 zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
388 zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
391 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
392 zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
393 zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
399 _Complex float zdotc = 0.0;
400 if (incx == 1 && incy == 1) {
401 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
402 zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
405 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
406 zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
412 static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
413 integer n = *n_, incx = *incx_, incy = *incy_, i;
415 _Dcomplex zdotc = {0.0, 0.0};
416 if (incx == 1 && incy == 1) {
417 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
418 zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
419 zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
422 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
423 zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
424 zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
430 _Complex double zdotc = 0.0;
431 if (incx == 1 && incy == 1) {
432 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
433 zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
436 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
437 zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
443 static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
444 integer n = *n_, incx = *incx_, incy = *incy_, i;
446 _Fcomplex zdotc = {0.0, 0.0};
447 if (incx == 1 && incy == 1) {
448 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
449 zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
450 zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
453 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
454 zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
455 zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
461 _Complex float zdotc = 0.0;
462 if (incx == 1 && incy == 1) {
463 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
464 zdotc += Cf(&x[i]) * Cf(&y[i]);
467 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
468 zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
474 static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
475 integer n = *n_, incx = *incx_, incy = *incy_, i;
477 _Dcomplex zdotc = {0.0, 0.0};
478 if (incx == 1 && incy == 1) {
479 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
480 zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
481 zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
484 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
485 zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
486 zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
492 _Complex double zdotc = 0.0;
493 if (incx == 1 && incy == 1) {
494 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
495 zdotc += Cd(&x[i]) * Cd(&y[i]);
498 for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
499 zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
505 /* -- translated by f2c (version 20000121).
506 You must link the resulting object file with the libraries:
507 -lf2c -lm (in that order)
513 /* Table of constant values */
515 static complex c_b1 = {1.f,0.f};
517 /* > \brief \b CTFSM solves a matrix equation (one operand is a triangular matrix in RFP format). */
519 /* =========== DOCUMENTATION =========== */
521 /* Online html documentation available at */
522 /* http://www.netlib.org/lapack/explore-html/ */
525 /* > Download CTFSM + dependencies */
526 /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ctfsm.f
529 /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ctfsm.f
532 /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ctfsm.f
540 /* SUBROUTINE CTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A, */
543 /* CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO */
544 /* INTEGER LDB, M, N */
546 /* COMPLEX A( 0: * ), B( 0: LDB-1, 0: * ) */
549 /* > \par Purpose: */
554 /* > Level 3 BLAS like routine for A in RFP Format. */
556 /* > CTFSM solves the matrix equation */
558 /* > op( A )*X = alpha*B or X*op( A ) = alpha*B */
560 /* > where alpha is a scalar, X and B are m by n matrices, A is a unit, or */
561 /* > non-unit, upper or lower triangular matrix and op( A ) is one of */
563 /* > op( A ) = A or op( A ) = A**H. */
565 /* > A is in Rectangular Full Packed (RFP) Format. */
567 /* > The matrix X is overwritten on B. */
573 /* > \param[in] TRANSR */
575 /* > TRANSR is CHARACTER*1 */
576 /* > = 'N': The Normal Form of RFP A is stored; */
577 /* > = 'C': The Conjugate-transpose Form of RFP A is stored. */
580 /* > \param[in] SIDE */
582 /* > SIDE is CHARACTER*1 */
583 /* > On entry, SIDE specifies whether op( A ) appears on the left */
584 /* > or right of X as follows: */
586 /* > SIDE = 'L' or 'l' op( A )*X = alpha*B. */
588 /* > SIDE = 'R' or 'r' X*op( A ) = alpha*B. */
590 /* > Unchanged on exit. */
593 /* > \param[in] UPLO */
595 /* > UPLO is CHARACTER*1 */
596 /* > On entry, UPLO specifies whether the RFP matrix A came from */
597 /* > an upper or lower triangular matrix as follows: */
598 /* > UPLO = 'U' or 'u' RFP A came from an upper triangular matrix */
599 /* > UPLO = 'L' or 'l' RFP A came from a lower triangular matrix */
601 /* > Unchanged on exit. */
604 /* > \param[in] TRANS */
606 /* > TRANS is CHARACTER*1 */
607 /* > On entry, TRANS specifies the form of op( A ) to be used */
608 /* > in the matrix multiplication as follows: */
610 /* > TRANS = 'N' or 'n' op( A ) = A. */
612 /* > TRANS = 'C' or 'c' op( A ) = conjg( A' ). */
614 /* > Unchanged on exit. */
617 /* > \param[in] DIAG */
619 /* > DIAG is CHARACTER*1 */
620 /* > On entry, DIAG specifies whether or not RFP A is unit */
621 /* > triangular as follows: */
623 /* > DIAG = 'U' or 'u' A is assumed to be unit triangular. */
625 /* > DIAG = 'N' or 'n' A is not assumed to be unit */
628 /* > Unchanged on exit. */
634 /* > On entry, M specifies the number of rows of B. M must be at */
636 /* > Unchanged on exit. */
642 /* > On entry, N specifies the number of columns of B. N must be */
643 /* > at least zero. */
644 /* > Unchanged on exit. */
647 /* > \param[in] ALPHA */
649 /* > ALPHA is COMPLEX */
650 /* > On entry, ALPHA specifies the scalar alpha. When alpha is */
651 /* > zero then A is not referenced and B need not be set before */
653 /* > Unchanged on exit. */
658 /* > A is COMPLEX array, dimension (N*(N+1)/2) */
659 /* > NT = N*(N+1)/2. On entry, the matrix A in RFP Format. */
660 /* > RFP Format is described by TRANSR, UPLO and N as follows: */
661 /* > If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even; */
662 /* > K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If */
663 /* > TRANSR = 'C' then RFP is the Conjugate-transpose of RFP A as */
664 /* > defined when TRANSR = 'N'. The contents of RFP A are defined */
665 /* > by UPLO as follows: If UPLO = 'U' the RFP A contains the NT */
666 /* > elements of upper packed A either in normal or */
667 /* > conjugate-transpose Format. If UPLO = 'L' the RFP A contains */
668 /* > the NT elements of lower packed A either in normal or */
669 /* > conjugate-transpose Format. The LDA of RFP A is (N+1)/2 when */
670 /* > TRANSR = 'C'. When TRANSR is 'N' the LDA is N+1 when N is */
671 /* > even and is N when is odd. */
672 /* > See the Note below for more details. Unchanged on exit. */
675 /* > \param[in,out] B */
677 /* > B is COMPLEX array, dimension (LDB,N) */
678 /* > Before entry, the leading m by n part of the array B must */
679 /* > contain the right-hand side matrix B, and on exit is */
680 /* > overwritten by the solution matrix X. */
683 /* > \param[in] LDB */
685 /* > LDB is INTEGER */
686 /* > On entry, LDB specifies the first dimension of B as declared */
687 /* > in the calling (sub) program. LDB must be at least */
688 /* > f2cmax( 1, m ). */
689 /* > Unchanged on exit. */
695 /* > \author Univ. of Tennessee */
696 /* > \author Univ. of California Berkeley */
697 /* > \author Univ. of Colorado Denver */
698 /* > \author NAG Ltd. */
700 /* > \date December 2016 */
702 /* > \ingroup complexOTHERcomputational */
704 /* > \par Further Details: */
705 /* ===================== */
709 /* > We first consider Standard Packed Format when N is even. */
710 /* > We give an example where N = 6. */
712 /* > AP is Upper AP is Lower */
714 /* > 00 01 02 03 04 05 00 */
715 /* > 11 12 13 14 15 10 11 */
716 /* > 22 23 24 25 20 21 22 */
717 /* > 33 34 35 30 31 32 33 */
718 /* > 44 45 40 41 42 43 44 */
719 /* > 55 50 51 52 53 54 55 */
722 /* > Let TRANSR = 'N'. RFP holds AP as follows: */
723 /* > For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last */
724 /* > three columns of AP upper. The lower triangle A(4:6,0:2) consists of */
725 /* > conjugate-transpose of the first three columns of AP upper. */
726 /* > For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first */
727 /* > three columns of AP lower. The upper triangle A(0:2,0:2) consists of */
728 /* > conjugate-transpose of the last three columns of AP lower. */
729 /* > To denote conjugate we place -- above the element. This covers the */
730 /* > case N even and TRANSR = 'N'. */
735 /* > 03 04 05 33 43 53 */
737 /* > 13 14 15 00 44 54 */
739 /* > 23 24 25 10 11 55 */
741 /* > 33 34 35 20 21 22 */
743 /* > 00 44 45 30 31 32 */
745 /* > 01 11 55 40 41 42 */
747 /* > 02 12 22 50 51 52 */
749 /* > Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate- */
750 /* > transpose of RFP A above. One therefore gets: */
755 /* > -- -- -- -- -- -- -- -- -- -- */
756 /* > 03 13 23 33 00 01 02 33 00 10 20 30 40 50 */
757 /* > -- -- -- -- -- -- -- -- -- -- */
758 /* > 04 14 24 34 44 11 12 43 44 11 21 31 41 51 */
759 /* > -- -- -- -- -- -- -- -- -- -- */
760 /* > 05 15 25 35 45 55 22 53 54 55 22 32 42 52 */
763 /* > We next consider Standard Packed Format when N is odd. */
764 /* > We give an example where N = 5. */
766 /* > AP is Upper AP is Lower */
768 /* > 00 01 02 03 04 00 */
769 /* > 11 12 13 14 10 11 */
770 /* > 22 23 24 20 21 22 */
771 /* > 33 34 30 31 32 33 */
772 /* > 44 40 41 42 43 44 */
775 /* > Let TRANSR = 'N'. RFP holds AP as follows: */
776 /* > For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last */
777 /* > three columns of AP upper. The lower triangle A(3:4,0:1) consists of */
778 /* > conjugate-transpose of the first two columns of AP upper. */
779 /* > For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first */
780 /* > three columns of AP lower. The upper triangle A(0:1,1:2) consists of */
781 /* > conjugate-transpose of the last two columns of AP lower. */
782 /* > To denote conjugate we place -- above the element. This covers the */
783 /* > case N odd and TRANSR = 'N'. */
788 /* > 02 03 04 00 33 43 */
790 /* > 12 13 14 10 11 44 */
792 /* > 22 23 24 20 21 22 */
794 /* > 00 33 34 30 31 32 */
796 /* > 01 11 44 40 41 42 */
798 /* > Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate- */
799 /* > transpose of RFP A above. One therefore gets: */
804 /* > -- -- -- -- -- -- -- -- -- */
805 /* > 02 12 22 00 01 00 10 20 30 40 50 */
806 /* > -- -- -- -- -- -- -- -- -- */
807 /* > 03 13 23 33 11 33 11 21 31 41 51 */
808 /* > -- -- -- -- -- -- -- -- -- */
809 /* > 04 14 24 34 44 43 44 22 32 42 52 */
812 /* ===================================================================== */
813 /* Subroutine */ int ctfsm_(char *transr, char *side, char *uplo, char *trans,
814 char *diag, integer *m, integer *n, complex *alpha, complex *a,
815 complex *b, integer *ldb)
817 /* System generated locals */
818 integer b_dim1, b_offset, i__1, i__2, i__3;
821 /* Local variables */
822 integer info, i__, j, k;
823 logical normaltransr;
824 extern /* Subroutine */ int cgemm_(char *, char *, integer *, integer *,
825 integer *, complex *, complex *, integer *, complex *, integer *,
826 complex *, complex *, integer *);
828 extern logical lsame_(char *, char *);
830 extern /* Subroutine */ int ctrsm_(char *, char *, char *, char *,
831 integer *, integer *, complex *, complex *, integer *, complex *,
833 integer m1, m2, n1, n2;
834 extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);
835 logical misodd, nisodd, notrans;
838 /* -- LAPACK computational routine (version 3.7.0) -- */
839 /* -- LAPACK is a software package provided by Univ. of Tennessee, -- */
840 /* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */
844 /* ===================================================================== */
846 /* Test the input parameters. */
848 /* Parameter adjustments */
849 b_dim1 = *ldb - 1 - 0 + 1;
850 b_offset = 0 + b_dim1 * 0;
855 normaltransr = lsame_(transr, "N");
856 lside = lsame_(side, "L");
857 lower = lsame_(uplo, "L");
858 notrans = lsame_(trans, "N");
859 if (! normaltransr && ! lsame_(transr, "C")) {
861 } else if (! lside && ! lsame_(side, "R")) {
863 } else if (! lower && ! lsame_(uplo, "U")) {
865 } else if (! notrans && ! lsame_(trans, "C")) {
867 } else if (! lsame_(diag, "N") && ! lsame_(diag,
874 } else if (*ldb < f2cmax(1,*m)) {
879 xerbla_("CTFSM ", &i__1, (ftnlen)6);
883 /* Quick return when ( (N.EQ.0).OR.(M.EQ.0) ) */
885 if (*m == 0 || *n == 0) {
889 /* Quick return when ALPHA.EQ.(0E+0,0E+0) */
891 if (alpha->r == 0.f && alpha->i == 0.f) {
893 for (j = 0; j <= i__1; ++j) {
895 for (i__ = 0; i__ <= i__2; ++i__) {
896 i__3 = i__ + j * b_dim1;
897 b[i__3].r = 0.f, b[i__3].i = 0.f;
910 /* If M is odd, set NISODD = .TRUE., and M1 and M2. */
911 /* If M is even, NISODD = .FALSE., and M. */
929 /* SIDE = 'L' and N is odd */
933 /* SIDE = 'L', N is odd, and TRANSR = 'N' */
937 /* SIDE ='L', N is odd, TRANSR = 'N', and UPLO = 'L' */
941 /* SIDE ='L', N is odd, TRANSR = 'N', UPLO = 'L', and */
945 ctrsm_("L", "L", "N", diag, &m1, n, alpha, a, m, &
948 ctrsm_("L", "L", "N", diag, &m1, n, alpha, a, m, &
950 q__1.r = -1.f, q__1.i = 0.f;
951 cgemm_("N", "N", &m2, n, &m1, &q__1, &a[m1], m, &
952 b[b_offset], ldb, alpha, &b[m1], ldb);
953 ctrsm_("L", "U", "C", diag, &m2, n, &c_b1, &a[*m],
959 /* SIDE ='L', N is odd, TRANSR = 'N', UPLO = 'L', and */
963 ctrsm_("L", "L", "C", diag, &m1, n, alpha, a, m, &
966 ctrsm_("L", "U", "N", diag, &m2, n, alpha, &a[*m],
968 q__1.r = -1.f, q__1.i = 0.f;
969 cgemm_("C", "N", &m1, n, &m2, &q__1, &a[m1], m, &
970 b[m1], ldb, alpha, &b[b_offset], ldb);
971 ctrsm_("L", "L", "C", diag, &m1, n, &c_b1, a, m, &
979 /* SIDE ='L', N is odd, TRANSR = 'N', and UPLO = 'U' */
983 /* SIDE ='L', N is odd, TRANSR = 'N', UPLO = 'U', and */
986 ctrsm_("L", "L", "N", diag, &m1, n, alpha, &a[m2], m,
988 q__1.r = -1.f, q__1.i = 0.f;
989 cgemm_("C", "N", &m2, n, &m1, &q__1, a, m, &b[
990 b_offset], ldb, alpha, &b[m1], ldb);
991 ctrsm_("L", "U", "C", diag, &m2, n, &c_b1, &a[m1], m,
996 /* SIDE ='L', N is odd, TRANSR = 'N', UPLO = 'U', and */
999 ctrsm_("L", "U", "N", diag, &m2, n, alpha, &a[m1], m,
1001 q__1.r = -1.f, q__1.i = 0.f;
1002 cgemm_("N", "N", &m1, n, &m2, &q__1, a, m, &b[m1],
1003 ldb, alpha, &b[b_offset], ldb);
1004 ctrsm_("L", "L", "C", diag, &m1, n, &c_b1, &a[m2], m,
1013 /* SIDE = 'L', N is odd, and TRANSR = 'C' */
1017 /* SIDE ='L', N is odd, TRANSR = 'C', and UPLO = 'L' */
1021 /* SIDE ='L', N is odd, TRANSR = 'C', UPLO = 'L', and */
1025 ctrsm_("L", "U", "C", diag, &m1, n, alpha, a, &m1,
1028 ctrsm_("L", "U", "C", diag, &m1, n, alpha, a, &m1,
1030 q__1.r = -1.f, q__1.i = 0.f;
1031 cgemm_("C", "N", &m2, n, &m1, &q__1, &a[m1 * m1],
1032 &m1, &b[b_offset], ldb, alpha, &b[m1],
1034 ctrsm_("L", "L", "N", diag, &m2, n, &c_b1, &a[1],
1040 /* SIDE ='L', N is odd, TRANSR = 'C', UPLO = 'L', and */
1044 ctrsm_("L", "U", "N", diag, &m1, n, alpha, a, &m1,
1047 ctrsm_("L", "L", "C", diag, &m2, n, alpha, &a[1],
1049 q__1.r = -1.f, q__1.i = 0.f;
1050 cgemm_("N", "N", &m1, n, &m2, &q__1, &a[m1 * m1],
1051 &m1, &b[m1], ldb, alpha, &b[b_offset],
1053 ctrsm_("L", "U", "N", diag, &m1, n, &c_b1, a, &m1,
1061 /* SIDE ='L', N is odd, TRANSR = 'C', and UPLO = 'U' */
1065 /* SIDE ='L', N is odd, TRANSR = 'C', UPLO = 'U', and */
1068 ctrsm_("L", "U", "C", diag, &m1, n, alpha, &a[m2 * m2]
1069 , &m2, &b[b_offset], ldb);
1070 q__1.r = -1.f, q__1.i = 0.f;
1071 cgemm_("N", "N", &m2, n, &m1, &q__1, a, &m2, &b[
1072 b_offset], ldb, alpha, &b[m1], ldb);
1073 ctrsm_("L", "L", "N", diag, &m2, n, &c_b1, &a[m1 * m2]
1074 , &m2, &b[m1], ldb);
1078 /* SIDE ='L', N is odd, TRANSR = 'C', UPLO = 'U', and */
1081 ctrsm_("L", "L", "C", diag, &m2, n, alpha, &a[m1 * m2]
1082 , &m2, &b[m1], ldb);
1083 q__1.r = -1.f, q__1.i = 0.f;
1084 cgemm_("C", "N", &m1, n, &m2, &q__1, a, &m2, &b[m1],
1085 ldb, alpha, &b[b_offset], ldb);
1086 ctrsm_("L", "U", "N", diag, &m1, n, &c_b1, &a[m2 * m2]
1087 , &m2, &b[b_offset], ldb);
1097 /* SIDE = 'L' and N is even */
1101 /* SIDE = 'L', N is even, and TRANSR = 'N' */
1105 /* SIDE ='L', N is even, TRANSR = 'N', and UPLO = 'L' */
1109 /* SIDE ='L', N is even, TRANSR = 'N', UPLO = 'L', */
1110 /* and TRANS = 'N' */
1113 ctrsm_("L", "L", "N", diag, &k, n, alpha, &a[1], &
1114 i__1, &b[b_offset], ldb);
1115 q__1.r = -1.f, q__1.i = 0.f;
1117 cgemm_("N", "N", &k, n, &k, &q__1, &a[k + 1], &i__1, &
1118 b[b_offset], ldb, alpha, &b[k], ldb);
1120 ctrsm_("L", "U", "C", diag, &k, n, &c_b1, a, &i__1, &
1125 /* SIDE ='L', N is even, TRANSR = 'N', UPLO = 'L', */
1126 /* and TRANS = 'C' */
1129 ctrsm_("L", "U", "N", diag, &k, n, alpha, a, &i__1, &
1131 q__1.r = -1.f, q__1.i = 0.f;
1133 cgemm_("C", "N", &k, n, &k, &q__1, &a[k + 1], &i__1, &
1134 b[k], ldb, alpha, &b[b_offset], ldb);
1136 ctrsm_("L", "L", "C", diag, &k, n, &c_b1, &a[1], &
1137 i__1, &b[b_offset], ldb);
1143 /* SIDE ='L', N is even, TRANSR = 'N', and UPLO = 'U' */
1147 /* SIDE ='L', N is even, TRANSR = 'N', UPLO = 'U', */
1148 /* and TRANS = 'N' */
1151 ctrsm_("L", "L", "N", diag, &k, n, alpha, &a[k + 1], &
1152 i__1, &b[b_offset], ldb);
1153 q__1.r = -1.f, q__1.i = 0.f;
1155 cgemm_("C", "N", &k, n, &k, &q__1, a, &i__1, &b[
1156 b_offset], ldb, alpha, &b[k], ldb);
1158 ctrsm_("L", "U", "C", diag, &k, n, &c_b1, &a[k], &
1163 /* SIDE ='L', N is even, TRANSR = 'N', UPLO = 'U', */
1164 /* and TRANS = 'C' */
1166 ctrsm_("L", "U", "N", diag, &k, n, alpha, &a[k], &
1168 q__1.r = -1.f, q__1.i = 0.f;
1170 cgemm_("N", "N", &k, n, &k, &q__1, a, &i__1, &b[k],
1171 ldb, alpha, &b[b_offset], ldb);
1173 ctrsm_("L", "L", "C", diag, &k, n, &c_b1, &a[k + 1], &
1174 i__1, &b[b_offset], ldb);
1182 /* SIDE = 'L', N is even, and TRANSR = 'C' */
1186 /* SIDE ='L', N is even, TRANSR = 'C', and UPLO = 'L' */
1190 /* SIDE ='L', N is even, TRANSR = 'C', UPLO = 'L', */
1191 /* and TRANS = 'N' */
1193 ctrsm_("L", "U", "C", diag, &k, n, alpha, &a[k], &k, &
1195 q__1.r = -1.f, q__1.i = 0.f;
1196 cgemm_("C", "N", &k, n, &k, &q__1, &a[k * (k + 1)], &
1197 k, &b[b_offset], ldb, alpha, &b[k], ldb);
1198 ctrsm_("L", "L", "N", diag, &k, n, &c_b1, a, &k, &b[k]
1203 /* SIDE ='L', N is even, TRANSR = 'C', UPLO = 'L', */
1204 /* and TRANS = 'C' */
1206 ctrsm_("L", "L", "C", diag, &k, n, alpha, a, &k, &b[k]
1208 q__1.r = -1.f, q__1.i = 0.f;
1209 cgemm_("N", "N", &k, n, &k, &q__1, &a[k * (k + 1)], &
1210 k, &b[k], ldb, alpha, &b[b_offset], ldb);
1211 ctrsm_("L", "U", "N", diag, &k, n, &c_b1, &a[k], &k, &
1218 /* SIDE ='L', N is even, TRANSR = 'C', and UPLO = 'U' */
1222 /* SIDE ='L', N is even, TRANSR = 'C', UPLO = 'U', */
1223 /* and TRANS = 'N' */
1225 ctrsm_("L", "U", "C", diag, &k, n, alpha, &a[k * (k +
1226 1)], &k, &b[b_offset], ldb);
1227 q__1.r = -1.f, q__1.i = 0.f;
1228 cgemm_("N", "N", &k, n, &k, &q__1, a, &k, &b[b_offset]
1229 , ldb, alpha, &b[k], ldb);
1230 ctrsm_("L", "L", "N", diag, &k, n, &c_b1, &a[k * k], &
1235 /* SIDE ='L', N is even, TRANSR = 'C', UPLO = 'U', */
1236 /* and TRANS = 'C' */
1238 ctrsm_("L", "L", "C", diag, &k, n, alpha, &a[k * k], &
1240 q__1.r = -1.f, q__1.i = 0.f;
1241 cgemm_("C", "N", &k, n, &k, &q__1, a, &k, &b[k], ldb,
1242 alpha, &b[b_offset], ldb);
1243 ctrsm_("L", "U", "N", diag, &k, n, &c_b1, &a[k * (k +
1244 1)], &k, &b[b_offset], ldb);
1259 /* If N is odd, set NISODD = .TRUE., and N1 and N2. */
1260 /* If N is even, NISODD = .FALSE., and K. */
1278 /* SIDE = 'R' and N is odd */
1282 /* SIDE = 'R', N is odd, and TRANSR = 'N' */
1286 /* SIDE ='R', N is odd, TRANSR = 'N', and UPLO = 'L' */
1290 /* SIDE ='R', N is odd, TRANSR = 'N', UPLO = 'L', and */
1293 ctrsm_("R", "U", "C", diag, m, &n2, alpha, &a[*n], n,
1294 &b[n1 * b_dim1], ldb);
1295 q__1.r = -1.f, q__1.i = 0.f;
1296 cgemm_("N", "N", m, &n1, &n2, &q__1, &b[n1 * b_dim1],
1297 ldb, &a[n1], n, alpha, b, ldb);
1298 ctrsm_("R", "L", "N", diag, m, &n1, &c_b1, a, n, b,
1303 /* SIDE ='R', N is odd, TRANSR = 'N', UPLO = 'L', and */
1306 ctrsm_("R", "L", "C", diag, m, &n1, alpha, a, n, b,
1308 q__1.r = -1.f, q__1.i = 0.f;
1309 cgemm_("N", "C", m, &n2, &n1, &q__1, b, ldb, &a[n1],
1310 n, alpha, &b[n1 * b_dim1], ldb);
1311 ctrsm_("R", "U", "N", diag, m, &n2, &c_b1, &a[*n], n,
1312 &b[n1 * b_dim1], ldb);
1318 /* SIDE ='R', N is odd, TRANSR = 'N', and UPLO = 'U' */
1322 /* SIDE ='R', N is odd, TRANSR = 'N', UPLO = 'U', and */
1325 ctrsm_("R", "L", "C", diag, m, &n1, alpha, &a[n2], n,
1327 q__1.r = -1.f, q__1.i = 0.f;
1328 cgemm_("N", "N", m, &n2, &n1, &q__1, b, ldb, a, n,
1329 alpha, &b[n1 * b_dim1], ldb);
1330 ctrsm_("R", "U", "N", diag, m, &n2, &c_b1, &a[n1], n,
1331 &b[n1 * b_dim1], ldb);
1335 /* SIDE ='R', N is odd, TRANSR = 'N', UPLO = 'U', and */
1338 ctrsm_("R", "U", "C", diag, m, &n2, alpha, &a[n1], n,
1339 &b[n1 * b_dim1], ldb);
1340 q__1.r = -1.f, q__1.i = 0.f;
1341 cgemm_("N", "C", m, &n1, &n2, &q__1, &b[n1 * b_dim1],
1342 ldb, a, n, alpha, b, ldb);
1343 ctrsm_("R", "L", "N", diag, m, &n1, &c_b1, &a[n2], n,
1352 /* SIDE = 'R', N is odd, and TRANSR = 'C' */
1356 /* SIDE ='R', N is odd, TRANSR = 'C', and UPLO = 'L' */
1360 /* SIDE ='R', N is odd, TRANSR = 'C', UPLO = 'L', and */
1363 ctrsm_("R", "L", "N", diag, m, &n2, alpha, &a[1], &n1,
1364 &b[n1 * b_dim1], ldb);
1365 q__1.r = -1.f, q__1.i = 0.f;
1366 cgemm_("N", "C", m, &n1, &n2, &q__1, &b[n1 * b_dim1],
1367 ldb, &a[n1 * n1], &n1, alpha, b, ldb);
1368 ctrsm_("R", "U", "C", diag, m, &n1, &c_b1, a, &n1, b,
1373 /* SIDE ='R', N is odd, TRANSR = 'C', UPLO = 'L', and */
1376 ctrsm_("R", "U", "N", diag, m, &n1, alpha, a, &n1, b,
1378 q__1.r = -1.f, q__1.i = 0.f;
1379 cgemm_("N", "N", m, &n2, &n1, &q__1, b, ldb, &a[n1 *
1380 n1], &n1, alpha, &b[n1 * b_dim1], ldb);
1381 ctrsm_("R", "L", "C", diag, m, &n2, &c_b1, &a[1], &n1,
1382 &b[n1 * b_dim1], ldb);
1388 /* SIDE ='R', N is odd, TRANSR = 'C', and UPLO = 'U' */
1392 /* SIDE ='R', N is odd, TRANSR = 'C', UPLO = 'U', and */
1395 ctrsm_("R", "U", "N", diag, m, &n1, alpha, &a[n2 * n2]
1397 q__1.r = -1.f, q__1.i = 0.f;
1398 cgemm_("N", "C", m, &n2, &n1, &q__1, b, ldb, a, &n2,
1399 alpha, &b[n1 * b_dim1], ldb);
1400 ctrsm_("R", "L", "C", diag, m, &n2, &c_b1, &a[n1 * n2]
1401 , &n2, &b[n1 * b_dim1], ldb);
1405 /* SIDE ='R', N is odd, TRANSR = 'C', UPLO = 'U', and */
1408 ctrsm_("R", "L", "N", diag, m, &n2, alpha, &a[n1 * n2]
1409 , &n2, &b[n1 * b_dim1], ldb);
1410 q__1.r = -1.f, q__1.i = 0.f;
1411 cgemm_("N", "N", m, &n1, &n2, &q__1, &b[n1 * b_dim1],
1412 ldb, a, &n2, alpha, b, ldb);
1413 ctrsm_("R", "U", "C", diag, m, &n1, &c_b1, &a[n2 * n2]
1424 /* SIDE = 'R' and N is even */
1428 /* SIDE = 'R', N is even, and TRANSR = 'N' */
1432 /* SIDE ='R', N is even, TRANSR = 'N', and UPLO = 'L' */
1436 /* SIDE ='R', N is even, TRANSR = 'N', UPLO = 'L', */
1437 /* and TRANS = 'N' */
1440 ctrsm_("R", "U", "C", diag, m, &k, alpha, a, &i__1, &
1441 b[k * b_dim1], ldb);
1442 q__1.r = -1.f, q__1.i = 0.f;
1444 cgemm_("N", "N", m, &k, &k, &q__1, &b[k * b_dim1],
1445 ldb, &a[k + 1], &i__1, alpha, b, ldb);
1447 ctrsm_("R", "L", "N", diag, m, &k, &c_b1, &a[1], &
1452 /* SIDE ='R', N is even, TRANSR = 'N', UPLO = 'L', */
1453 /* and TRANS = 'C' */
1456 ctrsm_("R", "L", "C", diag, m, &k, alpha, &a[1], &
1458 q__1.r = -1.f, q__1.i = 0.f;
1460 cgemm_("N", "C", m, &k, &k, &q__1, b, ldb, &a[k + 1],
1461 &i__1, alpha, &b[k * b_dim1], ldb);
1463 ctrsm_("R", "U", "N", diag, m, &k, &c_b1, a, &i__1, &
1464 b[k * b_dim1], ldb);
1470 /* SIDE ='R', N is even, TRANSR = 'N', and UPLO = 'U' */
1474 /* SIDE ='R', N is even, TRANSR = 'N', UPLO = 'U', */
1475 /* and TRANS = 'N' */
1478 ctrsm_("R", "L", "C", diag, m, &k, alpha, &a[k + 1], &
1480 q__1.r = -1.f, q__1.i = 0.f;
1482 cgemm_("N", "N", m, &k, &k, &q__1, b, ldb, a, &i__1,
1483 alpha, &b[k * b_dim1], ldb);
1485 ctrsm_("R", "U", "N", diag, m, &k, &c_b1, &a[k], &
1486 i__1, &b[k * b_dim1], ldb);
1490 /* SIDE ='R', N is even, TRANSR = 'N', UPLO = 'U', */
1491 /* and TRANS = 'C' */
1494 ctrsm_("R", "U", "C", diag, m, &k, alpha, &a[k], &
1495 i__1, &b[k * b_dim1], ldb);
1496 q__1.r = -1.f, q__1.i = 0.f;
1498 cgemm_("N", "C", m, &k, &k, &q__1, &b[k * b_dim1],
1499 ldb, a, &i__1, alpha, b, ldb);
1501 ctrsm_("R", "L", "N", diag, m, &k, &c_b1, &a[k + 1], &
1510 /* SIDE = 'R', N is even, and TRANSR = 'C' */
1514 /* SIDE ='R', N is even, TRANSR = 'C', and UPLO = 'L' */
1518 /* SIDE ='R', N is even, TRANSR = 'C', UPLO = 'L', */
1519 /* and TRANS = 'N' */
1521 ctrsm_("R", "L", "N", diag, m, &k, alpha, a, &k, &b[k
1523 q__1.r = -1.f, q__1.i = 0.f;
1524 cgemm_("N", "C", m, &k, &k, &q__1, &b[k * b_dim1],
1525 ldb, &a[(k + 1) * k], &k, alpha, b, ldb);
1526 ctrsm_("R", "U", "C", diag, m, &k, &c_b1, &a[k], &k,
1531 /* SIDE ='R', N is even, TRANSR = 'C', UPLO = 'L', */
1532 /* and TRANS = 'C' */
1534 ctrsm_("R", "U", "N", diag, m, &k, alpha, &a[k], &k,
1536 q__1.r = -1.f, q__1.i = 0.f;
1537 cgemm_("N", "N", m, &k, &k, &q__1, b, ldb, &a[(k + 1)
1538 * k], &k, alpha, &b[k * b_dim1], ldb);
1539 ctrsm_("R", "L", "C", diag, m, &k, &c_b1, a, &k, &b[k
1546 /* SIDE ='R', N is even, TRANSR = 'C', and UPLO = 'U' */
1550 /* SIDE ='R', N is even, TRANSR = 'C', UPLO = 'U', */
1551 /* and TRANS = 'N' */
1553 ctrsm_("R", "U", "N", diag, m, &k, alpha, &a[(k + 1) *
1555 q__1.r = -1.f, q__1.i = 0.f;
1556 cgemm_("N", "C", m, &k, &k, &q__1, b, ldb, a, &k,
1557 alpha, &b[k * b_dim1], ldb);
1558 ctrsm_("R", "L", "C", diag, m, &k, &c_b1, &a[k * k], &
1559 k, &b[k * b_dim1], ldb);
1563 /* SIDE ='R', N is even, TRANSR = 'C', UPLO = 'U', */
1564 /* and TRANS = 'C' */
1566 ctrsm_("R", "L", "N", diag, m, &k, alpha, &a[k * k], &
1567 k, &b[k * b_dim1], ldb);
1568 q__1.r = -1.f, q__1.i = 0.f;
1569 cgemm_("N", "N", m, &k, &k, &q__1, &b[k * b_dim1],
1570 ldb, a, &k, alpha, b, ldb);
1571 ctrsm_("R", "U", "C", diag, m, &k, &c_b1, &a[(k + 1) *