tgsja#

Functions

void stgsja(
    const char*          jobu,
    const char*          jobv,
    const char*          jobq,
    const INT            m,
    const INT            p,
    const INT            n,
    const INT            k,
    const INT            l,
          f32*  restrict A,
    const INT            lda,
          f32*  restrict B,
    const INT            ldb,
    const f32            tola,
    const f32            tolb,
          f32*  restrict alpha,
          f32*  restrict beta,
          f32*  restrict U,
    const INT            ldu,
          f32*  restrict V,
    const INT            ldv,
          f32*  restrict Q,
    const INT            ldq,
          f32*  restrict work,
          INT*           ncycle,
          INT*           info
);
void stgsja(const char *jobu, const char *jobv, const char *jobq, const INT m, const INT p, const INT n, const INT k, const INT l, f32 *restrict A, const INT lda, f32 *restrict B, const INT ldb, const f32 tola, const f32 tolb, f32 *restrict alpha, f32 *restrict beta, f32 *restrict U, const INT ldu, f32 *restrict V, const INT ldv, f32 *restrict Q, const INT ldq, f32 *restrict work, INT *ncycle, INT *info)#

STGSJA computes the generalized singular value decomposition (GSVD) of two real upper triangular (or trapezoidal) matrices A and B.

On entry, it is assumed that matrices A and B have the following forms, which may be obtained by the preprocessing subroutine DGGSVP from a general M-by-N matrix A and P-by-N matrix B:

         N-K-L  K    L
A = K ( 0 A12 A13 ) if M-K-L >= 0; L ( 0 0 A23 ) M-K-L ( 0 0 0 )
 N-K-L  K    L
A = K ( 0 A12 A13 ) if M-K-L < 0; M-K ( 0 0 A23 )
 N-K-L  K    L
B = L ( 0 0 B13 ) P-L ( 0 0 0 )

On exit,

   U**T *A*Q = D1*( 0 R ),    V**T *B*Q = D2*( 0 R ),
where U, V and Q are orthogonal matrices.

Parameters

in
jobu

= ‘U’: U must contain an orthogonal matrix U1 on entry; = ‘I’: U is initialized to the unit matrix; = ‘N’: U is not computed.

in
jobv

= ‘V’: V must contain an orthogonal matrix V1 on entry; = ‘I’: V is initialized to the unit matrix; = ‘N’: V is not computed.

in
jobq

= ‘Q’: Q must contain an orthogonal matrix Q1 on entry; = ‘I’: Q is initialized to the unit matrix; = ‘N’: Q is not computed.

in
m

The number of rows of matrix A. m >= 0.

in
p

The number of rows of matrix B. p >= 0.

in
n

The number of columns of A and B. n >= 0.

in
k

Subblock dimension from SGGSVP3.

in
l

Subblock dimension from SGGSVP3.

inout
A

On entry, the M-by-N matrix A. On exit, contains the triangular matrix R.

in
lda

Leading dimension of A. lda >= max(1,m).

inout
B

On entry, the P-by-N matrix B. On exit, may contain part of R.

in
ldb

Leading dimension of B. ldb >= max(1,p).

in
tola

Convergence threshold for A.

in
tolb

Convergence threshold for B.

out
alpha

Generalized singular values (dimension n).

out
beta

Generalized singular values (dimension n).

inout
U

Orthogonal matrix U (dimension ldu,m).

in
ldu

Leading dimension of U.

inout
V

Orthogonal matrix V (dimension ldv,p).

in
ldv

Leading dimension of V.

inout
Q

Orthogonal matrix Q (dimension ldq,n).

in
ldq

Leading dimension of Q.

out
work

Workspace of dimension 2*n.

out
ncycle

Number of cycles for convergence.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • = 1: the procedure does not converge after MAXIT cycles.

Functions

void dtgsja(
    const char*          jobu,
    const char*          jobv,
    const char*          jobq,
    const INT            m,
    const INT            p,
    const INT            n,
    const INT            k,
    const INT            l,
          f64*  restrict A,
    const INT            lda,
          f64*  restrict B,
    const INT            ldb,
    const f64            tola,
    const f64            tolb,
          f64*  restrict alpha,
          f64*  restrict beta,
          f64*  restrict U,
    const INT            ldu,
          f64*  restrict V,
    const INT            ldv,
          f64*  restrict Q,
    const INT            ldq,
          f64*  restrict work,
          INT*           ncycle,
          INT*           info
);
void dtgsja(const char *jobu, const char *jobv, const char *jobq, const INT m, const INT p, const INT n, const INT k, const INT l, f64 *restrict A, const INT lda, f64 *restrict B, const INT ldb, const f64 tola, const f64 tolb, f64 *restrict alpha, f64 *restrict beta, f64 *restrict U, const INT ldu, f64 *restrict V, const INT ldv, f64 *restrict Q, const INT ldq, f64 *restrict work, INT *ncycle, INT *info)#

DTGSJA computes the generalized singular value decomposition (GSVD) of two real upper triangular (or trapezoidal) matrices A and B.

On entry, it is assumed that matrices A and B have the following forms, which may be obtained by the preprocessing subroutine DGGSVP from a general M-by-N matrix A and P-by-N matrix B:

         N-K-L  K    L
A = K ( 0 A12 A13 ) if M-K-L >= 0; L ( 0 0 A23 ) M-K-L ( 0 0 0 )
 N-K-L  K    L
A = K ( 0 A12 A13 ) if M-K-L < 0; M-K ( 0 0 A23 )
 N-K-L  K    L
B = L ( 0 0 B13 ) P-L ( 0 0 0 )

On exit,

   U**T *A*Q = D1*( 0 R ),    V**T *B*Q = D2*( 0 R ),
where U, V and Q are orthogonal matrices.

Parameters

in
jobu

= ‘U’: U must contain an orthogonal matrix U1 on entry; = ‘I’: U is initialized to the unit matrix; = ‘N’: U is not computed.

in
jobv

= ‘V’: V must contain an orthogonal matrix V1 on entry; = ‘I’: V is initialized to the unit matrix; = ‘N’: V is not computed.

in
jobq

= ‘Q’: Q must contain an orthogonal matrix Q1 on entry; = ‘I’: Q is initialized to the unit matrix; = ‘N’: Q is not computed.

in
m

The number of rows of matrix A. m >= 0.

in
p

The number of rows of matrix B. p >= 0.

in
n

The number of columns of A and B. n >= 0.

in
k

Subblock dimension from DGGSVP3.

in
l

Subblock dimension from DGGSVP3.

inout
A

On entry, the M-by-N matrix A. On exit, contains the triangular matrix R.

in
lda

Leading dimension of A. lda >= max(1,m).

inout
B

On entry, the P-by-N matrix B. On exit, may contain part of R.

in
ldb

Leading dimension of B. ldb >= max(1,p).

in
tola

Convergence threshold for A.

in
tolb

Convergence threshold for B.

out
alpha

Generalized singular values (dimension n).

out
beta

Generalized singular values (dimension n).

inout
U

Orthogonal matrix U (dimension ldu,m).

in
ldu

Leading dimension of U.

inout
V

Orthogonal matrix V (dimension ldv,p).

in
ldv

Leading dimension of V.

inout
Q

Orthogonal matrix Q (dimension ldq,n).

in
ldq

Leading dimension of Q.

out
work

Workspace of dimension 2*n.

out
ncycle

Number of cycles for convergence.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • = 1: the procedure does not converge after MAXIT cycles.

Functions

void ctgsja(
    const char*          jobu,
    const char*          jobv,
    const char*          jobq,
    const INT            m,
    const INT            p,
    const INT            n,
    const INT            k,
    const INT            l,
          c64*  restrict A,
    const INT            lda,
          c64*  restrict B,
    const INT            ldb,
    const f32            tola,
    const f32            tolb,
          f32*  restrict alpha,
          f32*  restrict beta,
          c64*  restrict U,
    const INT            ldu,
          c64*  restrict V,
    const INT            ldv,
          c64*  restrict Q,
    const INT            ldq,
          c64*  restrict work,
          INT*           ncycle,
          INT*           info
);
void ctgsja(const char *jobu, const char *jobv, const char *jobq, const INT m, const INT p, const INT n, const INT k, const INT l, c64 *restrict A, const INT lda, c64 *restrict B, const INT ldb, const f32 tola, const f32 tolb, f32 *restrict alpha, f32 *restrict beta, c64 *restrict U, const INT ldu, c64 *restrict V, const INT ldv, c64 *restrict Q, const INT ldq, c64 *restrict work, INT *ncycle, INT *info)#

CTGSJA computes the generalized singular value decomposition (GSVD) of two complex upper triangular (or trapezoidal) matrices A and B.

On entry, it is assumed that matrices A and B have the following forms, which may be obtained by the preprocessing subroutine ZGGSVP from a general M-by-N matrix A and P-by-N matrix B:

         N-K-L  K    L
A = K ( 0 A12 A13 ) if M-K-L >= 0; L ( 0 0 A23 ) M-K-L ( 0 0 0 )
 N-K-L  K    L
A = K ( 0 A12 A13 ) if M-K-L < 0; M-K ( 0 0 A23 )
 N-K-L  K    L
B = L ( 0 0 B13 ) P-L ( 0 0 0 )

On exit,

   U**H *A*Q = D1*( 0 R ),    V**H *B*Q = D2*( 0 R ),
where U, V and Q are unitary matrices.

Parameters

in
jobu

= ‘U’: U must contain a unitary matrix U1 on entry; = ‘I’: U is initialized to the unit matrix; = ‘N’: U is not computed.

in
jobv

= ‘V’: V must contain a unitary matrix V1 on entry; = ‘I’: V is initialized to the unit matrix; = ‘N’: V is not computed.

in
jobq

= ‘Q’: Q must contain a unitary matrix Q1 on entry; = ‘I’: Q is initialized to the unit matrix; = ‘N’: Q is not computed.

in
m

The number of rows of matrix A. m >= 0.

in
p

The number of rows of matrix B. p >= 0.

in
n

The number of columns of A and B. n >= 0.

in
k

Subblock dimension from CGGSVP3.

in
l

Subblock dimension from CGGSVP3.

inout
A

On entry, the M-by-N matrix A. On exit, contains the triangular matrix R.

in
lda

Leading dimension of A. lda >= max(1,m).

inout
B

On entry, the P-by-N matrix B. On exit, may contain part of R.

in
ldb

Leading dimension of B. ldb >= max(1,p).

in
tola

Convergence threshold for A.

in
tolb

Convergence threshold for B.

out
alpha

Generalized singular values (dimension n).

out
beta

Generalized singular values (dimension n).

inout
U

Unitary matrix U (dimension ldu,m).

in
ldu

Leading dimension of U.

inout
V

Unitary matrix V (dimension ldv,p).

in
ldv

Leading dimension of V.

inout
Q

Unitary matrix Q (dimension ldq,n).

in
ldq

Leading dimension of Q.

out
work

Complex workspace of dimension 2*n.

out
ncycle

Number of cycles for convergence.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • = 1: the procedure does not converge after MAXIT cycles.

Functions

void ztgsja(
    const char*          jobu,
    const char*          jobv,
    const char*          jobq,
    const INT            m,
    const INT            p,
    const INT            n,
    const INT            k,
    const INT            l,
          c128* restrict A,
    const INT            lda,
          c128* restrict B,
    const INT            ldb,
    const f64            tola,
    const f64            tolb,
          f64*  restrict alpha,
          f64*  restrict beta,
          c128* restrict U,
    const INT            ldu,
          c128* restrict V,
    const INT            ldv,
          c128* restrict Q,
    const INT            ldq,
          c128* restrict work,
          INT*           ncycle,
          INT*           info
);
void ztgsja(const char *jobu, const char *jobv, const char *jobq, const INT m, const INT p, const INT n, const INT k, const INT l, c128 *restrict A, const INT lda, c128 *restrict B, const INT ldb, const f64 tola, const f64 tolb, f64 *restrict alpha, f64 *restrict beta, c128 *restrict U, const INT ldu, c128 *restrict V, const INT ldv, c128 *restrict Q, const INT ldq, c128 *restrict work, INT *ncycle, INT *info)#

ZTGSJA computes the generalized singular value decomposition (GSVD) of two complex upper triangular (or trapezoidal) matrices A and B.

On entry, it is assumed that matrices A and B have the following forms, which may be obtained by the preprocessing subroutine ZGGSVP from a general M-by-N matrix A and P-by-N matrix B:

         N-K-L  K    L
A = K ( 0 A12 A13 ) if M-K-L >= 0; L ( 0 0 A23 ) M-K-L ( 0 0 0 )
 N-K-L  K    L
A = K ( 0 A12 A13 ) if M-K-L < 0; M-K ( 0 0 A23 )
 N-K-L  K    L
B = L ( 0 0 B13 ) P-L ( 0 0 0 )

On exit,

   U**H *A*Q = D1*( 0 R ),    V**H *B*Q = D2*( 0 R ),
where U, V and Q are unitary matrices.

Parameters

in
jobu

= ‘U’: U must contain a unitary matrix U1 on entry; = ‘I’: U is initialized to the unit matrix; = ‘N’: U is not computed.

in
jobv

= ‘V’: V must contain a unitary matrix V1 on entry; = ‘I’: V is initialized to the unit matrix; = ‘N’: V is not computed.

in
jobq

= ‘Q’: Q must contain a unitary matrix Q1 on entry; = ‘I’: Q is initialized to the unit matrix; = ‘N’: Q is not computed.

in
m

The number of rows of matrix A. m >= 0.

in
p

The number of rows of matrix B. p >= 0.

in
n

The number of columns of A and B. n >= 0.

in
k

Subblock dimension from ZGGSVP3.

in
l

Subblock dimension from ZGGSVP3.

inout
A

On entry, the M-by-N matrix A. On exit, contains the triangular matrix R.

in
lda

Leading dimension of A. lda >= max(1,m).

inout
B

On entry, the P-by-N matrix B. On exit, may contain part of R.

in
ldb

Leading dimension of B. ldb >= max(1,p).

in
tola

Convergence threshold for A.

in
tolb

Convergence threshold for B.

out
alpha

Generalized singular values (dimension n).

out
beta

Generalized singular values (dimension n).

inout
U

Unitary matrix U (dimension ldu,m).

in
ldu

Leading dimension of U.

inout
V

Unitary matrix V (dimension ldv,p).

in
ldv

Leading dimension of V.

inout
Q

Unitary matrix Q (dimension ldq,n).

in
ldq

Leading dimension of Q.

out
work

Complex workspace of dimension 2*n.

out
ncycle

Number of cycles for convergence.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • = 1: the procedure does not converge after MAXIT cycles.