Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 11/07/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_?symm

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

Syntax

void cblas_ssymm (const CBLAS_LAYOUT Layout, const CBLAS_SIDE side, const CBLAS_UPLO uplo, 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_dsymm (const CBLAS_LAYOUT Layout, const CBLAS_SIDE side, const CBLAS_UPLO uplo, 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_csymm (const CBLAS_LAYOUT Layout, const CBLAS_SIDE side, const CBLAS_UPLO uplo, 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_zsymm (const CBLAS_LAYOUT Layout, const CBLAS_SIDE side, const CBLAS_UPLO uplo, 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 ?symm routines compute a scalar-matrix-matrix product with one symmetric matrix and add the result to a scalar-matrix product . The operation is defined as

C := alpha*A*B + beta*C,

or

C := alpha*B*A + beta*C,

where:

alpha and beta are scalars,

A is a symmetric matrix,

B and C are m-by-n matrices.

Input Parameters

Layout

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

side

Specifies whether the symmetric matrix A appears on the left or right in the operation:

if side = CblasLeft, then C := alpha*A*B + beta*C;

if side = CblasRight, then C := alpha*B*A + beta*C.

uplo

Specifies whether the upper or lower triangular part of the symmetric matrix A is used:

if uplo = CblasUpper, then the upper triangular part is used;

if uplo = CblasLower, then the lower triangular part is used.

m

Specifies the number of rows of the matrix C.

The value of m must be at least zero.

n

Specifies the number of columns of the matrix C.

The value of n must be at least zero.

alpha

Specifies the scalar alpha.

a

Array, size lda* ka , where ka is m when side = CblasLeft and is n otherwise.

Before entry with side = CblasLeft, the m-by-m part of the array a must contain the symmetric matrix, such that when uplo = CblasUpper, the leading m-by-m upper triangular part of the array a must contain the upper triangular part of the symmetric matrix and the strictly lower triangular part of a is not referenced, and when side = CblasLeft, the leading m-by-m lower triangular part of the array a must contain the lower triangular part of the symmetric matrix and the strictly upper triangular part of a is not referenced.

Before entry with side = CblasRight, the n-by-n part of the array a must contain the symmetric matrix, such that when uplo = CblasUppere array a must contain the upper triangular part of the symmetric matrix and the strictly lower triangular part of a is not referenced, and when side = CblasLeft, the leading n-by-n lower triangular part of the array a must contain the lower triangular part of the symmetric matrix and the strictly upper triangular part of a is not referenced.

lda

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

b

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

For Layout = CblasRowMajor: array, size ldb*m. 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).

beta

Specifies the scalar beta.

When beta is set to zero, then c need not be set on input.

c

For Layout = CblasColMajor: array, size ldc*n. Before entry, the leading m-by-n part of the array c must contain the matrix C, except when beta is zero, in which case c need not be set on entry.

For Layout = CblasRowMajor: array, size ldc*m. Before entry, the leading n-by-m part of the array c must contain the matrix C, except when beta is zero, in which case c need not be set on entry.

ldc

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

Output Parameters

c

Overwritten by the m-by-n updated matrix.