Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

cblas_?trmm

Computes a matrix-matrix product where one input matrix is triangular.

Syntax

void cblas_strmm (const CBLAS_LAYOUT Layout, const CBLAS_SIDE side, const CBLAS_UPLO uplo, const CBLAS_TRANSPOSE transa, const CBLAS_DIAG diag, const MKL_INT m, const MKL_INT n, const float alpha, const float *a, const MKL_INT lda, float *b, const MKL_INT ldb);

void cblas_dtrmm (const CBLAS_LAYOUT Layout, const CBLAS_SIDE side, const CBLAS_UPLO uplo, const CBLAS_TRANSPOSE transa, const CBLAS_DIAG diag, const MKL_INT m, const MKL_INT n, const double alpha, const double *a, const MKL_INT lda, double *b, const MKL_INT ldb);

void cblas_ctrmm (const CBLAS_LAYOUT Layout, const CBLAS_SIDE side, const CBLAS_UPLO uplo, const CBLAS_TRANSPOSE transa, const CBLAS_DIAG diag, const MKL_INT m, const MKL_INT n, const void *alpha, const void *a, const MKL_INT lda, void *b, const MKL_INT ldb);

void cblas_ztrmm (const CBLAS_LAYOUT Layout, const CBLAS_SIDE side, const CBLAS_UPLO uplo, const CBLAS_TRANSPOSE transa, const CBLAS_DIAG diag, const MKL_INT m, const MKL_INT n, const void *alpha, const void *a, const MKL_INT lda, void *b, const MKL_INT ldb);

Include Files

  • mkl.h

Description

The ?trmm routines compute a scalar-matrix-matrix product with one triangular matrix . The operation is defined as

B := alpha*op(A)*B

or

B := alpha*B*op(A)

where:

alpha is a scalar,

B is an m-by-n matrix,

A is a unit, or non-unit, upper or lower triangular matrix

op(A) is one of op(A) = A, or op(A) = A', or op(A) = conjg(A').

Input Parameters

Layout

Specifies whether two-dimensional array storage is row-major (CblasRowMajor) or column-major (CblasColMajor).

side

Specifies whether op(A) appears on the left or right of B in the operation:

if side = CblasLeft, then B := alpha*op(A)*B;

if side = CblasRight, then B := alpha*B*op(A).

uplo

Specifies whether the matrix A is upper or lower triangular.

uplo = CblasUpper

if uplo = CblasLower, then the matrix is low triangular.

transa

Specifies the form of op(A) used in the matrix multiplication:

if transa=CblasNoTrans, then op(A) = A;

if transa=CblasTrans, then op(A) = A';

if transa=CblasConjTrans, then op(A) = conjg(A').

diag

Specifies whether the matrix A is unit triangular:

if diag = CblasUnit then the matrix is unit triangular;

if diag = CblasNonUnit , then the matrix is not unit triangular.

m

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

n

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

alpha

Specifies the scalar alpha.

When alpha is zero, then a is not referenced and b need not be set before entry.

a

Array, size lda by k, where k is m when side = CblasLeft and 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 leading k by k 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

Specifies the leading dimension of a as declared in the calling (sub)program. Whenside = CblasLeft, then lda must be at least max(1, m), when side = CblasRight, then lda must be at least max(1, n).

b

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

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

ldb

Specifies the leading dimension of b as declared in the calling (sub)program. When Layout = CblasColMajor, ldb must be at least max(1, m); otherwise, ldb must be at least max(1, n).

Output Parameters

b

Overwritten by the transformed matrix.