LAPACK++ 2024.05.31
LAPACK C++ API
Loading...
Searching...
No Matches
A = QR factorization, triangle-pentagonal tiles

Functions

int64_t lapack::tpmqrt (lapack::Side side, lapack::Op trans, int64_t m, int64_t n, int64_t k, int64_t l, int64_t nb, double const *V, int64_t ldv, double const *T, int64_t ldt, double *A, int64_t lda, double *B, int64_t ldb)
 
int64_t lapack::tpmqrt (lapack::Side side, lapack::Op trans, int64_t m, int64_t n, int64_t k, int64_t l, int64_t nb, float const *V, int64_t ldv, float const *T, int64_t ldt, float *A, int64_t lda, float *B, int64_t ldb)
 
int64_t lapack::tpmqrt (lapack::Side side, lapack::Op trans, int64_t m, int64_t n, int64_t k, int64_t l, int64_t nb, std::complex< double > const *V, int64_t ldv, std::complex< double > const *T, int64_t ldt, std::complex< double > *A, int64_t lda, std::complex< double > *B, int64_t ldb)
 Applies a complex orthogonal matrix Q obtained from a "triangular-pentagonal" complex block reflector H to a general complex matrix C, which consists of two blocks A and B, as follows:
 
int64_t lapack::tpmqrt (lapack::Side side, lapack::Op trans, int64_t m, int64_t n, int64_t k, int64_t l, int64_t nb, std::complex< float > const *V, int64_t ldv, std::complex< float > const *T, int64_t ldt, std::complex< float > *A, int64_t lda, std::complex< float > *B, int64_t ldb)
 
int64_t lapack::tpqrt (int64_t m, int64_t n, int64_t l, int64_t nb, double *A, int64_t lda, double *B, int64_t ldb, double *T, int64_t ldt)
 
int64_t lapack::tpqrt (int64_t m, int64_t n, int64_t l, int64_t nb, float *A, int64_t lda, float *B, int64_t ldb, float *T, int64_t ldt)
 
int64_t lapack::tpqrt (int64_t m, int64_t n, int64_t l, int64_t nb, std::complex< double > *A, int64_t lda, std::complex< double > *B, int64_t ldb, std::complex< double > *T, int64_t ldt)
 
int64_t lapack::tpqrt (int64_t m, int64_t n, int64_t l, int64_t nb, std::complex< float > *A, int64_t lda, std::complex< float > *B, int64_t ldb, std::complex< float > *T, int64_t ldt)
 
int64_t lapack::tpqrt2 (int64_t m, int64_t n, int64_t l, double *A, int64_t lda, double *B, int64_t ldb, double *T, int64_t ldt)
 
int64_t lapack::tpqrt2 (int64_t m, int64_t n, int64_t l, float *A, int64_t lda, float *B, int64_t ldb, float *T, int64_t ldt)
 
int64_t lapack::tpqrt2 (int64_t m, int64_t n, int64_t l, std::complex< double > *A, int64_t lda, std::complex< double > *B, int64_t ldb, std::complex< double > *T, int64_t ldt)
 
int64_t lapack::tpqrt2 (int64_t m, int64_t n, int64_t l, std::complex< float > *A, int64_t lda, std::complex< float > *B, int64_t ldb, std::complex< float > *T, int64_t ldt)
 
void lapack::tprfb (lapack::Side side, lapack::Op trans, lapack::Direction direction, lapack::StoreV storev, int64_t m, int64_t n, int64_t k, int64_t l, double const *V, int64_t ldv, double const *T, int64_t ldt, double *A, int64_t lda, double *B, int64_t ldb)
 
void lapack::tprfb (lapack::Side side, lapack::Op trans, lapack::Direction direction, lapack::StoreV storev, int64_t m, int64_t n, int64_t k, int64_t l, float const *V, int64_t ldv, float const *T, int64_t ldt, float *A, int64_t lda, float *B, int64_t ldb)
 
void lapack::tprfb (lapack::Side side, lapack::Op trans, lapack::Direction direction, lapack::StoreV storev, int64_t m, int64_t n, int64_t k, int64_t l, std::complex< double > const *V, int64_t ldv, std::complex< double > const *T, int64_t ldt, std::complex< double > *A, int64_t lda, std::complex< double > *B, int64_t ldb)
 Applies a complex "triangular-pentagonal" block reflector H or its conjugate transpose \(H^H\) to a complex matrix C, which is composed of two blocks A and B, either from the left or right.
 
void lapack::tprfb (lapack::Side side, lapack::Op trans, lapack::Direction direction, lapack::StoreV storev, int64_t m, int64_t n, int64_t k, int64_t l, std::complex< float > const *V, int64_t ldv, std::complex< float > const *T, int64_t ldt, std::complex< float > *A, int64_t lda, std::complex< float > *B, int64_t ldb)
 

Detailed Description

Function Documentation

◆ tpmqrt()

int64_t lapack::tpmqrt ( lapack::Side  side,
lapack::Op  trans,
int64_t  m,
int64_t  n,
int64_t  k,
int64_t  l,
int64_t  nb,
std::complex< double > const *  V,
int64_t  ldv,
std::complex< double > const *  T,
int64_t  ldt,
std::complex< double > *  A,
int64_t  lda,
std::complex< double > *  B,
int64_t  ldb 
)

Applies a complex orthogonal matrix Q obtained from a "triangular-pentagonal" complex block reflector H to a general complex matrix C, which consists of two blocks A and B, as follows:

  • side = Left, trans = NoTrans: \(Q C\)
  • side = Right, trans = NoTrans: \(C Q\)
  • side = Left, trans = ConjTrans: \(Q^H C\)
  • side = Right, trans = ConjTrans: \(C Q^H\)

Overloaded versions are available for float, double, std::complex<float>, and std::complex<double>.

Since
LAPACK 3.4.0
Parameters
[in]side
  • lapack::Side::Left: apply \(Q\) or \(Q^H\) from the Left;
  • lapack::Side::Right: apply \(Q\) or \(Q^H\) from the Right.
[in]trans
  • lapack::Op::NoTrans: No transpose, apply \(Q\);
  • lapack::Op::Trans: Transpose, apply \(Q^T\) (real only);
  • lapack::Op::ConjTrans: Conjugate-transpose, apply \(Q^H\).
[in]mThe number of rows of the matrix B. m >= 0.
[in]nThe number of columns of the matrix B. n >= 0.
[in]kThe number of elementary reflectors whose product defines the matrix Q.
[in]lThe order of the trapezoidal part of V. k >= l >= 0. See Further Details.
[in]nbThe block size used for the storage of T. k >= nb >= 1. This must be the same value of nb used to generate T in lapack::tpqrt.
[in]VThe m-by-k matrix V, stored in an lda-by-k array. The i-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by lapack::tpqrt in B. See Further Details.
[in]ldvThe leading dimension of the array V. If side = Left, ldv >= max(1,m); if side = Right, ldv >= max(1,n).
[in]TThe nb-by-k matrix T, stored in an ldt-by-k array. The upper triangular factors of the block reflectors as returned by lapack::tpqrt, stored as a nb-by-k matrix.
[in]ldtThe leading dimension of the array T. ldt >= nb.
[in,out]AIf side = Left, the k-by-n matrix A, stored in an lda-by-n array; if side = Right, the m-by-k matrix A, stored in an lda-by-k array. On exit, A is overwritten by the corresponding block of \(Q C\) or \(Q^H C\) or \(C Q\) or \(C Q^H\). See Further Details.
[in]ldaThe leading dimension of the array A. If side = Left, lda >= max(1,k); If side = Right, lda >= max(1,m).
[in,out]BThe m-by-n matrix B, stored in an ldb-by-n array. On entry, the m-by-n matrix B. On exit, B is overwritten by the corresponding block of \(Q C\) or \(Q^H C\) or \(C Q\) or \(C Q^H\). See Further Details.
[in]ldbThe leading dimension of the array B. ldb >= max(1,m).
Returns
= 0: successful exit
Further Details

The columns of the pentagonal matrix V contain the elementary reflectors H(1), H(2), ..., H(k); V is composed of a rectangular block V1 and a trapezoidal block V2:

\[ V = \begin{bmatrix} V1 \\ V2 \end{bmatrix}. \]

The size of the trapezoidal block V2 is determined by the parameter l, where 0 <= l <= k; V2 is upper trapezoidal, consisting of the first l rows of a k-by-k upper triangular matrix. If l=k, V2 is upper triangular; if l=0, there is no trapezoidal block, hence V = V1 is rectangular.

If side = Left:

\[ C = \begin{bmatrix} A \\ B \end{bmatrix}, \]

where A is k-by-n, B is m-by-n and V is m-by-k.

If side = Right:

\[ C = \begin{bmatrix} A & B \end{bmatrix}, \]

where A is m-by-k, B is m-by-n and V is n-by-k.

The unitary matrix Q is formed from V and T.

◆ tprfb()

void lapack::tprfb ( lapack::Side  side,
lapack::Op  trans,
lapack::Direction  direction,
lapack::StoreV  storev,
int64_t  m,
int64_t  n,
int64_t  k,
int64_t  l,
std::complex< double > const *  V,
int64_t  ldv,
std::complex< double > const *  T,
int64_t  ldt,
std::complex< double > *  A,
int64_t  lda,
std::complex< double > *  B,
int64_t  ldb 
)

Applies a complex "triangular-pentagonal" block reflector H or its conjugate transpose \(H^H\) to a complex matrix C, which is composed of two blocks A and B, either from the left or right.

Overloaded versions are available for float, double, std::complex<float>, and std::complex<double>.

Since
LAPACK 3.4.0
Parameters
[in]side
  • lapack::Side::Left: apply \(H\) or \(H^H\) from the Left
  • lapack::Side::Right: apply \(H\) or \(H^H\) from the Right
[in]trans
  • lapack::Op::NoTrans: apply \(H\) (No transpose)
  • lapack::Op::ConjTrans: apply \(H^H\) (Conjugate transpose)
[in]directionIndicates how H is formed from a product of elementary reflectors
  • lapack::Direction::Forward: \(H = H(1) H(2) . . . H(k)\) (Forward)
  • lapack::Direction::Backward: \(H = H(k) . . . H(2) H(1)\) (Backward)
[in]storevIndicates how the vectors which define the elementary reflectors are stored:
  • lapack::StoreV::Columnwise: Columns
  • lapack::StoreV::Rowwise: Rows
[in]mThe number of rows of the matrix B. m >= 0.
[in]nThe number of columns of the matrix B. n >= 0.
[in]kThe order of the matrix T, i.e. the number of elementary reflectors whose product defines the block reflector. k >= 0.
[in]lThe order of the trapezoidal part of V. k >= l >= 0. See Further Details.
[in]VIf storev, side are:
  • Columnwise, Left: the m-by-k matrix V, stored in an ldv-by-k array.
  • Columnwise, Right: the n-by-k matrix V, stored in an ldv-by-k array.
  • Rowwise, Left: the k-by-m matrix V, stored in an ldv-by-m array.
  • Rowwise, Right: the k-by-n matrix V, stored in an ldv-by-n array. The pentagonal matrix V, which contains the elementary reflectors H(1), H(2), ..., H(k). See Further Details.
[in]ldvThe leading dimension of the array V. If storev = Columnwise and side = Left, ldv >= max(1,m); if storev = Columnwise and side = Right, ldv >= max(1,n); if storev = Rowwise, ldv >= k.
[in]TThe k-by-k matrix T, stored in an ldt-by-k array. The triangular k-by-k matrix T in the representation of the block reflector.
[in]ldtThe leading dimension of the array T. ldt >= k.
[in,out]AIf side = Left, the k-by-n matrix A, stored in an lda-by-n array. If side = Right, the n-by-k matrix A, stored in an lda-by-k array. On exit, A is overwritten by the corresponding block of \(HC\) or \(H^H C\) or \(CH\) or \(CH^H\). See Further Details.
[in]ldaThe leading dimension of the array A. If side = Left, lda >= max(1,k); If side = Right, lda >= max(1,m).
[in,out]BThe m-by-n matrix B, stored in an ldb-by-n array. On exit, B is overwritten by the corresponding block of \(HC\), \(H^H C\), \(CH\), or \(CH^H\). See Further Details.
[in]ldbThe leading dimension of the array B. ldb >= max(1,m).
Further Details

The matrix C is a composite matrix formed from blocks A and B. The block B is of size m-by-n; if side = Right, A is of size m-by-k, and if side = Left, A is of size k-by-n.

If side = Right and direction = Forward,

\[ C = \begin{bmatrix} A & B \end{bmatrix}. \]

If side = Left and direction = Forward,

\[ C = \begin{bmatrix} A \\ B \end{bmatrix}. \]

If side = Right and direction = Backward,

\[ C = \begin{bmatrix} B & A \end{bmatrix}. \]

If side = Left and direction = Backward,

\[ C = \begin{bmatrix} B \\ A \end{bmatrix}. \]

The pentagonal matrix V is composed of a rectangular block V1 and a trapezoidal block V2. The size of the trapezoidal block is determined by the parameter l, where 0 <= l <= k. If l=k, the V2 block of V is triangular; if l=0, there is no trapezoidal block, thus V = V1 is rectangular.

If direction = Forward and storev = Columnwise:

\[ V = \begin{bmatrix} V1 \\ V2 \end{bmatrix}. \]

  • V2 is upper trapezoidal (first l rows of k-by-k upper triangular)

If direction = Forward and storev = Rowwise:

\[ V = \begin{bmatrix} V1 & V2 \end{bmatrix} \]

  • V2 is lower trapezoidal (first l columns of k-by-k lower triangular)

If direction = Backward and storev = Columnwise:

\[ V = \begin{bmatrix} V2 \\ V1 \end{bmatrix}. \]

  • V2 is lower trapezoidal (last l rows of k-by-k lower triangular)

If direction = Backward and storev = Rowwise:

\[ V = \begin{bmatrix} V2 & V1 \end{bmatrix} \]

  • V2 is upper trapezoidal (last l columns of k-by-k upper triangular)

If storev = Columnwise and side = Left, V is m-by-k with V2 l-by-k.

If storev = Columnwise and side = Right, V is n-by-k with V2 l-by-k.

If storev = Rowwise and side = Left, V is k-by-m with V2 k-by-l.

If storev = Rowwise and side = Right, V is k-by-n with V2 k-by-l.