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


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


{\ttfamily \#include \char`\"{}../include/lass.\+h\char`\"{}}\\*
Include dependency graph for ddss\+\_\+dtrmm.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{ddss__dtrmm_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{ddss__dtrmm_8c_ac418e7d435cba3c169e5e75ad42ffbdd}{ddss\+\_\+dtrmm} (enum D\+D\+S\+S\+\_\+\+S\+I\+DE S\+I\+DE, 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, enum D\+D\+S\+S\+\_\+\+D\+I\+AG D\+I\+AG, int M, int N, const double A\+L\+P\+HA, double $\ast$A, int L\+DA, double $\ast$B, int L\+DB)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
L\+A\+Ss-\/\+D\+D\+Ss ddss\+\_\+dtrmm 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-\/03-\/19   
\end{DoxyDate}


\subsection{Function Documentation}
\index{ddss\+\_\+dtrmm.\+c@{ddss\+\_\+dtrmm.\+c}!ddss\+\_\+dtrmm@{ddss\+\_\+dtrmm}}
\index{ddss\+\_\+dtrmm@{ddss\+\_\+dtrmm}!ddss\+\_\+dtrmm.\+c@{ddss\+\_\+dtrmm.\+c}}
\subsubsection[{\texorpdfstring{ddss\+\_\+dtrmm(enum D\+D\+S\+S\+\_\+\+S\+I\+D\+E S\+I\+D\+E, 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, enum D\+D\+S\+S\+\_\+\+D\+I\+A\+G D\+I\+A\+G, int M, int N, const double A\+L\+P\+H\+A, double $\ast$\+A, int L\+D\+A, double $\ast$\+B, int L\+D\+B)}{ddss_dtrmm(enum DDSS_SIDE SIDE, enum DDSS_UPLO UPLO, enum DDSS_TRANS TRANS_A, enum DDSS_DIAG DIAG, int M, int N, const double ALPHA, double *A, int LDA, double *B, int LDB)}}]{\setlength{\rightskip}{0pt plus 5cm}int ddss\+\_\+dtrmm (
\begin{DoxyParamCaption}
\item[{enum D\+D\+S\+S\+\_\+\+S\+I\+DE}]{S\+I\+DE, }
\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[{enum D\+D\+S\+S\+\_\+\+D\+I\+AG}]{D\+I\+AG, }
\item[{int}]{M, }
\item[{int}]{N, }
\item[{const double}]{A\+L\+P\+HA, }
\item[{double $\ast$}]{A, }
\item[{int}]{L\+DA, }
\item[{double $\ast$}]{B, }
\item[{int}]{L\+DB}
\end{DoxyParamCaption}
)}\hypertarget{ddss__dtrmm_8c_ac418e7d435cba3c169e5e75ad42ffbdd}{}\label{ddss__dtrmm_8c_ac418e7d435cba3c169e5e75ad42ffbdd}
Performs one of the matrix-\/matrix operations\+: \begin{DoxyVerb}B = ALPHA * op( A ) * B, or B = ALPHA * B * op( A )
\end{DoxyVerb}


where op( A ) is one of\+: \begin{DoxyVerb}op( A ) = A      or
op( A ) = A**T 
\end{DoxyVerb}


A\+L\+P\+HA is a scalar, B is a M by N matrix and A is a unit, or non-\/unit, upper or lower triangular matrix.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em S\+I\+DE} & enum D\+D\+S\+S\+\_\+\+S\+I\+DE. S\+I\+DE specifies the position of the triangular A matrix in the operations\+:
\begin{DoxyItemize}
\item Left\+: B = A\+L\+P\+HA $\ast$ op( A ) $\ast$ B.
\item Right\+: B = A\+L\+P\+HA $\ast$ B $\ast$ op( A ).
\end{DoxyItemize}\\
\hline
\mbox{\tt in}  & {\em U\+P\+LO} & enum D\+D\+S\+S\+\_\+\+U\+P\+LO. U\+P\+LO specifies the form in which A is stored\+:
\begin{DoxyItemize}
\item Lower\+: Lower triangle of A is stored. The upper traingular part is not referenced.
\item Upper\+: Upper triangle of A 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 form of op( A ) to be used\+:
\begin{DoxyItemize}
\item No\+Trans\+: op( A ) = A.
\item Trans\+: op( A ) = A$\ast$$\ast$T.
\end{DoxyItemize}\\
\hline
\mbox{\tt in}  & {\em D\+I\+AG} & enum D\+D\+S\+S\+\_\+\+D\+I\+AG. D\+I\+AG specifies whether or not A is unit triangular as follows\+:
\begin{DoxyItemize}
\item Unit\+: A is assumed to be unit triangular.
\item Non\+Unit\+: A is not assumed to be unit triangular.
\end{DoxyItemize}\\
\hline
\mbox{\tt in}  & {\em M} & int. M specifies the number of rows of B. M must be at least zero.\\
\hline
\mbox{\tt in}  & {\em N} & int. N specifies the number of columns of B. N 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 K by K, where K is M when S\+I\+DE = Left and is N otherwise. When U\+P\+LO = Uppper the strictly lower triangular part of A is not referenced and when U\+P\+LO = Lower the strictly upper triangular part of A is not referenced. Note that when D\+I\+AG = Unit, the diagonal elements of A are not referenced either, but are assumed to be unity.\\
\hline
\mbox{\tt in}  & {\em L\+DA} & int. L\+DA specifies the number of columns of A ( row-\/major order ). When S\+I\+DE = Left then L\+DA must be at least max( 1, M ), otherwise L\+DA must be at least max( 1, N ).\\
\hline
\mbox{\tt in,out}  & {\em B} & double $\ast$. B is a pointer to a matrix of dimension M by N. On exit the matrix B is overwritten by the transformed matrix.\\
\hline
\mbox{\tt in}  & {\em L\+DB} & int. L\+DB specifies the number of columns of B ( row-\/major order ). L\+DB must be at least max( 1, N ).\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{lass_8h_afff986820ff4c554e2b217e99b49c143}{kdtrmm} 
\end{DoxySeeAlso}


Definition at line 113 of file ddss\+\_\+dtrmm.\+c.



References kdtrmm().


\begin{DoxyCode}
118 \{
119 
120     \textcolor{comment}{// Local variables}
121     \textcolor{keywordtype}{int} nA;
122     
123     \textcolor{comment}{// Argument checking}
124     \textcolor{keywordflow}{if} ( ( SIDE != Left ) && ( SIDE != Right ) ) 
125     \{
126         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of SIDE, in ddss\_dtrmm code\(\backslash\)n"} );
127         \textcolor{keywordflow}{return} NoSuccess;
128     \}
129 
130     \textcolor{keywordflow}{if} ( ( UPLO != Upper ) && ( UPLO != Lower ) ) 
131     \{
132         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of UPLO, in ddss\_dtrmm code\(\backslash\)n"} );
133         \textcolor{keywordflow}{return} NoSuccess;
134     \}
135 
136     \textcolor{keywordflow}{if} ( ( TRANS\_A != NoTrans ) && ( TRANS\_A != Trans ) ) 
137     \{
138         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of TRANS\_A, in ddss\_dtrmm code\(\backslash\)n"} );
139         \textcolor{keywordflow}{return} NoSuccess;
140     \}
141 
142     \textcolor{keywordflow}{if} ( ( DIAG != Unit ) && ( DIAG != NonUnit ) ) 
143     \{
144         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of DIAG, in ddss\_dtrmm code\(\backslash\)n"} );
145         \textcolor{keywordflow}{return} NoSuccess;
146     \}
147 
148     \textcolor{keywordflow}{if} ( M < 0 ) 
149     \{
150         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of M, in ddss\_dtrmm code\(\backslash\)n"} );
151         \textcolor{keywordflow}{return} NoSuccess;
152     \}
153 
154     \textcolor{keywordflow}{if} ( N < 0 ) 
155     \{
156         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of N, in ddss\_dtrmm code\(\backslash\)n"} );
157         \textcolor{keywordflow}{return} NoSuccess;
158     \}
159 
160     \textcolor{keywordflow}{if} ( SIDE == Left ) 
161     \{
162         nA = M;
163     \} 
164     \textcolor{keywordflow}{else} 
165     \{
166         nA = N;
167     \}
168 
169     \textcolor{keywordflow}{if} ( LDA < MAX( 1, nA ) ) 
170     \{
171         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of LDA, in ddss\_dtrmm code\(\backslash\)n"} );
172         \textcolor{keywordflow}{return} NoSuccess;
173     \}
174 
175     \textcolor{keywordflow}{if} ( LDB < MAX( 1, N ) ) 
176     \{
177         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of LDB, in ddss\_dtrmm code\(\backslash\)n"} );
178         \textcolor{keywordflow}{return} NoSuccess;
179     \}
180     
181     \textcolor{comment}{// Quick return}
182     \textcolor{keywordflow}{if} ( M == 0 || N == 0 )
183     \{
184         \textcolor{keywordflow}{return} Success;
185     \}   
186 
187     \textcolor{keywordflow}{return} \hyperlink{kdtrmm_8c_afff986820ff4c554e2b217e99b49c143}{kdtrmm}( SIDE, UPLO, 
188                    TRANS\_A, DIAG, 
189                    M, N, 
190                    ALPHA, A, LDA, 
191                           B, LDB );
192 
193 \}
\end{DoxyCode}
