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


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


{\ttfamily \#include \char`\"{}../include/lass.\+h\char`\"{}}\\*
Include dependency graph for ddss\+\_\+dposv.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{ddss__dposv_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{ddss__dposv_8c_ae6277290e221b3626ae93091fede2d5f}{ddss\+\_\+dposv} (enum D\+D\+S\+S\+\_\+\+U\+P\+LO U\+P\+LO, int N, int N\+R\+HS, double $\ast$A, int L\+DA, double $\ast$B, int L\+DB)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
L\+A\+Ss-\/\+D\+D\+Ss ddss\+\_\+dpotrf 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} 
\end{DoxyAuthor}
\begin{DoxyDate}{Date}
2018-\/05-\/04   
\end{DoxyDate}


\subsection{Function Documentation}
\index{ddss\+\_\+dposv.\+c@{ddss\+\_\+dposv.\+c}!ddss\+\_\+dposv@{ddss\+\_\+dposv}}
\index{ddss\+\_\+dposv@{ddss\+\_\+dposv}!ddss\+\_\+dposv.\+c@{ddss\+\_\+dposv.\+c}}
\subsubsection[{\texorpdfstring{ddss\+\_\+dposv(enum D\+D\+S\+S\+\_\+\+U\+P\+L\+O U\+P\+L\+O, int N, int N\+R\+H\+S, double $\ast$\+A, int L\+D\+A, double $\ast$\+B, int L\+D\+B)}{ddss_dposv(enum DDSS_UPLO UPLO, int N, int NRHS, double *A, int LDA, double *B, int LDB)}}]{\setlength{\rightskip}{0pt plus 5cm}int ddss\+\_\+dposv (
\begin{DoxyParamCaption}
\item[{enum D\+D\+S\+S\+\_\+\+U\+P\+LO}]{U\+P\+LO, }
\item[{int}]{N, }
\item[{int}]{N\+R\+HS, }
\item[{double $\ast$}]{A, }
\item[{int}]{L\+DA, }
\item[{double $\ast$}]{B, }
\item[{int}]{L\+DB}
\end{DoxyParamCaption}
)}\hypertarget{ddss__dposv_8c_ae6277290e221b3626ae93091fede2d5f}{}\label{ddss__dposv_8c_ae6277290e221b3626ae93091fede2d5f}
Solves a system of linear equations A  X = B, where A is a m-\/by-\/m simmetric positive definite matrix and X and B are m-\/by-\/nrhs matrices. The matrix A is descomposed as\+: \begin{DoxyVerb}A = L \times L^T
or
A = U^T \times U
\end{DoxyVerb}


where L is a lower triangular matrix and U is an upper triangular matrix.


\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 of 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 N} & int. N specifies the order of the square matrix A. N $>$= 0.\\
\hline
\mbox{\tt in}  & {\em N\+R\+HS} & int. N\+R\+HS specifies the number of right-\/hand-\/sides (number of columns of B). N\+R\+HS $>$= 0.\\
\hline
\mbox{\tt in,out}  & {\em A} & double $\ast$. A is a pointer to a positive definite matrix of dimension N by L\+DA. On exit, if return value is Success, the matrix A is overwriten by the factor U or L.\\
\hline
\mbox{\tt in}  & {\em L\+DA} & int. L\+DA specifies the number of columns of A ( row-\/major order ). 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 N by N\+R\+HS, which stores the right-\/hand-\/sides of the systems of linear equations. (row-\/major order). On exit, if return value is Success, the matrix B is overwriten by the solution matrix X.\\
\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\+R\+H\+S ).\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em Success} & sucessful exit \\
\hline
{\em No\+Success} & unsucessful exit\\
\hline
\end{DoxyRetVals}
\begin{DoxySeeAlso}{See also}
\hyperlink{lass_8h_ad9d439560ff8b96c5fdd6aa4ead8176f}{kdposv} 
\end{DoxySeeAlso}


Definition at line 92 of file ddss\+\_\+dposv.\+c.



References kdposv().


\begin{DoxyCode}
96 \{
97 
98     \textcolor{comment}{// Argument checking}
99     \textcolor{keywordflow}{if} ( ( UPLO != Upper ) && ( UPLO != Lower ) )
100     \{
101         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of UPLO, in ddss\_dposv code\(\backslash\)n"} );
102         \textcolor{keywordflow}{return} NoSuccess;
103     \}
104     
105     \textcolor{keywordflow}{if} ( N < 0 )
106     \{
107         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of N, in ddss\_dposv code\(\backslash\)n"} );
108         \textcolor{keywordflow}{return} NoSuccess;
109     \}
110     
111     \textcolor{keywordflow}{if} ( NRHS < 0 )
112     \{
113         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of NRHS, in ddss\_dposv code\(\backslash\)n"} );
114         \textcolor{keywordflow}{return} NoSuccess;
115     \}
116 
117     \textcolor{keywordflow}{if} ( LDA < MAX( 1, N ) )
118     \{
119         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of LDA, in ddss\_dposv code\(\backslash\)n"} );
120         \textcolor{keywordflow}{return} NoSuccess;
121     \}
122 
123     \textcolor{keywordflow}{if} ( LDB < MAX( 1, NRHS ) )
124     \{
125         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of LDB, in ddss\_dposv code\(\backslash\)n"} );
126         \textcolor{keywordflow}{return} NoSuccess;
127     \}
128 
129     \textcolor{comment}{// Quick return}
130     \textcolor{keywordflow}{if} ( MAX( N, 0 ) == 0 || MAX( NRHS, 0 ) == 0 )
131     \{
132         \textcolor{keywordflow}{return} Success;
133     \}
134     
135     \textcolor{keywordflow}{return} \hyperlink{kdposv_8c_ad9d439560ff8b96c5fdd6aa4ead8176f}{kdposv}( UPLO, N, NRHS, A, LDA, B, LDB );
136     
137 \}
\end{DoxyCode}
