00001
00002
00003
00004
00005
00006
00007 #ifndef AVP_ALTIVEC_SOLVER_H
00008 #define AVP_ALTIVEC_SOLVER_H
00009
00010 #include "chromabase.h"
00011 #include "avp_inverter_interface.h"
00012
00013 extern "C"
00014 {
00015 struct MIT_altivecf_DWF_Gauge;
00016 struct MIT_altivecf_DWF_Fermion;
00017 };
00018
00019 namespace Chroma
00020 {
00021
00022
00023
00024
00025
00026
00027 namespace AVPSolver
00028 {
00029
00030 class AltiVecDWFSolverF : public AVPSolverInterface< MIT_altivecf_DWF_Gauge, MIT_altivecf_DWF_Fermion >
00031 {
00032 public:
00033 protected:
00034 MIT_altivecf_DWF_Fermion* loadFermionRHS(const void* OuterFermion) const;
00035 MIT_altivecf_DWF_Fermion* loadFermionGuess(const void *OuterFermion) const;
00036 MIT_altivecf_DWF_Fermion* allocateFermion(void) const ;
00037 void saveFermionSolver(void *OuterFermion,
00038 MIT_altivecf_DWF_Fermion* CGFermion) const;
00039
00040 void saveFermionOperator(void *OuterFermion,
00041 MIT_altivecf_DWF_Fermion* CGFermion) const;
00042
00043 void deleteFermion(MIT_altivecf_DWF_Fermion* ptr) const;
00044 int cgInternal(MIT_altivecf_DWF_Fermion *psi,
00045 double *out_eps,
00046 int *out_iter,
00047 double M,
00048 double m_f,
00049 const MIT_altivecf_DWF_Fermion *x0,
00050 const MIT_altivecf_DWF_Fermion *eta,
00051 double eps,
00052 int min_iter,
00053 int max_iter) const;
00054 public:
00055 void loadGauge(const void *u,
00056 const void *v);
00057
00058 void deleteGauge(void);
00059
00060
00061 int init(const int lattice[5],
00062 void *(*allocator)(size_t size),
00063 void (*deallocator)(void *));
00064
00065
00066 void fini(void);
00067 private:
00068 MIT_altivecf_DWF_Gauge *g;
00069 };
00070 }
00071
00072
00073 }
00074
00075 #endif