# NAG Library Routine Document

## 1Purpose

f06ycf (dsymm) performs one of the matrix-matrix operations
 $C←αAB + βC or C←αBA + βC ,$
where $A$ is a real symmetric matrix, $B$ and $C$ are $m$ by $n$ real matrices, and $\alpha$ and $\beta$ are real scalars.

## 2Specification

Fortran Interface
 Subroutine f06ycf ( side, uplo, m, n, a, lda, b, ldb, beta, c, ldc)
 Integer, Intent (In) :: m, n, lda, ldb, ldc Real (Kind=nag_wp), Intent (In) :: alpha, a(lda,*), b(ldb,*), beta Real (Kind=nag_wp), Intent (Inout) :: c(ldc,*) Character (1), Intent (In) :: side, uplo
#include nagmk26.h
 void f06ycf_ (const char *side, const char *uplo, const Integer *m, const Integer *n, const double *alpha, const double a[], const Integer *lda, const double b[], const Integer *ldb, const double *beta, double c[], const Integer *ldc, const Charlen length_side, const Charlen length_uplo)
The routine may be called by its BLAS name dsymm.

None.

None.

## 5Arguments

1:     $\mathbf{side}$ – Character(1)Input
On entry: specifies whether $B$ is operated on from the left or the right.
${\mathbf{side}}=\text{'L'}$
$B$ is pre-multiplied from the left.
${\mathbf{side}}=\text{'R'}$
$B$ is post-multiplied from the right.
Constraint: ${\mathbf{side}}=\text{'L'}$ or $\text{'R'}$.
2:     $\mathbf{uplo}$ – Character(1)Input
On entry: specifies whether the upper or lower triangular part of $A$ is stored.
${\mathbf{uplo}}=\text{'U'}$
The upper triangular part of $A$ is stored.
${\mathbf{uplo}}=\text{'L'}$
The lower triangular part of $A$ is stored.
Constraint: ${\mathbf{uplo}}=\text{'U'}$ or $\text{'L'}$.
3:     $\mathbf{m}$ – IntegerInput
On entry: $m$, the number of rows of the matrices $B$ and $C$; the order of $A$ if ${\mathbf{side}}=\text{'L'}$.
Constraint: ${\mathbf{m}}\ge 0$.
4:     $\mathbf{n}$ – IntegerInput
On entry: $n$, the number of columns of the matrices $B$ and $C$; the order of $A$ if ${\mathbf{side}}=\text{'R'}$.
Constraint: ${\mathbf{n}}\ge 0$.
5:     $\mathbf{alpha}$ – Real (Kind=nag_wp)Input
On entry: the scalar $\alpha$.
6:     $\mathbf{a}\left({\mathbf{lda}},*\right)$ – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array a must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$ if ${\mathbf{side}}=\text{'L'}$ and at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$ if ${\mathbf{side}}=\text{'R'}$.
On entry: the symmetric matrix $A$; $A$ is $m$ by $m$ if ${\mathbf{side}}=\text{'L'}$, or $n$ by $n$ if ${\mathbf{side}}=\text{'R'}$.
• If ${\mathbf{uplo}}=\text{'U'}$, the upper triangular part of $A$ must be stored and the elements of the array below the diagonal are not referenced.
• If ${\mathbf{uplo}}=\text{'L'}$, the lower triangular part of $A$ must be stored and the elements of the array above the diagonal are not referenced.
7:     $\mathbf{lda}$ – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which f06ycf (dsymm) is called.
Constraints:
• if ${\mathbf{side}}=\text{'L'}$, ${\mathbf{lda}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$;
• if ${\mathbf{side}}=\text{'R'}$, ${\mathbf{lda}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
8:     $\mathbf{b}\left({\mathbf{ldb}},*\right)$ – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array b must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
On entry: the $m$ by $n$ matrix $B$.
9:     $\mathbf{ldb}$ – IntegerInput
On entry: the first dimension of the array b as declared in the (sub)program from which f06ycf (dsymm) is called.
Constraint: ${\mathbf{ldb}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.
10:   $\mathbf{beta}$ – Real (Kind=nag_wp)Input
On entry: the scalar $\beta$.
11:   $\mathbf{c}\left({\mathbf{ldc}},*\right)$ – Real (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array c must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
On entry: the $m$ by $n$ matrix $C$.
If ${\mathbf{beta}}=0$, c need not be set.
On exit: the updated matrix $C$.
12:   $\mathbf{ldc}$ – IntegerInput
On entry: the first dimension of the array c as declared in the (sub)program from which f06ycf (dsymm) is called.
Constraint: ${\mathbf{ldc}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.

None.

Not applicable.

## 8Parallelism and Performance

f06ycf (dsymm) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.