Developer Reference for Intel® oneAPI Math Kernel Library for C

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

cblas_?trmm_oop

Computes a matrix-matrix product where one input matrix is triangular and the other matrix is general, putting output into a different matrix.

Syntax

void cblas_strmm_oop (
    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,
    const float *b, const MKL_INT ldb, const float beta, float *c,
    const MKL_INT ldc);

void cblas_dtrmm_oop (
    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,
    const double *b, const MKL_INT ldb, const double beta, double *c,
    const MKL_INT ldc);

void cblas_ctrmm_oop (
    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, const void *b,
    const MKL_INT ldb, const void* beta, void *c, const MKL_INT ldc);

void cblas_ztrmm_oop (
    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, const void *b,
    const MKL_INT ldb, const void* beta, void *c, const MKL_INT ldc);

Include Files

mkl.h

Description

The cblas_?trmm_oop routines compute a scalar-matrix-matrix product where one of the matrices in the multiplication is triangular, and then add the result to a scalar-matrix product. The operation is defined as

C := alpha*op(A)*B + beta*C

or

C := alpha*B*op(A) + 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

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 C := alpha*op(A)*B + beta*C.

If side = CblasRight, then C := alpha*B*op(A) + beta*C.

uplo

Specifies whether the matrix A is upper or lower triangular.

If uplo = CblasUpper, then the matrix is upper triangular.

If uplo = CblasLower, then the matrix is lower 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 matrix B. The value of m must be at least zero.

n

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

alpha

Specifies the scalar alpha.

a

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

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

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

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

Specifies the scalar beta.

c

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

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