1ZGEQP3(1) LAPACK routine (version 3.1) ZGEQP3(1)
2
3
4
6 ZGEQP3 - a QR factorization with column pivoting of a matrix A
7
9 SUBROUTINE ZGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK, INFO )
10
11 INTEGER INFO, LDA, LWORK, M, N
12
13 INTEGER JPVT( * )
14
15 DOUBLE PRECISION RWORK( * )
16
17 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
18
20 ZGEQP3 computes a QR factorization with column pivoting of a matrix A:
21 A*P = Q*R using Level 3 BLAS.
22
23
25 M (input) INTEGER
26 The number of rows of the matrix A. M >= 0.
27
28 N (input) INTEGER
29 The number of columns of the matrix A. N >= 0.
30
31 A (input/output) COMPLEX*16 array, dimension (LDA,N)
32 On entry, the M-by-N matrix A. On exit, the upper triangle of
33 the array contains the min(M,N)-by-N upper trapezoidal matrix
34 R; the elements below the diagonal, together with the array
35 TAU, represent the unitary matrix Q as a product of min(M,N)
36 elementary reflectors.
37
38 LDA (input) INTEGER
39 The leading dimension of the array A. LDA >= max(1,M).
40
41 JPVT (input/output) INTEGER array, dimension (N)
42 On entry, if JPVT(J).ne.0, the J-th column of A is permuted to
43 the front of A*P (a leading column); if JPVT(J)=0, the J-th
44 column of A is a free column. On exit, if JPVT(J)=K, then the
45 J-th column of A*P was the the K-th column of A.
46
47 TAU (output) COMPLEX*16 array, dimension (min(M,N))
48 The scalar factors of the elementary reflectors.
49
50 WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
51 On exit, if INFO=0, WORK(1) returns the optimal LWORK.
52
53 LWORK (input) INTEGER
54 The dimension of the array WORK. LWORK >= N+1. For optimal
55 performance LWORK >= ( N+1 )*NB, where NB is the optimal block‐
56 size.
57
58 If LWORK = -1, then a workspace query is assumed; the routine
59 only calculates the optimal size of the WORK array, returns
60 this value as the first entry of the WORK array, and no error
61 message related to LWORK is issued by XERBLA.
62
63 RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
64
65 INFO (output) INTEGER
66 = 0: successful exit.
67 < 0: if INFO = -i, the i-th argument had an illegal value.
68
70 The matrix Q is represented as a product of elementary reflectors
71
72 Q = H(1) H(2) . . . H(k), where k = min(m,n).
73
74 Each H(i) has the form
75
76 H(i) = I - tau * v * v'
77
78 where tau is a real/complex scalar, and v is a real/complex vector with
79 v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
80 and tau in TAU(i).
81
82 Based on contributions by
83 G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
84 X. Sun, Computer Science Dept., Duke University, USA
85
86
87
88
89 LAPACK routine (version 3.1) November 2006 ZGEQP3(1)