zerrqp.c
Go to the documentation of this file.
00001 /* zerrqp.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__2 = 2;
00034 static integer c_n1 = -1;
00035 static integer c__0 = 0;
00036 static integer c__1 = 1;
00037 static integer c__3 = 3;
00038 
00039 /* Subroutine */ int zerrqp_(char *path, integer *nunit)
00040 {
00041     /* System generated locals */
00042     integer i__1;
00043 
00044     /* Builtin functions */
00045     /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
00046     integer s_wsle(cilist *), e_wsle(void);
00047 
00048     /* Local variables */
00049     doublecomplex a[9]  /* was [3][3] */, w[15];
00050     char c2[2];
00051     integer ip[3], lw;
00052     doublereal rw[6];
00053     doublecomplex tau[3];
00054     integer info;
00055     extern /* Subroutine */ int zgeqp3_(integer *, integer *, doublecomplex *, 
00056              integer *, integer *, doublecomplex *, doublecomplex *, integer *
00057 , doublereal *, integer *), alaesm_(char *, logical *, integer *);
00058     extern logical lsamen_(integer *, char *, char *);
00059     extern /* Subroutine */ int chkxer_(char *, integer *, integer *, logical 
00060             *, logical *), zgeqpf_(integer *, integer *, 
00061             doublecomplex *, integer *, integer *, doublecomplex *, 
00062             doublecomplex *, doublereal *, integer *);
00063 
00064     /* Fortran I/O blocks */
00065     static cilist io___4 = { 0, 0, 0, 0, 0 };
00066 
00067 
00068 
00069 /*  -- LAPACK test routine (version 3.1) -- */
00070 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00071 /*     November 2006 */
00072 
00073 /*     .. Scalar Arguments .. */
00074 /*     .. */
00075 
00076 /*  Purpose */
00077 /*  ======= */
00078 
00079 /*  ZERRQP tests the error exits for ZGEQPF and CGEQP3. */
00080 
00081 /*  Arguments */
00082 /*  ========= */
00083 
00084 /*  PATH    (input) CHARACTER*3 */
00085 /*          The LAPACK path name for the routines to be tested. */
00086 
00087 /*  NUNIT   (input) INTEGER */
00088 /*          The unit number for output. */
00089 
00090 /*  ===================================================================== */
00091 
00092 /*     .. Parameters .. */
00093 /*     .. */
00094 /*     .. Local Scalars .. */
00095 /*     .. */
00096 /*     .. Local Arrays .. */
00097 /*     .. */
00098 /*     .. External Functions .. */
00099 /*     .. */
00100 /*     .. External Subroutines .. */
00101 /*     .. */
00102 /*     .. Scalars in Common .. */
00103 /*     .. */
00104 /*     .. Common blocks .. */
00105 /*     .. */
00106 /*     .. Intrinsic Functions .. */
00107 /*     .. */
00108 /*     .. Executable Statements .. */
00109 
00110     infoc_1.nout = *nunit;
00111     s_copy(c2, path + 1, (ftnlen)2, (ftnlen)2);
00112     lw = 4;
00113     a[0].r = 1., a[0].i = -1.;
00114     a[3].r = 2., a[3].i = -2.;
00115     a[4].r = 3., a[4].i = -3.;
00116     a[1].r = 4., a[1].i = -4.;
00117     infoc_1.ok = TRUE_;
00118     io___4.ciunit = infoc_1.nout;
00119     s_wsle(&io___4);
00120     e_wsle();
00121 
00122 /*     Test error exits for QR factorization with pivoting */
00123 
00124     if (lsamen_(&c__2, c2, "QP")) {
00125 
00126 /*        ZGEQPF */
00127 
00128         s_copy(srnamc_1.srnamt, "ZGEQPF", (ftnlen)32, (ftnlen)6);
00129         infoc_1.infot = 1;
00130         zgeqpf_(&c_n1, &c__0, a, &c__1, ip, tau, w, rw, &info);
00131         chkxer_("ZGEQPF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00132                 infoc_1.ok);
00133         infoc_1.infot = 2;
00134         zgeqpf_(&c__0, &c_n1, a, &c__1, ip, tau, w, rw, &info);
00135         chkxer_("ZGEQPF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00136                 infoc_1.ok);
00137         infoc_1.infot = 4;
00138         zgeqpf_(&c__2, &c__0, a, &c__1, ip, tau, w, rw, &info);
00139         chkxer_("ZGEQPF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00140                 infoc_1.ok);
00141 
00142 /*        ZGEQP3 */
00143 
00144         s_copy(srnamc_1.srnamt, "ZGEQP3", (ftnlen)32, (ftnlen)6);
00145         infoc_1.infot = 1;
00146         zgeqp3_(&c_n1, &c__0, a, &c__1, ip, tau, w, &lw, rw, &info);
00147         chkxer_("ZGEQP3", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00148                 infoc_1.ok);
00149         infoc_1.infot = 2;
00150         zgeqp3_(&c__1, &c_n1, a, &c__1, ip, tau, w, &lw, rw, &info);
00151         chkxer_("ZGEQP3", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00152                 infoc_1.ok);
00153         infoc_1.infot = 4;
00154         zgeqp3_(&c__2, &c__3, a, &c__1, ip, tau, w, &lw, rw, &info);
00155         chkxer_("ZGEQP3", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
00156                 infoc_1.ok);
00157         infoc_1.infot = 8;
00158         i__1 = lw - 10;
00159         zgeqp3_(&c__2, &c__2, a, &c__2, ip, tau, w, &i__1, rw, &info);
00160         chkxer_("ZGEQP3", &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 ZERRQP */
00171 
00172 } /* zerrqp_ */


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