LASs - Linear Algebra Routines on OmpSs 1.0.0 LASs

- Main Page
- Files

- File List
- File Members

ddss_dtpgesv.c
Go to the documentation of this file.
1 #include "../include/lass.h"
2
3 /**
4 *
5 * @file ddss_dtpgesv.c
6 *
7 * @brief LASs-DDSs ddss_dtpgesv routine.
8 *
9 * LASs-DDSs is a software package provided by:
10 * Barcelona Supercomputing Center - Centro Nacional de Supercomputacion
11 *
12 * @author Pedro Valero-Lara pedro.valero@bsc.es
13 * @date 2018-09-20
14 * @reviewer
15 * @modified
16 *
17 **/
18
19 /**
20 *
21 * @ingroup DDSS
22 *
23 * Solves a system of linear equations A \times X = B, where A is a N-by-N
24 * general matrix and X and B are N-by-NRHS matrices. The matrix A is
25 * factorized using the LU descomposition with tiled-pivoting.
26 * The matrix A is descomposed as:
27 *
28 * A = P * L * U
29 *
30 * where P is a permutation matrix, L is a lower triangular matrix with unit
31 * diagonal elements and U is an upper triangular matrix.
32 *
33 **/
34
35 /**
36 *
37 * @param[in]
38 * N int.
39 * N specifies the order of the square matrix A. N >= 0.
40 *
41 * NRHS int.
42 * NRHS specifies the number of right-hand-sides (number
43 * of columns of B). NRHS >= 0.
44 *
45 * @param[in,out]
46 * A double *.
47 * A is a pointer to a regular matrix of dimension N-by-LDA.
48 * On exit, if return value is Success, the matrix A is overwriten by
49 * the factors L and U. The unit diagonal elements of L are not stored.
50 *
51 * @param[in]
52 * LDA int.
53 * LDA specifies the number of columns of A ( row-major order ).
54 * LDA must be at least max( 1, N ).
55 *
56 * @param[out]
57 * IPIV int *.
58 * ipiv is a pointer to an array of dimesion at least
59 * max( 1, min ( M, N ) ). ipiv( i ) = j, 1 <= i <= min( M, N ) implies
60 * that rows i and j have been interchanged.
61 *
62 * @param[in,out]
63 * B double *.
64 * B is a pointer to a matrix of dimension N by NRHS, which stores the
65 * right-hand-sides of the systems of linear equations.
66 * (row-major order). On exit, if return value is Success, the matrix B
67 * is overwriten by the solution matrix X.
68 *
69 * @param[in]
70 * LDB int.
71 * LDB specifies the number of columns of B ( row-major order ).
72 * LDB must be at least max( 1, NRHS ).
73 *
74 **/
75
76 /**
77 *
78 * @retval Success successful exit
79 * @retval NoSuccess unsuccessful exit
80 *
81 **/
82
83 /**
84 *
85 * @sa kdtpgesv
86 *
87 **/
88
89 int ddss_dtpgesv( int N, int NRHS,
90 double *A, int LDA,
91 int *IPIV,
92 double *B, int LDB )
93 {
94
95 // Argument checking
96 if ( N < 0 )
97 {
98 fprintf( stderr, "Illegal value of N, in ddss_dtpgesv code\n" );
99 return NoSuccess;
100 }
101
102 if ( NRHS < 0 )
103 {
104 fprintf( stderr, "Illegal value of NRHS, in ddss_dtpgesv code\n" );
105 return NoSuccess;
106 }
107
108 if ( LDA < MAX( 1, N ) )
109 {
110 fprintf( stderr, "Illegal value of LDA, in ddss_dtpgesv code\n" );
111 return NoSuccess;
112 }
113
114 if ( LDB < MAX( 1, NRHS ) )
115 {
116 fprintf( stderr, "Illegal value of LDB, in ddss_dtpgesv code\n" );
117 return NoSuccess;
118 }
119
120 // Quick return
121 if ( MAX( N, 0 ) == 0 || MAX( NRHS, 0 ) == 0 )
122 {
123 return Success;
124 }
125
126 return kdtpgesv( N, NRHS, A, LDA, IPIV, B, LDB );
127
128 }
ddss_dtpgesv
int ddss_dtpgesv(int N, int NRHS, double *A, int LDA, int *IPIV, double *B, int LDB)
Definition: ddss_dtpgesv.c:89
kdtpgesv
enum LASS_RETURN kdtpgesv(int N, int NRHS, double *A, int LDA, int *IPIV, double *B, int LDB)
Definition: kdtpgesv.c:91