larft#

Functions

void slarft(
    const char*          direct,
    const char*          storev,
    const INT            n,
    const INT            k,
    const f32*  restrict V,
    const INT            ldv,
    const f32*  restrict tau,
          f32*  restrict T,
    const INT            ldt
);
void slarft(const char *direct, const char *storev, const INT n, const INT k, const f32 *restrict V, const INT ldv, const f32 *restrict tau, f32 *restrict T, const INT ldt)#

SLARFT forms the triangular factor T of a real block reflector H of order n, which is defined as a product of k elementary reflectors.

If direct='F', H = H(0) H(1) … H(k-1) and T is upper triangular;

If direct='B', H = H(k-1) … H(1) H(0) and T is lower triangular.

If storev='C', the vector which defines the elementary reflector H(i) is stored in column i of the array V, and

H = I - V * T * V**T

If storev='R', the vector which defines the elementary reflector H(i) is stored in row i of the array V, and

H = I - V**T * T * V

If direct or storev = 'T', see Further Details for the shape of T

Further Details:

The shape of the matrix V and the storage of the vectors which define the H(i) is best illustrated by the following example with n = 5 and k = 3. The elements equal to 1 are not stored.

DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and (STOREV = 'R' or STOREV = 'T'):

             V = (  1       )                 V = (  1 v0 v0 v0 v0 )
                 ( v0  1    )                     (     1 v1 v1 v1 )
                 ( v0 v1  1 )                     (        1 v2 v2 )
                 ( v0 v1 v2 )
                 ( v0 v1 v2 )

DIRECT = 'B' and STOREV = 'C':         (DIRECT = 'B' or DIRECT = 'T') and STOREV = 'R':

             V = ( v0 v1 v2 )                 V = ( v0 v0  1       )
                 ( v0 v1 v2 )                     ( v1 v1 v1  1    )
                 (  1 v1 v2 )                     ( v2 v2 v2 v2  1 )
                 (     1 v2 )
                 (        1 )

In addition, the shape of T is determined by these same flags as in the below table. ‘U’ denotes upper triangular ‘L’ denotes lower triangular ‘X’ denotes no current implementation We also provide the logical variable that represents the case in the code if it is implemented

|-----------------------------------------------------------|
|              | DIRECT = 'F' | DIRECT = 'B' | DIRECT = 'T' |
|--------------+--------------+--------------+--------------|
| STOREV = 'C' | U (QR)       | L (QL)       | X            |
| STOREV = 'R' | U (LQ)       | L (RQ)       | U (RQT)      |
| STOREV = 'T' | L (LQT)      | X            | X            |
|-----------------------------------------------------------|

Finally, the relationship between the (conjugate) transposed T matrices are as follows: (Note that T_{FC} denotes the T associated with calling this routine with DIRECT = ‘F’ and STOREV = ‘C’)

T_{TR} = (T_{BR})**H
T_{FT} = (T_{FR})**H

Parameters

in
direct

Specifies the order in which the elementary reflectors are multiplied to form the block reflector:

  • 'F': H = H(0) H(1) … H(k-1) (Forward)

  • 'B': H = H(k-1) … H(1) H(0) (Backward)

  • 'T' (with storev='R'): H = H(k-1) … H(1) H(0) (backward) but we return the T matrix that is already (conjugate) transposed

in
storev

Specifies how the vectors which define the elementary reflectors are stored (see also Further Details):

  • 'C': column-wise

  • 'R': row-wise

  • 'T': (With direct='F') Row-wise, but we return the T matrix that is already (conjugate) transposed.

in
n

The order of the block reflector H. n>=0.

in
k

The order of the triangular factor T (= the number of elementary reflectors). k>=1.

in
V

Array of dimension (ldv, k) if storev='C', (ldv, n) if storev='R'. The matrix V. See further details.

in
ldv

The leading dimension of the array V. If storev='C', ldv>=max(1,n); if storev='R', ldv>=k.

in
tau

Array of dimension (k). tau[i] must contain the scalar factor of the elementary reflector H(i).

out
T

Array of dimension (ldt, k). The k by k triangular factor T of the block reflector. If direct='F', T is upper triangular; if direct='B', T is lower triangular. The rest of the array is not used.

in
ldt

The leading dimension of the array T. ldt>=k.

Functions

void dlarft(
    const char*          direct,
    const char*          storev,
    const INT            n,
    const INT            k,
    const f64*  restrict V,
    const INT            ldv,
    const f64*  restrict tau,
          f64*  restrict T,
    const INT            ldt
);
void dlarft(const char *direct, const char *storev, const INT n, const INT k, const f64 *restrict V, const INT ldv, const f64 *restrict tau, f64 *restrict T, const INT ldt)#

DLARFT forms the triangular factor T of a real block reflector H of order n, which is defined as a product of k elementary reflectors.

If direct='F', H = H(0) H(1) … H(k-1) and T is upper triangular;

If direct='B', H = H(k-1) … H(1) H(0) and T is lower triangular.

If storev='C', the vector which defines the elementary reflector H(i) is stored in column i of the array V, and

H = I - V * T * V**T

If storev='R', the vector which defines the elementary reflector H(i) is stored in row i of the array V, and

H = I - V**T * T * V

If direct or storev = 'T', see Further Details for the shape of T

Further Details:

The shape of the matrix V and the storage of the vectors which define the H(i) is best illustrated by the following example with n = 5 and k = 3. The elements equal to 1 are not stored.

DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and (STOREV = 'R' or STOREV = 'T'):

             V = (  1       )                 V = (  1 v0 v0 v0 v0 )
                 ( v0  1    )                     (     1 v1 v1 v1 )
                 ( v0 v1  1 )                     (        1 v2 v2 )
                 ( v0 v1 v2 )
                 ( v0 v1 v2 )

DIRECT = 'B' and STOREV = 'C':         (DIRECT = 'B' or DIRECT = 'T') and STOREV = 'R':

             V = ( v0 v1 v2 )                 V = ( v0 v0  1       )
                 ( v0 v1 v2 )                     ( v1 v1 v1  1    )
                 (  1 v1 v2 )                     ( v2 v2 v2 v2  1 )
                 (     1 v2 )
                 (        1 )

In addition, the shape of T is determined by these same flags as in the below table. ‘U’ denotes upper triangular ‘L’ denotes lower triangular ‘X’ denotes no current implementation We also provide the logical variable that represents the case in the code if it is implemented

|-----------------------------------------------------------|
|              | DIRECT = 'F' | DIRECT = 'B' | DIRECT = 'T' |
|--------------+--------------+--------------+--------------|
| STOREV = 'C' | U (QR)       | L (QL)       | X            |
| STOREV = 'R' | U (LQ)       | L (RQ)       | U (RQT)      |
| STOREV = 'T' | L (LQT)      | X            | X            |
|-----------------------------------------------------------|

Finally, the relationship between the (conjugate) transposed T matrices are as follows: (Note that T_{FC} denotes the T associated with calling this routine with DIRECT = ‘F’ and STOREV = ‘C’)

T_{TR} = (T_{BR})**H
T_{FT} = (T_{FR})**H

Parameters

in
direct

Specifies the order in which the elementary reflectors are multiplied to form the block reflector:

  • 'F': H = H(0) H(1) … H(k-1) (Forward)

  • 'B': H = H(k-1) … H(1) H(0) (Backward)

  • 'T' (with storev='R'): H = H(k-1) … H(1) H(0) (backward) but we return the T matrix that is already (conjugate) transposed

in
storev

Specifies how the vectors which define the elementary reflectors are stored (see also Further Details):

  • 'C': column-wise

  • 'R': row-wise

  • 'T': (With direct='F') Row-wise, but we return the T matrix that is already (conjugate) transposed.

in
n

The order of the block reflector H. n>=0.

in
k

The order of the triangular factor T (= the number of elementary reflectors). k>=1.

in
V

Array of dimension (ldv, k) if storev='C', (ldv, n) if storev='R'. The matrix V. See further details.

in
ldv

The leading dimension of the array V. If storev='C', ldv>=max(1,n); if storev='R', ldv>=k.

in
tau

Array of dimension (k). tau[i] must contain the scalar factor of the elementary reflector H(i).

out
T

Array of dimension (ldt, k). The k by k triangular factor T of the block reflector. If direct='F', T is upper triangular; if direct='B', T is lower triangular. The rest of the array is not used.

in
ldt

The leading dimension of the array T. ldt>=k.

Functions

void clarft(
    const char*          direct,
    const char*          storev,
    const INT            n,
    const INT            k,
    const c64*  restrict V,
    const INT            ldv,
    const c64*  restrict tau,
          c64*  restrict T,
    const INT            ldt
);
void clarft(const char *direct, const char *storev, const INT n, const INT k, const c64 *restrict V, const INT ldv, const c64 *restrict tau, c64 *restrict T, const INT ldt)#

CLARFT forms the triangular factor T of a complex block reflector H of order n, which is defined as a product of k elementary reflectors.

If direct='F', H = H(0) H(1) … H(k-1) and T is upper triangular;

If direct='B', H = H(k-1) … H(1) H(0) and T is lower triangular.

If storev='C', the vector which defines the elementary reflector H(i) is stored in column i of the array V, and

H = I - V * T * V**H

If storev='R', the vector which defines the elementary reflector H(i) is stored in row i of the array V, and

H = I - V**H * T * V

If direct or storev = 'T', see Further Details for the shape of T

Further Details:

The shape of the matrix V and the storage of the vectors which define the H(i) is best illustrated by the following example with n = 5 and k = 3. The elements equal to 1 are not stored.

DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':

             V = (  1       )                 V = (  1 v0 v0 v0 v0 )
                 ( v0  1    )                     (     1 v1 v1 v1 )
                 ( v0 v1  1 )                     (        1 v2 v2 )
                 ( v0 v1 v2 )
                 ( v0 v1 v2 )

DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':

             V = ( v0 v1 v2 )                 V = ( v0 v0  1       )
                 ( v0 v1 v2 )                     ( v1 v1 v1  1    )
                 (  1 v1 v2 )                     ( v2 v2 v2 v2  1 )
                 (     1 v2 )
                 (        1 )

In addition, the shape of T is determined by these same flags as in the below table. ‘U’ denotes upper triangular ‘L’ denotes lower triangular ‘X’ denotes no current implementation We also provide the logical variable that represents the case in the code if it is implemented

|-----------------------------------------------------------|
|              | DIRECT = 'F' | DIRECT = 'B' | DIRECT = 'T' |
|--------------+--------------+--------------+--------------|
| STOREV = 'C' | U (QR)       | L (QL)       | X            |
| STOREV = 'R' | U (LQ)       | L (RQ)       | U (RQT)      |
| STOREV = 'T' | L (LQT)      | X            | X            |
|-----------------------------------------------------------|

Finally, the relationship between the (conjugate) transposed T matrices are as follows: (Note that T_{FC} denotes the T associated with calling this routine with DIRECT = ‘F’ and STOREV = ‘C’)

T_{TR} = (T_{BR})**H
T_{FT} = (T_{FR})**H

Parameters

in
direct

Specifies the order in which the elementary reflectors are multiplied to form the block reflector:

  • 'F': H = H(0) H(1) … H(k-1) (Forward)

  • 'B': H = H(k-1) … H(1) H(0) (Backward)

  • 'T' (with storev='R'): H = H(k-1) … H(1) H(0) (backward) but we return the T matrix that is already (conjugate) transposed

in
storev

Specifies how the vectors which define the elementary reflectors are stored (see also Further Details):

  • 'C': column-wise

  • 'R': row-wise

  • 'T': (With direct='F') Row-wise, but we return the T matrix that is already (conjugate) transposed.

in
n

The order of the block reflector H. n>=0.

in
k

The order of the triangular factor T (= the number of elementary reflectors). k>=1.

in
V

Array of dimension (ldv, k) if storev='C', (ldv, n) if storev='R'. The matrix V. See further details.

in
ldv

The leading dimension of the array V. If storev='C', ldv>=max(1,n); if storev='R', ldv>=k.

in
tau

Array of dimension (k). tau[i] must contain the scalar factor of the elementary reflector H(i).

out
T

Array of dimension (ldt, k). The k by k triangular factor T of the block reflector. If direct='F', T is upper triangular; if direct='B', T is lower triangular. The rest of the array is not used.

in
ldt

The leading dimension of the array T. ldt>=k.

Functions

void zlarft(
    const char*          direct,
    const char*          storev,
    const INT            n,
    const INT            k,
    const c128* restrict V,
    const INT            ldv,
    const c128* restrict tau,
          c128* restrict T,
    const INT            ldt
);
void zlarft(const char *direct, const char *storev, const INT n, const INT k, const c128 *restrict V, const INT ldv, const c128 *restrict tau, c128 *restrict T, const INT ldt)#

ZLARFT forms the triangular factor T of a complex block reflector H of order n, which is defined as a product of k elementary reflectors.

If direct='F', H = H(0) H(1) … H(k-1) and T is upper triangular;

If direct='B', H = H(k-1) … H(1) H(0) and T is lower triangular.

If storev='C', the vector which defines the elementary reflector H(i) is stored in column i of the array V, and

H = I - V * T * V**H

If storev='R', the vector which defines the elementary reflector H(i) is stored in row i of the array V, and

H = I - V**H * T * V

If direct or storev = 'T', see Further Details for the shape of T

Further Details:

The shape of the matrix V and the storage of the vectors which define the H(i) is best illustrated by the following example with n = 5 and k = 3. The elements equal to 1 are not stored.

DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':

             V = (  1       )                 V = (  1 v0 v0 v0 v0 )
                 ( v0  1    )                     (     1 v1 v1 v1 )
                 ( v0 v1  1 )                     (        1 v2 v2 )
                 ( v0 v1 v2 )
                 ( v0 v1 v2 )

DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':

             V = ( v0 v1 v2 )                 V = ( v0 v0  1       )
                 ( v0 v1 v2 )                     ( v1 v1 v1  1    )
                 (  1 v1 v2 )                     ( v2 v2 v2 v2  1 )
                 (     1 v2 )
                 (        1 )

In addition, the shape of T is determined by these same flags as in the below table. ‘U’ denotes upper triangular ‘L’ denotes lower triangular ‘X’ denotes no current implementation We also provide the logical variable that represents the case in the code if it is implemented

|-----------------------------------------------------------|
|              | DIRECT = 'F' | DIRECT = 'B' | DIRECT = 'T' |
|--------------+--------------+--------------+--------------|
| STOREV = 'C' | U (QR)       | L (QL)       | X            |
| STOREV = 'R' | U (LQ)       | L (RQ)       | U (RQT)      |
| STOREV = 'T' | L (LQT)      | X            | X            |
|-----------------------------------------------------------|

Finally, the relationship between the (conjugate) transposed T matrices are as follows: (Note that T_{FC} denotes the T associated with calling this routine with DIRECT = ‘F’ and STOREV = ‘C’)

T_{TR} = (T_{BR})**H
T_{FT} = (T_{FR})**H

Parameters

in
direct

Specifies the order in which the elementary reflectors are multiplied to form the block reflector:

  • 'F': H = H(0) H(1) … H(k-1) (Forward)

  • 'B': H = H(k-1) … H(1) H(0) (Backward)

  • 'T' (with storev='R'): H = H(k-1) … H(1) H(0) (backward) but we return the T matrix that is already (conjugate) transposed

in
storev

Specifies how the vectors which define the elementary reflectors are stored (see also Further Details):

  • 'C': column-wise

  • 'R': row-wise

  • 'T': (With direct='F') Row-wise, but we return the T matrix that is already (conjugate) transposed.

in
n

The order of the block reflector H. n>=0.

in
k

The order of the triangular factor T (= the number of elementary reflectors). k>=1.

in
V

Array of dimension (ldv, k) if storev='C', (ldv, n) if storev='R'. The matrix V. See further details.

in
ldv

The leading dimension of the array V. If storev='C', ldv>=max(1,n); if storev='R', ldv>=k.

in
tau

Array of dimension (k). tau[i] must contain the scalar factor of the elementary reflector H(i).

out
T

Array of dimension (ldt, k). The k by k triangular factor T of the block reflector. If direct='F', T is upper triangular; if direct='B', T is lower triangular. The rest of the array is not used.

in
ldt

The leading dimension of the array T. ldt>=k.