ilaclc.c
Go to the documentation of this file.
00001 /* ilaclc.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 integer ilaclc_(integer *m, integer *n, complex *a, integer *lda)
00017 {
00018     /* System generated locals */
00019     integer a_dim1, a_offset, ret_val, i__1, i__2;
00020 
00021     /* Local variables */
00022     integer i__;
00023 
00024 
00025 /*  -- LAPACK auxiliary routine (version 3.2.1)                        -- */
00026 
00027 /*  -- April 2009                                                      -- */
00028 
00029 /*  -- LAPACK is a software package provided by Univ. of Tennessee,    -- */
00030 /*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */
00031 
00032 /*     .. Scalar Arguments .. */
00033 /*     .. */
00034 /*     .. Array Arguments .. */
00035 /*     .. */
00036 
00037 /*  Purpose */
00038 /*  ======= */
00039 
00040 /*  ILACLC scans A for its last non-zero column. */
00041 
00042 /*  Arguments */
00043 /*  ========= */
00044 
00045 /*  M       (input) INTEGER */
00046 /*          The number of rows of the matrix A. */
00047 
00048 /*  N       (input) INTEGER */
00049 /*          The number of columns of the matrix A. */
00050 
00051 /*  A       (input) COMPLEX array, dimension (LDA,N) */
00052 /*          The m by n matrix A. */
00053 
00054 /*  LDA     (input) INTEGER */
00055 /*          The leading dimension of the array A. LDA >= max(1,M). */
00056 
00057 /*  ===================================================================== */
00058 
00059 /*     .. Parameters .. */
00060 /*     .. */
00061 /*     .. Local Scalars .. */
00062 /*     .. */
00063 /*     .. Executable Statements .. */
00064 
00065 /*     Quick test for the common case where one corner is non-zero. */
00066     /* Parameter adjustments */
00067     a_dim1 = *lda;
00068     a_offset = 1 + a_dim1;
00069     a -= a_offset;
00070 
00071     /* Function Body */
00072     if (*n == 0) {
00073         ret_val = *n;
00074     } else /* if(complicated condition) */ {
00075         i__1 = *n * a_dim1 + 1;
00076         i__2 = *m + *n * a_dim1;
00077         if (a[i__1].r != 0.f || a[i__1].i != 0.f || (a[i__2].r != 0.f || a[
00078                 i__2].i != 0.f)) {
00079             ret_val = *n;
00080         } else {
00081 /*     Now scan each column from the end, returning with the first non-zero. */
00082             for (ret_val = *n; ret_val >= 1; --ret_val) {
00083                 i__1 = *m;
00084                 for (i__ = 1; i__ <= i__1; ++i__) {
00085                     i__2 = i__ + ret_val * a_dim1;
00086                     if (a[i__2].r != 0.f || a[i__2].i != 0.f) {
00087                         return ret_val;
00088                     }
00089                 }
00090             }
00091         }
00092     }
00093     return ret_val;
00094 } /* ilaclc_ */


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