\hypertarget{kdtpgesv_8c}{}\section{src/kdtpgesv.c File Reference}
\label{kdtpgesv_8c}\index{src/kdtpgesv.\+c@{src/kdtpgesv.\+c}}


L\+A\+Ss-\/\+D\+D\+Ss kdtpgesv routine.  


{\ttfamily \#include \char`\"{}../include/lass.\+h\char`\"{}}\\*
Include dependency graph for kdtpgesv.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{kdtpgesv_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
enum L\+A\+S\+S\+\_\+\+R\+E\+T\+U\+RN \hyperlink{kdtpgesv_8c_aa8b24e76e50652c68471955338c4e1b9}{kdtpgesv} (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 kdtpgesv 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{kdtpgesv.\+c@{kdtpgesv.\+c}!kdtpgesv@{kdtpgesv}}
\index{kdtpgesv@{kdtpgesv}!kdtpgesv.\+c@{kdtpgesv.\+c}}
\subsubsection[{\texorpdfstring{kdtpgesv(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)}{kdtpgesv(int N, int NRHS, double *A, int LDA, int *IPIV, double *B, int LDB)}}]{\setlength{\rightskip}{0pt plus 5cm}enum L\+A\+S\+S\+\_\+\+R\+E\+T\+U\+RN kdtpgesv (
\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{kdtpgesv_8c_aa8b24e76e50652c68471955338c4e1b9}{}\label{kdtpgesv_8c_aa8b24e76e50652c68471955338c4e1b9}
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}
ddss\+\_\+tile 

ddss\+\_\+flat2tiled 

ddss\+\_\+tiled2flat 
\end{DoxySeeAlso}


Definition at line 91 of file kdtpgesv.\+c.



References ddss\+\_\+dflat2tiled(), ddss\+\_\+dtiled2flat(), and ddss\+\_\+tile\+\_\+size().



Referenced by ddss\+\_\+dtpgesv().


\begin{DoxyCode}
95 \{
96 
97     \textcolor{comment}{// Local variables}
98     \textcolor{keywordtype}{int} i;
99     \textcolor{keywordtype}{int} nt, nrhst;
100     \textcolor{keywordtype}{int} ni, mi, nni, ki, nrhsi;
101     \textcolor{keywordtype}{int} tile\_size\_n;
102     \textcolor{keywordtype}{int} tile\_size\_m;
103     \textcolor{keywordtype}{int} tile\_size\_nn;
104     \textcolor{keywordtype}{int} tile\_size\_nrhs;
105     \textcolor{keywordtype}{int} tile\_size\_k;
106     \textcolor{keywordtype}{int} local\_ipiv\_size;
107     \textcolor{keywordtype}{int} current\_position;
108     \textcolor{keyword}{enum} LASS\_RETURN ret;
109     \textcolor{keywordtype}{int} *ipiv\_local;
110 
111     \textcolor{comment}{// Number of tiles}
112     \textcolor{keywordflow}{if} ( N % TILE\_SIZE == 0 )
113     \{
114         nt = N / TILE\_SIZE;
115     \}
116     \textcolor{keywordflow}{else}
117     \{
118         nt = ( N / TILE\_SIZE ) + 1;
119     \}
120 
121     \textcolor{keywordflow}{if} ( NRHS % TILE\_SIZE == 0 )
122     \{
123         nrhst = NRHS / TILE\_SIZE;
124     \}
125     \textcolor{keywordflow}{else}
126     \{
127         nrhst = ( NRHS / TILE\_SIZE ) + 1;
128     \}
129 
130     \textcolor{comment}{/***************************}
131 \textcolor{comment}{    --Tile matrices allocation--}
132 \textcolor{comment}{    ***************************/}
133         
134     double ( *TILE\_A )[nt][TILE\_SIZE * TILE\_SIZE] = malloc ( nt * nt * 
135         TILE\_SIZE * TILE\_SIZE * \textcolor{keyword}{sizeof}( \textcolor{keywordtype}{double} ) );
136     
137     \textcolor{keywordflow}{if} ( TILE\_A == NULL )
138     \{
139         fprintf( stderr, \textcolor{stringliteral}{"Failure in kdtpgesv for matrix TILE\_A\(\backslash\)n"} );
140         \textcolor{keywordflow}{return} NoSuccess;
141     \}
142     
143     double ( *TILE\_B )[nrhst][TILE\_SIZE * TILE\_SIZE] = malloc(
144              nt * nrhst * TILE\_SIZE * TILE\_SIZE * \textcolor{keyword}{sizeof}( \textcolor{keywordtype}{double} ) );
145 
146     \textcolor{keywordflow}{if} ( TILE\_B == NULL ) 
147     \{
148         fprintf( stderr, \textcolor{stringliteral}{"Failure in kdtpgesv for matrix TILE\_B\(\backslash\)n"} );
149         \textcolor{keywordflow}{return} NoSuccess;
150     \}
151 
152     ipiv\_local = ( \textcolor{keywordtype}{int}* ) malloc( N * \textcolor{keyword}{sizeof}( \textcolor{keywordtype}{int} ) );
153     
154     \textcolor{keywordflow}{if} ( ipiv\_local == NULL )
155     \{
156         fprintf( stderr, \textcolor{stringliteral}{"Failure in kdtpgesv for ipiv\_local\(\backslash\)n"} );
157         \textcolor{keywordflow}{return} NoSuccess;
158     \}
159 
160     \textcolor{comment}{/************************************************}
161 \textcolor{comment}{    // --From flat data layout to tiled data layout--   }
162 \textcolor{comment}{    ************************************************/}
163     
164     \textcolor{comment}{// From flat matrix A to tile matrix TILE\_A}
165     \hyperlink{ddss__flat2tiled_8c_ab411e9b05a203c7905f0285ef4200a9e}{ddss\_dflat2tiled}( N, N, A, LDA, nt, nt, TILE\_A );
166 
167     \textcolor{comment}{// From flat matrix B to tile matrix TILE\_B }
168     \hyperlink{ddss__flat2tiled_8c_ab411e9b05a203c7905f0285ef4200a9e}{ddss\_dflat2tiled}( N, NRHS, B, LDB, nt, nrhst, TILE\_B );
169     
170     \textcolor{comment}{/****************}
171 \textcolor{comment}{    --DGETRF tile--}
172 \textcolor{comment}{    ****************/}   
173     
174     current\_position = 0;
175     i = 0;
176     \textcolor{keywordflow}{for} ( ki = 0; ki < nt; ki++ )
177     \{
178         tile\_size\_k = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( N, ki );
179         
180 \textcolor{preprocessor}{        #pragma oss task inout( TILE\_A[ki][ki] ) \(\backslash\)}
181 \textcolor{preprocessor}{            inout( ipiv\_local ) \(\backslash\)}
182 \textcolor{preprocessor}{            inout( current\_position ) \(\backslash\)}
183 \textcolor{preprocessor}{            out( local\_ipiv\_size ) \(\backslash\)}
184 \textcolor{preprocessor}{            shared( TILE\_A ) \(\backslash\)}
185 \textcolor{preprocessor}{            firstprivate( ki, i ) \(\backslash\)}
186 \textcolor{preprocessor}{            label( dgetrf )}
187         \{
188             LAPACKE\_dgetrf( CblasRowMajor,
189                             tile\_size\_k, tile\_size\_k, 
190                             TILE\_A[ki][ki], tile\_size\_k,
191                             ipiv\_local + current\_position );
192             
193             \textcolor{comment}{// Update the global ipiv array}
194             local\_ipiv\_size = tile\_size\_k;
195             \textcolor{keywordflow}{for} ( i = 0; i < local\_ipiv\_size; i++ )
196             \{
197                 ( IPIV + current\_position )[i] =
198                         ( ipiv\_local + current\_position )[i] + current\_position;
199             \}
200             current\_position += local\_ipiv\_size;
201         \}
202         \textcolor{keywordflow}{for} ( mi = ki + 1; mi < nt; mi++ )
203         \{
204             tile\_size\_m = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( N, mi );
205 
206 \textcolor{preprocessor}{            #pragma oss task in( TILE\_A[ki][ki] ) \(\backslash\)}
207 \textcolor{preprocessor}{                inout(TILE\_A[mi][ki]) \(\backslash\)}
208 \textcolor{preprocessor}{                shared( TILE\_A ) \(\backslash\)}
209 \textcolor{preprocessor}{                firstprivate( mi, ki ) \(\backslash\)}
210 \textcolor{preprocessor}{                label( dtrsm\_below )}
211             cblas\_dtrsm( CblasRowMajor, 
212                          ( CBLAS\_SIDE ) Right, ( CBLAS\_UPLO ) Upper, 
213                          ( CBLAS\_TRANSPOSE ) NoTrans, ( CBLAS\_DIAG ) NonUnit, 
214                          tile\_size\_m, tile\_size\_k, 
215                          1.0, TILE\_A[ki][ki], tile\_size\_k, 
216                               TILE\_A[mi][ki], tile\_size\_k );
217         \}
218         \textcolor{keywordflow}{for} ( ni = 0; ni < ki; ni++ )
219         \{       
220             tile\_size\_n = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( N, ni );
221             \textcolor{comment}{// Swap the tiles to the left of A[ki][ki]}
222 \textcolor{preprocessor}{            #pragma oss task in ( ipiv\_local ) \(\backslash\)}
223 \textcolor{preprocessor}{                in( current\_position ) \(\backslash\)}
224 \textcolor{preprocessor}{                in( local\_ipiv\_size ) \(\backslash\)}
225 \textcolor{preprocessor}{                inout( TILE\_A[ki][ni] ) \(\backslash\)}
226 \textcolor{preprocessor}{                shared( TILE\_A ) \(\backslash\)}
227 \textcolor{preprocessor}{                firstprivate( ki, ni ) \(\backslash\)}
228 \textcolor{preprocessor}{                label( dlaswp\_left )}
229             LAPACKE\_dlaswp( CblasRowMajor,
230                             tile\_size\_n, TILE\_A[ki][ni], tile\_size\_n,
231                             1, local\_ipiv\_size,
232                             ipiv\_local + current\_position - local\_ipiv\_size, 
233                             1 );
234             
235         \}
236         \textcolor{keywordflow}{for} ( nrhsi = 0; nrhsi < nrhst; nrhsi++ )
237         \{       
238             tile\_size\_nrhs = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( NRHS, nrhsi );
239             \textcolor{comment}{// Swap on the B[ki][nrhsi] tile}
240 \textcolor{preprocessor}{            #pragma oss task in ( ipiv\_local ) \(\backslash\)}
241 \textcolor{preprocessor}{                in( current\_position ) \(\backslash\)}
242 \textcolor{preprocessor}{                in( local\_ipiv\_size ) \(\backslash\)}
243 \textcolor{preprocessor}{                inout( TILE\_B[ki][nrhsi] ) \(\backslash\)}
244 \textcolor{preprocessor}{                shared( TILE\_B ) \(\backslash\)}
245 \textcolor{preprocessor}{                firstprivate( ki, nrhsi ) \(\backslash\)}
246 \textcolor{preprocessor}{                label( dlaswp\_on\_B )}
247             LAPACKE\_dlaswp( CblasRowMajor,
248                             tile\_size\_nrhs, TILE\_B[ki][nrhsi], tile\_size\_nrhs,
249                             1, local\_ipiv\_size,
250                             ipiv\_local + current\_position - local\_ipiv\_size, 
251                             1 );
252             
253         \}
254         \textcolor{keywordflow}{for} ( ni = ki + 1; ni < nt; ni++ )
255         \{
256             tile\_size\_n = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( N, ni );
257             \textcolor{comment}{// Swap the tiles to the right of A[ki][ki]}
258 \textcolor{preprocessor}{            #pragma oss task in ( ipiv\_local ) \(\backslash\)}
259 \textcolor{preprocessor}{                in( current\_position ) \(\backslash\)}
260 \textcolor{preprocessor}{                in( local\_ipiv\_size ) \(\backslash\)}
261 \textcolor{preprocessor}{                inout( TILE\_A[ki][ni] ) \(\backslash\)}
262 \textcolor{preprocessor}{                shared( TILE\_A ) \(\backslash\)}
263 \textcolor{preprocessor}{                firstprivate( ki, ni ) \(\backslash\)}
264 \textcolor{preprocessor}{                label( dlaswp\_right )}
265             LAPACKE\_dlaswp( CblasRowMajor,
266                             tile\_size\_n, TILE\_A[ki][ni], tile\_size\_n,
267                             1, local\_ipiv\_size,
268                             ipiv\_local + current\_position - local\_ipiv\_size, 
269                             1 );
270 
271 \textcolor{preprocessor}{            #pragma oss task in( TILE\_A[ki][ki] ) \(\backslash\)}
272 \textcolor{preprocessor}{                inout(TILE\_A[ki][ni]) \(\backslash\)}
273 \textcolor{preprocessor}{                shared( TILE\_A ) \(\backslash\)}
274 \textcolor{preprocessor}{                firstprivate( ni, ki ) \(\backslash\)}
275 \textcolor{preprocessor}{                label( dtrsm\_right )}
276             cblas\_dtrsm( CblasRowMajor, 
277                          ( CBLAS\_SIDE ) Left, ( CBLAS\_UPLO ) Lower, 
278                          ( CBLAS\_TRANSPOSE ) NoTrans, ( CBLAS\_DIAG ) Unit, 
279                          tile\_size\_k, tile\_size\_n, 
280                          1.0, TILE\_A[ki][ki], tile\_size\_k, 
281                               TILE\_A[ki][ni], tile\_size\_n );
282                 
283             \textcolor{keywordflow}{for} ( nni = ki + 1; nni < nt; nni++ )
284             \{
285                 tile\_size\_nn = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( N, nni );
286         
287 \textcolor{preprocessor}{                #pragma oss task in( TILE\_A[nni][ki] ) \(\backslash\)}
288 \textcolor{preprocessor}{                    in( TILE\_A[ki][ni] ) \(\backslash\)}
289 \textcolor{preprocessor}{                    inout( TILE\_A[nni][ni] ) \(\backslash\)}
290 \textcolor{preprocessor}{                    shared( TILE\_A ) \(\backslash\)}
291 \textcolor{preprocessor}{                    firstprivate( ni, nni, ki ) \(\backslash\)}
292 \textcolor{preprocessor}{                    label( dgemm )}
293                 cblas\_dgemm( CblasRowMajor, 
294                              ( CBLAS\_TRANSPOSE ) NoTrans,
295                              ( CBLAS\_TRANSPOSE ) NoTrans,
296                              tile\_size\_nn, 
297                              tile\_size\_n, 
298                              TILE\_SIZE,
299                              -1.0, TILE\_A[nni][ki], tile\_size\_k,
300                                    TILE\_A[ki][ni],  tile\_size\_n,
301                               1.0, TILE\_A[nni][ni], tile\_size\_n );          
302             \}
303         \}
304     \}
305         
306     \textcolor{comment}{// --From tile data layout to flat data layout--    }
307     \hyperlink{ddss__tiled2flat_8c_aeeb6b69c6b4db8333c660ef6824cdf6a}{ddss\_dtiled2flat}( N, N, A, LDA, nt, nt, TILE\_A );
308 
309     \textcolor{comment}{// Triandular solve}
310     \textcolor{comment}{// --SIDE = Left & UPLO = Lower & TRANS\_A = NoTrans & Unit-- }
311     \textcolor{keywordflow}{for} ( ki = 0; ki < nt; ki++ )
312     \{
313         tile\_size\_k = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( N, ki );
314 
315         \textcolor{keywordflow}{for} ( ni = 0; ni < nrhst; ni++ )
316         \{
317             tile\_size\_n = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( NRHS, ni );
318                         
319 \textcolor{preprocessor}{            #pragma oss task in( TILE\_A[ki][ki] ) \(\backslash\)}
320 \textcolor{preprocessor}{                inout(  TILE\_B[ki][ni] ) \(\backslash\)}
321 \textcolor{preprocessor}{                shared( TILE\_A, TILE\_B ) \(\backslash\)}
322 \textcolor{preprocessor}{                firstprivate( ki, ni ) \(\backslash\)}
323 \textcolor{preprocessor}{                label( dtrsm\_dtrsm1 )}
324             cblas\_dtrsm( CblasRowMajor,
325                          ( CBLAS\_SIDE ) Left, ( CBLAS\_UPLO ) Lower,
326                          ( CBLAS\_TRANSPOSE ) NoTrans,
327                          ( CBLAS\_DIAG ) Unit,
328                          tile\_size\_k,
329                          tile\_size\_n,
330                          1.0, TILE\_A[ki][ki], tile\_size\_k,
331                               TILE\_B[ki][ni], tile\_size\_n );
332         \}
333         \textcolor{keywordflow}{for} ( nni = 0; nni < nrhst; nni++ ) 
334         \{
335             tile\_size\_nn = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( NRHS, nni );
336                 
337             \textcolor{keywordflow}{for} ( mi = ki + 1; mi < nt; mi++ )
338             \{
339                     
340 \textcolor{preprocessor}{                #pragma oss task in( TILE\_A[mi][ki] ) \(\backslash\)}
341 \textcolor{preprocessor}{                    in( TILE\_B[ki][nni] ) \(\backslash\)}
342 \textcolor{preprocessor}{                    inout( TILE\_B[mi][nni] ) \(\backslash\)}
343 \textcolor{preprocessor}{                    shared( TILE\_A, TILE\_B ) \(\backslash\)}
344 \textcolor{preprocessor}{                    firstprivate( ki, mi, nni ) \(\backslash\)}
345 \textcolor{preprocessor}{                    label( dtrsm\_dgemm1 )}
346                 cblas\_dgemm( CblasRowMajor,
347                              CblasNoTrans, CblasNoTrans,
348                              tile\_size\_k,
349                              tile\_size\_nn,
350                              tile\_size\_k,
351                              -1.0,  TILE\_A[mi][ki],  tile\_size\_k,
352                                    TILE\_B[ki][nni], tile\_size\_nn,
353                               1.0, TILE\_B[mi][nni], tile\_size\_nn );
354             \}
355         \}
356     \}
357 
358     \textcolor{comment}{// Triandular solve}
359     \textcolor{comment}{// --SIDE = Left & UPLO = Upper & TRANS\_A = NoTrans & NonUnit--}
360     \textcolor{keywordflow}{for} ( ki = nt - 1; ki >= 0; ki-- ) 
361     \{
362         tile\_size\_k = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( N, ki );
363         
364         \textcolor{keywordflow}{for} ( ni = 0; ni < nrhst; ni++ ) 
365         \{
366             tile\_size\_n = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( NRHS, ni );
367 
368 \textcolor{preprocessor}{            #pragma oss task in( TILE\_A[ki][ki] ) \(\backslash\)}
369 \textcolor{preprocessor}{                inout( TILE\_B[ki][ni] ) \(\backslash\)}
370 \textcolor{preprocessor}{                shared( TILE\_A, TILE\_B ) \(\backslash\)}
371 \textcolor{preprocessor}{                firstprivate( ki, ni ) \(\backslash\)}
372 \textcolor{preprocessor}{                label( dtrsmi\_dtrsm2 )}
373             cblas\_dtrsm( CblasRowMajor,
374                          ( CBLAS\_SIDE ) Left, ( CBLAS\_UPLO ) Upper,
375                          ( CBLAS\_TRANSPOSE ) NoTrans,
376                          ( CBLAS\_DIAG ) NonUnit,
377                          tile\_size\_k, 
378                          tile\_size\_n,
379                          1.0, TILE\_A[ki][ki], tile\_size\_k,
380                               TILE\_B[ki][ni], tile\_size\_n );
381         \}
382 
383         \textcolor{keywordflow}{for} ( mi = ki - 1; mi >= 0; mi-- ) 
384         \{
385             tile\_size\_m = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( N, mi );
386             
387             \textcolor{keywordflow}{for} ( nni = 0; nni < nrhst; nni++ ) 
388             \{
389                 tile\_size\_nn = \hyperlink{ddss__tile_8c_a931442adba78807015ff9a076fb2ae49}{ddss\_tile\_size}( NRHS, nni );
390 
391 \textcolor{preprocessor}{                #pragma oss task in( TILE\_A[mi][ki] ) \(\backslash\)}
392 \textcolor{preprocessor}{                    in( TILE\_B[ki][nni] ) \(\backslash\)}
393 \textcolor{preprocessor}{                    inout( TILE\_B[mi][nni] ) \(\backslash\)}
394 \textcolor{preprocessor}{                    shared( TILE\_A, TILE\_B ) \(\backslash\)}
395 \textcolor{preprocessor}{                    firstprivate( ki, mi, nni ) \(\backslash\)}
396 \textcolor{preprocessor}{                    label( dtrsm\_dgemm2 )}
397                 cblas\_dgemm( CblasRowMajor,
398                              CblasNoTrans, CblasNoTrans,
399                              tile\_size\_m, 
400                              tile\_size\_nn, 
401                              tile\_size\_k,
402                              -1.0, TILE\_A[mi][ki],  tile\_size\_k,
403                                    TILE\_B[ki][nni], tile\_size\_nn,
404                               1.0, TILE\_B[mi][nni], tile\_size\_nn );
405             \}
406         \}
407     \}
408 
409     \textcolor{comment}{/*********************************************}
410 \textcolor{comment}{    --From tiled data layout to flat data layout--  }
411 \textcolor{comment}{    *********************************************/}
412     \hyperlink{ddss__tiled2flat_8c_aeeb6b69c6b4db8333c660ef6824cdf6a}{ddss\_dtiled2flat}( N, NRHS, B, LDB, nt, nrhst, TILE\_B );
413 
414     \textcolor{comment}{// --Free--}
415     free( TILE\_A );
416     free( TILE\_B );
417     free( ipiv\_local );
418     
419     \textcolor{keywordflow}{return} Success;
420 
421 \}
\end{DoxyCode}
