File: solvesys.c

package info (click to toggle)
coinor-csdp 6.2.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,048 kB
  • sloc: ansic: 7,195; makefile: 99
file content (48 lines) | stat: -rw-r--r-- 829 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
  Solve a system of equations using the Cholesky factorization of A.  
  Note that we assume that A is positive definite and that A has already
  been factored.
*/

#include <stdlib.h>
#include <stdio.h>
#include <csdp/declarations.h>

int solvesys(
    int m,
    int ldam,
    double *A,
    double *rhs)
{
  int incx;
  int info;

  incx=1;

#ifdef HIDDENSTRLEN
  dpotrs_("U",&m,&incx,A,&ldam,rhs+1,&ldam,&info,1);
#else
#ifdef NOUNDERLAPACK
  #ifdef CAPSLAPACK
	   DPOTRS("U",&m,&incx,A,&ldam,rhs+1,&ldam,&info);
  #else
	   dpotrs("U",&m,&incx,A,&ldam,rhs+1,&ldam,&info);
  #endif
#else
  #ifdef CAPSLAPACK	
	   DPOTRS_("U",&m,&incx,A,&ldam,rhs+1,&ldam,&info);
  #else
	   dpotrs_("U",&m,&incx,A,&ldam,rhs+1,&ldam,&info);
  #endif
#endif
#endif

	   if (info != 0)
	     {
	       return(6);
	     };

	   return(0);
}