libsc
1.6.0
|
00001 /* 00002 This file is part of the SC Library. 00003 The SC Library provides support for parallel scientific applications. 00004 00005 Copyright (C) 2010 The University of Texas System 00006 00007 The SC Library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public 00009 License as published by the Free Software Foundation; either 00010 version 2.1 of the License, or (at your option) any later version. 00011 00012 The SC Library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with the SC Library; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00020 02110-1301, USA. 00021 */ 00022 00023 #ifndef SC_LAPACK_H 00024 #define SC_LAPACK_H 00025 00026 #include <sc_blas.h> 00027 00028 SC_EXTERN_C_BEGIN; 00029 00030 typedef enum sc_jobz 00031 { 00032 SC_EIGVALS_ONLY, 00033 SC_EIGVALS_AND_EIGVECS, 00034 SC_JOBZ_ANCHOR 00035 } 00036 sc_jobz_t; 00037 00038 extern const char sc_jobzchar[]; 00039 00040 #ifdef SC_WITH_LAPACK 00041 00042 #ifndef SC_F77_FUNC 00043 #define SC_F77_FUNC(small,CAPS) small ## _ 00044 #endif 00045 00046 #define SC_LAPACK_DGELS SC_F77_FUNC(dgels,DGELS) 00047 #define SC_LAPACK_DGETRF SC_F77_FUNC(dgetrf,DGETRF) 00048 #define SC_LAPACK_DGETRS SC_F77_FUNC(dgetrs,DGETRS) 00049 #define SC_LAPACK_DSTEV SC_F77_FUNC(dstev,DSTEV) 00050 #define SC_LAPACK_DTRSM SC_F77_FUNC(dtrsm,DTRSM) 00051 #define SC_LAPACK_DLAIC1 SC_F77_FUNC(dlaic1,DLAIC1) 00052 #define SC_LAPACK_ILAENV SC_F77_FUNC(ilaenv,ILAENV) 00053 00054 void SC_LAPACK_DGELS (const char *trans, 00055 const sc_bint_t * m, const sc_bint_t * n, 00056 const sc_bint_t * nrhs, double *a, 00057 const sc_bint_t * lda, double *b, 00058 const sc_bint_t * ldb, double *work, 00059 const sc_bint_t * lwork, 00060 sc_bint_t * info); 00061 void SC_LAPACK_DGETRF (const sc_bint_t * m, 00062 const sc_bint_t * n, double *a, 00063 const sc_bint_t * lda, sc_bint_t * ipiv, 00064 sc_bint_t * info); 00065 00066 void SC_LAPACK_DGETRS (const char *trans, const sc_bint_t * n, 00067 const sc_bint_t * nrhs, const double *a, 00068 const sc_bint_t * lda, 00069 const sc_bint_t * ipiv, double *b, 00070 const sc_bint_t * ldx, 00071 sc_bint_t * info); 00072 00073 void SC_LAPACK_DSTEV (const char *jobz, 00074 const sc_bint_t * n, 00075 double *d, 00076 double *e, 00077 double *z, 00078 const sc_bint_t * ldz, 00079 double *work, sc_bint_t * info); 00080 00081 void SC_LAPACK_DTRSM (const char *side, 00082 const char *uplo, 00083 const char *transa, 00084 const char *diag, 00085 const sc_bint_t * m, 00086 const sc_bint_t * n, 00087 const double *alpha, 00088 const double *a, 00089 const sc_bint_t * lda, 00090 const double *b, const sc_bint_t * ldb); 00091 00092 void SC_LAPACK_DLAIC1 (const int *job, 00093 const int *j, 00094 const double *x, 00095 const double *sest, 00096 const double *w, 00097 const double *gamma, 00098 double *sestpr, double *s, double *c); 00099 00100 int SC_LAPACK_ILAENV (const sc_bint_t * ispec, 00101 const char *name, 00102 const char *opts, 00103 const sc_bint_t * N1, 00104 const sc_bint_t * N2, 00105 const sc_bint_t * N3, 00106 const sc_bint_t * N4, 00107 sc_buint_t name_length, 00108 sc_buint_t opts_length); 00109 00110 #else /* !SC_WITH_LAPACK */ 00111 00112 #define SC_LAPACK_DGELS (void) sc_lapack_nonimplemented 00113 #define SC_LAPACK_DGETRF (void) sc_lapack_nonimplemented 00114 #define SC_LAPACK_DGETRS (void) sc_lapack_nonimplemented 00115 #define SC_LAPACK_DSTEV (void) sc_lapack_nonimplemented 00116 #define SC_LAPACK_DTRSM (void) sc_lapack_nonimplemented 00117 #define SC_LAPACK_DLAIC1 (void) sc_lapack_nonimplemented 00118 #define SC_LAPACK_ILAENV (int) sc_lapack_nonimplemented 00119 00120 int sc_lapack_nonimplemented (); 00121 00122 #endif 00123 00124 SC_EXTERN_C_END; 00125 00126 #endif /* !SC_LAPACK_H */