~ubuntu-branches/ubuntu/vivid/atlas/vivid

« back to all changes in this revision

Viewing changes to interfaces/lapack/F77/src/dgetrf.f

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2002-04-13 10:07:52 UTC
  • Revision ID: james.westby@ubuntu.com-20020413100752-va9zm0rd4gpurdkq
Tags: upstream-3.2.1ln
ImportĀ upstreamĀ versionĀ 3.2.1ln

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
 
2
*
 
3
*  -- LAPACK routine (version 3.0) --
 
4
*     Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
 
5
*     Courant Institute, Argonne National Lab, and Rice University
 
6
*     September 30, 1994
 
7
*
 
8
*  -- Modified by R. Clint Whaley for ATLAS Fortran77 LAPACK interface,
 
9
*     November, 1999.
 
10
*
 
11
*     .. Scalar Arguments ..
 
12
      INTEGER            INFO, LDA, M, N
 
13
*     ..
 
14
*     .. Array Arguments ..
 
15
      INTEGER            IPIV( * )
 
16
      DOUBLE PRECISION   A( LDA, * )
 
17
*     ..
 
18
*
 
19
*  Purpose
 
20
*  =======
 
21
*
 
22
*  DGETRF computes an LU factorization of a general M-by-N matrix A
 
23
*  using partial pivoting with row interchanges.
 
24
*
 
25
*  The factorization has the form
 
26
*     A = P * L * U
 
27
*  where P is a permutation matrix, L is lower triangular with unit
 
28
*  diagonal elements (lower trapezoidal if m > n), and U is upper
 
29
*  triangular (upper trapezoidal if m < n).
 
30
*
 
31
*  Arguments
 
32
*  =========
 
33
*
 
34
*  M       (input) INTEGER
 
35
*          The number of rows of the matrix A.  M >= 0.
 
36
*
 
37
*  N       (input) INTEGER
 
38
*          The number of columns of the matrix A.  N >= 0.
 
39
*
 
40
*  A       (input/output) DOUBLE PRECISION array, dimension (LDA,N)
 
41
*          On entry, the M-by-N matrix to be factored.
 
42
*          On exit, the factors L and U from the factorization
 
43
*          A = P*L*U; the unit diagonal elements of L are not stored.
 
44
*
 
45
*  LDA     (input) INTEGER
 
46
*          The leading dimension of the array A.  LDA >= max(1,M).
 
47
*
 
48
*  IPIV    (output) INTEGER array, dimension (min(M,N))
 
49
*          The pivot indices; for 1 <= i <= min(M,N), row i of the
 
50
*          matrix was interchanged with row IPIV(i).
 
51
*
 
52
*  INFO    (output) INTEGER
 
53
*          = 0:  successful exit
 
54
*          < 0:  if INFO = -i, the i-th argument had an illegal value
 
55
*          > 0:  if INFO = i, U(i,i) is exactly zero. The factorization
 
56
*                has been completed, but the factor U is exactly
 
57
*                singular, and division by zero will occur if it is used
 
58
*                to solve a system of equations.
 
59
*
 
60
*  =====================================================================
 
61
*
 
62
*     ..
 
63
*     .. External Subroutines ..
 
64
      EXTERNAL           XERBLA, ATL_F77WRAP_DGETRF
 
65
*     ..
 
66
*     .. Intrinsic Functions ..
 
67
      INTRINSIC          MAX, MIN
 
68
*     ..
 
69
*     .. Executable Statements ..
 
70
*
 
71
*     Test the input parameters.
 
72
*
 
73
      INFO = 0
 
74
      IF( M.LT.0 ) THEN
 
75
         INFO = -1
 
76
      ELSE IF( N.LT.0 ) THEN
 
77
         INFO = -2
 
78
      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
 
79
         INFO = -4
 
80
      END IF
 
81
      IF( INFO.NE.0 ) THEN
 
82
         CALL XERBLA( 'DGETRF', -INFO )
 
83
         RETURN
 
84
      END IF
 
85
*
 
86
      CALL ATL_F77WRAP_DGETRF( M, N, A, LDA, IPIV, INFO )
 
87
*
 
88
      RETURN
 
89
      END