LP-311 Remove basic/advanced stabilization tab auto-switch (autotune/txpid lock issues)
[librepilot.git] / ground / gcs / src / libs / eigen / lapack / ilaclr.f
blobd8ab09c5532660052e50292b8466331e76901a10
1 *> \brief \b ILACLR
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
8 *> \htmlonly
9 *> Download ILACLR + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilaclr.f">
11 *> [TGZ]</a>
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilaclr.f">
13 *> [ZIP]</a>
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilaclr.f">
15 *> [TXT]</a>
16 *> \endhtmlonly
18 * Definition:
19 * ===========
21 * INTEGER FUNCTION ILACLR( M, N, A, LDA )
23 * .. Scalar Arguments ..
24 * INTEGER M, N, LDA
25 * ..
26 * .. Array Arguments ..
27 * COMPLEX A( LDA, * )
28 * ..
31 *> \par Purpose:
32 * =============
34 *> \verbatim
36 *> ILACLR scans A for its last non-zero row.
37 *> \endverbatim
39 * Arguments:
40 * ==========
42 *> \param[in] M
43 *> \verbatim
44 *> M is INTEGER
45 *> The number of rows of the matrix A.
46 *> \endverbatim
48 *> \param[in] N
49 *> \verbatim
50 *> N is INTEGER
51 *> The number of columns of the matrix A.
52 *> \endverbatim
54 *> \param[in] A
55 *> \verbatim
56 *> A is array, dimension (LDA,N)
57 *> The m by n matrix A.
58 *> \endverbatim
60 *> \param[in] LDA
61 *> \verbatim
62 *> LDA is INTEGER
63 *> The leading dimension of the array A. LDA >= max(1,M).
64 *> \endverbatim
66 * Authors:
67 * ========
69 *> \author Univ. of Tennessee
70 *> \author Univ. of California Berkeley
71 *> \author Univ. of Colorado Denver
72 *> \author NAG Ltd.
74 *> \date April 2012
76 *> \ingroup complexOTHERauxiliary
78 * =====================================================================
79 INTEGER FUNCTION ILACLR( M, N, A, LDA )
81 * -- LAPACK auxiliary routine (version 3.4.1) --
82 * -- LAPACK is a software package provided by Univ. of Tennessee, --
83 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
84 * April 2012
86 * .. Scalar Arguments ..
87 INTEGER M, N, LDA
88 * ..
89 * .. Array Arguments ..
90 COMPLEX A( LDA, * )
91 * ..
93 * =====================================================================
95 * .. Parameters ..
96 COMPLEX ZERO
97 PARAMETER ( ZERO = (0.0E+0, 0.0E+0) )
98 * ..
99 * .. Local Scalars ..
100 INTEGER I, J
101 * ..
102 * .. Executable Statements ..
104 * Quick test for the common case where one corner is non-zero.
105 IF( M.EQ.0 ) THEN
106 ILACLR = M
107 ELSE IF( A(M, 1).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN
108 ILACLR = M
109 ELSE
110 * Scan up each column tracking the last zero row seen.
111 ILACLR = 0
112 DO J = 1, N
114 DO WHILE((A(MAX(I,1),J).EQ.ZERO).AND.(I.GE.1))
115 I=I-1
116 ENDDO
117 ILACLR = MAX( ILACLR, I )
118 END DO
119 END IF
120 RETURN