cerrps.c
Go to the documentation of this file.
00001 /* cerrps.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 real c_b9 = -1.f;
00036 static integer c_n1 = -1;
00037 static integer c__2 = 2;
00038 
00039 /* Subroutine */ int cerrps_(char *path, integer *nunit)
00040 {
00041     /* System generated locals */
00042     integer i__1;
00043     real r__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     complex a[16]       /* was [4][4] */;
00051     integer i__, j, piv[4], info;
00052     real rwork[8];
00053     extern /* Subroutine */ int cpstf2_(char *, integer *, complex *, integer 
00054             *, integer *, integer *, real *, real *, integer *), 
00055             alaesm_(char *, logical *, integer *), chkxer_(char *, 
00056             integer *, integer *, logical *, logical *), cpstrf_(char 
00057             *, integer *, complex *, integer *, integer *, integer *, real *, 
00058             real *, integer *);
00059 
00060     /* Fortran I/O blocks */
00061     static cilist io___1 = { 0, 0, 0, 0, 0 };
00062 
00063 
00064 
00065 /*  -- LAPACK test routine (version 3.1) -- */
00066 /*     Craig Lucas, University of Manchester / NAG Ltd. */
00067 /*     October, 2008 */
00068 
00069 /*     .. Scalar Arguments .. */
00070 /*     .. */
00071 
00072 /*  Purpose */
00073 /*  ======= */
00074 
00075 /*  CERRPS tests the error exits for the COMPLEX routines */
00076 /*  for CPSTRF.. */
00077 
00078 /*  Arguments */
00079 /*  ========= */
00080 
00081 /*  PATH    (input) CHARACTER*3 */
00082 /*          The LAPACK path name for the routines to be tested. */
00083 
00084 /*  NUNIT   (input) INTEGER */
00085 /*          The unit number for output. */
00086 
00087 /*  ===================================================================== */
00088 
00089 /*     .. Parameters .. */
00090 /*     .. */
00091 /*     .. Local Scalars .. */
00092 /*     .. */
00093 /*     .. Local Arrays .. */
00094 /*     .. */
00095 /*     .. External Subroutines .. */
00096 /*     .. */
00097 /*     .. Scalars in Common .. */
00098 /*     .. */
00099 /*     .. Common blocks .. */
00100 /*     .. */
00101 /*     .. Intrinsic Functions .. */
00102 /*     .. */
00103 /*     .. Executable Statements .. */
00104 
00105     infoc_1.nout = *nunit;
00106     io___1.ciunit = infoc_1.nout;
00107     s_wsle(&io___1);
00108     e_wsle();
00109 
00110 /*     Set the variables to innocuous values. */
00111 
00112     for (j = 1; j <= 4; ++j) {
00113         for (i__ = 1; i__ <= 4; ++i__) {
00114             i__1 = i__ + (j << 2) - 5;
00115             r__1 = 1.f / (real) (i__ + j);
00116             a[i__1].r = r__1, a[i__1].i = 0.f;
00117 
00118 /* L100: */
00119         }
00120         piv[j - 1] = j;
00121         rwork[j - 1] = 0.f;
00122         rwork[j + 3] = 0.f;
00123 
00124 /* L110: */
00125     }
00126     infoc_1.ok = TRUE_;
00127 
00128 
00129 /*        Test error exits of the routines that use the Cholesky */
00130 /*        decomposition of an Hermitian positive semidefinite matrix. */
00131 
00132 /*        CPSTRF */
00133 
00134     s_copy(srnamc_1.srnamt, "CPSTRF", (ftnlen)32, (ftnlen)6);
00135     infoc_1.infot = 1;
00136     cpstrf_("/", &c__0, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00137     chkxer_("CPSTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00138             infoc_1.ok);
00139     infoc_1.infot = 2;
00140     cpstrf_("U", &c_n1, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00141     chkxer_("CPSTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00142             infoc_1.ok);
00143     infoc_1.infot = 4;
00144     cpstrf_("U", &c__2, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00145     chkxer_("CPSTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00146             infoc_1.ok);
00147 
00148 /*        CPSTF2 */
00149 
00150     s_copy(srnamc_1.srnamt, "CPSTF2", (ftnlen)32, (ftnlen)6);
00151     infoc_1.infot = 1;
00152     cpstf2_("/", &c__0, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00153     chkxer_("CPSTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00154             infoc_1.ok);
00155     infoc_1.infot = 2;
00156     cpstf2_("U", &c_n1, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00157     chkxer_("CPSTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00158             infoc_1.ok);
00159     infoc_1.infot = 4;
00160     cpstf2_("U", &c__2, a, &c__1, piv, &c__1, &c_b9, rwork, &info);
00161     chkxer_("CPSTF2", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00162             infoc_1.ok);
00163 
00164 
00165 /*     Print a summary line. */
00166 
00167     alaesm_(path, &infoc_1.ok, &infoc_1.nout);
00168 
00169     return 0;
00170 
00171 /*     End of CERRPS */
00172 
00173 } /* cerrps_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:24