LASs - Linear Algebra Routines on OmpSs 1.0.0 LASs

- Main Page
- Files

- File List
- File Members

ddss_dnpgesv.c
Go to the documentation of this file.
1 #include "../include/lass.h"
2
3 /**
4 *
5 * @file ddss_dnpgesv.c
6 *
7 * @brief LASs-DDSs ddss_dnpgesv 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-07-26
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 without pivoting.
26 * The matrix A is descomposed as:
27 *
28 * A = L * U
29 *
30 * where L is a lower triangular matrix with unit diagonal elements and
31 * 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 * @param[in]
42 * NRHS int.
43 * NRHS specifies the number of right-hand-sides (number
44 * of columns of B). NRHS >= 0.
45 *
46 * @param[in,out]
47 * A double *.
48 * A is a pointer to a regular matrix of dimension N-by-LDA.
49 * On exit, if return value is Success, the matrix A is overwriten by
50 * the factors L and U. The unit diagonal elements of L are not stored.
51 *
52 * @param[in]
53 * LDA int.
54 * LDA specifies the number of columns of A ( row-major order ).
55 * LDA must be at least max( 1, N ).
56 *
57 * @param[in,out]
58 * B double *.
59 * B is a pointer to a matrix of dimension N by NRHS, which stores the
60 * right-hand-sides of the systems of linear equations.
61 * (row-major order). On exit, if return value is Success, the matrix B
62 * is overwriten by the solution matrix X.
63 *
64 * @param[in]
65 * LDB int.
66 * LDB specifies the number of columns of B ( row-major order ).
67 * LDB must be at least max( 1, NRHS ).
68 *
69 **/
70
71 /**
72 *
73 * @retval Success successful exit
74 * @retval NoSuccess unsuccessful exit
75 *
76 **/
77
78 /**
79 *
80 * @sa kdnpgesv
81 *
82 **/
83
84 int ddss_dnpgesv( int N, int NRHS,
85 double *A, int LDA,
86 double *B, int LDB )
87 {
88
89 // Argument checking
90 if ( N < 0 )
91 {
92 fprintf( stderr, "Illegal value of N, in ddss_dnpgesv code\n" );
93 return NoSuccess;
94 }
95
96 if ( NRHS < 0 )
97 {
98 fprintf( stderr, "Illegal value of NRHS, in ddss_dnpgesv code\n" );
99 return NoSuccess;
100 }
101
102 if ( LDA < MAX( 1, N ) )
103 {
104 fprintf( stderr, "Illegal value of LDA, in ddss_dnpgesv code\n" );
105 return NoSuccess;
106 }
107
108 if ( LDB < MAX( 1, NRHS ) )
109 {
110 fprintf( stderr, "Illegal value of LDB, in ddss_dnpgesv code\n" );
111 return NoSuccess;
112 }
113
114 // Quick return
115 if ( MAX( N, 0 ) == 0 || MAX( NRHS, 0 ) == 0 )
116 {
117 return Success;
118 }
119
120 return kdnpgesv( N, NRHS, A, LDA, B, LDB );
121
122 }
ddss_dnpgesv
int ddss_dnpgesv(int N, int NRHS, double *A, int LDA, double *B, int LDB)
Definition: ddss_dnpgesv.c:84
kdnpgesv
enum LASS_RETURN kdnpgesv(int N, int NRHS, double *A, int LDA, double *B, int LDB)
Definition: kdnpgesv.c:86