| 333 | } /* ilaclr_ */ |
| 334 | |
| 335 | integer iladlc_(integer *m, integer *n, doublereal *a, integer *lda) |
| 336 | { |
| 337 | /* System generated locals */ |
| 338 | integer a_dim1, a_offset, ret_val, i__1; |
| 339 | |
| 340 | /* Local variables */ |
| 341 | static integer i__; |
| 342 | |
| 343 | |
| 344 | /* |
| 345 | -- LAPACK auxiliary routine (version 3.2.2) -- |
| 346 | |
| 347 | -- June 2010 -- |
| 348 | |
| 349 | -- LAPACK is a software package provided by Univ. of Tennessee, -- |
| 350 | -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
| 351 | |
| 352 | |
| 353 | Purpose |
| 354 | ======= |
| 355 | |
| 356 | ILADLC scans A for its last non-zero column. |
| 357 | |
| 358 | Arguments |
| 359 | ========= |
| 360 | |
| 361 | M (input) INTEGER |
| 362 | The number of rows of the matrix A. |
| 363 | |
| 364 | N (input) INTEGER |
| 365 | The number of columns of the matrix A. |
| 366 | |
| 367 | A (input) DOUBLE PRECISION array, dimension (LDA,N) |
| 368 | The m by n matrix A. |
| 369 | |
| 370 | LDA (input) INTEGER |
| 371 | The leading dimension of the array A. LDA >= max(1,M). |
| 372 | |
| 373 | ===================================================================== |
| 374 | |
| 375 | |
| 376 | Quick test for the common case where one corner is non-zero. |
| 377 | */ |
| 378 | /* Parameter adjustments */ |
| 379 | a_dim1 = *lda; |
| 380 | a_offset = 1 + a_dim1; |
| 381 | a -= a_offset; |
| 382 | |
| 383 | /* Function Body */ |
| 384 | if (*n == 0) { |
| 385 | ret_val = *n; |
| 386 | } else if (a[*n * a_dim1 + 1] != 0. || a[*m + *n * a_dim1] != 0.) { |
| 387 | ret_val = *n; |
| 388 | } else { |
| 389 | /* Now scan each column from the end, returning with the first non-zero. */ |
| 390 | for (ret_val = *n; ret_val >= 1; --ret_val) { |
| 391 | i__1 = *m; |
| 392 | for (i__ = 1; i__ <= i__1; ++i__) { |