/* Subroutine */ int serrpo_(char *path, integer *nunit) { /* Builtin functions */ integer s_wsle(cilist *), e_wsle(void); /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen); /* Local variables */ static integer info; static real anrm, a[16] /* was [4][4] */, b[4]; static integer i__, j; static real w[12], x[4], rcond; static char c2[2]; static real r1[4], r2[4]; extern /* Subroutine */ int spbtf2_(char *, integer *, integer *, real *, integer *, integer *); static real af[16] /* was [4][4] */; extern /* Subroutine */ int spotf2_(char *, integer *, real *, integer *, integer *); static integer iw[4]; extern /* Subroutine */ int alaesm_(char *, logical *, integer *); extern logical lsamen_(integer *, char *, char *); extern /* Subroutine */ int chkxer_(char *, integer *, integer *, logical *, logical *), spbcon_(char *, integer *, integer *, real *, integer *, real *, real *, real *, integer *, integer *), spbequ_(char *, integer *, integer *, real *, integer *, real *, real *, real *, integer *), spbrfs_(char *, integer *, integer *, integer *, real *, integer *, real *, integer *, real *, integer *, real *, integer *, real *, real *, real *, integer *, integer *), spbtrf_(char *, integer *, integer *, real *, integer *, integer *), spocon_(char *, integer *, real *, integer *, real *, real *, real *, integer *, integer *), sppcon_(char *, integer *, real *, real *, real *, real *, integer *, integer *), spoequ_(integer *, real *, integer *, real *, real *, real *, integer *), spbtrs_( char *, integer *, integer *, integer *, real *, integer *, real * , integer *, integer *), sporfs_(char *, integer *, integer *, real *, integer *, real *, integer *, real *, integer * , real *, integer *, real *, real *, real *, integer *, integer *), spotrf_(char *, integer *, real *, integer *, integer *), spotri_(char *, integer *, real *, integer *, integer *), sppequ_(char *, integer *, real *, real *, real *, real *, integer *), spprfs_(char *, integer *, integer *, real *, real *, real *, integer *, real *, integer *, real *, real *, real *, integer *, integer *), spptrf_(char *, integer *, real *, integer *), spptri_(char *, integer *, real *, integer *), spotrs_(char *, integer *, integer *, real *, integer *, real *, integer *, integer *), spptrs_(char *, integer *, integer *, real *, real *, integer *, integer *); /* Fortran I/O blocks */ static cilist io___1 = { 0, 0, 0, 0, 0 }; #define a_ref(a_1,a_2) a[(a_2)*4 + a_1 - 5] #define af_ref(a_1,a_2) af[(a_2)*4 + a_1 - 5] /* -- LAPACK test routine (version 3.0) -- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., Courant Institute, Argonne National Lab, and Rice University February 29, 1992 Purpose ======= SERRPO tests the error exits for the REAL routines for symmetric positive definite matrices. Arguments ========= PATH (input) CHARACTER*3 The LAPACK path name for the routines to be tested. NUNIT (input) INTEGER The unit number for output. ===================================================================== */ 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); /* Set the variables to innocuous values. */ for (j = 1; j <= 4; ++j) { for (i__ = 1; i__ <= 4; ++i__) { a_ref(i__, j) = 1.f / (real) (i__ + j); af_ref(i__, j) = 1.f / (real) (i__ + j); /* L10: */ } b[j - 1] = 0.f; r1[j - 1] = 0.f; r2[j - 1] = 0.f; w[j - 1] = 0.f; x[j - 1] = 0.f; iw[j - 1] = j; /* L20: */ } infoc_1.ok = TRUE_; if (lsamen_(&c__2, c2, "PO")) { /* Test error exits of the routines that use the Cholesky decomposition of a symmetric positive definite matrix. SPOTRF */ s_copy(srnamc_1.srnamt, "SPOTRF", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spotrf_("/", &c__0, a, &c__1, &info); chkxer_("SPOTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spotrf_("U", &c_n1, a, &c__1, &info); chkxer_("SPOTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spotrf_("U", &c__2, a, &c__1, &info); chkxer_("SPOTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPOTF2 */ s_copy(srnamc_1.srnamt, "SPOTF2", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spotf2_("/", &c__0, a, &c__1, &info); chkxer_("SPOTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spotf2_("U", &c_n1, a, &c__1, &info); chkxer_("SPOTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spotf2_("U", &c__2, a, &c__1, &info); chkxer_("SPOTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPOTRI */ s_copy(srnamc_1.srnamt, "SPOTRI", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spotri_("/", &c__0, a, &c__1, &info); chkxer_("SPOTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spotri_("U", &c_n1, a, &c__1, &info); chkxer_("SPOTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spotri_("U", &c__2, a, &c__1, &info); chkxer_("SPOTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPOTRS */ s_copy(srnamc_1.srnamt, "SPOTRS", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spotrs_("/", &c__0, &c__0, a, &c__1, b, &c__1, &info); chkxer_("SPOTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spotrs_("U", &c_n1, &c__0, a, &c__1, b, &c__1, &info); chkxer_("SPOTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spotrs_("U", &c__0, &c_n1, a, &c__1, b, &c__1, &info); chkxer_("SPOTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; spotrs_("U", &c__2, &c__1, a, &c__1, b, &c__2, &info); chkxer_("SPOTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 7; spotrs_("U", &c__2, &c__1, a, &c__2, b, &c__1, &info); chkxer_("SPOTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPORFS */ s_copy(srnamc_1.srnamt, "SPORFS", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; sporfs_("/", &c__0, &c__0, a, &c__1, af, &c__1, b, &c__1, x, &c__1, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; sporfs_("U", &c_n1, &c__0, a, &c__1, af, &c__1, b, &c__1, x, &c__1, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; sporfs_("U", &c__0, &c_n1, a, &c__1, af, &c__1, b, &c__1, x, &c__1, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; sporfs_("U", &c__2, &c__1, a, &c__1, af, &c__2, b, &c__2, x, &c__2, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 7; sporfs_("U", &c__2, &c__1, a, &c__2, af, &c__1, b, &c__2, x, &c__2, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 9; sporfs_("U", &c__2, &c__1, a, &c__2, af, &c__2, b, &c__1, x, &c__2, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 11; sporfs_("U", &c__2, &c__1, a, &c__2, af, &c__2, b, &c__2, x, &c__1, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPOCON */ s_copy(srnamc_1.srnamt, "SPOCON", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spocon_("/", &c__0, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPOCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spocon_("U", &c_n1, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPOCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spocon_("U", &c__2, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPOCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPOEQU */ s_copy(srnamc_1.srnamt, "SPOEQU", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spoequ_(&c_n1, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPOEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spoequ_(&c__2, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPOEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); } else if (lsamen_(&c__2, c2, "PP")) { /* Test error exits of the routines that use the Cholesky decomposition of a symmetric positive definite packed matrix. SPPTRF */ s_copy(srnamc_1.srnamt, "SPPTRF", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spptrf_("/", &c__0, a, &info); chkxer_("SPPTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spptrf_("U", &c_n1, a, &info); chkxer_("SPPTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPPTRI */ s_copy(srnamc_1.srnamt, "SPPTRI", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spptri_("/", &c__0, a, &info); chkxer_("SPPTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spptri_("U", &c_n1, a, &info); chkxer_("SPPTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPPTRS */ s_copy(srnamc_1.srnamt, "SPPTRS", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spptrs_("/", &c__0, &c__0, a, b, &c__1, &info); chkxer_("SPPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spptrs_("U", &c_n1, &c__0, a, b, &c__1, &info); chkxer_("SPPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spptrs_("U", &c__0, &c_n1, a, b, &c__1, &info); chkxer_("SPPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 6; spptrs_("U", &c__2, &c__1, a, b, &c__1, &info); chkxer_("SPPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPPRFS */ s_copy(srnamc_1.srnamt, "SPPRFS", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spprfs_("/", &c__0, &c__0, a, af, b, &c__1, x, &c__1, r1, r2, w, iw, & info); chkxer_("SPPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spprfs_("U", &c_n1, &c__0, a, af, b, &c__1, x, &c__1, r1, r2, w, iw, & info); chkxer_("SPPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spprfs_("U", &c__0, &c_n1, a, af, b, &c__1, x, &c__1, r1, r2, w, iw, & info); chkxer_("SPPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 7; spprfs_("U", &c__2, &c__1, a, af, b, &c__1, x, &c__2, r1, r2, w, iw, & info); chkxer_("SPPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 9; spprfs_("U", &c__2, &c__1, a, af, b, &c__2, x, &c__1, r1, r2, w, iw, & info); chkxer_("SPPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPPCON */ s_copy(srnamc_1.srnamt, "SPPCON", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; sppcon_("/", &c__0, a, &anrm, &rcond, w, iw, &info); chkxer_("SPPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; sppcon_("U", &c_n1, a, &anrm, &rcond, w, iw, &info); chkxer_("SPPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPPEQU */ s_copy(srnamc_1.srnamt, "SPPEQU", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; sppequ_("/", &c__0, a, r1, &rcond, &anrm, &info); chkxer_("SPPEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; sppequ_("U", &c_n1, a, r1, &rcond, &anrm, &info); chkxer_("SPPEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); } else if (lsamen_(&c__2, c2, "PB")) { /* Test error exits of the routines that use the Cholesky decomposition of a symmetric positive definite band matrix. SPBTRF */ s_copy(srnamc_1.srnamt, "SPBTRF", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spbtrf_("/", &c__0, &c__0, a, &c__1, &info); chkxer_("SPBTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbtrf_("U", &c_n1, &c__0, a, &c__1, &info); chkxer_("SPBTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbtrf_("U", &c__1, &c_n1, a, &c__1, &info); chkxer_("SPBTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; spbtrf_("U", &c__2, &c__1, a, &c__1, &info); chkxer_("SPBTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPBTF2 */ s_copy(srnamc_1.srnamt, "SPBTF2", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spbtf2_("/", &c__0, &c__0, a, &c__1, &info); chkxer_("SPBTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbtf2_("U", &c_n1, &c__0, a, &c__1, &info); chkxer_("SPBTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbtf2_("U", &c__1, &c_n1, a, &c__1, &info); chkxer_("SPBTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; spbtf2_("U", &c__2, &c__1, a, &c__1, &info); chkxer_("SPBTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPBTRS */ s_copy(srnamc_1.srnamt, "SPBTRS", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spbtrs_("/", &c__0, &c__0, &c__0, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbtrs_("U", &c_n1, &c__0, &c__0, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbtrs_("U", &c__1, &c_n1, &c__0, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spbtrs_("U", &c__0, &c__0, &c_n1, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 6; spbtrs_("U", &c__2, &c__1, &c__1, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 8; spbtrs_("U", &c__2, &c__0, &c__1, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPBRFS */ s_copy(srnamc_1.srnamt, "SPBRFS", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spbrfs_("/", &c__0, &c__0, &c__0, a, &c__1, af, &c__1, b, &c__1, x, & c__1, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbrfs_("U", &c_n1, &c__0, &c__0, a, &c__1, af, &c__1, b, &c__1, x, & c__1, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbrfs_("U", &c__1, &c_n1, &c__0, a, &c__1, af, &c__1, b, &c__1, x, & c__1, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spbrfs_("U", &c__0, &c__0, &c_n1, a, &c__1, af, &c__1, b, &c__1, x, & c__1, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 6; spbrfs_("U", &c__2, &c__1, &c__1, a, &c__1, af, &c__2, b, &c__2, x, & c__2, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 8; spbrfs_("U", &c__2, &c__1, &c__1, a, &c__2, af, &c__1, b, &c__2, x, & c__2, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 10; spbrfs_("U", &c__2, &c__0, &c__1, a, &c__1, af, &c__1, b, &c__1, x, & c__2, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 12; spbrfs_("U", &c__2, &c__0, &c__1, a, &c__1, af, &c__1, b, &c__2, x, & c__1, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPBCON */ s_copy(srnamc_1.srnamt, "SPBCON", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spbcon_("/", &c__0, &c__0, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbcon_("U", &c_n1, &c__0, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbcon_("U", &c__1, &c_n1, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; spbcon_("U", &c__2, &c__1, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPBEQU */ s_copy(srnamc_1.srnamt, "SPBEQU", (ftnlen)6, (ftnlen)6); infoc_1.infot = 1; spbequ_("/", &c__0, &c__0, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPBEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbequ_("U", &c_n1, &c__0, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPBEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbequ_("U", &c__1, &c_n1, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPBEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; spbequ_("U", &c__2, &c__1, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPBEQU", &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 SERRPO */ } /* serrpo_ */
/* Subroutine */ int spbtrf_(char *uplo, integer *n, integer *kd, real *ab, integer *ldab, integer *info) { /* -- 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 Purpose ======= SPBTRF computes the Cholesky factorization of a real symmetric positive definite band matrix A. The factorization has the form A = U**T * U, if UPLO = 'U', or A = L * L**T, if UPLO = 'L', where U is an upper triangular matrix and L is lower triangular. 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. KD (input) INTEGER The number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KD >= 0. AB (input/output) REAL array, dimension (LDAB,N) On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first KD+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows: if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j; if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd). On exit, if INFO = 0, the triangular factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T of the band matrix A, in the same storage format as A. LDAB (input) INTEGER The leading dimension of the array AB. LDAB >= KD+1. INFO (output) INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value > 0: if INFO = i, the leading minor of order i is not positive definite, and the factorization could not be completed. Further Details =============== The band storage scheme is illustrated by the following example, when N = 6, KD = 2, and UPLO = 'U': On entry: On exit: * * a13 a24 a35 a46 * * u13 u24 u35 u46 * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56 a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66 Similarly, if UPLO = 'L' the format of A is as follows: On entry: On exit: a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66 a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 * a31 a42 a53 a64 * * l31 l42 l53 l64 * * Array elements marked * are not used by the routine. Contributed by Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989 ===================================================================== Test the input parameters. Parameter adjustments */ /* Table of constant values */ static integer c__1 = 1; static integer c_n1 = -1; static real c_b18 = 1.f; static real c_b21 = -1.f; static integer c__33 = 33; /* System generated locals */ integer ab_dim1, ab_offset, i__1, i__2, i__3, i__4; /* Local variables */ static real work[1056] /* was [33][32] */; static integer i__, j; extern logical lsame_(char *, char *); extern /* Subroutine */ int sgemm_(char *, char *, integer *, integer *, integer *, real *, real *, integer *, real *, integer *, real *, real *, integer *); static integer i2, i3; extern /* Subroutine */ int strsm_(char *, char *, char *, char *, integer *, integer *, real *, real *, integer *, real *, integer * ), ssyrk_(char *, char *, integer *, integer *, real *, real *, integer *, real *, real *, integer * ), spbtf2_(char *, integer *, integer *, real *, integer *, integer *); static integer ib; extern /* Subroutine */ int spotf2_(char *, integer *, real *, integer *, integer *); static integer nb, ii, jj; extern /* Subroutine */ int xerbla_(char *, integer *); extern integer ilaenv_(integer *, char *, char *, integer *, integer *, integer *, integer *, ftnlen, ftnlen); #define work_ref(a_1,a_2) work[(a_2)*33 + a_1 - 34] #define ab_ref(a_1,a_2) ab[(a_2)*ab_dim1 + a_1] ab_dim1 = *ldab; ab_offset = 1 + ab_dim1 * 1; ab -= ab_offset; /* Function Body */ *info = 0; if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) { *info = -1; } else if (*n < 0) { *info = -2; } else if (*kd < 0) { *info = -3; } else if (*ldab < *kd + 1) { *info = -5; } if (*info != 0) { i__1 = -(*info); xerbla_("SPBTRF", &i__1); return 0; } /* Quick return if possible */ if (*n == 0) { return 0; } /* Determine the block size for this environment */ nb = ilaenv_(&c__1, "SPBTRF", uplo, n, kd, &c_n1, &c_n1, (ftnlen)6, ( ftnlen)1); /* The block size must not exceed the semi-bandwidth KD, and must not exceed the limit set by the size of the local array WORK. */ nb = min(nb,32); if (nb <= 1 || nb > *kd) { /* Use unblocked code */ spbtf2_(uplo, n, kd, &ab[ab_offset], ldab, info); } else { /* Use blocked code */ if (lsame_(uplo, "U")) { /* Compute the Cholesky factorization of a symmetric band matrix, given the upper triangle of the matrix in band storage. Zero the upper triangle of the work array. */ i__1 = nb; for (j = 1; j <= i__1; ++j) { i__2 = j - 1; for (i__ = 1; i__ <= i__2; ++i__) { work_ref(i__, j) = 0.f; /* L10: */ } /* L20: */ } /* Process the band matrix one diagonal block at a time. */ i__1 = *n; i__2 = nb; for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { /* Computing MIN */ i__3 = nb, i__4 = *n - i__ + 1; ib = min(i__3,i__4); /* Factorize the diagonal block */ i__3 = *ldab - 1; spotf2_(uplo, &ib, &ab_ref(*kd + 1, i__), &i__3, &ii); if (ii != 0) { *info = i__ + ii - 1; goto L150; } if (i__ + ib <= *n) { /* Update the relevant part of the trailing submatrix. If A11 denotes the diagonal block which has just been factorized, then we need to update the remaining blocks in the diagram: A11 A12 A13 A22 A23 A33 The numbers of rows and columns in the partitioning are IB, I2, I3 respectively. The blocks A12, A22 and A23 are empty if IB = KD. The upper triangle of A13 lies outside the band. Computing MIN */ i__3 = *kd - ib, i__4 = *n - i__ - ib + 1; i2 = min(i__3,i__4); /* Computing MIN */ i__3 = ib, i__4 = *n - i__ - *kd + 1; i3 = min(i__3,i__4); if (i2 > 0) { /* Update A12 */ i__3 = *ldab - 1; i__4 = *ldab - 1; strsm_("Left", "Upper", "Transpose", "Non-unit", &ib, &i2, &c_b18, &ab_ref(*kd + 1, i__), &i__3, & ab_ref(*kd + 1 - ib, i__ + ib), &i__4); /* Update A22 */ i__3 = *ldab - 1; i__4 = *ldab - 1; ssyrk_("Upper", "Transpose", &i2, &ib, &c_b21, & ab_ref(*kd + 1 - ib, i__ + ib), &i__3, &c_b18, &ab_ref(*kd + 1, i__ + ib), &i__4); } if (i3 > 0) { /* Copy the lower triangle of A13 into the work array. */ i__3 = i3; for (jj = 1; jj <= i__3; ++jj) { i__4 = ib; for (ii = jj; ii <= i__4; ++ii) { work_ref(ii, jj) = ab_ref(ii - jj + 1, jj + i__ + *kd - 1); /* L30: */ } /* L40: */ } /* Update A13 (in the work array). */ i__3 = *ldab - 1; strsm_("Left", "Upper", "Transpose", "Non-unit", &ib, &i3, &c_b18, &ab_ref(*kd + 1, i__), &i__3, work, &c__33); /* Update A23 */ if (i2 > 0) { i__3 = *ldab - 1; i__4 = *ldab - 1; sgemm_("Transpose", "No Transpose", &i2, &i3, &ib, &c_b21, &ab_ref(*kd + 1 - ib, i__ + ib), &i__3, work, &c__33, &c_b18, &ab_ref(ib + 1, i__ + *kd), &i__4); } /* Update A33 */ i__3 = *ldab - 1; ssyrk_("Upper", "Transpose", &i3, &ib, &c_b21, work, & c__33, &c_b18, &ab_ref(*kd + 1, i__ + *kd), & i__3); /* Copy the lower triangle of A13 back into place. */ i__3 = i3; for (jj = 1; jj <= i__3; ++jj) { i__4 = ib; for (ii = jj; ii <= i__4; ++ii) { ab_ref(ii - jj + 1, jj + i__ + *kd - 1) = work_ref(ii, jj); /* L50: */ } /* L60: */ } } } /* L70: */ } } else { /* Compute the Cholesky factorization of a symmetric band matrix, given the lower triangle of the matrix in band storage. Zero the lower triangle of the work array. */ i__2 = nb; for (j = 1; j <= i__2; ++j) { i__1 = nb; for (i__ = j + 1; i__ <= i__1; ++i__) { work_ref(i__, j) = 0.f; /* L80: */ } /* L90: */ } /* Process the band matrix one diagonal block at a time. */ i__2 = *n; i__1 = nb; for (i__ = 1; i__1 < 0 ? i__ >= i__2 : i__ <= i__2; i__ += i__1) { /* Computing MIN */ i__3 = nb, i__4 = *n - i__ + 1; ib = min(i__3,i__4); /* Factorize the diagonal block */ i__3 = *ldab - 1; spotf2_(uplo, &ib, &ab_ref(1, i__), &i__3, &ii); if (ii != 0) { *info = i__ + ii - 1; goto L150; } if (i__ + ib <= *n) { /* Update the relevant part of the trailing submatrix. If A11 denotes the diagonal block which has just been factorized, then we need to update the remaining blocks in the diagram: A11 A21 A22 A31 A32 A33 The numbers of rows and columns in the partitioning are IB, I2, I3 respectively. The blocks A21, A22 and A32 are empty if IB = KD. The lower triangle of A31 lies outside the band. Computing MIN */ i__3 = *kd - ib, i__4 = *n - i__ - ib + 1; i2 = min(i__3,i__4); /* Computing MIN */ i__3 = ib, i__4 = *n - i__ - *kd + 1; i3 = min(i__3,i__4); if (i2 > 0) { /* Update A21 */ i__3 = *ldab - 1; i__4 = *ldab - 1; strsm_("Right", "Lower", "Transpose", "Non-unit", &i2, &ib, &c_b18, &ab_ref(1, i__), &i__3, &ab_ref( ib + 1, i__), &i__4); /* Update A22 */ i__3 = *ldab - 1; i__4 = *ldab - 1; ssyrk_("Lower", "No Transpose", &i2, &ib, &c_b21, & ab_ref(ib + 1, i__), &i__3, &c_b18, &ab_ref(1, i__ + ib), &i__4); } if (i3 > 0) { /* Copy the upper triangle of A31 into the work array. */ i__3 = ib; for (jj = 1; jj <= i__3; ++jj) { i__4 = min(jj,i3); for (ii = 1; ii <= i__4; ++ii) { work_ref(ii, jj) = ab_ref(*kd + 1 - jj + ii, jj + i__ - 1); /* L100: */ } /* L110: */ } /* Update A31 (in the work array). */ i__3 = *ldab - 1; strsm_("Right", "Lower", "Transpose", "Non-unit", &i3, &ib, &c_b18, &ab_ref(1, i__), &i__3, work, & c__33); /* Update A32 */ if (i2 > 0) { i__3 = *ldab - 1; i__4 = *ldab - 1; sgemm_("No transpose", "Transpose", &i3, &i2, &ib, &c_b21, work, &c__33, &ab_ref(ib + 1, i__), &i__3, &c_b18, &ab_ref(*kd + 1 - ib, i__ + ib), &i__4); } /* Update A33 */ i__3 = *ldab - 1; ssyrk_("Lower", "No Transpose", &i3, &ib, &c_b21, work, &c__33, &c_b18, &ab_ref(1, i__ + *kd), & i__3); /* Copy the upper triangle of A31 back into place. */ i__3 = ib; for (jj = 1; jj <= i__3; ++jj) { i__4 = min(jj,i3); for (ii = 1; ii <= i__4; ++ii) { ab_ref(*kd + 1 - jj + ii, jj + i__ - 1) = work_ref(ii, jj); /* L120: */ } /* L130: */ } } } /* L140: */ } } } return 0; L150: return 0; /* End of SPBTRF */ } /* spbtrf_ */
/* Subroutine */ int serrpo_(char *path, integer *nunit) { /* Builtin functions */ integer s_wsle(cilist *), e_wsle(void); /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen); /* Local variables */ real a[16] /* was [4][4] */, b[4]; integer i__, j; real w[12], x[4]; char c2[2]; real r1[4], r2[4], af[16] /* was [4][4] */; integer iw[4], info; real anrm, rcond; extern /* Subroutine */ int spbtf2_(char *, integer *, integer *, real *, integer *, integer *), spotf2_(char *, integer *, real *, integer *, integer *), alaesm_(char *, logical *, integer *); extern logical lsamen_(integer *, char *, char *); extern /* Subroutine */ int chkxer_(char *, integer *, integer *, logical *, logical *), spbcon_(char *, integer *, integer *, real *, integer *, real *, real *, real *, integer *, integer *), spbequ_(char *, integer *, integer *, real *, integer *, real *, real *, real *, integer *), spbrfs_(char *, integer *, integer *, integer *, real *, integer *, real *, integer *, real *, integer *, real *, integer *, real *, real *, real *, integer *, integer *), spbtrf_(char *, integer *, integer *, real *, integer *, integer *), spocon_(char *, integer *, real *, integer *, real *, real *, real *, integer *, integer *), sppcon_(char *, integer *, real *, real *, real *, real *, integer *, integer *), spoequ_(integer *, real *, integer *, real *, real *, real *, integer *), spbtrs_( char *, integer *, integer *, integer *, real *, integer *, real * , integer *, integer *), sporfs_(char *, integer *, integer *, real *, integer *, real *, integer *, real *, integer * , real *, integer *, real *, real *, real *, integer *, integer *), spotrf_(char *, integer *, real *, integer *, integer *), spotri_(char *, integer *, real *, integer *, integer *), sppequ_(char *, integer *, real *, real *, real *, real *, integer *), spprfs_(char *, integer *, integer *, real *, real *, real *, integer *, real *, integer *, real *, real *, real *, integer *, integer *), spptrf_(char *, integer *, real *, integer *), spptri_(char *, integer *, real *, integer *), spotrs_(char *, integer *, integer *, real *, integer *, real *, integer *, integer *), spptrs_(char *, integer *, integer *, real *, real *, integer *, integer *); /* 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 */ /* ======= */ /* SERRPO tests the error exits for the REAL routines */ /* for symmetric positive definite matrices. */ /* 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 .. */ /* .. */ /* .. Intrinsic Functions .. */ /* .. */ /* .. 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); /* Set the variables to innocuous values. */ for (j = 1; j <= 4; ++j) { for (i__ = 1; i__ <= 4; ++i__) { a[i__ + (j << 2) - 5] = 1.f / (real) (i__ + j); af[i__ + (j << 2) - 5] = 1.f / (real) (i__ + j); /* L10: */ } b[j - 1] = 0.f; r1[j - 1] = 0.f; r2[j - 1] = 0.f; w[j - 1] = 0.f; x[j - 1] = 0.f; iw[j - 1] = j; /* L20: */ } infoc_1.ok = TRUE_; if (lsamen_(&c__2, c2, "PO")) { /* Test error exits of the routines that use the Cholesky */ /* decomposition of a symmetric positive definite matrix. */ /* SPOTRF */ s_copy(srnamc_1.srnamt, "SPOTRF", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spotrf_("/", &c__0, a, &c__1, &info); chkxer_("SPOTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spotrf_("U", &c_n1, a, &c__1, &info); chkxer_("SPOTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spotrf_("U", &c__2, a, &c__1, &info); chkxer_("SPOTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPOTF2 */ s_copy(srnamc_1.srnamt, "SPOTF2", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spotf2_("/", &c__0, a, &c__1, &info); chkxer_("SPOTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spotf2_("U", &c_n1, a, &c__1, &info); chkxer_("SPOTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spotf2_("U", &c__2, a, &c__1, &info); chkxer_("SPOTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPOTRI */ s_copy(srnamc_1.srnamt, "SPOTRI", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spotri_("/", &c__0, a, &c__1, &info); chkxer_("SPOTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spotri_("U", &c_n1, a, &c__1, &info); chkxer_("SPOTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spotri_("U", &c__2, a, &c__1, &info); chkxer_("SPOTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPOTRS */ s_copy(srnamc_1.srnamt, "SPOTRS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spotrs_("/", &c__0, &c__0, a, &c__1, b, &c__1, &info); chkxer_("SPOTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spotrs_("U", &c_n1, &c__0, a, &c__1, b, &c__1, &info); chkxer_("SPOTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spotrs_("U", &c__0, &c_n1, a, &c__1, b, &c__1, &info); chkxer_("SPOTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; spotrs_("U", &c__2, &c__1, a, &c__1, b, &c__2, &info); chkxer_("SPOTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 7; spotrs_("U", &c__2, &c__1, a, &c__2, b, &c__1, &info); chkxer_("SPOTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPORFS */ s_copy(srnamc_1.srnamt, "SPORFS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; sporfs_("/", &c__0, &c__0, a, &c__1, af, &c__1, b, &c__1, x, &c__1, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; sporfs_("U", &c_n1, &c__0, a, &c__1, af, &c__1, b, &c__1, x, &c__1, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; sporfs_("U", &c__0, &c_n1, a, &c__1, af, &c__1, b, &c__1, x, &c__1, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; sporfs_("U", &c__2, &c__1, a, &c__1, af, &c__2, b, &c__2, x, &c__2, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 7; sporfs_("U", &c__2, &c__1, a, &c__2, af, &c__1, b, &c__2, x, &c__2, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 9; sporfs_("U", &c__2, &c__1, a, &c__2, af, &c__2, b, &c__1, x, &c__2, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 11; sporfs_("U", &c__2, &c__1, a, &c__2, af, &c__2, b, &c__2, x, &c__1, r1, r2, w, iw, &info); chkxer_("SPORFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPOCON */ s_copy(srnamc_1.srnamt, "SPOCON", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spocon_("/", &c__0, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPOCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spocon_("U", &c_n1, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPOCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spocon_("U", &c__2, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPOCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPOEQU */ s_copy(srnamc_1.srnamt, "SPOEQU", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spoequ_(&c_n1, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPOEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spoequ_(&c__2, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPOEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); } else if (lsamen_(&c__2, c2, "PP")) { /* Test error exits of the routines that use the Cholesky */ /* decomposition of a symmetric positive definite packed matrix. */ /* SPPTRF */ s_copy(srnamc_1.srnamt, "SPPTRF", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spptrf_("/", &c__0, a, &info); chkxer_("SPPTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spptrf_("U", &c_n1, a, &info); chkxer_("SPPTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPPTRI */ s_copy(srnamc_1.srnamt, "SPPTRI", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spptri_("/", &c__0, a, &info); chkxer_("SPPTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spptri_("U", &c_n1, a, &info); chkxer_("SPPTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPPTRS */ s_copy(srnamc_1.srnamt, "SPPTRS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spptrs_("/", &c__0, &c__0, a, b, &c__1, &info); chkxer_("SPPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spptrs_("U", &c_n1, &c__0, a, b, &c__1, &info); chkxer_("SPPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spptrs_("U", &c__0, &c_n1, a, b, &c__1, &info); chkxer_("SPPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 6; spptrs_("U", &c__2, &c__1, a, b, &c__1, &info); chkxer_("SPPTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPPRFS */ s_copy(srnamc_1.srnamt, "SPPRFS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spprfs_("/", &c__0, &c__0, a, af, b, &c__1, x, &c__1, r1, r2, w, iw, & info); chkxer_("SPPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spprfs_("U", &c_n1, &c__0, a, af, b, &c__1, x, &c__1, r1, r2, w, iw, & info); chkxer_("SPPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spprfs_("U", &c__0, &c_n1, a, af, b, &c__1, x, &c__1, r1, r2, w, iw, & info); chkxer_("SPPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 7; spprfs_("U", &c__2, &c__1, a, af, b, &c__1, x, &c__2, r1, r2, w, iw, & info); chkxer_("SPPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 9; spprfs_("U", &c__2, &c__1, a, af, b, &c__2, x, &c__1, r1, r2, w, iw, & info); chkxer_("SPPRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPPCON */ s_copy(srnamc_1.srnamt, "SPPCON", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; sppcon_("/", &c__0, a, &anrm, &rcond, w, iw, &info); chkxer_("SPPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; sppcon_("U", &c_n1, a, &anrm, &rcond, w, iw, &info); chkxer_("SPPCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPPEQU */ s_copy(srnamc_1.srnamt, "SPPEQU", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; sppequ_("/", &c__0, a, r1, &rcond, &anrm, &info); chkxer_("SPPEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; sppequ_("U", &c_n1, a, r1, &rcond, &anrm, &info); chkxer_("SPPEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); } else if (lsamen_(&c__2, c2, "PB")) { /* Test error exits of the routines that use the Cholesky */ /* decomposition of a symmetric positive definite band matrix. */ /* SPBTRF */ s_copy(srnamc_1.srnamt, "SPBTRF", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spbtrf_("/", &c__0, &c__0, a, &c__1, &info); chkxer_("SPBTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbtrf_("U", &c_n1, &c__0, a, &c__1, &info); chkxer_("SPBTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbtrf_("U", &c__1, &c_n1, a, &c__1, &info); chkxer_("SPBTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; spbtrf_("U", &c__2, &c__1, a, &c__1, &info); chkxer_("SPBTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPBTF2 */ s_copy(srnamc_1.srnamt, "SPBTF2", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spbtf2_("/", &c__0, &c__0, a, &c__1, &info); chkxer_("SPBTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbtf2_("U", &c_n1, &c__0, a, &c__1, &info); chkxer_("SPBTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbtf2_("U", &c__1, &c_n1, a, &c__1, &info); chkxer_("SPBTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; spbtf2_("U", &c__2, &c__1, a, &c__1, &info); chkxer_("SPBTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPBTRS */ s_copy(srnamc_1.srnamt, "SPBTRS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spbtrs_("/", &c__0, &c__0, &c__0, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbtrs_("U", &c_n1, &c__0, &c__0, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbtrs_("U", &c__1, &c_n1, &c__0, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spbtrs_("U", &c__0, &c__0, &c_n1, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 6; spbtrs_("U", &c__2, &c__1, &c__1, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 8; spbtrs_("U", &c__2, &c__0, &c__1, a, &c__1, b, &c__1, &info); chkxer_("SPBTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPBRFS */ s_copy(srnamc_1.srnamt, "SPBRFS", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spbrfs_("/", &c__0, &c__0, &c__0, a, &c__1, af, &c__1, b, &c__1, x, & c__1, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbrfs_("U", &c_n1, &c__0, &c__0, a, &c__1, af, &c__1, b, &c__1, x, & c__1, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbrfs_("U", &c__1, &c_n1, &c__0, a, &c__1, af, &c__1, b, &c__1, x, & c__1, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 4; spbrfs_("U", &c__0, &c__0, &c_n1, a, &c__1, af, &c__1, b, &c__1, x, & c__1, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 6; spbrfs_("U", &c__2, &c__1, &c__1, a, &c__1, af, &c__2, b, &c__2, x, & c__2, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 8; spbrfs_("U", &c__2, &c__1, &c__1, a, &c__2, af, &c__1, b, &c__2, x, & c__2, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 10; spbrfs_("U", &c__2, &c__0, &c__1, a, &c__1, af, &c__1, b, &c__1, x, & c__2, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 12; spbrfs_("U", &c__2, &c__0, &c__1, a, &c__1, af, &c__1, b, &c__2, x, & c__1, r1, r2, w, iw, &info); chkxer_("SPBRFS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPBCON */ s_copy(srnamc_1.srnamt, "SPBCON", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spbcon_("/", &c__0, &c__0, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbcon_("U", &c_n1, &c__0, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbcon_("U", &c__1, &c_n1, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; spbcon_("U", &c__2, &c__1, a, &c__1, &anrm, &rcond, w, iw, &info); chkxer_("SPBCON", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); /* SPBEQU */ s_copy(srnamc_1.srnamt, "SPBEQU", (ftnlen)32, (ftnlen)6); infoc_1.infot = 1; spbequ_("/", &c__0, &c__0, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPBEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 2; spbequ_("U", &c_n1, &c__0, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPBEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 3; spbequ_("U", &c__1, &c_n1, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPBEQU", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, & infoc_1.ok); infoc_1.infot = 5; spbequ_("U", &c__2, &c__1, a, &c__1, r1, &rcond, &anrm, &info); chkxer_("SPBEQU", &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 SERRPO */ } /* serrpo_ */
/* Subroutine */ int spbtrf_(char *uplo, integer *n, integer *kd, real *ab, integer *ldab, integer *info) { /* System generated locals */ integer ab_dim1, ab_offset, i__1, i__2, i__3, i__4; /* Local variables */ integer i__, j, i2, i3, ib, nb, ii, jj; real work[1056] /* was [33][32] */; /* -- LAPACK routine (version 3.2) -- */ /* November 2006 */ /* Purpose */ /* ======= */ /* SPBTRF computes the Cholesky factorization of a real symmetric */ /* positive definite band matrix A. */ /* The factorization has the form */ /* A = U**T * U, if UPLO = 'U', or */ /* A = L * L**T, if UPLO = 'L', */ /* where U is an upper triangular matrix and L is lower triangular. */ /* 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. */ /* KD (input) INTEGER */ /* The number of superdiagonals of the matrix A if UPLO = 'U', */ /* or the number of subdiagonals if UPLO = 'L'. KD >= 0. */ /* AB (input/output) REAL array, dimension (LDAB,N) */ /* On entry, the upper or lower triangle of the symmetric band */ /* matrix A, stored in the first KD+1 rows of the array. The */ /* j-th column of A is stored in the j-th column of the array AB */ /* as follows: */ /* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j; */ /* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd). */ /* On exit, if INFO = 0, the triangular factor U or L from the */ /* Cholesky factorization A = U**T*U or A = L*L**T of the band */ /* matrix A, in the same storage format as A. */ /* LDAB (input) INTEGER */ /* The leading dimension of the array AB. LDAB >= KD+1. */ /* INFO (output) INTEGER */ /* = 0: successful exit */ /* < 0: if INFO = -i, the i-th argument had an illegal value */ /* > 0: if INFO = i, the leading minor of order i is not */ /* positive definite, and the factorization could not be */ /* completed. */ /* Further Details */ /* =============== */ /* The band storage scheme is illustrated by the following example, when */ /* N = 6, KD = 2, and UPLO = 'U': */ /* On entry: On exit: */ /* * * a13 a24 a35 a46 * * u13 u24 u35 u46 */ /* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56 */ /* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66 */ /* Similarly, if UPLO = 'L' the format of A is as follows: */ /* On entry: On exit: */ /* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66 */ /* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 * */ /* a31 a42 a53 a64 * * l31 l42 l53 l64 * * */ /* Array elements marked * are not used by the routine. */ /* Contributed by */ /* Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989 */ /* ===================================================================== */ /* Test the input parameters. */ /* Parameter adjustments */ ab_dim1 = *ldab; ab_offset = 1 + ab_dim1; ab -= ab_offset; /* Function Body */ *info = 0; if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) { *info = -1; } else if (*n < 0) { *info = -2; } else if (*kd < 0) { *info = -3; } else if (*ldab < *kd + 1) { *info = -5; } if (*info != 0) { i__1 = -(*info); xerbla_("SPBTRF", &i__1); return 0; } /* Quick return if possible */ if (*n == 0) { return 0; } /* Determine the block size for this environment */ nb = ilaenv_(&c__1, "SPBTRF", uplo, n, kd, &c_n1, &c_n1); /* The block size must not exceed the semi-bandwidth KD, and must not */ /* exceed the limit set by the size of the local array WORK. */ nb = min(nb,32); if (nb <= 1 || nb > *kd) { /* Use unblocked code */ spbtf2_(uplo, n, kd, &ab[ab_offset], ldab, info); } else { /* Use blocked code */ if (lsame_(uplo, "U")) { /* Compute the Cholesky factorization of a symmetric band */ /* matrix, given the upper triangle of the matrix in band */ /* storage. */ /* Zero the upper triangle of the work array. */ i__1 = nb; for (j = 1; j <= i__1; ++j) { i__2 = j - 1; for (i__ = 1; i__ <= i__2; ++i__) { work[i__ + j * 33 - 34] = 0.f; } } /* Process the band matrix one diagonal block at a time. */ i__1 = *n; i__2 = nb; for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { /* Computing MIN */ i__3 = nb, i__4 = *n - i__ + 1; ib = min(i__3,i__4); /* Factorize the diagonal block */ i__3 = *ldab - 1; spotf2_(uplo, &ib, &ab[*kd + 1 + i__ * ab_dim1], &i__3, &ii); if (ii != 0) { *info = i__ + ii - 1; goto L150; } if (i__ + ib <= *n) { /* Update the relevant part of the trailing submatrix. */ /* If A11 denotes the diagonal block which has just been */ /* factorized, then we need to update the remaining */ /* blocks in the diagram: */ /* A11 A12 A13 */ /* A22 A23 */ /* A33 */ /* The numbers of rows and columns in the partitioning */ /* are IB, I2, I3 respectively. The blocks A12, A22 and */ /* A23 are empty if IB = KD. The upper triangle of A13 */ /* lies outside the band. */ /* Computing MIN */ i__3 = *kd - ib, i__4 = *n - i__ - ib + 1; i2 = min(i__3,i__4); /* Computing MIN */ i__3 = ib, i__4 = *n - i__ - *kd + 1; i3 = min(i__3,i__4); if (i2 > 0) { /* Update A12 */ i__3 = *ldab - 1; i__4 = *ldab - 1; strsm_("Left", "Upper", "Transpose", "Non-unit", &ib, &i2, &c_b18, &ab[*kd + 1 + i__ * ab_dim1], & i__3, &ab[*kd + 1 - ib + (i__ + ib) * ab_dim1] , &i__4); /* Update A22 */ i__3 = *ldab - 1; i__4 = *ldab - 1; ssyrk_("Upper", "Transpose", &i2, &ib, &c_b21, &ab[* kd + 1 - ib + (i__ + ib) * ab_dim1], &i__3, & c_b18, &ab[*kd + 1 + (i__ + ib) * ab_dim1], & i__4); } if (i3 > 0) { /* Copy the lower triangle of A13 into the work array. */ i__3 = i3; for (jj = 1; jj <= i__3; ++jj) { i__4 = ib; for (ii = jj; ii <= i__4; ++ii) { work[ii + jj * 33 - 34] = ab[ii - jj + 1 + ( jj + i__ + *kd - 1) * ab_dim1]; } } /* Update A13 (in the work array). */ i__3 = *ldab - 1; strsm_("Left", "Upper", "Transpose", "Non-unit", &ib, &i3, &c_b18, &ab[*kd + 1 + i__ * ab_dim1], & i__3, work, &c__33); /* Update A23 */ if (i2 > 0) { i__3 = *ldab - 1; i__4 = *ldab - 1; sgemm_("Transpose", "No Transpose", &i2, &i3, &ib, &c_b21, &ab[*kd + 1 - ib + (i__ + ib) * ab_dim1], &i__3, work, &c__33, &c_b18, & ab[ib + 1 + (i__ + *kd) * ab_dim1], &i__4); } /* Update A33 */ i__3 = *ldab - 1; ssyrk_("Upper", "Transpose", &i3, &ib, &c_b21, work, & c__33, &c_b18, &ab[*kd + 1 + (i__ + *kd) * ab_dim1], &i__3); /* Copy the lower triangle of A13 back into place. */ i__3 = i3; for (jj = 1; jj <= i__3; ++jj) { i__4 = ib; for (ii = jj; ii <= i__4; ++ii) { ab[ii - jj + 1 + (jj + i__ + *kd - 1) * ab_dim1] = work[ii + jj * 33 - 34]; } } } } } } else { /* Compute the Cholesky factorization of a symmetric band */ /* matrix, given the lower triangle of the matrix in band */ /* storage. */ /* Zero the lower triangle of the work array. */ i__2 = nb; for (j = 1; j <= i__2; ++j) { i__1 = nb; for (i__ = j + 1; i__ <= i__1; ++i__) { work[i__ + j * 33 - 34] = 0.f; } } /* Process the band matrix one diagonal block at a time. */ i__2 = *n; i__1 = nb; for (i__ = 1; i__1 < 0 ? i__ >= i__2 : i__ <= i__2; i__ += i__1) { /* Computing MIN */ i__3 = nb, i__4 = *n - i__ + 1; ib = min(i__3,i__4); /* Factorize the diagonal block */ i__3 = *ldab - 1; spotf2_(uplo, &ib, &ab[i__ * ab_dim1 + 1], &i__3, &ii); if (ii != 0) { *info = i__ + ii - 1; goto L150; } if (i__ + ib <= *n) { /* Update the relevant part of the trailing submatrix. */ /* If A11 denotes the diagonal block which has just been */ /* factorized, then we need to update the remaining */ /* blocks in the diagram: */ /* A11 */ /* A21 A22 */ /* A31 A32 A33 */ /* The numbers of rows and columns in the partitioning */ /* are IB, I2, I3 respectively. The blocks A21, A22 and */ /* A32 are empty if IB = KD. The lower triangle of A31 */ /* lies outside the band. */ /* Computing MIN */ i__3 = *kd - ib, i__4 = *n - i__ - ib + 1; i2 = min(i__3,i__4); /* Computing MIN */ i__3 = ib, i__4 = *n - i__ - *kd + 1; i3 = min(i__3,i__4); if (i2 > 0) { /* Update A21 */ i__3 = *ldab - 1; i__4 = *ldab - 1; strsm_("Right", "Lower", "Transpose", "Non-unit", &i2, &ib, &c_b18, &ab[i__ * ab_dim1 + 1], &i__3, & ab[ib + 1 + i__ * ab_dim1], &i__4); /* Update A22 */ i__3 = *ldab - 1; i__4 = *ldab - 1; ssyrk_("Lower", "No Transpose", &i2, &ib, &c_b21, &ab[ ib + 1 + i__ * ab_dim1], &i__3, &c_b18, &ab[( i__ + ib) * ab_dim1 + 1], &i__4); } if (i3 > 0) { /* Copy the upper triangle of A31 into the work array. */ i__3 = ib; for (jj = 1; jj <= i__3; ++jj) { i__4 = min(jj,i3); for (ii = 1; ii <= i__4; ++ii) { work[ii + jj * 33 - 34] = ab[*kd + 1 - jj + ii + (jj + i__ - 1) * ab_dim1]; } } /* Update A31 (in the work array). */ i__3 = *ldab - 1; strsm_("Right", "Lower", "Transpose", "Non-unit", &i3, &ib, &c_b18, &ab[i__ * ab_dim1 + 1], &i__3, work, &c__33); /* Update A32 */ if (i2 > 0) { i__3 = *ldab - 1; i__4 = *ldab - 1; sgemm_("No transpose", "Transpose", &i3, &i2, &ib, &c_b21, work, &c__33, &ab[ib + 1 + i__ * ab_dim1], &i__3, &c_b18, &ab[*kd + 1 - ib + (i__ + ib) * ab_dim1], &i__4); } /* Update A33 */ i__3 = *ldab - 1; ssyrk_("Lower", "No Transpose", &i3, &ib, &c_b21, work, &c__33, &c_b18, &ab[(i__ + *kd) * ab_dim1 + 1], &i__3); /* Copy the upper triangle of A31 back into place. */ i__3 = ib; for (jj = 1; jj <= i__3; ++jj) { i__4 = min(jj,i3); for (ii = 1; ii <= i__4; ++ii) { ab[*kd + 1 - jj + ii + (jj + i__ - 1) * ab_dim1] = work[ii + jj * 33 - 34]; } } } } } } } return 0; L150: return 0; /* End of SPBTRF */ } /* spbtrf_ */