Contents

?ggqrf

Computes the generalized QR factorization of two matrices.

Syntax

Include Files
• mkl.h
Description
The routine forms the generalized
QR
factorization of an
n
-by-
m
matrix
A
and an
n
-by-
p
matrix
B
as
A
=
Q
*
R
,
B
=
Q
*
T
*
Z
, where
Q
is an
n
-by-
n
orthogonal/unitary matrix,
Z
is a
p
-by-
p
orthogonal/unitary matrix, and
R
and
T
assume one of the forms:
or
where
R
11
is upper triangular, and
where
T
12
or
T
21
is a
p
-by-
p
upper triangular matrix.
In particular, if
B
is square and nonsingular, the
GQR
factorization of
A
and
B
implicitly gives the
QR
factorization of
B
-1
A
as:
B
-1
*
A
=
Z
T
*(
T
-1
*
R
)
(for real flavors) or
B
-1
*
A
=
Z
H
*(
T
-1
*
R
)
(for complex flavors).
Input Parameters
matrix_layout
Specifies whether matrix storage layout is row major (
LAPACK_ROW_MAJOR
) or column major (
LAPACK_COL_MAJOR
).
n
The number of rows of the matrices
A
and
B
(
n
0
).
m
The number of columns in
A
(
m
0
).
p
The number of columns in
B
(
p
0
).
a
,
b
Array
a
of size max(1,
lda
*
m
) for column major layout and max(1,
lda
*
n
) for row major layout contains the matrix
A
.
Array
b
of size max(1,
ldb
*
p
) for column major layout and max(1,
ldb
*
n
) for row major layout
contains the matrix
B
.
lda
a
; at least max(1,
n
)
for column major layout and at least max(1,
m
) for row major layout
.
ldb
b
; at least max(1,
n
)
for column major layout and at least max(1,
p
) for row major layout
.
Output Parameters
a
,
b
Overwritten by the factorization data as follows:
on exit, the elements on and above the diagonal of the array
a
contain the min(
n
,
m
)-by-
m
upper trapezoidal matrix
R
(
R
is upper triangular if
n
m
);the elements below the diagonal, with the array
taua
, represent the orthogonal/unitary matrix
Q
as a product of min(
n
,
m
) elementary reflectors ;
if
n
p
, the upper triangle of the subarray
b
(1:
n
,
p
-
n
+1:
p
) contains the
n
-by-
n
upper triangular matrix
T
;
if
n
>
p
, the elements on and above the (
n
-
p
)th subdiagonal contain the
n
-by-
p
upper trapezoidal matrix
T
; the remaining elements, with the array
taub
, represent the orthogonal/unitary matrix
Z
as a product of elementary reflectors.
taua
,
taub
Arrays, size at least max (1, min(
n
,
m
)) for
taua
and at least max (1, min(
n
,
p
)) for
taub
. The array
taua
contains the scalar factors of the elementary reflectors which represent the orthogonal/unitary matrix
Q
.
The array
taub
contains the scalar factors of the elementary reflectors which represent the orthogonal/unitary matrix
Z
.
Return Values
This function returns a value
info
.
If
info
=0
, the execution is successful.
If
info
=
-i
, the
i
-th parameter had an illegal value.
Application Notes
The matrix
Q
is represented as a product of elementary reflectors
Q
=
H
(1)
H
(2)...
H
(
k
)
, where
k
= min(n,m)
.
Each
H
(i) has the form
H
(i) =
I
-
τ
a
*
v
*
v
T
for real flavors, or
H
(i) =
I
-
τ
a
*
v
*
v
H
for complex flavors,
where
τ
a
is a real/complex scalar, and
v
is a real/complex vector with
v
j
= 0 for 1
j
i
- 1,
v
i
= 1
.
On exit, for
i
+ 1
j
n
,
v
j
is stored in
a
[(
j
- 1) + (
i
- 1)*
lda
]
for column major layout and in
a
[(
j
- 1)*
lda
+ (
i
- 1)]
for row major layout
and
τ
a
is stored in
taua
[
i
- 1]
The matrix
Z
is represented as a product of elementary reflectors
Z
=
H
(1)
H
(2)...
H
(
k
)
, where
k
= min(n,p)
.
Each
H
(i) has the form
H
(i) =
I
-
τ
b
*
v
*
v
T
for real flavors, or
H
(i) =
I
-
τ
b
*
v
*
v
H
for complex flavors,
where
τ
b
is a real/complex scalar, and
v
is a real/complex vector with
v
p
-
k
+ 1
= 1,
v
j
= 0 for
p
-
k
+ 1
j
p
- 1, .
On exit, for 1
j
p
-
k
+
i
- 1,
v
j
is stored in
b
[(
n
-
k
+
i
- 1) + (
j
- 1)*
ldb
]
for column major layout and in
b
[(
n
-
k
+
i
- 1)*
ldb
+ (
j
- 1)]
for row major layout
and
τ
b
is stored in
taub
[
i
- 1]
.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804