CHROMA
avp_altivecf_solver.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief DWF/Bluegene altivec solver
4  */
5 
6 #ifndef AVP_ALTIVEC_SOLVER_H
7 #define AVP_ALTIVEC_SOLVER_H
8 
9 #include "chromabase.h"
10 #include "avp_inverter_interface.h"
11 
12 extern "C"
13 {
14  struct MIT_altivecf_DWF_Gauge;
15  struct MIT_altivecf_DWF_Fermion;
16 };
17 
18 namespace Chroma
19 {
20  //! Bluegene single-prec solver
21  /*!
22  * \ingroup qprop
23  *
24  * @{
25  */
26  namespace AVPSolver
27  {
28  //! Bluegene altivec solver
29  class AltiVecDWFSolverF : public AVPSolverInterface< MIT_altivecf_DWF_Gauge, MIT_altivecf_DWF_Fermion >
30  {
31  public:
32  protected:
33  MIT_altivecf_DWF_Fermion* loadFermionRHS(const void* OuterFermion) const;
34  MIT_altivecf_DWF_Fermion* loadFermionGuess(const void *OuterFermion) const;
35  MIT_altivecf_DWF_Fermion* allocateFermion(void) const ;
36  void saveFermionSolver(void *OuterFermion,
37  MIT_altivecf_DWF_Fermion* CGFermion) const;
38 
39  void saveFermionOperator(void *OuterFermion,
40  MIT_altivecf_DWF_Fermion* CGFermion) const;
41 
42  void deleteFermion(MIT_altivecf_DWF_Fermion* ptr) const;
43  int cgInternal(MIT_altivecf_DWF_Fermion *psi,
44  double *out_eps,
45  int *out_iter,
46  double M,
47  double m_f,
48  const MIT_altivecf_DWF_Fermion *x0,
49  const MIT_altivecf_DWF_Fermion *eta,
50  double eps,
51  int min_iter,
52  int max_iter) const;
53  public:
54  void loadGauge(const void *u,
55  const void *v);
56 
57  void deleteGauge(void);
58 
59  // Init the system -- Constructor call?
60  int init(const int lattice[5],
61  void *(*allocator)(size_t size),
62  void (*deallocator)(void *));
63 
64  // Finalize - destructor call
65  void fini(void);
66  private:
67  MIT_altivecf_DWF_Gauge *g;
68  };
69  }
70 
71  /*! @} */ // end of group qprop
72 }
73 
74 #endif
Base class for AVP's DWF solver interface.
Primary include file for CHROMA library code.
int init(const int lattice[5], void *(*allocator)(size_t size), void(*deallocator)(void *))
MIT_altivecf_DWF_Fermion * allocateFermion(void) const
void saveFermionSolver(void *OuterFermion, MIT_altivecf_DWF_Fermion *CGFermion) const
MIT_altivecf_DWF_Fermion * loadFermionGuess(const void *OuterFermion) const
MIT_altivecf_DWF_Fermion * loadFermionRHS(const void *OuterFermion) const
void loadGauge(const void *u, const void *v)
void deleteFermion(MIT_altivecf_DWF_Fermion *ptr) const
void saveFermionOperator(void *OuterFermion, MIT_altivecf_DWF_Fermion *CGFermion) const
int cgInternal(MIT_altivecf_DWF_Fermion *psi, double *out_eps, int *out_iter, double M, double m_f, const MIT_altivecf_DWF_Fermion *x0, const MIT_altivecf_DWF_Fermion *eta, double eps, int min_iter, int max_iter) const
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
LatticeFermion psi
Definition: mespbg5p_w.cc:35
LatticeFermion eta
Definition: mespbg5p_w.cc:37