/* Subroutine */ int ctpcon_(char *norm, char *uplo, char *diag, integer *n, complex *ap, real *rcond, complex *work, real *rwork, integer *info) { /* System generated locals */ integer i__1; real r__1, r__2; /* Builtin functions */ double r_imag(complex *); /* Local variables */ integer ix, kase, kase1; real scale; extern logical lsame_(char *, char *); integer isave[3]; real anorm; logical upper; extern /* Subroutine */ int clacn2_(integer *, complex *, complex *, real *, integer *, integer *); real xnorm; extern integer icamax_(integer *, complex *, integer *); extern real slamch_(char *); extern /* Subroutine */ int xerbla_(char *, integer *); extern real clantp_(char *, char *, char *, integer *, complex *, real *); extern /* Subroutine */ int clatps_(char *, char *, char *, char *, integer *, complex *, complex *, real *, real *, integer *); real ainvnm; extern /* Subroutine */ int csrscl_(integer *, real *, complex *, integer *); logical onenrm; char normin[1]; real smlnum; logical nounit; /* -- LAPACK computational routine (version 3.4.0) -- */ /* -- LAPACK is a software package provided by Univ. of Tennessee, -- */ /* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */ /* November 2011 */ /* .. Scalar Arguments .. */ /* .. */ /* .. Array Arguments .. */ /* .. */ /* ===================================================================== */ /* .. Parameters .. */ /* .. */ /* .. Local Scalars .. */ /* .. */ /* .. Local Arrays .. */ /* .. */ /* .. External Functions .. */ /* .. */ /* .. External Subroutines .. */ /* .. */ /* .. Intrinsic Functions .. */ /* .. */ /* .. Statement Functions .. */ /* .. */ /* .. Statement Function definitions .. */ /* .. */ /* .. Executable Statements .. */ /* Test the input parameters. */ /* Parameter adjustments */ --rwork; --work; --ap; /* Function Body */ *info = 0; upper = lsame_(uplo, "U"); onenrm = *(unsigned char *)norm == '1' || lsame_(norm, "O"); nounit = lsame_(diag, "N"); if (! onenrm && ! lsame_(norm, "I")) { *info = -1; } else if (! upper && ! lsame_(uplo, "L")) { *info = -2; } else if (! nounit && ! lsame_(diag, "U")) { *info = -3; } else if (*n < 0) { *info = -4; } if (*info != 0) { i__1 = -(*info); xerbla_("CTPCON", &i__1); return 0; } /* Quick return if possible */ if (*n == 0) { *rcond = 1.f; return 0; } *rcond = 0.f; smlnum = slamch_("Safe minimum") * (real) max(1,*n); /* Compute the norm of the triangular matrix A. */ anorm = clantp_(norm, uplo, diag, n, &ap[1], &rwork[1]); /* Continue only if ANORM > 0. */ if (anorm > 0.f) { /* Estimate the norm of the inverse of A. */ ainvnm = 0.f; *(unsigned char *)normin = 'N'; if (onenrm) { kase1 = 1; } else { kase1 = 2; } kase = 0; L10: clacn2_(n, &work[*n + 1], &work[1], &ainvnm, &kase, isave); if (kase != 0) { if (kase == kase1) { /* Multiply by inv(A). */ clatps_(uplo, "No transpose", diag, normin, n, &ap[1], &work[ 1], &scale, &rwork[1], info); } else { /* Multiply by inv(A**H). */ clatps_(uplo, "Conjugate transpose", diag, normin, n, &ap[1], &work[1], &scale, &rwork[1], info); } *(unsigned char *)normin = 'Y'; /* Multiply by 1/SCALE if doing so will not cause overflow. */ if (scale != 1.f) { ix = icamax_(n, &work[1], &c__1); i__1 = ix; xnorm = (r__1 = work[i__1].r, abs(r__1)) + (r__2 = r_imag(& work[ix]), abs(r__2)); if (scale < xnorm * smlnum || scale == 0.f) { goto L20; } csrscl_(n, &scale, &work[1], &c__1); } goto L10; } /* Compute the estimate of the reciprocal condition number. */ if (ainvnm != 0.f) { *rcond = 1.f / anorm / ainvnm; } } L20: return 0; /* End of CTPCON */ }
/* Subroutine */ int ctpcon_(char *norm, char *uplo, char *diag, integer *n, complex *ap, real *rcond, complex *work, real *rwork, integer *info, ftnlen norm_len, ftnlen uplo_len, ftnlen diag_len) { /* System generated locals */ integer i__1; real r__1, r__2; /* Builtin functions */ double r_imag(complex *); /* Local variables */ static integer ix, kase, kase1; static real scale; extern logical lsame_(char *, char *, ftnlen, ftnlen); static real anorm; static logical upper; static real xnorm; extern /* Subroutine */ int clacon_(integer *, complex *, complex *, real *, integer *); extern integer icamax_(integer *, complex *, integer *); extern doublereal slamch_(char *, ftnlen); extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); extern doublereal clantp_(char *, char *, char *, integer *, complex *, real *, ftnlen, ftnlen, ftnlen); extern /* Subroutine */ int clatps_(char *, char *, char *, char *, integer *, complex *, complex *, real *, real *, integer *, ftnlen, ftnlen, ftnlen, ftnlen); static real ainvnm; extern /* Subroutine */ int csrscl_(integer *, real *, complex *, integer *); static logical onenrm; static char normin[1]; static real smlnum; static logical nounit; /* -- LAPACK routine (version 3.0) -- */ /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ /* Courant Institute, Argonne National Lab, and Rice University */ /* March 31, 1993 */ /* .. Scalar Arguments .. */ /* .. */ /* .. Array Arguments .. */ /* .. */ /* Purpose */ /* ======= */ /* CTPCON estimates the reciprocal of the condition number of a packed */ /* triangular matrix A, in either the 1-norm or the infinity-norm. */ /* The norm of A is computed and an estimate is obtained for */ /* norm(inv(A)), then the reciprocal of the condition number is */ /* computed as */ /* RCOND = 1 / ( norm(A) * norm(inv(A)) ). */ /* Arguments */ /* ========= */ /* NORM (input) CHARACTER*1 */ /* Specifies whether the 1-norm condition number or the */ /* infinity-norm condition number is required: */ /* = '1' or 'O': 1-norm; */ /* = 'I': Infinity-norm. */ /* UPLO (input) CHARACTER*1 */ /* = 'U': A is upper triangular; */ /* = 'L': A is lower triangular. */ /* DIAG (input) CHARACTER*1 */ /* = 'N': A is non-unit triangular; */ /* = 'U': A is unit triangular. */ /* N (input) INTEGER */ /* The order of the matrix A. N >= 0. */ /* AP (input) COMPLEX array, dimension (N*(N+1)/2) */ /* The upper or lower triangular matrix A, packed columnwise in */ /* a linear array. The j-th column of A is stored in the array */ /* AP as follows: */ /* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; */ /* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n. */ /* If DIAG = 'U', the diagonal elements of A are not referenced */ /* and are assumed to be 1. */ /* RCOND (output) REAL */ /* The reciprocal of the condition number of the matrix A, */ /* computed as RCOND = 1/(norm(A) * norm(inv(A))). */ /* WORK (workspace) COMPLEX array, dimension (2*N) */ /* RWORK (workspace) REAL array, dimension (N) */ /* INFO (output) INTEGER */ /* = 0: successful exit */ /* < 0: if INFO = -i, the i-th argument had an illegal value */ /* ===================================================================== */ /* .. Parameters .. */ /* .. */ /* .. Local Scalars .. */ /* .. */ /* .. External Functions .. */ /* .. */ /* .. External Subroutines .. */ /* .. */ /* .. Intrinsic Functions .. */ /* .. */ /* .. Statement Functions .. */ /* .. */ /* .. Statement Function definitions .. */ /* .. */ /* .. Executable Statements .. */ /* Test the input parameters. */ /* Parameter adjustments */ --rwork; --work; --ap; /* Function Body */ *info = 0; upper = lsame_(uplo, "U", (ftnlen)1, (ftnlen)1); onenrm = *(unsigned char *)norm == '1' || lsame_(norm, "O", (ftnlen)1, ( ftnlen)1); nounit = lsame_(diag, "N", (ftnlen)1, (ftnlen)1); if (! onenrm && ! lsame_(norm, "I", (ftnlen)1, (ftnlen)1)) { *info = -1; } else if (! upper && ! lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { *info = -2; } else if (! nounit && ! lsame_(diag, "U", (ftnlen)1, (ftnlen)1)) { *info = -3; } else if (*n < 0) { *info = -4; } if (*info != 0) { i__1 = -(*info); xerbla_("CTPCON", &i__1, (ftnlen)6); return 0; } /* Quick return if possible */ if (*n == 0) { *rcond = 1.f; return 0; } *rcond = 0.f; smlnum = slamch_("Safe minimum", (ftnlen)12) * (real) max(1,*n); /* Compute the norm of the triangular matrix A. */ anorm = clantp_(norm, uplo, diag, n, &ap[1], &rwork[1], (ftnlen)1, ( ftnlen)1, (ftnlen)1); /* Continue only if ANORM > 0. */ if (anorm > 0.f) { /* Estimate the norm of the inverse of A. */ ainvnm = 0.f; *(unsigned char *)normin = 'N'; if (onenrm) { kase1 = 1; } else { kase1 = 2; } kase = 0; L10: clacon_(n, &work[*n + 1], &work[1], &ainvnm, &kase); if (kase != 0) { if (kase == kase1) { /* Multiply by inv(A). */ clatps_(uplo, "No transpose", diag, normin, n, &ap[1], &work[ 1], &scale, &rwork[1], info, (ftnlen)1, (ftnlen)12, ( ftnlen)1, (ftnlen)1); } else { /* Multiply by inv(A'). */ clatps_(uplo, "Conjugate transpose", diag, normin, n, &ap[1], &work[1], &scale, &rwork[1], info, (ftnlen)1, (ftnlen) 19, (ftnlen)1, (ftnlen)1); } *(unsigned char *)normin = 'Y'; /* Multiply by 1/SCALE if doing so will not cause overflow. */ if (scale != 1.f) { ix = icamax_(n, &work[1], &c__1); i__1 = ix; xnorm = (r__1 = work[i__1].r, dabs(r__1)) + (r__2 = r_imag(& work[ix]), dabs(r__2)); if (scale < xnorm * smlnum || scale == 0.f) { goto L20; } csrscl_(n, &scale, &work[1], &c__1); } goto L10; } /* Compute the estimate of the reciprocal condition number. */ if (ainvnm != 0.f) { *rcond = 1.f / anorm / ainvnm; } } L20: return 0; /* End of CTPCON */ } /* ctpcon_ */
/* Subroutine */ int cppcon_(char *uplo, integer *n, complex *ap, real *anorm, real *rcond, complex *work, real *rwork, integer *info) { /* System generated locals */ integer i__1; real r__1, r__2; /* Local variables */ integer ix, kase; real scale; integer isave[3]; logical upper; real scalel; real scaleu; real ainvnm; char normin[1]; real smlnum; /* -- LAPACK routine (version 3.2) -- */ /* November 2006 */ /* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH. */ /* Purpose */ /* ======= */ /* CPPCON estimates the reciprocal of the condition number (in the */ /* 1-norm) of a complex Hermitian positive definite packed matrix using */ /* the Cholesky factorization A = U**H*U or A = L*L**H computed by */ /* CPPTRF. */ /* An estimate is obtained for norm(inv(A)), and the reciprocal of the */ /* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))). */ /* Arguments */ /* ========= */ /* UPLO (input) CHARACTER*1 */ /* = 'U': Upper triangle of A is stored; */ /* = 'L': Lower triangle of A is stored. */ /* N (input) INTEGER */ /* The order of the matrix A. N >= 0. */ /* AP (input) COMPLEX array, dimension (N*(N+1)/2) */ /* The triangular factor U or L from the Cholesky factorization */ /* A = U**H*U or A = L*L**H, packed columnwise in a linear */ /* array. The j-th column of U or L is stored in the array AP */ /* as follows: */ /* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j; */ /* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n. */ /* ANORM (input) REAL */ /* The 1-norm (or infinity-norm) of the Hermitian matrix A. */ /* RCOND (output) REAL */ /* The reciprocal of the condition number of the matrix A, */ /* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an */ /* estimate of the 1-norm of inv(A) computed in this routine. */ /* WORK (workspace) COMPLEX array, dimension (2*N) */ /* RWORK (workspace) REAL array, dimension (N) */ /* INFO (output) INTEGER */ /* = 0: successful exit */ /* < 0: if INFO = -i, the i-th argument had an illegal value */ /* ===================================================================== */ /* Test the input parameters. */ /* Parameter adjustments */ --rwork; --work; --ap; /* Function Body */ *info = 0; upper = lsame_(uplo, "U"); if (! upper && ! lsame_(uplo, "L")) { *info = -1; } else if (*n < 0) { *info = -2; } else if (*anorm < 0.f) { *info = -4; } if (*info != 0) { i__1 = -(*info); xerbla_("CPPCON", &i__1); return 0; } /* Quick return if possible */ *rcond = 0.f; if (*n == 0) { *rcond = 1.f; return 0; } else if (*anorm == 0.f) { return 0; } smlnum = slamch_("Safe minimum"); /* Estimate the 1-norm of the inverse. */ kase = 0; *(unsigned char *)normin = 'N'; L10: clacn2_(n, &work[*n + 1], &work[1], &ainvnm, &kase, isave); if (kase != 0) { if (upper) { /* Multiply by inv(U'). */ clatps_("Upper", "Conjugate transpose", "Non-unit", normin, n, & ap[1], &work[1], &scalel, &rwork[1], info); *(unsigned char *)normin = 'Y'; /* Multiply by inv(U). */ clatps_("Upper", "No transpose", "Non-unit", normin, n, &ap[1], & work[1], &scaleu, &rwork[1], info); } else { /* Multiply by inv(L). */ clatps_("Lower", "No transpose", "Non-unit", normin, n, &ap[1], & work[1], &scalel, &rwork[1], info); *(unsigned char *)normin = 'Y'; /* Multiply by inv(L'). */ clatps_("Lower", "Conjugate transpose", "Non-unit", normin, n, & ap[1], &work[1], &scaleu, &rwork[1], info); } /* Multiply by 1/SCALE if doing so will not cause overflow. */ scale = scalel * scaleu; if (scale != 1.f) { ix = icamax_(n, &work[1], &c__1); i__1 = ix; if (scale < ((r__1 = work[i__1].r, dabs(r__1)) + (r__2 = r_imag(& work[ix]), dabs(r__2))) * smlnum || scale == 0.f) { goto L20; } csrscl_(n, &scale, &work[1], &c__1); } goto L10; } /* Compute the estimate of the reciprocal condition number. */ if (ainvnm != 0.f) { *rcond = 1.f / ainvnm / *anorm; } L20: return 0; /* End of CPPCON */ } /* cppcon_ */
/* Subroutine */ int cerrtr_(char *path, integer *nunit) { /* Local variables */ complex a[4] /* was [2][2] */, b[2], w[2], x[2]; char c2[2]; real r1[2], r2[2], rw[2]; integer info; real scale, rcond; /* Fortran I/O blocks */ static cilist io___1 = { 0, 0, 0, 0, 0 }; /* -- LAPACK test routine (version 3.1) -- */ /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */ /* November 2006 */ /* .. Scalar Arguments .. */ /* .. */ /* Purpose */ /* ======= */ /* CERRTR tests the error exits for the COMPLEX triangular routines. */ /* Arguments */ /* ========= */ /* PATH (input) CHARACTER*3 */ /* The LAPACK path name for the routines to be tested. */ /* NUNIT (input) INTEGER */ /* The unit number for output. */ /* ===================================================================== */ /* .. Parameters .. */ /* .. */ /* .. Local Scalars .. */ /* .. */ /* .. Local Arrays .. */ /* .. */ /* .. External Functions .. */ /* .. */ /* .. External Subroutines .. */ /* .. */ /* .. Scalars in Common .. */ /* .. */ /* .. Common blocks .. */ /* .. */ /* .. Executable Statements .. */ infoc_1.nout = *nunit; io___1.ciunit = infoc_1.nout; s_wsle(&io___1); e_wsle(); s_copy(c2, path + 1, (ftnlen)2, (ftnlen)2); a[0].r = 1.f, a[0].i = 0.f; a[2].r = 2.f, a[2].i = 0.f; a[3].r = 3.f, a[3].i = 0.f; a[1].r = 4.f, a[1].i = 0.f; infoc_1.ok = TRUE_; /* Test error exits for the general triangular routines. */ if (lsamen_(&c__2, c2, "TR")) { /* CTRTRI */ s_copy(srnamc_1.srnamt, "CTRTRI", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctrtri_("/", "N", &c__0, a, &c__1, &info); chkxer_("CTRTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctrtri_("U", "/", &c__0, a, &c__1, &info); chkxer_("CTRTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctrtri_("U", "N", &c_n1, a, &c__1, &info); chkxer_("CTRTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; ctrtri_("U", "N", &c__2, a, &c__1, &info); chkxer_("CTRTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CTRTI2 */ s_copy(srnamc_1.srnamt, "CTRTI2", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctrti2_("/", "N", &c__0, a, &c__1, &info); chkxer_("CTRTI2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctrti2_("U", "/", &c__0, a, &c__1, &info); chkxer_("CTRTI2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctrti2_("U", "N", &c_n1, a, &c__1, &info); chkxer_("CTRTI2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; ctrti2_("U", "N", &c__2, a, &c__1, &info); chkxer_("CTRTI2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CTRTRS */ s_copy(srnamc_1.srnamt, "CTRTRS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctrtrs_("/", "N", "N", &c__0, &c__0, a, &c__1, x, &c__1, &info); chkxer_("CTRTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctrtrs_("U", "/", "N", &c__0, &c__0, a, &c__1, x, &c__1, &info); chkxer_("CTRTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctrtrs_("U", "N", "/", &c__0, &c__0, a, &c__1, x, &c__1, &info); chkxer_("CTRTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; ctrtrs_("U", "N", "N", &c_n1, &c__0, a, &c__1, x, &c__1, &info); chkxer_("CTRTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; ctrtrs_("U", "N", "N", &c__0, &c_n1, a, &c__1, x, &c__1, &info); chkxer_("CTRTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 7; /* CTRRFS */ s_copy(srnamc_1.srnamt, "CTRRFS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctrrfs_("/", "N", "N", &c__0, &c__0, a, &c__1, b, &c__1, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTRRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctrrfs_("U", "/", "N", &c__0, &c__0, a, &c__1, b, &c__1, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTRRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctrrfs_("U", "N", "/", &c__0, &c__0, a, &c__1, b, &c__1, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTRRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; ctrrfs_("U", "N", "N", &c_n1, &c__0, a, &c__1, b, &c__1, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTRRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; ctrrfs_("U", "N", "N", &c__0, &c_n1, a, &c__1, b, &c__1, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTRRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 7; ctrrfs_("U", "N", "N", &c__2, &c__1, a, &c__1, b, &c__2, x, &c__2, r1, r2, w, rw, &info); chkxer_("CTRRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 9; ctrrfs_("U", "N", "N", &c__2, &c__1, a, &c__2, b, &c__1, x, &c__2, r1, r2, w, rw, &info); chkxer_("CTRRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 11; ctrrfs_("U", "N", "N", &c__2, &c__1, a, &c__2, b, &c__2, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTRRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CTRCON */ s_copy(srnamc_1.srnamt, "CTRCON", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctrcon_("/", "U", "N", &c__0, a, &c__1, &rcond, w, rw, &info); chkxer_("CTRCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctrcon_("1", "/", "N", &c__0, a, &c__1, &rcond, w, rw, &info); chkxer_("CTRCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctrcon_("1", "U", "/", &c__0, a, &c__1, &rcond, w, rw, &info); chkxer_("CTRCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; ctrcon_("1", "U", "N", &c_n1, a, &c__1, &rcond, w, rw, &info); chkxer_("CTRCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 6; ctrcon_("1", "U", "N", &c__2, a, &c__1, &rcond, w, rw, &info); chkxer_("CTRCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CLATRS */ s_copy(srnamc_1.srnamt, "CLATRS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; clatrs_("/", "N", "N", "N", &c__0, a, &c__1, x, &scale, rw, &info); chkxer_("CLATRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; clatrs_("U", "/", "N", "N", &c__0, a, &c__1, x, &scale, rw, &info); chkxer_("CLATRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; clatrs_("U", "N", "/", "N", &c__0, a, &c__1, x, &scale, rw, &info); chkxer_("CLATRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; clatrs_("U", "N", "N", "/", &c__0, a, &c__1, x, &scale, rw, &info); chkxer_("CLATRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; clatrs_("U", "N", "N", "N", &c_n1, a, &c__1, x, &scale, rw, &info); chkxer_("CLATRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 7; clatrs_("U", "N", "N", "N", &c__2, a, &c__1, x, &scale, rw, &info); chkxer_("CLATRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* Test error exits for the packed triangular routines. */ } else if (lsamen_(&c__2, c2, "TP")) { /* CTPTRI */ s_copy(srnamc_1.srnamt, "CTPTRI", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctptri_("/", "N", &c__0, a, &info); chkxer_("CTPTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctptri_("U", "/", &c__0, a, &info); chkxer_("CTPTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctptri_("U", "N", &c_n1, a, &info); chkxer_("CTPTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CTPTRS */ s_copy(srnamc_1.srnamt, "CTPTRS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctptrs_("/", "N", "N", &c__0, &c__0, a, x, &c__1, &info); chkxer_("CTPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctptrs_("U", "/", "N", &c__0, &c__0, a, x, &c__1, &info); chkxer_("CTPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctptrs_("U", "N", "/", &c__0, &c__0, a, x, &c__1, &info); chkxer_("CTPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; ctptrs_("U", "N", "N", &c_n1, &c__0, a, x, &c__1, &info); chkxer_("CTPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; ctptrs_("U", "N", "N", &c__0, &c_n1, a, x, &c__1, &info); chkxer_("CTPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 8; ctptrs_("U", "N", "N", &c__2, &c__1, a, x, &c__1, &info); chkxer_("CTPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CTPRFS */ s_copy(srnamc_1.srnamt, "CTPRFS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctprfs_("/", "N", "N", &c__0, &c__0, a, b, &c__1, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctprfs_("U", "/", "N", &c__0, &c__0, a, b, &c__1, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctprfs_("U", "N", "/", &c__0, &c__0, a, b, &c__1, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; ctprfs_("U", "N", "N", &c_n1, &c__0, a, b, &c__1, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; ctprfs_("U", "N", "N", &c__0, &c_n1, a, b, &c__1, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 8; ctprfs_("U", "N", "N", &c__2, &c__1, a, b, &c__1, x, &c__2, r1, r2, w, rw, &info); chkxer_("CTPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 10; ctprfs_("U", "N", "N", &c__2, &c__1, a, b, &c__2, x, &c__1, r1, r2, w, rw, &info); chkxer_("CTPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CTPCON */ s_copy(srnamc_1.srnamt, "CTPCON", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctpcon_("/", "U", "N", &c__0, a, &rcond, w, rw, &info); chkxer_("CTPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctpcon_("1", "/", "N", &c__0, a, &rcond, w, rw, &info); chkxer_("CTPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctpcon_("1", "U", "/", &c__0, a, &rcond, w, rw, &info); chkxer_("CTPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; ctpcon_("1", "U", "N", &c_n1, a, &rcond, w, rw, &info); chkxer_("CTPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CLATPS */ s_copy(srnamc_1.srnamt, "CLATPS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; clatps_("/", "N", "N", "N", &c__0, a, x, &scale, rw, &info); chkxer_("CLATPS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; clatps_("U", "/", "N", "N", &c__0, a, x, &scale, rw, &info); chkxer_("CLATPS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; clatps_("U", "N", "/", "N", &c__0, a, x, &scale, rw, &info); chkxer_("CLATPS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; clatps_("U", "N", "N", "/", &c__0, a, x, &scale, rw, &info); chkxer_("CLATPS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; clatps_("U", "N", "N", "N", &c_n1, a, x, &scale, rw, &info); chkxer_("CLATPS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* Test error exits for the banded triangular routines. */ } else if (lsamen_(&c__2, c2, "TB")) { /* CTBTRS */ s_copy(srnamc_1.srnamt, "CTBTRS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctbtrs_("/", "N", "N", &c__0, &c__0, &c__0, a, &c__1, x, &c__1, &info); chkxer_("CTBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctbtrs_("U", "/", "N", &c__0, &c__0, &c__0, a, &c__1, x, &c__1, &info); chkxer_("CTBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctbtrs_("U", "N", "/", &c__0, &c__0, &c__0, a, &c__1, x, &c__1, &info); chkxer_("CTBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; ctbtrs_("U", "N", "N", &c_n1, &c__0, &c__0, a, &c__1, x, &c__1, &info); chkxer_("CTBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; ctbtrs_("U", "N", "N", &c__0, &c_n1, &c__0, a, &c__1, x, &c__1, &info); chkxer_("CTBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 6; ctbtrs_("U", "N", "N", &c__0, &c__0, &c_n1, a, &c__1, x, &c__1, &info); chkxer_("CTBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 8; ctbtrs_("U", "N", "N", &c__2, &c__1, &c__1, a, &c__1, x, &c__2, &info); chkxer_("CTBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 10; ctbtrs_("U", "N", "N", &c__2, &c__0, &c__1, a, &c__1, x, &c__1, &info); chkxer_("CTBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CTBRFS */ s_copy(srnamc_1.srnamt, "CTBRFS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctbrfs_("/", "N", "N", &c__0, &c__0, &c__0, a, &c__1, b, &c__1, x, & c__1, r1, r2, w, rw, &info); chkxer_("CTBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctbrfs_("U", "/", "N", &c__0, &c__0, &c__0, a, &c__1, b, &c__1, x, & c__1, r1, r2, w, rw, &info); chkxer_("CTBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctbrfs_("U", "N", "/", &c__0, &c__0, &c__0, a, &c__1, b, &c__1, x, & c__1, r1, r2, w, rw, &info); chkxer_("CTBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; ctbrfs_("U", "N", "N", &c_n1, &c__0, &c__0, a, &c__1, b, &c__1, x, & c__1, r1, r2, w, rw, &info); chkxer_("CTBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; ctbrfs_("U", "N", "N", &c__0, &c_n1, &c__0, a, &c__1, b, &c__1, x, & c__1, r1, r2, w, rw, &info); chkxer_("CTBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 6; ctbrfs_("U", "N", "N", &c__0, &c__0, &c_n1, a, &c__1, b, &c__1, x, & c__1, r1, r2, w, rw, &info); chkxer_("CTBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 8; ctbrfs_("U", "N", "N", &c__2, &c__1, &c__1, a, &c__1, b, &c__2, x, & c__2, r1, r2, w, rw, &info); chkxer_("CTBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 10; ctbrfs_("U", "N", "N", &c__2, &c__1, &c__1, a, &c__2, b, &c__1, x, & c__2, r1, r2, w, rw, &info); chkxer_("CTBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 12; ctbrfs_("U", "N", "N", &c__2, &c__1, &c__1, a, &c__2, b, &c__2, x, & c__1, r1, r2, w, rw, &info); chkxer_("CTBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CTBCON */ s_copy(srnamc_1.srnamt, "CTBCON", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; ctbcon_("/", "U", "N", &c__0, &c__0, a, &c__1, &rcond, w, rw, &info); chkxer_("CTBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; ctbcon_("1", "/", "N", &c__0, &c__0, a, &c__1, &rcond, w, rw, &info); chkxer_("CTBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; ctbcon_("1", "U", "/", &c__0, &c__0, a, &c__1, &rcond, w, rw, &info); chkxer_("CTBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; ctbcon_("1", "U", "N", &c_n1, &c__0, a, &c__1, &rcond, w, rw, &info); chkxer_("CTBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; ctbcon_("1", "U", "N", &c__0, &c_n1, a, &c__1, &rcond, w, rw, &info); chkxer_("CTBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 7; ctbcon_("1", "U", "N", &c__2, &c__1, a, &c__1, &rcond, w, rw, &info); chkxer_("CTBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* CLATBS */ s_copy(srnamc_1.srnamt, "CLATBS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; clatbs_("/", "N", "N", "N", &c__0, &c__0, a, &c__1, x, &scale, rw, & info); chkxer_("CLATBS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; clatbs_("U", "/", "N", "N", &c__0, &c__0, a, &c__1, x, &scale, rw, & info); chkxer_("CLATBS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; clatbs_("U", "N", "/", "N", &c__0, &c__0, a, &c__1, x, &scale, rw, & info); chkxer_("CLATBS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; clatbs_("U", "N", "N", "/", &c__0, &c__0, a, &c__1, x, &scale, rw, & info); chkxer_("CLATBS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; clatbs_("U", "N", "N", "N", &c_n1, &c__0, a, &c__1, x, &scale, rw, & info); chkxer_("CLATBS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 6; clatbs_("U", "N", "N", "N", &c__1, &c_n1, a, &c__1, x, &scale, rw, & info); chkxer_("CLATBS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 8; clatbs_("U", "N", "N", "N", &c__2, &c__1, a, &c__1, x, &scale, rw, & info); chkxer_("CLATBS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); } /* Print a summary line. */ alaesm_(path, &infoc_1.ok, &infoc_1.nout); return 0; /* End of CERRTR */ } /* cerrtr_ */