LASs - Linear Algebra Routines on OmpSs 1.0.0 LASs

- Main Page
- Files

- File List
- File Members

ddss_dpotrf.c
Go to the documentation of this file.
1 #include "../include/lass.h"
2
3 /**
4 *
5 * @file ddss_dpotrf.c
6 *
7 * @brief LASs-DDSs ddss_dpotrf 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 2017-15-08
14 * @reviewer
15 * @modified
16 *
17 **/
18
19 /**
20 *
21 * @ingroup DDSS
22 *
23 * Performs the Cholesky factorization of a symmetric positive definite
24 * matrix A:
25 *
26 * A = L \times L^T
27 * or
28 * A = U^T \times U
29 *
30 * where L is a lower triangular matrix and U is an upper triangular matrix.
31 *
32 **/
33
34 /**
35 *
36 * @param[in]
37 * UPLO enum DDSS_UPLO.
38 * UPLO specifies the form of A is stored:
39 * - Lower: Lower triangle of A is stored. The upper traingular part is
40 * not referenced.
41 * - Upper: Upper triangle of A is stored. The lower triangular part is
42 * not referenced.
43 *
44 * @param[in]
45 * N int.
46 * N specifies the order of the square matrix A. N >= 0.
47 *
48 * @param[in,out]
49 * A double *.
50 * A is a pointer to a positive definite matrix of dimension N by LDA.
51 * On exit, if return value is Success, the matrix A is overwriten by
52 * the factor U or L.
53 *
54 * @param[in]
55 * LDA int.
56 * LDA specifies the number of columns of A ( row-major order ).
57 * LDA must be at least max( 1, N ).
58 *
59 **/
60
61 /**
62 *
63 * @retval Success successful exit
64 * @retval NoSuccess unsuccessful exit
65 *
66 **/
67
68 /**
69 *
70 * @sa kdpotrf
71 *
72 **/
73
74 int ddss_dpotrf( enum DDSS_UPLO UPLO, int N, double *A, int LDA )
75 {
76
77 // Argument checking
78 if ( ( UPLO != Upper ) && ( UPLO != Lower ) )
79 {
80 fprintf( stderr, "Illegal value of UPLO, in ddss_dportf code\n" );
81 return NoSuccess;
82 }
83
84 if ( N < 0 )
85 {
86 fprintf( stderr, "Illegal value of N, in ddss_dportf code\n" );
87 return NoSuccess;
88 }
89
90 if ( LDA < MAX( 1, N ) )
91 {
92 fprintf( stderr, "Illegal value of LDA, in ddss_dportf code\n" );
93 return NoSuccess;
94 }
95
96 // Quick return
97 if ( MAX( N, 0 ) == 0 )
98 {
99 return Success;
100 }
101
102 return kdpotrf( UPLO, N, A, LDA );
103
104 }
ddss_dpotrf
int ddss_dpotrf(enum DDSS_UPLO UPLO, int N, double *A, int LDA)
Definition: ddss_dpotrf.c:74
kdpotrf
enum LASS_RETURN kdpotrf(enum DDSS_UPLO UPLO, int N, double *A, int LDA)
Definition: kdpotrf.c:78