LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
iladlc.f
Go to the documentation of this file.
00001 *> \brief \b ILADLC
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download ILADLC + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iladlc.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iladlc.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iladlc.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       INTEGER FUNCTION ILADLC( M, N, A, LDA )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       INTEGER            M, N, LDA
00025 *       ..
00026 *       .. Array Arguments ..
00027 *       DOUBLE PRECISION   A( LDA, * )
00028 *       ..
00029 *  
00030 *
00031 *> \par Purpose:
00032 *  =============
00033 *>
00034 *> \verbatim
00035 *>
00036 *> ILADLC scans A for its last non-zero column.
00037 *> \endverbatim
00038 *
00039 *  Arguments:
00040 *  ==========
00041 *
00042 *> \param[in] M
00043 *> \verbatim
00044 *>          M is INTEGER
00045 *>          The number of rows of the matrix A.
00046 *> \endverbatim
00047 *>
00048 *> \param[in] N
00049 *> \verbatim
00050 *>          N is INTEGER
00051 *>          The number of columns of the matrix A.
00052 *> \endverbatim
00053 *>
00054 *> \param[in] A
00055 *> \verbatim
00056 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
00057 *>          The m by n matrix A.
00058 *> \endverbatim
00059 *>
00060 *> \param[in] LDA
00061 *> \verbatim
00062 *>          LDA is INTEGER
00063 *>          The leading dimension of the array A. LDA >= max(1,M).
00064 *> \endverbatim
00065 *
00066 *  Authors:
00067 *  ========
00068 *
00069 *> \author Univ. of Tennessee 
00070 *> \author Univ. of California Berkeley 
00071 *> \author Univ. of Colorado Denver 
00072 *> \author NAG Ltd. 
00073 *
00074 *> \date November 2011
00075 *
00076 *> \ingroup auxOTHERauxiliary
00077 *
00078 *  =====================================================================
00079       INTEGER FUNCTION ILADLC( M, N, A, LDA )
00080 *
00081 *  -- LAPACK auxiliary routine (version 3.4.0) --
00082 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00083 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00084 *     November 2011
00085 *
00086 *     .. Scalar Arguments ..
00087       INTEGER            M, N, LDA
00088 *     ..
00089 *     .. Array Arguments ..
00090       DOUBLE PRECISION   A( LDA, * )
00091 *     ..
00092 *
00093 *  =====================================================================
00094 *
00095 *     .. Parameters ..
00096       DOUBLE PRECISION ZERO
00097       PARAMETER ( ZERO = 0.0D+0 )
00098 *     ..
00099 *     .. Local Scalars ..
00100       INTEGER I
00101 *     ..
00102 *     .. Executable Statements ..
00103 *
00104 *     Quick test for the common case where one corner is non-zero.
00105       IF( N.EQ.0 ) THEN
00106          ILADLC = N
00107       ELSE IF( A(1, N).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN
00108          ILADLC = N
00109       ELSE
00110 *     Now scan each column from the end, returning with the first non-zero.
00111          DO ILADLC = N, 1, -1
00112             DO I = 1, M
00113                IF( A(I, ILADLC).NE.ZERO ) RETURN
00114             END DO
00115          END DO
00116       END IF
00117       RETURN
00118       END
 All Files Functions