LASs - Linear Algebra Routines on OmpSs 1.0.0 LASs

- Main Page
- Files

- File List
- File Members

Functions
ddss_dsymm.c File Reference

LASs-DDSs ddss_dsymm routine. More...

`#include "../include/lass.h"`
Include dependency graph for ddss_dsymm.c:

Go to the source code of this file.

## Functions
int | ddss_dsymm (enum DDSS_SIDE SIDE, enum DDSS_UPLO UPLO, int M, int N, double ALPHA, double *A, int LDA, double *B, int LDB, double BETA, double *C, int LDC)

## Detailed Description

LASs-DDSs ddss_dsymm routine.

LASs-DDSs is a software package provided by: Barcelona Supercomputing Center - Centro Nacional de Supercomputacion

Author
  Pedro Valero-Lara pedro.nosp@m..val.nosp@m.ero@b.nosp@m.sc.e.nosp@m.s

Date
  2017-07-11

Definition in file ddss_dsymm.c.

## Function Documentation

int ddss_dsymm | ( | enum DDSS_SIDE | SIDE,
|  | enum DDSS_UPLO | UPLO,
|  | int | M,
|  | int | N,
|  | double | ALPHA,
|  | double * | A,
|  | int | LDA,
|  | double * | B,
|  | int | LDB,
|  | double | BETA,
|  | double * | C,
|  | int | LDC
| ) |  |

Performs one of the matrix-matrix operations:

    C = ALPHA * A * B + BETA * C

or

    C = ALPHA * B * A + BETA * C

where op( X ) is one of:

    op( X ) = X      or
    op( X ) = X**T

ALPHA and BETA are scalars, A is a symmetric matrix, and B and C are M by N matrices.

Parameters

  [in] | SIDE | enum DDSS_SIDE. UPLO specifies the position of the symmetric A matrix in the operation: Left: C = ALPHA * A * B + BETA * C Right: C = ALPHA * B * A + BETA * C
  [in] | UPLO | enum DDSS_UPLO. UPLO specifies the form of A is stored: Lower: Lower triangle of A is stored. The upper traingular part is not referenced. Upper: Upper triangle of A is stored. The lower triangular part is not referenced.
  [in] | M | int. M specifies the number of rows of the matrix C. M must be equal or greater than zero.
  [in] | N | int. N specifies the number of columns of the matrix C. N must be equal or greater than zero.
  [in] | ALPHA | double.
  [in] | A | double *. A is a pointer to a matrix of dimension Ma ( rows ) by Na (columns), where Ma is M and Na is M when SIDE = Left, and Ma is N and Na is N when SIDE = Right
  [in] | LDA | int. LDA specifies the number of columns of A ( row-major order ). LDA must be at least max( 1, Na ).
  [in] | B | double *. B is a pointer to a matrix of dimension M by N.
  [in] | LDB | int. LDB specifies the number of columns of B ( row-major order ). LDB must be at least max( 1, N ).
  [in] | BETA | double.
  [in,out] | C | double *. C is a pointer to a matrix of dimension M by N. On exit, C is overwritten by the M by N matrix.
  [in] | LDC | int. LDC specifies the number of columns of C ( row-major order ). LDC must be at least max( 1, N ).

Return values

  Success | successful exit
  NoSuccess | unsuccessful exit

See also
  kdsymm

Definition at line 120 of file ddss_dsymm.c.

References kdsymm().

125 {
126
127 // Local variables
128 int nA;
129
130 // Argument checking
131 if ( ( SIDE != Left ) && ( SIDE != Right ) )
132 {
133 fprintf( stderr, "Illegal value of SIDE, in ddss_dsymm code\n" );
134 return NoSuccess;
135 }
136
137 if ( ( UPLO != Upper ) && ( UPLO != Lower ) )
138 {
139 fprintf( stderr, "Illegal value of UPLO, in ddss_dsymm code\n" );
140 return NoSuccess;
141 }
142
143 if ( M < 0 )
144 {
145 fprintf( stderr, "Illegal value of M, in ddss_dsymm code\n" );
146 return NoSuccess;
147 }
148
149 if ( N < 0 )
150 {
151 fprintf( stderr, "Illegal value of N, in ddss_dsymm code\n" );
152 return NoSuccess;
153 }
154
155 // Quick return
156 if ( M == 0 || N == 0 || ( ALPHA == 0.0 && BETA == 1.0 ) )
157 {
158 return Success;
159 }
160
161 if ( SIDE == Left )
162 {
163 nA = M;
164 }
165 else
166 {
167 nA = N;
168 }
169
170 if ( LDA < MAX( 1, nA ) )
171 {
172 fprintf( stderr, "Illegal value of LDA, in ddss_dsymm code\n" );
173 return NoSuccess;
174 }
175
176 if ( LDB < MAX( 1, N ) )
177 {
178 fprintf( stderr, "Illegal value of LDB, in ddss_dsymm code\n" );
179 return NoSuccess;
180 }
181
182 if ( LDC < MAX( 1, N ) )
183 {
184 fprintf( stderr, "Illegal value of LDC, in ddss_dsymm code\n" );
185 return NoSuccess;
186 }
187
188 return kdsymm( SIDE, UPLO, M, N,
189 ( const double ) ALPHA, A, LDA,
190 B, LDB,
191 ( const double ) BETA, C, LDC );
192
193 }
kdsymm
enum LASS_RETURN kdsymm(enum DDSS_SIDE SIDE, enum DDSS_UPLO UPLO, int M, int N, const double ALPHA, double *A, int LDA, double *B, int LDB, const double BETA, double *C, int LDC)
Definition: kdsymm.c:125