casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
LAPACK.h
Go to the documentation of this file.
00001 //# LAPACK.h: AIPS++ interface to LAPACK routines
00002 //# Copyright (C) 1994
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id$
00027 
00028 #ifndef NRAO_LAPACK_H
00029 #define NRAO_LAPACK_H
00030 
00031 //# Includes
00032 #include <casa/aips.h>
00033 
00034 #define NEED_FORTRAN_UNDERSCORES
00035 
00036 #if defined(NEED_FORTRAN_UNDERSCORES)
00037  #define sgetrf sgetrf_
00038  #define dgetrf dgetrf_
00039  #define cgetrf cgetrf_
00040  #define zgetrf zgetrf_
00041  #define sgetri sgetri_
00042  #define dgetri dgetri_
00043  #define cgetri cgetri_
00044  #define zgetri zgetri_
00045  #define ssolvx ssolvx_
00046  #define dsolvx dsolvx_
00047  #define csolvx csolvx_
00048  #define zsolvx zsolvx_
00049  #define sblda  sblda_
00050  #define cndnm  cndnm_
00051  #define MAIN   MAIN_
00052 #endif
00053 
00054 extern "C" {
00055 // LU decomposition
00056     void sgetrf(int &, int &, float *, int &, int *, int &);
00057     void dgetrf(int &, int &, double *, int &, int *, int &);
00058     void cgetrf(int &, int &, void *, int &, int *, int &);
00059     void zgetrf(int &, int &, void *, int &, int *, int &);
00060                
00061 // Inverse computation
00062     void sgetri(int &, float *, int &, const int *, float *, int &, int &);
00063     void dgetri(int &, double *, int &, const int *, double *, int &, int &);
00064     void cgetri(int &, void *, int &, const int *, void *, int &, int &);
00065     void zgetri(int &, void *, int &, const int *, void *, int &, int &);
00066                
00067 // Solve AX=B  with errors
00068     void ssolvx(Int &, Int &, float *, Int &, const float *, Int &, 
00069                 const Int *, float *, Int &, float *, Int &, float *, 
00070                 float *, Int &, float *, float *, float *, Int *);
00071     void dsolvx(Int &, Int &, double *, Int &, const double *, Int &, 
00072                 const Int *, double *, Int &, double *, Int &, double *, 
00073                 double *, Int &, double *, double *, double *, Int *);
00074     void csolvx(Int &, Int &, void *, Int &, const void *, Int &,
00075                 const Int *, void *, Int &, void *, Int &, float *, 
00076                 float *, Int &, float *, float *, void *, float *);
00077     void zsolvx(Int &, Int &, void *, Int &, const void *, Int &, 
00078                 const Int *, void *, Int &, void *, Int &, double *, 
00079                 double *, Int &, double *, double *, void *, double *);
00080 
00081 // test routines from LAPACK rewrapped for easy C++ call
00082     void sblda(Int &, Int &, float &, float &, Int &, Int &, float *, int &);
00083     void cndnm(Int &, Int &, float *, Int &, float &, float &, int &);
00084 
00085     // called by fortran initialization, may not be needed on all machines,
00086     // in fact, this might cause problems on some machines.
00087     void MAIN_(); 
00088 };
00089 
00090 #endif