\hypertarget{ddss__dsyrk_8c}{}\section{src/ddss\+\_\+dsyrk.c File Reference}
\label{ddss__dsyrk_8c}\index{src/ddss\+\_\+dsyrk.\+c@{src/ddss\+\_\+dsyrk.\+c}}


L\+A\+Ss-\/\+D\+D\+Ss ddss\+\_\+dsyrk routine.  


{\ttfamily \#include \char`\"{}../include/lass.\+h\char`\"{}}\\*
Include dependency graph for ddss\+\_\+dsyrk.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{ddss__dsyrk_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{ddss__dsyrk_8c_a60f62b1e38c14cf41be017ce9597eec4}{ddss\+\_\+dsyrk} (enum D\+D\+S\+S\+\_\+\+U\+P\+LO U\+P\+LO, enum D\+D\+S\+S\+\_\+\+T\+R\+A\+NS T\+R\+A\+N\+S\+\_\+A, int N, int K, const double A\+L\+P\+HA, double $\ast$A, int L\+DA, const double B\+E\+TA, double $\ast$C, int L\+DC)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
L\+A\+Ss-\/\+D\+D\+Ss ddss\+\_\+dsyrk routine. 

L\+A\+Ss-\/\+D\+D\+Ss is a software package provided by\+: Barcelona Supercomputing Center -\/ Centro Nacional de Supercomputacion

\begin{DoxyAuthor}{Author}
Pedro Valero-\/\+Lara \href{mailto:pedro.valero@bsc.es}{\tt pedro.\+valero@bsc.\+es} 

Boro Sofranac \href{mailto:boro.sofranac@bsc.es}{\tt boro.\+sofranac@bsc.\+es} 
\end{DoxyAuthor}
\begin{DoxyDate}{Date}
2018-\/02-\/13   
\end{DoxyDate}


\subsection{Function Documentation}
\index{ddss\+\_\+dsyrk.\+c@{ddss\+\_\+dsyrk.\+c}!ddss\+\_\+dsyrk@{ddss\+\_\+dsyrk}}
\index{ddss\+\_\+dsyrk@{ddss\+\_\+dsyrk}!ddss\+\_\+dsyrk.\+c@{ddss\+\_\+dsyrk.\+c}}
\subsubsection[{\texorpdfstring{ddss\+\_\+dsyrk(enum D\+D\+S\+S\+\_\+\+U\+P\+L\+O U\+P\+L\+O, enum D\+D\+S\+S\+\_\+\+T\+R\+A\+N\+S T\+R\+A\+N\+S\+\_\+\+A, int N, int K, const double A\+L\+P\+H\+A, double $\ast$\+A, int L\+D\+A, const double B\+E\+T\+A, double $\ast$\+C, int L\+D\+C)}{ddss_dsyrk(enum DDSS_UPLO UPLO, enum DDSS_TRANS TRANS_A, int N, int K, const double ALPHA, double *A, int LDA, const double BETA, double *C, int LDC)}}]{\setlength{\rightskip}{0pt plus 5cm}int ddss\+\_\+dsyrk (
\begin{DoxyParamCaption}
\item[{enum D\+D\+S\+S\+\_\+\+U\+P\+LO}]{U\+P\+LO, }
\item[{enum D\+D\+S\+S\+\_\+\+T\+R\+A\+NS}]{T\+R\+A\+N\+S\+\_\+A, }
\item[{int}]{N, }
\item[{int}]{K, }
\item[{const double}]{A\+L\+P\+HA, }
\item[{double $\ast$}]{A, }
\item[{int}]{L\+DA, }
\item[{const double}]{B\+E\+TA, }
\item[{double $\ast$}]{C, }
\item[{int}]{L\+DC}
\end{DoxyParamCaption}
)}\hypertarget{ddss__dsyrk_8c_a60f62b1e38c14cf41be017ce9597eec4}{}\label{ddss__dsyrk_8c_a60f62b1e38c14cf41be017ce9597eec4}
Performs one of the symmetric rank k operations\+: \begin{DoxyVerb}C = ALPHA * A * op( A ) + BETA * C  or
C = ALPHA * op( A ) * A + BETA * C
\end{DoxyVerb}


where op( X ) is\+: \begin{DoxyVerb}op( X ) = X**T
\end{DoxyVerb}


A\+L\+P\+HA and B\+E\+TA are scalars, C is an N by N symmetric matrix and A is an N by K matrix in the first case and a K by N matrix in the second case. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em U\+P\+LO} & enum D\+D\+S\+S\+\_\+\+U\+P\+LO. U\+P\+LO specifies the form in which C is stored\+:
\begin{DoxyItemize}
\item Lower\+: Lower triangular part of C is stored. The upper traingular part is not referenced.
\item Upper\+: Upper triangular part of C is stored. The lower triangular part is not referenced.
\end{DoxyItemize}\\
\hline
\mbox{\tt in}  & {\em T\+R\+A\+N\+S\+\_\+A} & enum D\+D\+S\+S\+\_\+\+T\+R\+A\+NS. T\+R\+A\+N\+S\+\_\+A specifies the operation to be performed as follows\+:
\begin{DoxyItemize}
\item No\+Trans\+: C = A\+L\+P\+HA $\ast$ A $\ast$ A$\ast$$\ast$T + B\+E\+TA $\ast$ C
\item Trans\+: C = A\+L\+P\+HA $\ast$ A$\ast$$\ast$T $\ast$ A + B\+E\+TA $\ast$ C
\end{DoxyItemize}\\
\hline
\mbox{\tt in}  & {\em N} & int. N specifies the order of matrix C. N must be at least zero.\\
\hline
\mbox{\tt in}  & {\em K} & int. With T\+R\+A\+N\+S\+\_\+A = No\+Trans, K specifies the number of columns of the matrix A, and with T\+R\+A\+N\+S\+\_\+A = Trans, K specifies the number of rows of the matrix A. K must be at least zero.\\
\hline
\mbox{\tt in}  & {\em A\+L\+P\+HA} & double. A\+L\+P\+HA specifies the scalar alpha.\\
\hline
\mbox{\tt in}  & {\em A} & double $\ast$. A is a pointer to a matrix of dimension Na ( rows ) by Ka ( columns ), where Na is N and Ka is K when T\+R\+A\+N\+S\+\_\+A = No\+Trans, and Na is K and Ka is N otherwise.\\
\hline
\mbox{\tt in}  & {\em L\+DA} & int. L\+DA specifies the number of columns of A ( row-\/major order ). When T\+R\+A\+N\+S\+\_\+A = No\+Trans then L\+DA must be at least max( 1, K ), otherwise L\+DA must be at least max( 1, N ).\\
\hline
\mbox{\tt in}  & {\em B\+E\+TA} & double. B\+E\+TA specifies the scalar beta.\\
\hline
\mbox{\tt in,out}  & {\em C} & double $\ast$. C is a pointer to a matrix of dimension N by N. When U\+P\+LO = Uppper the strictly lower triangular part of C is not referenced. On exit, the upper triangular part of C is overwritten by the upper triangular part of the updated solution matrix C. When U\+P\+LO = Lower the strictly upper triangular part of C is not referenced. On exit, the lower triangular part of C is overwritten by the lower triangular part of the updated solution matrix C.\\
\hline
\mbox{\tt in}  & {\em L\+DC} & int. L\+DC specifies the number of columns of C ( row-\/major order ). L\+DC must be at least max( 1, N ).\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{lass_8h_a8ffc4fc508b14a7ccda98be54ded18bc}{kdsyrk} 
\end{DoxySeeAlso}


Definition at line 106 of file ddss\+\_\+dsyrk.\+c.



References kdsyrk().


\begin{DoxyCode}
110 \{
111 
112     \textcolor{comment}{// Local variables}
113     \textcolor{keywordtype}{int} nA;
114     
115     \textcolor{comment}{// Argument checking}
116     \textcolor{keywordflow}{if} ( ( UPLO != Upper ) && ( UPLO != Lower ) ) 
117     \{
118         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of UPLO, in ddss\_dsyrk code\(\backslash\)n"} );
119         \textcolor{keywordflow}{return} NoSuccess;
120     \}
121     
122     \textcolor{keywordflow}{if} ( ( TRANS\_A != NoTrans ) && ( TRANS\_A != Trans ) )
123     \{
124         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of TRANS\_A, in ddss\_dsyrk code\(\backslash\)n"} );
125         \textcolor{keywordflow}{return} NoSuccess;
126     \}
127     
128     \textcolor{keywordflow}{if} ( N < 0 )
129     \{
130         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of N, in ddss\_dsyrk code\(\backslash\)n"} );
131         \textcolor{keywordflow}{return} NoSuccess;
132     \}
133         
134     \textcolor{keywordflow}{if} ( K < 0 )
135     \{
136         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of K, in ddss\_dsyrk code\(\backslash\)n"} );
137         \textcolor{keywordflow}{return} NoSuccess;
138     \}
139     
140     \textcolor{keywordflow}{if} ( TRANS\_A == NoTrans ) 
141     \{
142         nA = K;
143     \} 
144     \textcolor{keywordflow}{else} 
145     \{
146         nA = N;
147     \}
148 
149     \textcolor{keywordflow}{if} ( LDA < MAX( 1, nA ) ) 
150     \{
151         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of LDA, in ddss\_dsyrk code\(\backslash\)n"} );
152         \textcolor{keywordflow}{return} NoSuccess;
153     \}
154 
155     \textcolor{keywordflow}{if} ( LDC < MAX( 1, N ) ) 
156     \{
157         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of LDC, in ddss\_dsyrk code\(\backslash\)n"} );
158         \textcolor{keywordflow}{return} NoSuccess;
159     \}
160     
161     \textcolor{comment}{// Quick return}
162      \textcolor{keywordflow}{if} ( N == 0 || ( ( ALPHA == 0.0 || K == 0 ) && BETA == 1.0 ) )
163      \{
164          \textcolor{keywordflow}{return} Success;
165      \}
166     
167     \textcolor{keywordflow}{return} \hyperlink{kdsyrk_8c_a8ffc4fc508b14a7ccda98be54ded18bc}{kdsyrk}( UPLO, TRANS\_A,
168                    N, K,
169                    ALPHA, A, LDA,
170                    BETA,  C, LDC );
171     
172 \}
\end{DoxyCode}
