LASs - Linear Algebra Routines on OmpSs  1.0.0
LASs
Functions
ddss_dposv.c File Reference

LASs-DDSs ddss_dpotrf routine. More...

#include "../include/lass.h"
Include dependency graph for ddss_dposv.c:

Go to the source code of this file.

Functions

int ddss_dposv (enum DDSS_UPLO UPLO, int N, int NRHS, double *A, int LDA, double *B, int LDB)
 

Detailed Description

LASs-DDSs ddss_dpotrf routine.

LASs-DDSs is a software package provided by: Barcelona Supercomputing Center - Centro Nacional de Supercomputacion

Author
Pedro Valero-Lara pedro.nosp@m..val.nosp@m.ero@b.nosp@m.sc.e.nosp@m.s
Date
2018-05-04

Definition in file ddss_dposv.c.

Function Documentation

int ddss_dposv ( enum DDSS_UPLO  UPLO,
int  N,
int  NRHS,
double *  A,
int  LDA,
double *  B,
int  LDB 
)

Solves a system of linear equations A X = B, where A is a m-by-m simmetric positive definite matrix and X and B are m-by-nrhs matrices. The matrix A is descomposed as:

A = L \times L^T
or
A = U^T \times U

where L is a lower triangular matrix and U is an upper triangular matrix.

Parameters
[in]UPLOenum DDSS_UPLO. UPLO specifies the form of A is stored:
  • Lower: Lower triangle of A is stored. The upper traingular part is not referenced.
  • Upper: Upper triangle of A is stored. The lower triangular part is not referenced.
[in]Nint. N specifies the order of the square matrix A. N >= 0.
[in]NRHSint. NRHS specifies the number of right-hand-sides (number of columns of B). NRHS >= 0.
[in,out]Adouble *. A is a pointer to a positive definite matrix of dimension N by LDA. On exit, if return value is Success, the matrix A is overwriten by the factor U or L.
[in]LDAint. LDA specifies the number of columns of A ( row-major order ). LDA must be at least max( 1, N ).
[in,out]Bdouble *. B is a pointer to a matrix of dimension N by NRHS, 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.
[in]LDBint. LDB specifies the number of columns of B ( row-major order ). LDB must be at least max( 1, NRHS ).
Return values
Successsucessful exit
NoSuccessunsucessful exit
See also
kdposv

Definition at line 92 of file ddss_dposv.c.

References kdposv().

96 {
97 
98  // Argument checking
99  if ( ( UPLO != Upper ) && ( UPLO != Lower ) )
100  {
101  fprintf( stderr, "Illegal value of UPLO, in ddss_dposv code\n" );
102  return NoSuccess;
103  }
104 
105  if ( N < 0 )
106  {
107  fprintf( stderr, "Illegal value of N, in ddss_dposv code\n" );
108  return NoSuccess;
109  }
110 
111  if ( NRHS < 0 )
112  {
113  fprintf( stderr, "Illegal value of NRHS, in ddss_dposv code\n" );
114  return NoSuccess;
115  }
116 
117  if ( LDA < MAX( 1, N ) )
118  {
119  fprintf( stderr, "Illegal value of LDA, in ddss_dposv code\n" );
120  return NoSuccess;
121  }
122 
123  if ( LDB < MAX( 1, NRHS ) )
124  {
125  fprintf( stderr, "Illegal value of LDB, in ddss_dposv code\n" );
126  return NoSuccess;
127  }
128 
129  // Quick return
130  if ( MAX( N, 0 ) == 0 || MAX( NRHS, 0 ) == 0 )
131  {
132  return Success;
133  }
134 
135  return kdposv( UPLO, N, NRHS, A, LDA, B, LDB );
136 
137 }
enum LASS_RETURN kdposv(enum DDSS_UPLO UPLO, int N, int NRHS, double *A, int LDA, double *B, int LDB)
Definition: kdposv.c:95