zerrps.c
Go to the documentation of this file.
00001 /* zerrps.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Common Block Declarations */
00017 
00018 struct {
00019     integer infot, nout;
00020     logical ok, lerr;
00021 } infoc_;
00022 
00023 #define infoc_1 infoc_
00024 
00025 struct {
00026     char srnamt[32];
00027 } srnamc_;
00028 
00029 #define srnamc_1 srnamc_
00030 
00031 /* Table of constant values */
00032 
00033 static integer c__0 = 0;
00034 static integer c__1 = 1;
00035 static doublereal c_b9 = -1.;
00036 static integer c_n1 = -1;
00037 static integer c__2 = 2;
00038 
00039 /* Subroutine */ int zerrps_(char *path, integer *nunit)
00040 {
00041     /* System generated locals */
00042     integer i__1;
00043     doublereal d__1;
00044 
00045     /* Builtin functions */
00046     integer s_wsle(cilist *), e_wsle(void);
00047     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00048 
00049     /* Local variables */
00050     doublecomplex a[16] /* was [4][4] */;
00051     integer i__, j, piv[4], info;
00052     doublereal rwork[8];
00053     extern /* Subroutine */ int zpstf2_(char *, integer *, doublecomplex *, 
00054             integer *, integer *, integer *, doublereal *, doublereal *, 
00055             integer *), alaesm_(char *, logical *, integer *),
00056              chkxer_(char *, integer *, integer *, logical *, logical *), zpstrf_(char *, integer *, doublecomplex *, integer *, 
00057             integer *, integer *, doublereal *, doublereal *, integer *);
00058 
00059     /* Fortran I/O blocks */
00060     static cilist io___1 = { 0, 0, 0, 0, 0 };
00061 
00062 
00063 
00064 /*  -- LAPACK test routine (version 3.1) -- */
00065 /*     Craig Lucas, University of Manchester / NAG Ltd. */
00066 /*     October, 2008 */
00067 
00068 /*     .. Scalar Arguments .. */
00069 /*     .. */
00070 
00071 /*  Purpose */
00072 /*  ======= */
00073 
00074 /*  ZERRPS tests the error exits for the COMPLEX routines */
00075 /*  for ZPSTRF. */
00076 
00077 /*  Arguments */
00078 /*  ========= */
00079 
00080 /*  PATH    (input) CHARACTER*3 */
00081 /*          The LAPACK path name for the routines to be tested. */
00082 
00083 /*  NUNIT   (input) INTEGER */
00084 /*          The unit number for output. */
00085 
00086 /*  ===================================================================== */
00087 
00088 /*     .. Parameters .. */
00089 /*     .. */
00090 /*     .. Local Scalars .. */
00091 /*     .. */
00092 /*     .. Local Arrays .. */
00093 /*     .. */
00094 /*     .. External Subroutines .. */
00095 /*     .. */
00096 /*     .. Scalars in Common .. */
00097 /*     .. */
00098 /*     .. Common blocks .. */
00099 /*     .. */
00100 /*     .. Intrinsic Functions .. */
00101 /*     .. */
00102 /*     .. Executable Statements .. */
00103 
00104     infoc_1.nout = *nunit;
00105     io___1.ciunit = infoc_1.nout;
00106     s_wsle(&io___1);
00107     e_wsle();
00108 
00109 /*     Set the variables to innocuous values. */
00110 
00111     for (j = 1; j <= 4; ++j) {
00112         for (i__ = 1; i__ <= 4; ++i__) {
00113             i__1 = i__ + (j << 2) - 5;
00114             d__1 = 1. / (doublereal) (i__ + j);
00115             a[i__1].r = d__1, a[i__1].i = 0.;
00116 
00117 /* L100: */
00118         }
00119         piv[j - 1] = j;
00120         rwork[j - 1] = 0.;
00121         rwork[j + 3] = 0.;
00122 
00123 /* L110: */
00124     }
00125     infoc_1.ok = TRUE_;
00126 
00127 
00128 /*        Test error exits of the routines that use the Cholesky */
00129 /*        decomposition of an Hermitian positive semidefinite matrix. */
00130 
00131 /*        ZPSTRF */
00132 
00133     s_copy(srnamc_1.srnamt, "ZPSTRF", (ftnlen)32, (ftnlen)6);
00134     infoc_1.infot = 1;
00135     zpstrf_("/", &c__0, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00136     chkxer_("ZPSTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00137             infoc_1.ok);
00138     infoc_1.infot = 2;
00139     zpstrf_("U", &c_n1, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00140     chkxer_("ZPSTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00141             infoc_1.ok);
00142     infoc_1.infot = 4;
00143     zpstrf_("U", &c__2, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00144     chkxer_("ZPSTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00145             infoc_1.ok);
00146 
00147 /*        ZPSTF2 */
00148 
00149     s_copy(srnamc_1.srnamt, "ZPSTF2", (ftnlen)32, (ftnlen)6);
00150     infoc_1.infot = 1;
00151     zpstf2_("/", &c__0, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00152     chkxer_("ZPSTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00153             infoc_1.ok);
00154     infoc_1.infot = 2;
00155     zpstf2_("U", &c_n1, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00156     chkxer_("ZPSTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00157             infoc_1.ok);
00158     infoc_1.infot = 4;
00159     zpstf2_("U", &c__2, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00160     chkxer_("ZPSTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00161             infoc_1.ok);
00162 
00163 
00164 /*     Print a summary line. */
00165 
00166     alaesm_(path, &infoc_1.ok, &infoc_1.nout);
00167 
00168     return 0;
00169 
00170 /*     End of ZERRPS */
00171 
00172 } /* zerrps_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:27