Grid 0.7.0
StaggeredKernels.h
Go to the documentation of this file.
1/*************************************************************************************
2
3Grid physics library, www.github.com/paboyle/Grid
4
5Source file: ./lib/qcd/action/fermion/StaggeredKernels.h
6
7Copyright (C) 2015
8
9Author: Azusa Yamaguchi, Peter Boyle
10
11This program is free software; you can redistribute it and/or modify
12it under the terms of the GNU General Public License as published by
13the Free Software Foundation; either version 2 of the License, or
14(at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License along
22with this program; if not, write to the Free Software Foundation, Inc.,
2351 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24
25See the full license in the file "LICENSE" in the top level distribution
26directory
27*************************************************************************************/
28/* END LEGAL */
29#pragma once
30
32
33
34 // Helper routines that implement Staggered stencil for a single site.
37 public:
40 static int Opt;
41 static int Comms;
42};
43
44template<class Impl> class StaggeredKernels : public FermionOperator<Impl> , public StaggeredKernelsStatic {
45 public:
46
49
50 public:
51
52 void DhopImproved(StencilImpl &st,
53 DoubledGaugeField &U, DoubledGaugeField &UUU,
54 const FermionField &in, FermionField &out, int dag, int interior,int exterior);
55 void DhopNaive(StencilImpl &st,
56 DoubledGaugeField &U,
57 const FermionField &in, FermionField &out, int dag, int interior,int exterior);
58
59 void DhopDirKernel(StencilImpl &st, DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU, SiteSpinor * buf,
60 int sF, int sU, const FermionFieldView &in, FermionFieldView &out, int dir,int disp);
61 protected:
62
64 // Generic Nc kernels
66 template<int Naik>
68 void DhopSiteGeneric(StencilView &st,
69 DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU,
70 SiteSpinor * buf, int LLs, int sU,
71 const FermionFieldView &in, FermionFieldView &out,int dag);
72
73 template<int Naik> static accelerator_inline
74 void DhopSiteGenericInt(StencilView &st,
75 DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU,
76 SiteSpinor * buf, int LLs, int sU,
77 const FermionFieldView &in, FermionFieldView &out,int dag);
78
79 template<int Naik> static accelerator_inline
80 void DhopSiteGenericExt(StencilView &st,
81 DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU,
82 SiteSpinor * buf, int LLs, int sU,
83 const FermionFieldView &in, FermionFieldView &out,int dag);
84
86 // Nc=3 specific kernels
88
89 template<int Naik> static accelerator_inline
90 void DhopSiteHand(StencilView &st,
91 DoubledGaugeFieldView &U,DoubledGaugeFieldView &UUU,
92 SiteSpinor * buf, int LLs, int sU,
93 const FermionFieldView &in, FermionFieldView &out,int dag);
94
95 template<int Naik> static accelerator_inline
96 void DhopSiteHandInt(StencilView &st,
97 DoubledGaugeFieldView &U,DoubledGaugeFieldView &UUU,
98 SiteSpinor * buf, int LLs, int sU,
99 const FermionFieldView &in, FermionFieldView &out,int dag);
100
101 template<int Naik> static accelerator_inline
102 void DhopSiteHandExt(StencilView &st,
103 DoubledGaugeFieldView &U,DoubledGaugeFieldView &UUU,
104 SiteSpinor * buf, int LLs, int sU,
105 const FermionFieldView &in, FermionFieldView &out,int dag);
106
108 // Asm Nc=3 specific kernels
110
111 void DhopSiteAsm(StencilView &st,
112 DoubledGaugeFieldView &U,DoubledGaugeFieldView &UUU,
113 SiteSpinor * buf, int LLs, int sU,
114 const FermionFieldView &in, FermionFieldView &out,int dag);
115
116public:
117
118 StaggeredKernels(const ImplParams &p = ImplParams());
119
120};
#define accelerator_inline
#define NAMESPACE_BEGIN(A)
Definition Namespace.h:35
#define NAMESPACE_END(A)
Definition Namespace.h:36
static INTERNAL_PRECISION U
Definition Zolotarev.cc:230
FermionOperator(const ImplParams &p=ImplParams())
void DhopNaive(StencilImpl &st, DoubledGaugeField &U, const FermionField &in, FermionField &out, int dag, int interior, int exterior)
void DhopSiteAsm(StencilView &st, DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU, SiteSpinor *buf, int LLs, int sU, const FermionFieldView &in, FermionFieldView &out, int dag)
static accelerator_inline void DhopSiteHandExt(StencilView &st, DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU, SiteSpinor *buf, int LLs, int sU, const FermionFieldView &in, FermionFieldView &out, int dag)
static accelerator_inline void DhopSiteHand(StencilView &st, DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU, SiteSpinor *buf, int LLs, int sU, const FermionFieldView &in, FermionFieldView &out, int dag)
static accelerator_inline void DhopSiteHandInt(StencilView &st, DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU, SiteSpinor *buf, int LLs, int sU, const FermionFieldView &in, FermionFieldView &out, int dag)
void DhopDirKernel(StencilImpl &st, DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU, SiteSpinor *buf, int sF, int sU, const FermionFieldView &in, FermionFieldView &out, int dir, int disp)
StaggeredKernels(const ImplParams &p=ImplParams())
INHERIT_IMPL_TYPES(Impl)
void DhopImproved(StencilImpl &st, DoubledGaugeField &U, DoubledGaugeField &UUU, const FermionField &in, FermionField &out, int dag, int interior, int exterior)
static accelerator_inline void DhopSiteGenericExt(StencilView &st, DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU, SiteSpinor *buf, int LLs, int sU, const FermionFieldView &in, FermionFieldView &out, int dag)
static accelerator_inline void DhopSiteGenericInt(StencilView &st, DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU, SiteSpinor *buf, int LLs, int sU, const FermionFieldView &in, FermionFieldView &out, int dag)
FermionOperator< Impl > Base
static accelerator_inline void DhopSiteGeneric(StencilView &st, DoubledGaugeFieldView &U, DoubledGaugeFieldView &UUU, SiteSpinor *buf, int LLs, int sU, const FermionFieldView &in, FermionFieldView &out, int dag)