~ubuntu-branches/ubuntu/quantal/psicode/quantal

« back to all changes in this revision

Viewing changes to src/bin/psimrcc/algebra_interface.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2009-02-23 00:12:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223001202-rutldoy3dimfpesc
Tags: 3.4.0-1
* New upstream release.

[ Michael Banck ]
* debian/patches/01_DESTDIR.dpatch: Refreshed.
* debian/patches/02_FHS.dpatch: Removed, applied upstream.
* debian/patches/03_debian_docdir: Likewise.
* debian/patches/04_man.dpatch: Likewise.
* debian/patches/06_466828_fix_gcc_43_ftbfs.dpatch: Likewise.
* debian/patches/07_464867_move_executables: Fixed and refreshed.
* debian/patches/00list: Adjusted.
* debian/control: Improved description.
* debian/patches-held: Removed.
* debian/rules (install/psi3): Do not ship the ruby bindings for now.

[ Daniel Leidert ]
* debian/rules: Fix txtdir via DEB_MAKE_INSTALL_TARGET.
* debian/patches/01_DESTDIR.dpatch: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _psi_src_bin_psimrcc_algebra_interface_h_
 
2
#define _psi_src_bin_psimrcc_algebra_interface_h_
 
3
 
 
4
#ifndef FC_SYMBOL
 
5
#define FC_SYMBOL 2
 
6
#endif
 
7
 
 
8
#if FC_SYMBOL==2
 
9
#define F_DAXPY daxpy_
 
10
#define F_DCOPY dcopy_
 
11
#define F_DGEMM dgemm_
 
12
#define F_DROT drot_
 
13
#define F_DSCAL dscal_
 
14
#define F_DGEMV dgemv_
 
15
#define F_DSPMV dspmv_
 
16
#define F_DDOT  ddot_
 
17
#elif FC_SYMBOL==1
 
18
#define F_DAXPY daxpy
 
19
#define F_DCOPY dcopy
 
20
#define F_DGEMM dgemm
 
21
#define F_DROT drot
 
22
#define F_DSCAL dscal
 
23
#define F_DGEMV dgemv
 
24
#define F_DSPMV dspmv
 
25
#define F_DDOT  ddot
 
26
#elif FC_SYMBOL==3
 
27
#define F_DAXPY DAXPY
 
28
#define F_DCOPY DCOPY
 
29
#define F_DGEMM DGEMM
 
30
#define F_DROT DROT
 
31
#define F_DSCAL DSCAL
 
32
#define F_DGEMV DGEMV
 
33
#define F_DSPMV DSPMV
 
34
#define F_DDOT  DDOT
 
35
#elif FC_SYMBOL==4
 
36
#define F_DAXPY DAXPY_
 
37
#define F_DCOPY DCOPY_
 
38
#define F_DGEMM DGEMM_
 
39
#define F_DROT DROT_
 
40
#define F_DSCAL DSCAL_
 
41
#define F_DGEMV DGEMV_
 
42
#define F_DSPMV DSPMV_
 
43
#define F_DDOT  DDOT_
 
44
#endif
 
45
 
 
46
namespace psi{ namespace psimrcc{
 
47
 
 
48
extern "C" void F_DAXPY(int *length, double *a, double *x, int *inc_x,
 
49
                    double *y, int *inc_y);
 
50
extern "C" void F_DCOPY(int *length, double *x, int *inc_x,
 
51
                    double *y, int *inc_y);
 
52
extern "C" void F_DGEMM(const char *transa, const char *transb, int *m, int *n, int *k,
 
53
                    double *alpha, double *A, int *lda, double *B, int *ldb,
 
54
                    double *beta, double *C, int *ldc);
 
55
extern "C" void F_DROT(int *ntot,double *x, int *incx,double *y, int *incy,
 
56
                  double *cotheta,double *sintheta);
 
57
extern "C" void F_DSCAL(int *n, double *alpha, double *vec, int *inc);
 
58
extern "C" void F_DGEMV(char *transa, int *m, int *n, double *alpha, double *A,
 
59
                    int *lda, double *X, int *inc_x, double *beta,
 
60
                    double *Y, int *inc_y);
 
61
extern "C" double F_DDOT(int *n, double *x, int *incx, double *y, int *incy);
 
62
 
 
63
void C_DGEMM_12(int m, int n, int k, double alpha,double *A, int nra,
 
64
                double *B, int ncb, double beta, double *C, int ncc);
 
65
void C_DGEMM_22(int m, int n, int k, double alpha,double *A, int nca,
 
66
                double *B, int ncb, double beta, double *C, int ncc);
 
67
 
 
68
// void C_DGEMM_11(int m, int n, int k, double alpha,double *A, int nca,
 
69
//                 double *B, int ncb, double beta, double *C, int ncc);
 
70
// void C_DGEMM_21(int m, int n, int k, double alpha,double *A, int nca,
 
71
//                 double *B, int ncb, double beta, double *C, int ncc);
 
72
 
 
73
 
 
74
#if FC_SYMBOL==2
 
75
#define F_DGEEV dgeev_
 
76
#define F_DGESV dgesv_
 
77
#define F_DGETRF dgetrf_
 
78
#define F_DGETRI dgetri_
 
79
#define F_DGESVD dgesvd_
 
80
#define F_DSYEV dsyev_
 
81
#elif FC_SYMBOL==1
 
82
#define F_DGEEV dgeev
 
83
#define F_DGESV dgesv
 
84
#define F_DGETRF dgetrf
 
85
#define F_DGETRI dgetri
 
86
#define F_DGESVD dgesvd
 
87
#define F_DSYEV dsyev
 
88
#elif FC_SYMBOL==3
 
89
#define F_DGEEV DGEEV
 
90
#define F_DGESV DGESV
 
91
#define F_DGETRF DGETRF
 
92
#define F_DGETRI DGETRI
 
93
#define F_DGESVD DGESVD
 
94
#define F_DSYEV DSYEV
 
95
#elif FC_SYMBOL==4
 
96
#define F_DGEEV DGEEV_
 
97
#define F_DGESV DGESV_
 
98
#define F_DGETRF DGETRF_
 
99
#define F_DGETRI DGETRI_
 
100
#define F_DGESVD DGESVD_
 
101
#define F_DSYEV DSYEV_
 
102
#endif
 
103
 
 
104
extern "C" void F_DGEEV(const char *jobvl, const char *jobvr, int *n, double *a, int *lda,
 
105
                    double *wr, double *wi, double *vl, int *ldvl, double *vr,
 
106
                    int *ldvr, double *work, int *lwork, int *info);
 
107
extern "C" void F_DGESV(int *n, int *nrhs, double *A, int *lda, int *ipiv,
 
108
                    double *B, int *ldb, int *info);
 
109
 
 
110
extern "C" void F_DSYEV(char *JOBZ, char *UPLO, int *N, double *A, int *LDA, double *W, double *WORK, int *LWORK, int *INFO );
 
111
 
 
112
}}
 
113
 
 
114
#endif // _psi_src_bin_psimrcc_algebra_interface_h_