LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ ilaslc()

integer function ilaslc ( integer  M,
integer  N,
real, dimension( lda, * )  A,
integer  LDA 
)

ILASLC scans a matrix for its last non-zero column.

Download ILASLC + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 ILASLC scans A for its last non-zero column.
Parameters
[in]M
          M is INTEGER
          The number of rows of the matrix A.
[in]N
          N is INTEGER
          The number of columns of the matrix A.
[in]A
          A is REAL array, dimension (LDA,N)
          The m by n matrix A.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A. LDA >= max(1,M).
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 77 of file ilaslc.f.

78 *
79 * -- LAPACK auxiliary routine --
80 * -- LAPACK is a software package provided by Univ. of Tennessee, --
81 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
82 *
83 * .. Scalar Arguments ..
84  INTEGER M, N, LDA
85 * ..
86 * .. Array Arguments ..
87  REAL A( LDA, * )
88 * ..
89 *
90 * =====================================================================
91 *
92 * .. Parameters ..
93  REAL ZERO
94  parameter( zero = 0.0e+0 )
95 * ..
96 * .. Local Scalars ..
97  INTEGER I
98 * ..
99 * .. Executable Statements ..
100 *
101 * Quick test for the common case where one corner is non-zero.
102  IF( n.EQ.0 ) THEN
103  ilaslc = n
104  ELSE IF( a(1, n).NE.zero .OR. a(m, n).NE.zero ) THEN
105  ilaslc = n
106  ELSE
107 * Now scan each column from the end, returning with the first non-zero.
108  DO ilaslc = n, 1, -1
109  DO i = 1, m
110  IF( a(i, ilaslc).NE.zero ) RETURN
111  END DO
112  END DO
113  END IF
114  RETURN
integer function ilaslc(M, N, A, LDA)
ILASLC scans a matrix for its last non-zero column.
Definition: ilaslc.f:78