latrs3#

Functions

void slatrs3(
    const char*          uplo,
    const char*          trans,
    const char*          diag,
    const char*          normin,
    const INT            n,
    const INT            nrhs,
    const f32*  restrict A,
    const INT            lda,
          f32*  restrict X,
    const INT            ldx,
          f32*  restrict scale,
          f32*  restrict cnorm,
          f32*  restrict work,
    const INT            lwork,
          INT*           info
);
void slatrs3(const char *uplo, const char *trans, const char *diag, const char *normin, const INT n, const INT nrhs, const f32 *restrict A, const INT lda, f32 *restrict X, const INT ldx, f32 *restrict scale, f32 *restrict cnorm, f32 *restrict work, const INT lwork, INT *info)#

SLATRS3 solves one of the triangular systems.

A * X = B * diag(scale) or A**T * X = B * diag(scale)

with scaling to prevent overflow. Here A is an upper or lower triangular matrix, A**T denotes the transpose of A. X and B are n by nrhs matrices and scale is an nrhs element vector of scaling factors. A scaling factor scale(j) is usually less than or equal to 1, chosen such that X(:,j) is less than the overflow threshold. If the matrix A is singular (A(j,j) = 0 for some j), then a non-trivial solution to A*X = 0 is returned. If the system is so badly scaled that the solution cannot be represented as (1/scale(k))*X(:,k), then x(:,k) = 0 and scale(k) is returned.

This is a BLAS-3 version of LATRS for solving several right hand sides simultaneously.

Reference: C. C. Kjelgaard Mikkelsen, A. B. Schwarz and L. Karlsson (2019). Parallel robust solution of triangular linear systems. Concurrency and Computation: Practice and Experience, 31(19), e5064.

Parameters

in
uplo

‘U’: Upper triangular; ‘L’: Lower triangular.

in
trans

‘N’: Solve A * X = B*diag(scale); ‘T’/’C’: Solve A**T * X = B*diag(scale).

in
diag

‘N’: Non-unit triangular; ‘U’: Unit triangular.

in
normin

‘Y’: CNORM contains column norms on entry; ‘N’: CNORM is not set, will be computed.

in
n

The order of the matrix A (n >= 0).

in
nrhs

The number of columns of X (nrhs >= 0).

in
A

The triangular matrix A. Array of dimension (lda, n).

in
lda

The leading dimension of A (lda >= max(1,n)).

inout
X

On entry, the right hand side B. On exit, overwritten by the solution matrix X. Array of dimension (ldx, nrhs).

in
ldx

The leading dimension of X (ldx >= max(1,n)).

out
scale

Array of dimension nrhs. The scaling factor s(k) for the triangular system with right-hand side k.

inout
cnorm

Array of dimension n. If normin=’Y’, contains column norms on entry. If normin=’N’, returns the 1-norm of offdiagonal parts.

out
work

Workspace array of dimension lwork. On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of work. If min(n,nrhs) = 0, lwork >= 1, else lwork >= 2*NBA * max(NBA, min(nrhs, 32)), where NBA = (n + NB - 1)/NB and NB is the optimal block size. If lwork = -1, a workspace query is performed.

out
info

Exit status:

  • = 0: successful exit

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

Functions

void dlatrs3(
    const char*          uplo,
    const char*          trans,
    const char*          diag,
    const char*          normin,
    const INT            n,
    const INT            nrhs,
    const f64*  restrict A,
    const INT            lda,
          f64*  restrict X,
    const INT            ldx,
          f64*  restrict scale,
          f64*  restrict cnorm,
          f64*  restrict work,
    const INT            lwork,
          INT*           info
);
void dlatrs3(const char *uplo, const char *trans, const char *diag, const char *normin, const INT n, const INT nrhs, const f64 *restrict A, const INT lda, f64 *restrict X, const INT ldx, f64 *restrict scale, f64 *restrict cnorm, f64 *restrict work, const INT lwork, INT *info)#

DLATRS3 solves one of the triangular systems.

A * X = B * diag(scale) or A**T * X = B * diag(scale)

with scaling to prevent overflow. Here A is an upper or lower triangular matrix, A**T denotes the transpose of A. X and B are n by nrhs matrices and scale is an nrhs element vector of scaling factors. A scaling factor scale(j) is usually less than or equal to 1, chosen such that X(:,j) is less than the overflow threshold. If the matrix A is singular (A(j,j) = 0 for some j), then a non-trivial solution to A*X = 0 is returned. If the system is so badly scaled that the solution cannot be represented as (1/scale(k))*X(:,k), then x(:,k) = 0 and scale(k) is returned.

This is a BLAS-3 version of LATRS for solving several right hand sides simultaneously.

Reference: C. C. Kjelgaard Mikkelsen, A. B. Schwarz and L. Karlsson (2019). Parallel robust solution of triangular linear systems. Concurrency and Computation: Practice and Experience, 31(19), e5064.

Parameters

in
uplo

‘U’: Upper triangular; ‘L’: Lower triangular.

in
trans

‘N’: Solve A * X = B*diag(scale); ‘T’/’C’: Solve A**T * X = B*diag(scale).

in
diag

‘N’: Non-unit triangular; ‘U’: Unit triangular.

in
normin

‘Y’: CNORM contains column norms on entry; ‘N’: CNORM is not set, will be computed.

in
n

The order of the matrix A (n >= 0).

in
nrhs

The number of columns of X (nrhs >= 0).

in
A

The triangular matrix A. Array of dimension (lda, n).

in
lda

The leading dimension of A (lda >= max(1,n)).

inout
X

On entry, the right hand side B. On exit, overwritten by the solution matrix X. Array of dimension (ldx, nrhs).

in
ldx

The leading dimension of X (ldx >= max(1,n)).

out
scale

Array of dimension nrhs. The scaling factor s(k) for the triangular system with right-hand side k.

inout
cnorm

Array of dimension n. If normin=’Y’, contains column norms on entry. If normin=’N’, returns the 1-norm of offdiagonal parts.

out
work

Workspace array of dimension lwork. On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of work. If min(n,nrhs) = 0, lwork >= 1, else lwork >= 2*NBA * max(NBA, min(nrhs, 32)), where NBA = (n + NB - 1)/NB and NB is the optimal block size. If lwork = -1, a workspace query is performed.

out
info

Exit status:

  • = 0: successful exit

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

Functions

void clatrs3(
    const char*          uplo,
    const char*          trans,
    const char*          diag,
    const char*          normin,
    const INT            n,
    const INT            nrhs,
    const c64*  restrict A,
    const INT            lda,
          c64*  restrict X,
    const INT            ldx,
          f32*  restrict scale,
          f32*  restrict cnorm,
          f32*  restrict work,
    const INT            lwork,
          INT*           info
);
void clatrs3(const char *uplo, const char *trans, const char *diag, const char *normin, const INT n, const INT nrhs, const c64 *restrict A, const INT lda, c64 *restrict X, const INT ldx, f32 *restrict scale, f32 *restrict cnorm, f32 *restrict work, const INT lwork, INT *info)#

CLATRS3 solves one of the triangular systems.

A * X = B * diag(scale), A**T * X = B * diag(scale), or A**H * X = B * diag(scale)

with scaling to prevent overflow. Here A is an upper or lower triangular matrix, A**T denotes the transpose of A, A**H denotes the conjugate transpose of A. X and B are n by nrhs matrices and scale is an nrhs element vector of scaling factors. A scaling factor scale(j) is usually less than or equal to 1, chosen such that X(:,j) is less than the overflow threshold. If the matrix A is singular (A(j,j) = 0 for some j), then a non-trivial solution to A*X = 0 is returned. If the system is so badly scaled that the solution cannot be represented as (1/scale(k))*X(:,k), then x(:,k) = 0 and scale(k) is returned.

This is a BLAS-3 version of LATRS for solving several right hand sides simultaneously.

Reference: C. C. Kjelgaard Mikkelsen, A. B. Schwarz and L. Karlsson (2019). Parallel robust solution of triangular linear systems. Concurrency and Computation: Practice and Experience, 31(19), e5064.

Parameters

in
uplo

‘U’: Upper triangular; ‘L’: Lower triangular.

in
trans

‘N’: Solve A * X = B*diag(scale); ‘T’: Solve A**T * X = B*diag(scale); ‘C’: Solve A**H * X = B*diag(scale).

in
diag

‘N’: Non-unit triangular; ‘U’: Unit triangular.

in
normin

‘Y’: CNORM contains column norms on entry; ‘N’: CNORM is not set, will be computed.

in
n

The order of the matrix A (n >= 0).

in
nrhs

The number of columns of X (nrhs >= 0).

in
A

The triangular matrix A. Array of dimension (lda, n).

in
lda

The leading dimension of A (lda >= max(1,n)).

inout
X

On entry, the right hand side B. On exit, overwritten by the solution matrix X. Array of dimension (ldx, nrhs).

in
ldx

The leading dimension of X (ldx >= max(1,n)).

out
scale

Array of dimension nrhs. The scaling factor s(k) for the triangular system with right-hand side k.

inout
cnorm

Array of dimension n. If normin=’Y’, contains column norms on entry. If normin=’N’, returns the 1-norm of offdiagonal parts.

out
work

Workspace array of dimension lwork. On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of work. If min(n,nrhs) = 0, lwork >= 1, else lwork >= 2*NBA * max(NBA, min(nrhs, 32)), where NBA = (n + NB - 1)/NB and NB is the optimal block size. If lwork = -1, a workspace query is performed.

out
info

Exit status:

  • = 0: successful exit

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

Functions

void zlatrs3(
    const char*          uplo,
    const char*          trans,
    const char*          diag,
    const char*          normin,
    const INT            n,
    const INT            nrhs,
    const c128* restrict A,
    const INT            lda,
          c128* restrict X,
    const INT            ldx,
          f64*  restrict scale,
          f64*  restrict cnorm,
          f64*  restrict work,
    const INT            lwork,
          INT*           info
);
void zlatrs3(const char *uplo, const char *trans, const char *diag, const char *normin, const INT n, const INT nrhs, const c128 *restrict A, const INT lda, c128 *restrict X, const INT ldx, f64 *restrict scale, f64 *restrict cnorm, f64 *restrict work, const INT lwork, INT *info)#

ZLATRS3 solves one of the triangular systems.

A * X = B * diag(scale), A**T * X = B * diag(scale), or A**H * X = B * diag(scale)

with scaling to prevent overflow. Here A is an upper or lower triangular matrix, A**T denotes the transpose of A, A**H denotes the conjugate transpose of A. X and B are n by nrhs matrices and scale is an nrhs element vector of scaling factors. A scaling factor scale(j) is usually less than or equal to 1, chosen such that X(:,j) is less than the overflow threshold. If the matrix A is singular (A(j,j) = 0 for some j), then a non-trivial solution to A*X = 0 is returned. If the system is so badly scaled that the solution cannot be represented as (1/scale(k))*X(:,k), then x(:,k) = 0 and scale(k) is returned.

This is a BLAS-3 version of LATRS for solving several right hand sides simultaneously.

Reference: C. C. Kjelgaard Mikkelsen, A. B. Schwarz and L. Karlsson (2019). Parallel robust solution of triangular linear systems. Concurrency and Computation: Practice and Experience, 31(19), e5064.

Parameters

in
uplo

‘U’: Upper triangular; ‘L’: Lower triangular.

in
trans

‘N’: Solve A * X = B*diag(scale); ‘T’: Solve A**T * X = B*diag(scale); ‘C’: Solve A**H * X = B*diag(scale).

in
diag

‘N’: Non-unit triangular; ‘U’: Unit triangular.

in
normin

‘Y’: CNORM contains column norms on entry; ‘N’: CNORM is not set, will be computed.

in
n

The order of the matrix A (n >= 0).

in
nrhs

The number of columns of X (nrhs >= 0).

in
A

The triangular matrix A. Array of dimension (lda, n).

in
lda

The leading dimension of A (lda >= max(1,n)).

inout
X

On entry, the right hand side B. On exit, overwritten by the solution matrix X. Array of dimension (ldx, nrhs).

in
ldx

The leading dimension of X (ldx >= max(1,n)).

out
scale

Array of dimension nrhs. The scaling factor s(k) for the triangular system with right-hand side k.

inout
cnorm

Array of dimension n. If normin=’Y’, contains column norms on entry. If normin=’N’, returns the 1-norm of offdiagonal parts.

out
work

Workspace array of dimension lwork. On exit, work[0] returns the optimal lwork.

in
lwork

The dimension of work. If min(n,nrhs) = 0, lwork >= 1, else lwork >= 2*NBA * max(NBA, min(nrhs, 32)), where NBA = (n + NB - 1)/NB and NB is the optimal block size. If lwork = -1, a workspace query is performed.

out
info

Exit status:

  • = 0: successful exit

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