diff --git a/Grid/Makefile.am b/Grid/Makefile.am index 7c3c151b..8472dd71 100644 --- a/Grid/Makefile.am +++ b/Grid/Makefile.am @@ -66,6 +66,10 @@ if BUILD_FERMION_REPS extra_sources+=$(ADJ_FERMION_FILES) extra_sources+=$(TWOIND_FERMION_FILES) endif +if BUILD_SP + extra_sources+=$(SP_FERMION_FILES) + extra_sources+=$(SP_TWOIND_FERMION_FILES) +endif lib_LIBRARIES = libGrid.a diff --git a/Grid/lattice/Lattice_ET.h b/Grid/lattice/Lattice_ET.h index fdd31b28..2ad93d30 100644 --- a/Grid/lattice/Lattice_ET.h +++ b/Grid/lattice/Lattice_ET.h @@ -345,7 +345,9 @@ GridUnopClass(UnaryNot, Not(a)); GridUnopClass(UnaryTrace, trace(a)); GridUnopClass(UnaryTranspose, transpose(a)); GridUnopClass(UnaryTa, Ta(a)); +GridUnopClass(UnarySpTa, SpTa(a)); GridUnopClass(UnaryProjectOnGroup, ProjectOnGroup(a)); +GridUnopClass(UnaryProjectOnSpGroup, ProjectOnSpGroup(a)); GridUnopClass(UnaryTimesI, timesI(a)); GridUnopClass(UnaryTimesMinusI, timesMinusI(a)); GridUnopClass(UnaryAbs, abs(a)); @@ -456,7 +458,9 @@ GRID_DEF_UNOP(operator!, UnaryNot); GRID_DEF_UNOP(trace, UnaryTrace); GRID_DEF_UNOP(transpose, UnaryTranspose); GRID_DEF_UNOP(Ta, UnaryTa); +GRID_DEF_UNOP(SpTa, UnarySpTa); GRID_DEF_UNOP(ProjectOnGroup, UnaryProjectOnGroup); +GRID_DEF_UNOP(ProjectOnSpGroup, UnaryProjectOnSpGroup); GRID_DEF_UNOP(timesI, UnaryTimesI); GRID_DEF_UNOP(timesMinusI, UnaryTimesMinusI); GRID_DEF_UNOP(abs, UnaryAbs); // abs overloaded in cmath C++98; DON'T do the diff --git a/Grid/qcd/action/fermion/Fermion.h b/Grid/qcd/action/fermion/Fermion.h index bad736cf..8d7b3fdc 100644 --- a/Grid/qcd/action/fermion/Fermion.h +++ b/Grid/qcd/action/fermion/Fermion.h @@ -126,6 +126,16 @@ typedef WilsonFermion WilsonTwoIndexSymmetricFermi typedef WilsonFermion WilsonTwoIndexAntiSymmetricFermionF; typedef WilsonFermion WilsonTwoIndexAntiSymmetricFermionD; +// Sp(2n) +typedef WilsonFermion SpWilsonFermionF; +typedef WilsonFermion SpWilsonFermionD; + +typedef WilsonFermion SpWilsonTwoIndexAntiSymmetricFermionF; +typedef WilsonFermion SpWilsonTwoIndexAntiSymmetricFermionD; + +typedef WilsonFermion SpWilsonTwoIndexSymmetricFermionF; +typedef WilsonFermion SpWilsonTwoIndexSymmetricFermionD; + // Twisted mass fermion typedef WilsonTMFermion WilsonTMFermionD2; typedef WilsonTMFermion WilsonTMFermionF; diff --git a/Grid/qcd/action/fermion/WilsonImpl.h b/Grid/qcd/action/fermion/WilsonImpl.h index c7180115..07248160 100644 --- a/Grid/qcd/action/fermion/WilsonImpl.h +++ b/Grid/qcd/action/fermion/WilsonImpl.h @@ -261,6 +261,22 @@ typedef WilsonImpl W typedef WilsonImpl WilsonTwoIndexAntiSymmetricImplF; // Float typedef WilsonImpl WilsonTwoIndexAntiSymmetricImplD; // Double +//sp 2n + +typedef WilsonImpl SpWilsonImplR; // Real.. whichever prec +typedef WilsonImpl SpWilsonImplF; // Float +typedef WilsonImpl SpWilsonImplD; // Double + +typedef WilsonImpl SpWilsonTwoIndexAntiSymmetricImplR; // Real.. whichever prec +typedef WilsonImpl SpWilsonTwoIndexAntiSymmetricImplF; // Float +typedef WilsonImpl SpWilsonTwoIndexAntiSymmetricImplD; // Double + +typedef WilsonImpl SpWilsonTwoIndexSymmetricImplR; // Real.. whichever prec +typedef WilsonImpl SpWilsonTwoIndexSymmetricImplF; // Float +typedef WilsonImpl SpWilsonTwoIndexSymmetricImplD; // Double + +typedef WilsonImpl SpWilsonAdjImplR; // Real.. whichever prec // adj = 2indx symmetric for Sp(2N) +typedef WilsonImpl SpWilsonAdjImplF; // Float // adj = 2indx symmetric for Sp(2N) +typedef WilsonImpl SpWilsonAdjImplD; // Double // adj = 2indx symmetric for Sp(2N) NAMESPACE_END(Grid); - diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonCloverFermionInstantiationSpWilsonImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonCloverFermionInstantiationSpWilsonImplD.cc new file mode 120000 index 00000000..9cc05107 --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonCloverFermionInstantiationSpWilsonImplD.cc @@ -0,0 +1 @@ +../WilsonCloverFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonFermionInstantiationSpWilsonImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonFermionInstantiationSpWilsonImplD.cc new file mode 120000 index 00000000..5f6ab65e --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonFermionInstantiationSpWilsonImplD.cc @@ -0,0 +1 @@ +../WilsonFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonKernelsInstantiationSpWilsonImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonKernelsInstantiationSpWilsonImplD.cc new file mode 120000 index 00000000..01c35e7b --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonKernelsInstantiationSpWilsonImplD.cc @@ -0,0 +1 @@ +../WilsonKernelsInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonTMFermionInstantiationSpWilsonImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonTMFermionInstantiationSpWilsonImplD.cc new file mode 120000 index 00000000..d5789bcf --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/WilsonTMFermionInstantiationSpWilsonImplD.cc @@ -0,0 +1 @@ +../WilsonTMFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/impl.h b/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/impl.h new file mode 100644 index 00000000..5aa843dd --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonImplD/impl.h @@ -0,0 +1 @@ +#define IMPLEMENTATION SpWilsonImplD diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonCloverFermionInstantiationSpWilsonImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonCloverFermionInstantiationSpWilsonImplF.cc new file mode 120000 index 00000000..9cc05107 --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonCloverFermionInstantiationSpWilsonImplF.cc @@ -0,0 +1 @@ +../WilsonCloverFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonFermionInstantiationSpWilsonImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonFermionInstantiationSpWilsonImplF.cc new file mode 120000 index 00000000..5f6ab65e --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonFermionInstantiationSpWilsonImplF.cc @@ -0,0 +1 @@ +../WilsonFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonKernelsInstantiationSpWilsonImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonKernelsInstantiationSpWilsonImplF.cc new file mode 120000 index 00000000..01c35e7b --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonKernelsInstantiationSpWilsonImplF.cc @@ -0,0 +1 @@ +../WilsonKernelsInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonTMFermionInstantiationSpWilsonImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonTMFermionInstantiationSpWilsonImplF.cc new file mode 120000 index 00000000..d5789bcf --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/WilsonTMFermionInstantiationSpWilsonImplF.cc @@ -0,0 +1 @@ +../WilsonTMFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/impl.h b/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/impl.h new file mode 100644 index 00000000..761b0c82 --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonImplF/impl.h @@ -0,0 +1 @@ +#define IMPLEMENTATION SpWilsonImplF diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonCloverFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonCloverFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc new file mode 120000 index 00000000..9cc05107 --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonCloverFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc @@ -0,0 +1 @@ +../WilsonCloverFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc new file mode 120000 index 00000000..5f6ab65e --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc @@ -0,0 +1 @@ +../WilsonFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonKernelsInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonKernelsInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc new file mode 120000 index 00000000..01c35e7b --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonKernelsInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc @@ -0,0 +1 @@ +../WilsonKernelsInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonTMFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonTMFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc new file mode 120000 index 00000000..d5789bcf --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/WilsonTMFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplD.cc @@ -0,0 +1 @@ +../WilsonTMFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/impl.h b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/impl.h new file mode 100644 index 00000000..4c546322 --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplD/impl.h @@ -0,0 +1 @@ +#define IMPLEMENTATION SpWilsonTwoIndexAntiSymmetricImplD diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonCloverFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonCloverFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc new file mode 120000 index 00000000..9cc05107 --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonCloverFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc @@ -0,0 +1 @@ +../WilsonCloverFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc new file mode 120000 index 00000000..5f6ab65e --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc @@ -0,0 +1 @@ +../WilsonFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonKernelsInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonKernelsInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc new file mode 120000 index 00000000..01c35e7b --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonKernelsInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc @@ -0,0 +1 @@ +../WilsonKernelsInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonTMFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonTMFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc new file mode 120000 index 00000000..d5789bcf --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/WilsonTMFermionInstantiationSpWilsonTwoIndexAntiSymmetricImplF.cc @@ -0,0 +1 @@ +../WilsonTMFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/impl.h b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/impl.h new file mode 100644 index 00000000..8425236e --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexAntiSymmetricImplF/impl.h @@ -0,0 +1 @@ +#define IMPLEMENTATION SpWilsonTwoIndexAntiSymmetricImplF diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonCloverFermionInstantiationSpWilsonTwoIndexSymmetricImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonCloverFermionInstantiationSpWilsonTwoIndexSymmetricImplD.cc new file mode 120000 index 00000000..9cc05107 --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonCloverFermionInstantiationSpWilsonTwoIndexSymmetricImplD.cc @@ -0,0 +1 @@ +../WilsonCloverFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonFermionInstantiationSpWilsonTwoIndexSymmetricImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonFermionInstantiationSpWilsonTwoIndexSymmetricImplD.cc new file mode 120000 index 00000000..5f6ab65e --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonFermionInstantiationSpWilsonTwoIndexSymmetricImplD.cc @@ -0,0 +1 @@ +../WilsonFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonKernelsInstantiationSpWilsonTwoIndexSymmetricImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonKernelsInstantiationSpWilsonTwoIndexSymmetricImplD.cc new file mode 120000 index 00000000..01c35e7b --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonKernelsInstantiationSpWilsonTwoIndexSymmetricImplD.cc @@ -0,0 +1 @@ +../WilsonKernelsInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonTMFermionInstantiationSpWilsonTwoIndexSymmetricImplD.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonTMFermionInstantiationSpWilsonTwoIndexSymmetricImplD.cc new file mode 120000 index 00000000..d5789bcf --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/WilsonTMFermionInstantiationSpWilsonTwoIndexSymmetricImplD.cc @@ -0,0 +1 @@ +../WilsonTMFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/impl.h b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/impl.h new file mode 100644 index 00000000..ac5babca --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplD/impl.h @@ -0,0 +1 @@ +#define IMPLEMENTATION SpWilsonTwoIndexSymmetricImplD diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonCloverFermionInstantiationSpWilsonTwoIndexSymmetricImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonCloverFermionInstantiationSpWilsonTwoIndexSymmetricImplF.cc new file mode 120000 index 00000000..9cc05107 --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonCloverFermionInstantiationSpWilsonTwoIndexSymmetricImplF.cc @@ -0,0 +1 @@ +../WilsonCloverFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonFermionInstantiationSpWilsonTwoIndexSymmetricImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonFermionInstantiationSpWilsonTwoIndexSymmetricImplF.cc new file mode 120000 index 00000000..5f6ab65e --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonFermionInstantiationSpWilsonTwoIndexSymmetricImplF.cc @@ -0,0 +1 @@ +../WilsonFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonKernelsInstantiationSpWilsonTwoIndexSymmetricImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonKernelsInstantiationSpWilsonTwoIndexSymmetricImplF.cc new file mode 120000 index 00000000..01c35e7b --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonKernelsInstantiationSpWilsonTwoIndexSymmetricImplF.cc @@ -0,0 +1 @@ +../WilsonKernelsInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonTMFermionInstantiationSpWilsonTwoIndexSymmetricImplF.cc b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonTMFermionInstantiationSpWilsonTwoIndexSymmetricImplF.cc new file mode 120000 index 00000000..d5789bcf --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/WilsonTMFermionInstantiationSpWilsonTwoIndexSymmetricImplF.cc @@ -0,0 +1 @@ +../WilsonTMFermionInstantiation.cc.master \ No newline at end of file diff --git a/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/impl.h b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/impl.h new file mode 100644 index 00000000..bea7dce7 --- /dev/null +++ b/Grid/qcd/action/fermion/instantiation/SpWilsonTwoIndexSymmetricImplF/impl.h @@ -0,0 +1 @@ +#define IMPLEMENTATION SpWilsonTwoIndexSymmetricImplF diff --git a/Grid/qcd/action/fermion/instantiation/generate_instantiations.sh b/Grid/qcd/action/fermion/instantiation/generate_instantiations.sh index 4ccc01e8..728dc5e7 100755 --- a/Grid/qcd/action/fermion/instantiation/generate_instantiations.sh +++ b/Grid/qcd/action/fermion/instantiation/generate_instantiations.sh @@ -10,12 +10,18 @@ WILSON_IMPL_LIST=" \ WilsonImplF \ WilsonImplD \ WilsonImplD2 \ + SpWilsonImplF \ + SpWilsonImplD \ WilsonAdjImplF \ WilsonAdjImplD \ WilsonTwoIndexSymmetricImplF \ WilsonTwoIndexSymmetricImplD \ WilsonTwoIndexAntiSymmetricImplF \ WilsonTwoIndexAntiSymmetricImplD \ + SpWilsonTwoIndexAntiSymmetricImplF \ + SpWilsonTwoIndexAntiSymmetricImplD \ + SpWilsonTwoIndexSymmetricImplF \ + SpWilsonTwoIndexSymmetricImplD \ GparityWilsonImplF \ GparityWilsonImplD " diff --git a/Grid/qcd/action/gauge/Gauge.h b/Grid/qcd/action/gauge/Gauge.h index b3b34eba..7a72d087 100644 --- a/Grid/qcd/action/gauge/Gauge.h +++ b/Grid/qcd/action/gauge/Gauge.h @@ -39,6 +39,9 @@ NAMESPACE_BEGIN(Grid); typedef WilsonGaugeAction WilsonGaugeActionR; typedef WilsonGaugeAction WilsonGaugeActionF; typedef WilsonGaugeAction WilsonGaugeActionD; +typedef WilsonGaugeAction SpWilsonGaugeActionR; +typedef WilsonGaugeAction SpWilsonGaugeActionF; +typedef WilsonGaugeAction SpWilsonGaugeActionD; typedef PlaqPlusRectangleAction PlaqPlusRectangleActionR; typedef PlaqPlusRectangleAction PlaqPlusRectangleActionF; typedef PlaqPlusRectangleAction PlaqPlusRectangleActionD; diff --git a/Grid/qcd/action/gauge/GaugeImplTypes.h b/Grid/qcd/action/gauge/GaugeImplTypes.h index 5c9405ab..a9af1fae 100644 --- a/Grid/qcd/action/gauge/GaugeImplTypes.h +++ b/Grid/qcd/action/gauge/GaugeImplTypes.h @@ -61,7 +61,7 @@ NAMESPACE_BEGIN(Grid); typedef typename Impl::Field Field; // hardcodes the exponential approximation in the template -template class GaugeImplTypes { +template > class GaugeImplTypes { public: typedef S Simd; typedef typename Simd::scalar_type scalar_type; @@ -78,8 +78,6 @@ public: typedef Lattice LinkField; typedef Lattice Field; - typedef SU Group; - // Guido: we can probably separate the types from the HMC functions // this will create 2 kind of implementations // probably confusing the users @@ -119,6 +117,7 @@ public: // LinkField Pmu(P.Grid()); Pmu = Zero(); + for (int mu = 0; mu < Nd; mu++) { Group::GaussianFundamentalLieAlgebraMatrix(pRNG, Pmu); RealD scale = ::sqrt(HMC_MOMENTUM_DENOMINATOR) ; @@ -126,8 +125,12 @@ public: PokeIndex(P, Pmu, mu); } } - - static inline Field projectForce(Field &P) { return Ta(P); } + + static inline Field projectForce(Field &P) { + Field ret(P.Grid()); + Group::taProj(P, ret); + return ret; + } static inline void update_field(Field& P, Field& U, double ep){ //static std::chrono::duration diff; @@ -137,14 +140,15 @@ public: autoView(P_v,P,AcceleratorRead); accelerator_for(ss, P.Grid()->oSites(),1,{ for (int mu = 0; mu < Nd; mu++) { - U_v[ss](mu) = ProjectOnGroup(Exponentiate(P_v[ss](mu), ep, Nexp) * U_v[ss](mu)); + U_v[ss](mu) = Exponentiate(P_v[ss](mu), ep, Nexp) * U_v[ss](mu); + U_v[ss](mu) = Group::ProjectOnGeneralGroup(U_v[ss](mu)); } }); //auto end = std::chrono::high_resolution_clock::now(); // diff += end - start; // std::cout << "Time to exponentiate matrix " << diff.count() << " s\n"; } - + static inline RealD FieldSquareNorm(Field& U){ LatticeComplex Hloc(U.Grid()); Hloc = Zero(); @@ -157,7 +161,7 @@ public: } static inline void Project(Field &U) { - ProjectSUn(U); + Group::ProjectOnSpecialGroup(U); } static inline void HotConfiguration(GridParallelRNG &pRNG, Field &U) { @@ -171,6 +175,7 @@ public: static inline void ColdConfiguration(GridParallelRNG &pRNG, Field &U) { Group::ColdConfiguration(pRNG, U); } + }; @@ -178,10 +183,17 @@ typedef GaugeImplTypes GimplTypesR; typedef GaugeImplTypes GimplTypesF; typedef GaugeImplTypes GimplTypesD; +typedef GaugeImplTypes > SpGimplTypesR; +typedef GaugeImplTypes > SpGimplTypesF; +typedef GaugeImplTypes > SpGimplTypesD; + typedef GaugeImplTypes::AdjointDimension> GimplAdjointTypesR; typedef GaugeImplTypes::AdjointDimension> GimplAdjointTypesF; typedef GaugeImplTypes::AdjointDimension> GimplAdjointTypesD; + + + NAMESPACE_END(Grid); #endif // GRID_GAUGE_IMPL_TYPES_H diff --git a/Grid/qcd/action/gauge/GaugeImplementations.h b/Grid/qcd/action/gauge/GaugeImplementations.h index f518b236..05dd27f9 100644 --- a/Grid/qcd/action/gauge/GaugeImplementations.h +++ b/Grid/qcd/action/gauge/GaugeImplementations.h @@ -193,6 +193,11 @@ typedef ConjugateGaugeImpl ConjugateGimplR; // Real.. whichever pre typedef ConjugateGaugeImpl ConjugateGimplF; // Float typedef ConjugateGaugeImpl ConjugateGimplD; // Double +typedef PeriodicGaugeImpl SpPeriodicGimplR; // Real.. whichever prec +typedef PeriodicGaugeImpl SpPeriodicGimplF; // Float +typedef PeriodicGaugeImpl SpPeriodicGimplD; // Double + + NAMESPACE_END(Grid); #endif diff --git a/Grid/qcd/hmc/GenericHMCrunner.h b/Grid/qcd/hmc/GenericHMCrunner.h index 727b3e24..1429d848 100644 --- a/Grid/qcd/hmc/GenericHMCrunner.h +++ b/Grid/qcd/hmc/GenericHMCrunner.h @@ -225,6 +225,18 @@ template ; +// sp2n + +template