00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef AMESOS_SCALAPACK_WRAPPERS_H
00031 #define AMESOS_SCALAPACK_WRAPPERS_H
00032
00033 #include "Epetra_ConfigDefs.h"
00034 #include "Epetra_LAPACK_wrappers.h"
00035 #include <stdio.h>
00036 #include <string.h>
00037
00038 #if defined(CRAY_T3X) || defined(INTEL_CXML) || defined(INTEL_MKL)
00039
00040
00041
00042
00043
00044 #if defined(CRAY_T3X)
00045
00046 #define SL_INIT_F77 F77_FUNC_(sl_init,SL_INIT)
00047 #define BLACS_GRIDINFO_F77 F77_FUNC_(blacs_gridinfo,BLACS_GRIDINFO)
00048 #define PDGETRF_F77 F77_FUNC(psgetrf,PSGETRF)
00049 #define PDGETRS_F77 F77_FUNC(psgetrs,PSGETRS)
00050 #define DESCINIT_F77 F77_FUNC(descinit,DESCINIT)
00051
00052 #endif
00053 #if defined(INTEL_CXML)
00054
00055 #define SL_INIT_F77 F77_FUNC_(sl_init,SL_INIT)
00056 #define BLACS_GRIDINFO_F77 F77_FUNC_(blacs_gridinfo,BLACS_GRIDINFO)
00057 #define PDGETRF_F77 F77_FUNC(pdgetrf,PDGETRF)
00058 #define PDGETRS_F77 F77_FUNC(pdgetrs,PDGETRS)
00059 #define DESCINIT_F77 F77_FUNC(descinit,DESCINIT)
00060
00061 #endif
00062 #if defined(INTEL_MKL)
00063
00064 #define SL_INIT_F77 F77_FUNC_(sl_init,SL_INIT_)
00065 #define BLACS_GRIDINFO_F77 F77_FUNC_(blacs_gridinfo,BLACS_GRIDINFO_)
00066 #define PDGETRF_F77 F77_FUNC(pdgetrf,PDGETRF)
00067 #define PDGETRS_F77 F77_FUNC(pdgetrs,PDGETRS)
00068 #define DESCINIT_F77 F77_FUNC(descinit,DESCINIT)
00069
00070 #endif
00071
00072 #else
00073
00074
00075
00076
00077 #define SL_INIT_F77 F77_FUNC_(sl_init,SL_INIT)
00078 #define BLACS_GRIDINFO_F77 F77_FUNC_(blacs_gridinfo,BLACS_GRIDINFO)
00079
00080 #define PDGETRF_F77 F77_FUNC(pdgetrf,PDGETRF)
00081 #define PDGETRS_F77 F77_FUNC(pdgetrs,PDGETRS)
00082 #define DESCINIT_F77 F77_FUNC(descinit,DESCINIT)
00083
00084 #endif
00085
00086 #ifdef __cplusplus
00087 extern "C" {
00088 #endif
00089
00090
00091 void PREFIX SL_INIT_F77(int* blacs_context, const int* nprow, const int* npcol);
00092 void PREFIX DESCINIT_F77(int *DescA, const int* m, const int* n, const int* mblock,
00093 const int* nblock, const int* rsrc, const int* csrc, const int* blacs_context,
00094 const int* Lda, int* ierr);
00095 void PREFIX BLACS_GRIDINFO_F77(int* blacs_context, const int* nprow, const int* npcol,
00096 const int* myrow, const int* mycol);
00097
00098 void PREFIX PDGETRF_F77(const int* m, const int* n, double* A, const int* Ai, const int* Aj,
00099 const int* DescA, int* ipiv, int* info);
00100 void PREFIX PDGETRS_F77(Epetra_fcd, const int* n, const int* nrhs,
00101 const double* A, const int* Ai, const int* Aj,
00102 const int* DescA, const int* ipiv, double* X, const int* Xi, const int* Xj,
00103 const int* DescX, int* info);
00104
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108
00109 #endif