Developer Reference

  • 0.10
  • 10/21/2020
  • Public Content
Contents

p?larfb

Applies a block reflector or its transpose/conjugate-transpose to a general rectangular matrix.

Syntax

void
pslarfb
(
char
*side
,
char
*trans
,
char
*direct
,
char
*storev
,
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*k
,
float
*v
,
MKL_INT
*iv
,
MKL_INT
*jv
,
MKL_INT
*descv
,
float
*t
,
float
*c
,
MKL_INT
*ic
,
MKL_INT
*jc
,
MKL_INT
*descc
,
float
*work
);
void
pdlarfb
(
char
*side
,
char
*trans
,
char
*direct
,
char
*storev
,
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*k
,
double
*v
,
MKL_INT
*iv
,
MKL_INT
*jv
,
MKL_INT
*descv
,
double
*t
,
double
*c
,
MKL_INT
*ic
,
MKL_INT
*jc
,
MKL_INT
*descc
,
double
*work
);
void
pclarfb
(
char
*side
,
char
*trans
,
char
*direct
,
char
*storev
,
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*k
,
MKL_Complex8
*v
,
MKL_INT
*iv
,
MKL_INT
*jv
,
MKL_INT
*descv
,
MKL_Complex8
*t
,
MKL_Complex8
*c
,
MKL_INT
*ic
,
MKL_INT
*jc
,
MKL_INT
*descc
,
MKL_Complex8
*work
);
void
pzlarfb
(
char
*side
,
char
*trans
,
char
*direct
,
char
*storev
,
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*k
,
MKL_Complex16
*v
,
MKL_INT
*iv
,
MKL_INT
*jv
,
MKL_INT
*descv
,
MKL_Complex16
*t
,
MKL_Complex16
*c
,
MKL_INT
*ic
,
MKL_INT
*jc
,
MKL_INT
*descc
,
MKL_Complex16
*work
);
Include Files
  • mkl_scalapack.h
Description
The
p?larfb
function
applies a real/complex block reflector
Q
or its transpose
Q
T
/conjugate transpose
Q
H
to a real/complex distributed
m
-by-
n
matrix sub(
C
) =
C
(
ic
:
ic
+
m
-1
,
jc
:
jc
+
n
-1)
from the left or the right.
Input Parameters
side
(global)
if
side
=
'L'
: apply
Q
or
Q
T
for real flavors (
Q
H
for complex flavors) from the Left;
if
side
=
'R'
: apply
Q
or
Q
T
for real flavors (
Q
H
for complex flavors) from the Right.
trans
(global)
if
trans
=
'N'
: no transpose, apply
Q
;
for real flavors, if
trans
=
'T'
: transpose, apply
Q
T
for complex flavors, if
trans
=
'C'
: conjugate transpose, apply
Q
H
;
direct
(global) Indicates how
Q
is formed from a product of elementary reflectors.
if
direct
=
'F'
:
Q
=
H
(1)*
H
(2)*...*
H
(
k
)
(Forward)
if
direct
=
'B'
:
Q
=
H
(
k
)*...*
H
(2)*
H
(1)
(Backward)
storev
(global)
Indicates how the vectors that define the elementary reflectors are stored:
if
storev
=
'C'
: Columnwise
if
storev
=
'R'
: Rowwise.
m
(global)
The number of rows in the distributed matrix sub(
C
).
(
m
0)
.
n
(global)
The number of columns in the distributed matrix sub(
C
).
(
n
0)
.
k
(global)
The order of the matrix T.
v
(local).
Pointer into the local memory to an array of size
lld_v
*
LOCc
(
jv
+
k
-1)
if
storev
=
'C'
,
lld_v
*
LOCc
(
jv
+
m
-1)
if
storev
=
'R'
and
side
=
'L'
,
lld_v
*
LOCc
(
jv
+
n
-1)
if
storev
=
'R'
and
side
=
'R'
.
It contains the local pieces of the distributed vectors
V
representing the Householder transformation.
if
storev
=
'C'
and
side
=
'L'
,
lld_v
max(1,
LOCr
(
iv+m-1
))
;
if
storev
=
'C'
and
side
=
'R'
,
lld_v
max(1,
LOCr
(
iv+n-1
))
;
if
storev
=
'R'
,
lld_v
LOCr
(
jv
+
k
-1)
.
iv
,
jv
(global)
The row and column indices in the global matrix
V
indicating the first row and the first column of the matrix sub(
V
), respectively.
descv
(global and local) array of size
dlen_
. The array descriptor for the distributed matrix
V
.
c
(local).
Pointer into the local memory to an array of size
lld_c
*
LOCc
(
jc
+
n
-1)
, containing the local pieces of sub(
C
).
ic
,
jc
(global) The row and column indices in the global matrix
C
indicating the first row and the first column of the matrix sub(
C
), respectively.
descc
(global and local) array of size
dlen_
. The array descriptor for the distributed matrix
C
.
work
(local)
.
Workspace array of size
lwork
.
If
storev
=
'C'
,
  if
side
=
'L'
,
    
lwork
(
nqc
0 +
mpc
0 ) *
k
  else if
side
=
'R'
,
    
lwork
(
nqc
0 +
max
(
npv
0 +
numroc
(
numroc
(
n
+
      
icoffc
,
nb_v
, 0, 0,
npcol
),
nb_v
, 0, 0,
lcmq
),
      
mpc
0 ) ) *
k
  end if
else if
storev
=
'R'
,
  if
side
=
'L'
,
    
lwork
(
mpc
0 +
max
(
mqv
0 +
numroc
(
numroc
(
m
+
    
iroffc
,
mb_v
, 0, 0,
nprow
),
mb_v
, 0, 0,
lcmp
),
    
nqc
0 ) ) *
k
  else if
side
=
'R'
,
    
lwork
(
mpc
0 +
nqc
0 ) *
k
  end if
end if,
where
lcmq
=
lcm
/
npcol
with
lcm
=
iclm
(
nprow
,
npcol
),
iroffv
=
mod
(
iv
-1,
mb_v
),
icoffv
=
mod
(
jv
-1,
nb_v
),
ivrow
=
indxg2p
(
iv
,
mb_v
,
myrow
,
rsrc_v
,
nprow
),
ivcol
=
indxg2p
(
jv
,
nb_v
,
mycol
,
csrc_v
,
npcol
),
MqV0
=
numroc
(
m
+
icoffv
,
nb_v
,
mycol
,
ivcol
,
npcol
),
NpV0
=
numroc
(
n
+
iroffv
,
mb_v
,
myrow
,
ivrow
,
nprow
),
iroffc
=
mod
(
ic
-1,
mb_c
),
icoffc
=
mod
(
jc
-1,
nb_c
),
icrow
=
indxg2p
(
ic
,
mb_c
,
myrow
,
rsrc
_c,
nprow
),
iccol
=
indxg2p
(
jc
,
nb_c
,
mycol
,
csrc
_c,
npcol
),
MpC0
=
numroc
(
m
+
iroffc
,
mb_c
,
myrow
,
icrow
,
nprow
),
NpC0
=
numroc
(
n
+
icoffc
,
mb_c
,
myrow
,
icrow
,
nprow
),
NqC0
=
numroc
(
n
+
icoffc
,
nb_c
,
mycol
,
iccol
,
npcol
),
ilcm
,
indxg2p
, and
numroc
are ScaLAPACK tool functions;
myrow
,
mycol
,
nprow
, and
npcol
can be determined by calling the
function
blacs_gridinfo
.
Output Parameters
t
(local).
Array of size
mb_v
*
mb_v
if
storev
=
'R',
and
nb_v
*
nb_v
if
storev
=
'C'
. The triangular matrix
t
is the representation of the block reflector.
c
(local).
On exit, sub(
C
) is overwritten by the
Q
*sub(
C
)
, or
Q'
*sub(
C
)
, or
sub(
C
)*
Q
, or
sub(
C
)*
Q'
.
Q'
is transpose (conjugate transpose) of
Q
.