LAPACK 3.3.1
Linear Algebra PACKage

iladlc.f

Go to the documentation of this file.
00001       INTEGER FUNCTION ILADLC( M, N, A, LDA )
00002       IMPLICIT NONE
00003 *
00004 *  -- LAPACK auxiliary routine (version 3.2.2)                        --
00005 *
00006 *  -- June 2010                                                       --
00007 *
00008 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00009 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00010 *
00011 *     .. Scalar Arguments ..
00012       INTEGER            M, N, LDA
00013 *     ..
00014 *     .. Array Arguments ..
00015       DOUBLE PRECISION   A( LDA, * )
00016 *     ..
00017 *
00018 *  Purpose
00019 *  =======
00020 *
00021 *  ILADLC scans A for its last non-zero column.
00022 *
00023 *  Arguments
00024 *  =========
00025 *
00026 *  M       (input) INTEGER
00027 *          The number of rows of the matrix A.
00028 *
00029 *  N       (input) INTEGER
00030 *          The number of columns of the matrix A.
00031 *
00032 *  A       (input) DOUBLE PRECISION array, dimension (LDA,N)
00033 *          The m by n matrix A.
00034 *
00035 *  LDA     (input) INTEGER
00036 *          The leading dimension of the array A. LDA >= max(1,M).
00037 *
00038 *  =====================================================================
00039 *
00040 *     .. Parameters ..
00041       DOUBLE PRECISION ZERO
00042       PARAMETER ( ZERO = 0.0D+0 )
00043 *     ..
00044 *     .. Local Scalars ..
00045       INTEGER I
00046 *     ..
00047 *     .. Executable Statements ..
00048 *
00049 *     Quick test for the common case where one corner is non-zero.
00050       IF( N.EQ.0 ) THEN
00051          ILADLC = N
00052       ELSE IF( A(1, N).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN
00053          ILADLC = N
00054       ELSE
00055 *     Now scan each column from the end, returning with the first non-zero.
00056          DO ILADLC = N, 1, -1
00057             DO I = 1, M
00058                IF( A(I, ILADLC).NE.ZERO ) RETURN
00059             END DO
00060          END DO
00061       END IF
00062       RETURN
00063       END
 All Files Functions