Diana
0.8.3
|
00001 /* ----------------------------------------------------------------------------- 00002 * Diana process modelling, simulation and analysis software 00003 * Copyright (c) 2005, Michael Krasnyk 00004 * All rights reserved. 00005 00006 * This file is a part of Diana process modelling, simulation and analysis software 00007 * 00008 * Diana is free software; you can redistribute it and/or modify it 00009 * under the terms of the GNU General Public License as published 00010 * by the Free Software Foundation (see accompanying file LICENSE) 00011 * ----------------------------------------------------------------------------- 00012 * $Id: Lapack.hpp 8160 2009-03-16 18:36:30Z miha $ 00013 * ----------------------------------------------------------------------------- 00014 * Description: 00015 */ 00016 00017 #ifndef LAPACK__HPP 00018 #define LAPACK__HPP 00019 00020 #include "Fortran.hpp" 00021 00022 // TODO: configuration of names (non-gcc mangling) 00023 #define GETRF (dgetrf_) 00024 #define GETRS (dgetrs_) 00025 #define GEMV (dgemv_) 00026 #define GELS (dgels_) 00027 #define DGGEV (dggev_) 00028 #define DGEEV (dgeev_) 00029 #define DGEMM (dgemm_) 00030 #define DGESV (dgesv_) 00031 #define DORGQR (dorgqr_) 00032 #define DGEQRF (dgeqrf_) 00033 // Routines for symmetric and symmetric positive definite matrices 00034 #define POTRF (dpotrf_) 00035 #define SPEV (dspev_) 00036 // SVD 00037 #define GESVD (dgesvd_) 00038 00039 extern "C" { 00040 void GETRF(const fortrani& m, const fortrani& n, fortrand* a, const fortrani& lda, fortrani* ipiv, fortrani& info); 00041 void GETRS(const fortrans type, const fortrani& n, const fortrani& nrhs, const fortrand* a, const fortrani& lda, 00042 const fortrani* ipiv, fortrand* b, const fortrani& ldb, fortrani& info); 00043 void GEMV(const fortrans trans, const fortrani& m, const fortrani& n, const fortrand& alpha, 00044 const fortrand* a, const fortrani& lda, const fortrand* x, 00045 const fortrani& incx, const fortrand& beta, fortrand* y, const fortrani& incy ); 00046 void DGGEV(const fortrans jobvl, const fortrans jobvr, const fortrani& n, fortrand* a, const fortrani& lda, 00047 fortrand* b, const fortrani& ldb, fortrand* alphar, fortrand* alphai, fortrand* beta, 00048 fortrand* vl, const fortrani& ldvl, fortrand* vr, const fortrani& ldvr, 00049 fortrand* work, const fortrani& lwork, fortrani& info); 00050 void DGEEV(const fortrans jobvl, const fortrans jobvr, const fortrani& n, fortrand* a, const fortrani& lda, 00051 fortrand* wr, fortrand* wi, fortrand* vl, const fortrani& ldvl, fortrand* vr, const fortrani& ldvr, 00052 fortrand* work, const fortrani& lwork, fortrani& info ); 00053 00054 void GELS(const fortrans trans, const fortrani& m, const fortrani& n, const fortrani& nrhs, 00055 const fortrand* a, const fortrani& lda, 00056 const fortrand* b, const fortrani& ldb, 00057 const fortrand* work, const fortrani& lwork, 00058 fortrani& info); 00059 00060 void DGEMM(const fortrans transa,const fortrans transb, const fortrani& m, const fortrani& n, 00061 const fortrani& k, const fortrand& alpha, const fortrand* a, const fortrani& lda, 00062 const fortrand* b, const fortrani& ldb,const fortrand& beta, const fortrand* c, 00063 const fortrani& ldc); 00064 00065 void DGESV( const fortrani& n, const fortrani& nrhs, const fortrand* a, const fortrani& lda, 00066 const fortrani* ipiv, const fortrand* b, const fortrani& ldb, fortrani& info); 00067 00068 void DGEQRF( const fortrani& m, const fortrani& n, const fortrand* a, const fortrani& lda, 00069 const fortrand* tau, const fortrand* work, const fortrani& lwork, fortrani& info); 00070 00071 void DORGQR( const fortrani& m, const fortrani& n, const fortrani& k, const fortrand* a, 00072 const fortrani& lda, const fortrand* tau, const fortrand* work, const fortrani& lwork, fortrani& info); 00073 00074 // Interfaces of routines for symmetric and symmetric positive definite matrices 00075 void POTRF(const fortrans uplo, const fortrani& n, fortrand* a, const fortrani& lda, fortrani& info); 00076 void SPEV(const fortrans jobz, const fortrans uplo, const fortrani& n, fortrand* ap, fortrand* w, fortrand* z, 00077 const fortrani& ldz, fortrand* work, fortrani& info); 00078 00079 void GESVD(const fortrans jobu, const fortrans jobvt, const fortrani& m, const fortrani& n, 00080 fortrand* a, const fortrani& lda, fortrand* s, 00081 fortrand* u, const fortrani& ldu, fortrand* vt, const fortrani& ldvt, 00082 fortrand* work, const fortrani& lwork, fortrani& info ); 00083 00084 }; 00085 00086 00087 #endif // LAPACK__HPP