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


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


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


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


\subsection{Function Documentation}
\index{ddss\+\_\+dtpgesv.\+c@{ddss\+\_\+dtpgesv.\+c}!ddss\+\_\+dtpgesv@{ddss\+\_\+dtpgesv}}
\index{ddss\+\_\+dtpgesv@{ddss\+\_\+dtpgesv}!ddss\+\_\+dtpgesv.\+c@{ddss\+\_\+dtpgesv.\+c}}
\subsubsection[{\texorpdfstring{ddss\+\_\+dtpgesv(int N, int N\+R\+H\+S, double $\ast$\+A, int L\+D\+A, int $\ast$\+I\+P\+I\+V, double $\ast$\+B, int L\+D\+B)}{ddss_dtpgesv(int N, int NRHS, double *A, int LDA, int *IPIV, double *B, int LDB)}}]{\setlength{\rightskip}{0pt plus 5cm}int ddss\+\_\+dtpgesv (
\begin{DoxyParamCaption}
\item[{int}]{N, }
\item[{int}]{N\+R\+HS, }
\item[{double $\ast$}]{A, }
\item[{int}]{L\+DA, }
\item[{int $\ast$}]{I\+P\+IV, }
\item[{double $\ast$}]{B, }
\item[{int}]{L\+DB}
\end{DoxyParamCaption}
)}\hypertarget{ddss__dtpgesv_8c_adcc6575c28b21fe5c6486fff97d90aa9}{}\label{ddss__dtpgesv_8c_adcc6575c28b21fe5c6486fff97d90aa9}
Solves a system of linear equations A  X = B, where A is a N-\/by-\/N general matrix and X and B are N-\/by-\/\+N\+R\+HS matrices. The matrix A is factorized using the LU descomposition with tiled-\/pivoting. The matrix A is descomposed as\+: \begin{DoxyVerb}A = P * L * U
\end{DoxyVerb}


where P is a permutation matrix, L is a lower triangular matrix with unit diagonal elements and U is an upper triangular matrix.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em N} & int. N specifies the order of the square matrix A. N $>$= 0.\\
\hline
\end{DoxyParams}
N\+R\+HS int. N\+R\+HS specifies the number of right-\/hand-\/sides (number of columns of B). N\+R\+HS $>$= 0.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em A} & double $\ast$. A is a pointer to a regular matrix of dimension N-\/by-\/\+L\+DA. On exit, if return value is Success, the matrix A is overwriten by the factors L and U. The unit diagonal elements of L are not stored.\\
\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 out}  & {\em I\+P\+IV} & int $\ast$. ipiv is a pointer to an array of dimesion at least max( 1, min ( M, N ) ). ipiv( i ) = j, 1 $<$= i $<$= min( M, N ) implies that rows i and j have been interchanged.\\
\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} & successful exit \\
\hline
{\em No\+Success} & unsuccessful exit\\
\hline
\end{DoxyRetVals}
\begin{DoxySeeAlso}{See also}
\hyperlink{lass_8h_aa8b24e76e50652c68471955338c4e1b9}{kdtpgesv} 
\end{DoxySeeAlso}


Definition at line 89 of file ddss\+\_\+dtpgesv.\+c.



References kdtpgesv().


\begin{DoxyCode}
93 \{
94 
95     \textcolor{comment}{// Argument checking}
96     \textcolor{keywordflow}{if} ( N < 0 )
97     \{
98         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of N, in ddss\_dtpgesv code\(\backslash\)n"} );
99         \textcolor{keywordflow}{return} NoSuccess;
100     \}
101 
102     \textcolor{keywordflow}{if} ( NRHS < 0 )
103     \{
104         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of NRHS, in ddss\_dtpgesv code\(\backslash\)n"} );
105         \textcolor{keywordflow}{return} NoSuccess;
106     \}
107 
108     \textcolor{keywordflow}{if} ( LDA < MAX( 1, N ) )
109     \{
110         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of LDA, in ddss\_dtpgesv code\(\backslash\)n"} );
111         \textcolor{keywordflow}{return} NoSuccess;
112     \}
113 
114     \textcolor{keywordflow}{if} ( LDB < MAX( 1, NRHS ) )
115     \{
116         fprintf( stderr, \textcolor{stringliteral}{"Illegal value of LDB, in ddss\_dtpgesv code\(\backslash\)n"} );
117         \textcolor{keywordflow}{return} NoSuccess;
118     \}
119 
120     \textcolor{comment}{// Quick return}
121     \textcolor{keywordflow}{if} ( MAX( N, 0 ) == 0 || MAX( NRHS, 0 ) == 0 )
122     \{
123         \textcolor{keywordflow}{return} Success;
124     \}
125 
126     \textcolor{keywordflow}{return} \hyperlink{kdtpgesv_8c_aa8b24e76e50652c68471955338c4e1b9}{kdtpgesv}( N, NRHS, A, LDA, IPIV, B, LDB );
127 
128 \} 
\end{DoxyCode}
