casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LAPACK.h
Go to the documentation of this file.
1 //# LAPACK.h: AIPS++ interface to LAPACK routines
2 //# Copyright (C) 1994
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef NRAO_LAPACK_H
29 #define NRAO_LAPACK_H
30 
31 //# Includes
32 #include <casa/aips.h>
33 
34 #define NEED_FORTRAN_UNDERSCORES
35 
36 #if defined(NEED_FORTRAN_UNDERSCORES)
37  #define sgetrf sgetrf_
38  #define dgetrf dgetrf_
39  #define cgetrf cgetrf_
40  #define zgetrf zgetrf_
41  #define sgetri sgetri_
42  #define dgetri dgetri_
43  #define cgetri cgetri_
44  #define zgetri zgetri_
45  #define ssolvx ssolvx_
46  #define dsolvx dsolvx_
47  #define csolvx csolvx_
48  #define zsolvx zsolvx_
49  #define sblda sblda_
50  #define cndnm cndnm_
51  #define MAIN MAIN_
52 #endif
53 
54 extern "C" {
55 // LU decomposition
56  void sgetrf(int &, int &, float *, int &, int *, int &);
57  void dgetrf(int &, int &, double *, int &, int *, int &);
58  void cgetrf(int &, int &, void *, int &, int *, int &);
59  void zgetrf(int &, int &, void *, int &, int *, int &);
60 
61 // Inverse computation
62  void sgetri(int &, float *, int &, const int *, float *, int &, int &);
63  void dgetri(int &, double *, int &, const int *, double *, int &, int &);
64  void cgetri(int &, void *, int &, const int *, void *, int &, int &);
65  void zgetri(int &, void *, int &, const int *, void *, int &, int &);
66 
67 // Solve AX=B with errors
68  void ssolvx(casacore::Int &, casacore::Int &, float *, casacore::Int &, const float *, casacore::Int &,
69  const casacore::Int *, float *, casacore::Int &, float *, casacore::Int &, float *,
70  float *, casacore::Int &, float *, float *, float *, casacore::Int *);
71  void dsolvx(casacore::Int &, casacore::Int &, double *, casacore::Int &, const double *, casacore::Int &,
72  const casacore::Int *, double *, casacore::Int &, double *, casacore::Int &, double *,
73  double *, casacore::Int &, double *, double *, double *, casacore::Int *);
74  void csolvx(casacore::Int &, casacore::Int &, void *, casacore::Int &, const void *, casacore::Int &,
75  const casacore::Int *, void *, casacore::Int &, void *, casacore::Int &, float *,
76  float *, casacore::Int &, float *, float *, void *, float *);
77  void zsolvx(casacore::Int &, casacore::Int &, void *, casacore::Int &, const void *, casacore::Int &,
78  const casacore::Int *, void *, casacore::Int &, void *, casacore::Int &, double *,
79  double *, casacore::Int &, double *, double *, void *, double *);
80 
81 // test routines from LAPACK rewrapped for easy C++ call
82  void sblda(casacore::Int &, casacore::Int &, float &, float &, casacore::Int &, casacore::Int &, float *, int &);
83  void cndnm(casacore::Int &, casacore::Int &, float *, casacore::Int &, float &, float &, int &);
84 
85  // called by fortran initialization, may not be needed on all machines,
86  // in fact, this might cause problems on some machines.
87  void MAIN_();
88 };
89 
90 #endif
#define cndnm
Definition: LAPACK.h:50
#define dsolvx
Definition: LAPACK.h:46
int Int
Definition: aipstype.h:50
#define cgetrf
Definition: MatrixMathLA.h:110
#define zgetri
Definition: MatrixMathLA.h:115
#define sblda
Definition: LAPACK.h:49
#define sgetrf
Definition: MatrixMathLA.h:108
#define zgetrf
Definition: MatrixMathLA.h:111
#define cgetri
Definition: MatrixMathLA.h:114
#define zsolvx
Definition: LAPACK.h:48
#define sgetri
Definition: MatrixMathLA.h:112
#define dgetri
Definition: MatrixMathLA.h:113
#define dgetrf
Definition: MatrixMathLA.h:109
void MAIN_()
called by fortran initialization, may not be needed on all machines, in fact, this might cause proble...
#define csolvx
Definition: LAPACK.h:47
#define ssolvx
Definition: LAPACK.h:45