Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 10/31/2024
Public
Document Table of Contents

?trsm_oop

Solves a triangular matrix equation and adds the result to another scaled matrix.

Syntax

call strsm_oop(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb, beta, c, ldc)

call dtrsm_oop(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb, beta, c, ldc)

call ctrsm_oop(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb, beta, c, ldc)

call ztrsm_oop(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb, beta, c, ldc)

Include Files

mkl.fi

Description

The ?trsm_oop routines perform a triangular matrix solve followed by a scaled matrix addition.

For a left-side solve, the routine solves

op(A)*X=alpha*B

for x and then computes

C := X + beta*C

For a right-side solve, the routine solves

X*op(A)=alpha*B

followed by the same-scaled addition

C := X + beta*C

where:

  • alpha and beta are scalars.
  • A is a unit or non-unit upper or lower triangular matrix.
  • B is an m-by-n matrix.
  • C is an m-by-n matrix.
  • op(A) is one of op(A) = A, op(A) = A', or op(A) = conjg(A').

Input Parameters

side

CHARACTER*1. Specifies whether op(A) appears on the left or right of B in the triangular solve.

If side = 'L' or side = 'l', then we solve op(A)*X = alpha*B before performing C := X + beta*C.

If side = 'R' or side = 'r', then we solve X*op(A) = alpha*B before performing C := X + beta*C.

uplo

CHARACTER*1. Specifies whether the matrix A is upper or lower triangular.

If uplo = 'U' or uplo = 'u', then the matrix is upper triangular.

If uplo = 'L' or uplo = 'l', then the matrix is lower triangular.

transa

CHARACTER*1. Specifies the form of op(A) used in the triangular solve.

If transa='N' or transa = 'n', then op(A) = A.

If transa='T' or transa = 't', then op(A) = A'.

If transa='C' or transa = 'c', then op(A) = conjg(A').

diag

CHARACTER*1. Specifies whether the matrix A is unit triangular.

If diag = 'U' or diag = 'u', then the matrix is unit triangular.

If diag = 'N' or diag = 'n', then the matrix is not unit triangular.

m

INTEGER. Specifies the number of rows of matrix B. The value of m must be at least zero.

n

INTEGER. Specifies the number of columns of matrix B. The value of n must be at least zero.

alpha

REAL for strsm_oop.

DOUBLE PRECISION for dtrsm_oop.

COMPLEX for ctrsm_oop.

DOUBLE COMPLEX for ztrsm_oop.

Specifies the scalar alpha.

a

REAL for strsm_oop.

DOUBLE PRECISION for dtrsm_oop.

COMPLEX for ctrsm_oop.

DOUBLE COMPLEX for ztrsm_oop.

Array of size lda*k, where k is m when side = CblasLeft and k is n when side = CblasRight.

Before entry with uplo = CblasUpper, the leading k by k upper triangular part of the array a must contain the upper triangular matrix and the strictly lower triangular part of a is not referenced.

Before entry with uplo = CblasLower the lower triangular part of the array a must contain the lower triangular matrix and the strictly upper triangular part of a is not referenced.

When diag = CblasUnit, the diagonal elements of a are not referenced either, but are assumed to be unity.

lda

INTEGER. Specifies the leading dimension of a. When side = CblasLeft, then lda must be at least max(1, m). When side = CblasRight, then lda must be at least max(1, n).

b

REAL for strsm_oop.

DOUBLE PRECISION for dtrsm_oop.

COMPLEX for ctrsm_oop.

DOUBLE COMPLEX for ztrsm_oop.

For layout = CblasColMajor, array of size ldb*n. Before entry, the leading m-by-n part of the array b must contain the matrix B.

For layout = CblasRowMajor, array of size ldb*m. Before entry, the leading n-by-m part of the array b must contain the matrix B.

ldb

INTEGER. Specifies the leading dimension of b. When layout = CblasColMajor, ldb must be at least max(1, m); otherwise, ldb must be at least max(1, n).

beta

REAL for strsm_oop.

DOUBLE PRECISION for dtrsm_oop.

COMPLEX for ctrsm_oop.

DOUBLE COMPLEX for ztrsm_oop.

Specifies the scalar beta.

c

REAL for strsm_oop.

DOUBLE PRECISION for dtrsm_oop.

COMPLEX for ctrsm_oop.

DOUBLE COMPLEX for ztrsm_oop.

For layout = CblasColMajor, array of size ldc*n. Before entry, the leading m-by-n part of the array c must contain the matrix C.

For layout = CblasRowMajor, array of size ldc*m. Before entry, the leading n-by-m part of the array c must contain the matrix C.

ldc

INTEGER. Specifies the leading dimension of c. When layout = CblasColMajor, ldc must be at least max(1, m); otherwise, ldc must be at least max(1, n).

Output Parameters

c

Output matrix overwritten by the operation.