From 853a5528dc36a1c4d4050a817810c74ce4391d63 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 23 Apr 2018 17:35:01 +0100 Subject: [PATCH] Hadrons: template modules compilation optimisation --- extras/Hadrons/Application.hpp | 2 +- extras/Hadrons/Module.hpp | 37 ++++++------------- extras/Hadrons/Modules.hpp | 30 --------------- extras/Hadrons/Modules/MAction/DWF.cc | 8 ++++ extras/Hadrons/Modules/MAction/DWF.hpp | 3 +- extras/Hadrons/Modules/MAction/Wilson.cc | 8 ++++ extras/Hadrons/Modules/MAction/Wilson.hpp | 2 +- .../Hadrons/Modules/MAction/WilsonClover.cc | 8 ++++ .../Hadrons/Modules/MAction/WilsonClover.hpp | 2 +- extras/Hadrons/Modules/MAction/ZMobiusDWF.cc | 8 ++++ extras/Hadrons/Modules/MAction/ZMobiusDWF.hpp | 2 +- extras/Hadrons/Modules/MContraction/Baryon.cc | 8 ++++ .../Hadrons/Modules/MContraction/Baryon.hpp | 2 +- .../Hadrons/Modules/MContraction/DiscLoop.cc | 8 ++++ .../Hadrons/Modules/MContraction/DiscLoop.hpp | 2 +- .../Hadrons/Modules/MContraction/Gamma3pt.cc | 8 ++++ .../Hadrons/Modules/MContraction/Gamma3pt.hpp | 2 +- extras/Hadrons/Modules/MContraction/Meson.cc | 8 ++++ extras/Hadrons/Modules/MContraction/Meson.hpp | 2 +- .../Modules/MContraction/WardIdentity.cc | 8 ++++ .../Modules/MContraction/WardIdentity.hpp | 2 +- .../Modules/MContraction/WeakHamiltonian.hpp | 2 +- extras/Hadrons/Modules/MFermion/GaugeProp.cc | 8 ++++ extras/Hadrons/Modules/MFermion/GaugeProp.hpp | 2 +- extras/Hadrons/Modules/MGauge/FundtoHirep.hpp | 6 +-- extras/Hadrons/Modules/MGauge/Random.hpp | 2 +- extras/Hadrons/Modules/MGauge/StochEm.hpp | 2 +- extras/Hadrons/Modules/MGauge/Unit.hpp | 2 +- extras/Hadrons/Modules/MIO/LoadBinary.cc | 13 +++++++ extras/Hadrons/Modules/MIO/LoadBinary.hpp | 12 +++--- .../Modules/MIO/LoadCoarseEigenPack.cc | 8 ++++ .../Modules/MIO/LoadCoarseEigenPack.hpp | 3 +- extras/Hadrons/Modules/MIO/LoadEigenPack.cc | 8 ++++ extras/Hadrons/Modules/MIO/LoadEigenPack.hpp | 2 +- extras/Hadrons/Modules/MIO/LoadNersc.hpp | 2 +- extras/Hadrons/Modules/MLoop/NoiseLoop.cc | 8 ++++ extras/Hadrons/Modules/MLoop/NoiseLoop.hpp | 2 +- .../Hadrons/Modules/MScalar/ChargedProp.hpp | 2 +- extras/Hadrons/Modules/MScalar/FreeProp.hpp | 2 +- extras/Hadrons/Modules/MScalarSUN/Div.cc | 12 ++++++ extras/Hadrons/Modules/MScalarSUN/Div.hpp | 10 ++--- extras/Hadrons/Modules/MScalarSUN/EMT.cc | 12 ++++++ extras/Hadrons/Modules/MScalarSUN/EMT.hpp | 10 ++--- .../Hadrons/Modules/MScalarSUN/ShiftProbe.cc | 12 ++++++ .../Hadrons/Modules/MScalarSUN/ShiftProbe.hpp | 10 ++--- .../Hadrons/Modules/MScalarSUN/TrKinetic.cc | 12 ++++++ .../Hadrons/Modules/MScalarSUN/TrKinetic.hpp | 10 ++--- extras/Hadrons/Modules/MScalarSUN/TrMag.cc | 12 ++++++ extras/Hadrons/Modules/MScalarSUN/TrMag.hpp | 10 ++--- extras/Hadrons/Modules/MScalarSUN/TrPhi.cc | 12 ++++++ extras/Hadrons/Modules/MScalarSUN/TrPhi.hpp | 10 ++--- .../Hadrons/Modules/MScalarSUN/TransProj.cc | 12 ++++++ .../Hadrons/Modules/MScalarSUN/TransProj.hpp | 10 ++--- extras/Hadrons/Modules/MScalarSUN/TwoPoint.cc | 12 ++++++ .../Hadrons/Modules/MScalarSUN/TwoPoint.hpp | 10 ++--- extras/Hadrons/Modules/MSink/Point.cc | 9 +++++ extras/Hadrons/Modules/MSink/Point.hpp | 4 +- extras/Hadrons/Modules/MSink/Smear.cc | 8 ++++ extras/Hadrons/Modules/MSink/Smear.hpp | 2 +- .../Modules/MSolver/LocalCoherenceLanczos.cc | 9 +++++ .../Modules/MSolver/LocalCoherenceLanczos.hpp | 8 +--- extras/Hadrons/Modules/MSolver/RBPrecCG.cc | 9 +++++ extras/Hadrons/Modules/MSolver/RBPrecCG.hpp | 6 +-- extras/Hadrons/Modules/MSource/Point.cc | 9 +++++ extras/Hadrons/Modules/MSource/Point.hpp | 4 +- .../Hadrons/Modules/MSource/SeqConserved.cc | 8 ++++ .../Hadrons/Modules/MSource/SeqConserved.hpp | 2 +- extras/Hadrons/Modules/MSource/SeqGamma.cc | 8 ++++ extras/Hadrons/Modules/MSource/SeqGamma.hpp | 2 +- extras/Hadrons/Modules/MSource/Wall.cc | 8 ++++ extras/Hadrons/Modules/MSource/Wall.hpp | 2 +- extras/Hadrons/Modules/MSource/Z2.cc | 9 +++++ extras/Hadrons/Modules/MSource/Z2.hpp | 4 +- .../Modules/MUtilities/TestSeqConserved.cc | 8 ++++ .../Modules/MUtilities/TestSeqConserved.hpp | 2 +- .../Modules/MUtilities/TestSeqGamma.cc | 8 ++++ .../Modules/MUtilities/TestSeqGamma.hpp | 2 +- .../templates/Module_in_NS.hpp.template | 2 +- .../templates/Module_tmp_in_NS.hpp.template | 2 +- extras/Hadrons/make_module_inst.sh | 27 ++++++++++++++ extras/Hadrons/modules.inc | 35 +++++++++++++++++- 81 files changed, 467 insertions(+), 152 deletions(-) create mode 100644 extras/Hadrons/Modules/MAction/DWF.cc create mode 100644 extras/Hadrons/Modules/MAction/Wilson.cc create mode 100644 extras/Hadrons/Modules/MAction/WilsonClover.cc create mode 100644 extras/Hadrons/Modules/MAction/ZMobiusDWF.cc create mode 100644 extras/Hadrons/Modules/MContraction/Baryon.cc create mode 100644 extras/Hadrons/Modules/MContraction/DiscLoop.cc create mode 100644 extras/Hadrons/Modules/MContraction/Gamma3pt.cc create mode 100644 extras/Hadrons/Modules/MContraction/Meson.cc create mode 100644 extras/Hadrons/Modules/MContraction/WardIdentity.cc create mode 100644 extras/Hadrons/Modules/MFermion/GaugeProp.cc create mode 100644 extras/Hadrons/Modules/MIO/LoadBinary.cc create mode 100644 extras/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc create mode 100644 extras/Hadrons/Modules/MIO/LoadEigenPack.cc create mode 100644 extras/Hadrons/Modules/MLoop/NoiseLoop.cc create mode 100644 extras/Hadrons/Modules/MScalarSUN/Div.cc create mode 100644 extras/Hadrons/Modules/MScalarSUN/EMT.cc create mode 100644 extras/Hadrons/Modules/MScalarSUN/ShiftProbe.cc create mode 100644 extras/Hadrons/Modules/MScalarSUN/TrKinetic.cc create mode 100644 extras/Hadrons/Modules/MScalarSUN/TrMag.cc create mode 100644 extras/Hadrons/Modules/MScalarSUN/TrPhi.cc create mode 100644 extras/Hadrons/Modules/MScalarSUN/TransProj.cc create mode 100644 extras/Hadrons/Modules/MScalarSUN/TwoPoint.cc create mode 100644 extras/Hadrons/Modules/MSink/Point.cc create mode 100644 extras/Hadrons/Modules/MSink/Smear.cc create mode 100644 extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.cc create mode 100644 extras/Hadrons/Modules/MSolver/RBPrecCG.cc create mode 100644 extras/Hadrons/Modules/MSource/Point.cc create mode 100644 extras/Hadrons/Modules/MSource/SeqConserved.cc create mode 100644 extras/Hadrons/Modules/MSource/SeqGamma.cc create mode 100644 extras/Hadrons/Modules/MSource/Wall.cc create mode 100644 extras/Hadrons/Modules/MSource/Z2.cc create mode 100644 extras/Hadrons/Modules/MUtilities/TestSeqConserved.cc create mode 100644 extras/Hadrons/Modules/MUtilities/TestSeqGamma.cc create mode 100755 extras/Hadrons/make_module_inst.sh diff --git a/extras/Hadrons/Application.hpp b/extras/Hadrons/Application.hpp index 0254f2fc..8cd15433 100644 --- a/extras/Hadrons/Application.hpp +++ b/extras/Hadrons/Application.hpp @@ -31,7 +31,7 @@ See the full license in the file "LICENSE" in the top level distribution directo #include #include -#include +#include BEGIN_HADRONS_NAMESPACE diff --git a/extras/Hadrons/Module.hpp b/extras/Hadrons/Module.hpp index 583f1111..9229a01c 100644 --- a/extras/Hadrons/Module.hpp +++ b/extras/Hadrons/Module.hpp @@ -35,32 +35,7 @@ See the full license in the file "LICENSE" in the top level distribution directo BEGIN_HADRONS_NAMESPACE // module registration macros -#define MODULE_REGISTER(mod, base)\ -class mod: public base\ -{\ -public:\ - typedef base Base;\ - using Base::Base;\ - virtual std::string getRegisteredName(void)\ - {\ - return std::string(#mod);\ - }\ -};\ -class mod##ModuleRegistrar\ -{\ -public:\ - mod##ModuleRegistrar(void)\ - {\ - ModuleFactory &modFac = ModuleFactory::getInstance();\ - modFac.registerBuilder(#mod, [&](const std::string name)\ - {\ - return std::unique_ptr(new mod(name));\ - });\ - }\ -};\ -static mod##ModuleRegistrar mod##ModuleRegistrarInstance; - -#define MODULE_REGISTER_NS(mod, base, ns)\ +#define MODULE_REGISTER(mod, base, ns)\ class mod: public base\ {\ public:\ @@ -85,6 +60,10 @@ public:\ };\ static ns##mod##ModuleRegistrar ns##mod##ModuleRegistrarInstance; +#define MODULE_REGISTER_TMP(mod, base, ns)\ +extern template class base;\ +MODULE_REGISTER(mod, ARG(base), ns); + #define ARG(...) __VA_ARGS__ #define MACRO_REDIRECT(arg1, arg2, arg3, macro, ...) macro @@ -144,6 +123,12 @@ MACRO_REDIRECT(__VA_ARGS__, envTmpLat5, envTmpLat4)(__VA_ARGS__) if (env().getGrid()->IsBoss())\ {\ ResultWriter _writer(RESULT_FILE_NAME(ioStem));\ + std::string _basename = basename(ioStem);\ + \ + if (!mkdir(_basename))\ + {\ + HADRON_ERROR(Io, "cannot create directory '" + _basename + "'");\ + }\ write(_writer, name, result);\ } diff --git a/extras/Hadrons/Modules.hpp b/extras/Hadrons/Modules.hpp index 528faecd..cdd94c35 100644 --- a/extras/Hadrons/Modules.hpp +++ b/extras/Hadrons/Modules.hpp @@ -1,33 +1,3 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: extras/Hadrons/Modules.hpp - -Copyright (C) 2015-2018 - -Author: Antonin Portelli -Author: Guido Cossu -Author: Lanny91 -Author: pretidav - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ #include #include #include diff --git a/extras/Hadrons/Modules/MAction/DWF.cc b/extras/Hadrons/Modules/MAction/DWF.cc new file mode 100644 index 00000000..2037238a --- /dev/null +++ b/extras/Hadrons/Modules/MAction/DWF.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MAction; + +template class Grid::Hadrons::MAction::TDWF; + diff --git a/extras/Hadrons/Modules/MAction/DWF.hpp b/extras/Hadrons/Modules/MAction/DWF.hpp index 4dfd06cf..6be35a8a 100644 --- a/extras/Hadrons/Modules/MAction/DWF.hpp +++ b/extras/Hadrons/Modules/MAction/DWF.hpp @@ -72,7 +72,8 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(DWF, TDWF, MAction); +extern template class TDWF; +MODULE_REGISTER_TMP(DWF, TDWF, MAction); /****************************************************************************** * DWF template implementation * diff --git a/extras/Hadrons/Modules/MAction/Wilson.cc b/extras/Hadrons/Modules/MAction/Wilson.cc new file mode 100644 index 00000000..10526241 --- /dev/null +++ b/extras/Hadrons/Modules/MAction/Wilson.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MAction; + +template class Grid::Hadrons::MAction::TWilson; + diff --git a/extras/Hadrons/Modules/MAction/Wilson.hpp b/extras/Hadrons/Modules/MAction/Wilson.hpp index 6467b3ee..5508b6b8 100644 --- a/extras/Hadrons/Modules/MAction/Wilson.hpp +++ b/extras/Hadrons/Modules/MAction/Wilson.hpp @@ -70,7 +70,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(Wilson, TWilson, MAction); +MODULE_REGISTER_TMP(Wilson, TWilson, MAction); /****************************************************************************** * TWilson template implementation * diff --git a/extras/Hadrons/Modules/MAction/WilsonClover.cc b/extras/Hadrons/Modules/MAction/WilsonClover.cc new file mode 100644 index 00000000..d0f90f26 --- /dev/null +++ b/extras/Hadrons/Modules/MAction/WilsonClover.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MAction; + +template class Grid::Hadrons::MAction::TWilsonClover; + diff --git a/extras/Hadrons/Modules/MAction/WilsonClover.hpp b/extras/Hadrons/Modules/MAction/WilsonClover.hpp index 2967931c..a93a0136 100644 --- a/extras/Hadrons/Modules/MAction/WilsonClover.hpp +++ b/extras/Hadrons/Modules/MAction/WilsonClover.hpp @@ -74,7 +74,7 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(WilsonClover, TWilsonClover, MAction); +MODULE_REGISTER_TMP(WilsonClover, TWilsonClover, MAction); /****************************************************************************** * TWilsonClover template implementation * diff --git a/extras/Hadrons/Modules/MAction/ZMobiusDWF.cc b/extras/Hadrons/Modules/MAction/ZMobiusDWF.cc new file mode 100644 index 00000000..b5be7d9b --- /dev/null +++ b/extras/Hadrons/Modules/MAction/ZMobiusDWF.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MAction; + +template class Grid::Hadrons::MAction::TZMobiusDWF; + diff --git a/extras/Hadrons/Modules/MAction/ZMobiusDWF.hpp b/extras/Hadrons/Modules/MAction/ZMobiusDWF.hpp index 518b88f2..58a6bb1a 100644 --- a/extras/Hadrons/Modules/MAction/ZMobiusDWF.hpp +++ b/extras/Hadrons/Modules/MAction/ZMobiusDWF.hpp @@ -72,7 +72,7 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(ZMobiusDWF, TZMobiusDWF, MAction); +MODULE_REGISTER_TMP(ZMobiusDWF, TZMobiusDWF, MAction); /****************************************************************************** * TZMobiusDWF implementation * diff --git a/extras/Hadrons/Modules/MContraction/Baryon.cc b/extras/Hadrons/Modules/MContraction/Baryon.cc new file mode 100644 index 00000000..7015e899 --- /dev/null +++ b/extras/Hadrons/Modules/MContraction/Baryon.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MContraction; + +template class Grid::Hadrons::MContraction::TBaryon; + diff --git a/extras/Hadrons/Modules/MContraction/Baryon.hpp b/extras/Hadrons/Modules/MContraction/Baryon.hpp index f3bf360d..87691e7b 100644 --- a/extras/Hadrons/Modules/MContraction/Baryon.hpp +++ b/extras/Hadrons/Modules/MContraction/Baryon.hpp @@ -79,7 +79,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(Baryon, ARG(TBaryon), MContraction); +MODULE_REGISTER_TMP(Baryon, ARG(TBaryon), MContraction); /****************************************************************************** * TBaryon implementation * diff --git a/extras/Hadrons/Modules/MContraction/DiscLoop.cc b/extras/Hadrons/Modules/MContraction/DiscLoop.cc new file mode 100644 index 00000000..257d7765 --- /dev/null +++ b/extras/Hadrons/Modules/MContraction/DiscLoop.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MContraction; + +template class Grid::Hadrons::MContraction::TDiscLoop; + diff --git a/extras/Hadrons/Modules/MContraction/DiscLoop.hpp b/extras/Hadrons/Modules/MContraction/DiscLoop.hpp index 4a30963f..1c872f0a 100644 --- a/extras/Hadrons/Modules/MContraction/DiscLoop.hpp +++ b/extras/Hadrons/Modules/MContraction/DiscLoop.hpp @@ -76,7 +76,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(DiscLoop, TDiscLoop, MContraction); +MODULE_REGISTER_TMP(DiscLoop, TDiscLoop, MContraction); /****************************************************************************** * TDiscLoop implementation * diff --git a/extras/Hadrons/Modules/MContraction/Gamma3pt.cc b/extras/Hadrons/Modules/MContraction/Gamma3pt.cc new file mode 100644 index 00000000..c4886223 --- /dev/null +++ b/extras/Hadrons/Modules/MContraction/Gamma3pt.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MContraction; + +template class Grid::Hadrons::MContraction::TGamma3pt; + diff --git a/extras/Hadrons/Modules/MContraction/Gamma3pt.hpp b/extras/Hadrons/Modules/MContraction/Gamma3pt.hpp index b615cd7b..2b4b88a7 100644 --- a/extras/Hadrons/Modules/MContraction/Gamma3pt.hpp +++ b/extras/Hadrons/Modules/MContraction/Gamma3pt.hpp @@ -107,7 +107,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(Gamma3pt, ARG(TGamma3pt), MContraction); +MODULE_REGISTER_TMP(Gamma3pt, ARG(TGamma3pt), MContraction); /****************************************************************************** * TGamma3pt implementation * diff --git a/extras/Hadrons/Modules/MContraction/Meson.cc b/extras/Hadrons/Modules/MContraction/Meson.cc new file mode 100644 index 00000000..a1c6a742 --- /dev/null +++ b/extras/Hadrons/Modules/MContraction/Meson.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MContraction; + +template class Grid::Hadrons::MContraction::TMeson; + diff --git a/extras/Hadrons/Modules/MContraction/Meson.hpp b/extras/Hadrons/Modules/MContraction/Meson.hpp index 5d27c526..f75e55dc 100644 --- a/extras/Hadrons/Modules/MContraction/Meson.hpp +++ b/extras/Hadrons/Modules/MContraction/Meson.hpp @@ -102,7 +102,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(Meson, ARG(TMeson), MContraction); +MODULE_REGISTER_TMP(Meson, ARG(TMeson), MContraction); /****************************************************************************** * TMeson implementation * diff --git a/extras/Hadrons/Modules/MContraction/WardIdentity.cc b/extras/Hadrons/Modules/MContraction/WardIdentity.cc new file mode 100644 index 00000000..cd188e46 --- /dev/null +++ b/extras/Hadrons/Modules/MContraction/WardIdentity.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MContraction; + +template class Grid::Hadrons::MContraction::TWardIdentity; + diff --git a/extras/Hadrons/Modules/MContraction/WardIdentity.hpp b/extras/Hadrons/Modules/MContraction/WardIdentity.hpp index 2801d88c..3b9a1449 100644 --- a/extras/Hadrons/Modules/MContraction/WardIdentity.hpp +++ b/extras/Hadrons/Modules/MContraction/WardIdentity.hpp @@ -84,7 +84,7 @@ private: unsigned int Ls_; }; -MODULE_REGISTER_NS(WardIdentity, TWardIdentity, MContraction); +MODULE_REGISTER_TMP(WardIdentity, TWardIdentity, MContraction); /****************************************************************************** * TWardIdentity implementation * diff --git a/extras/Hadrons/Modules/MContraction/WeakHamiltonian.hpp b/extras/Hadrons/Modules/MContraction/WeakHamiltonian.hpp index 9d8ada98..84edc366 100644 --- a/extras/Hadrons/Modules/MContraction/WeakHamiltonian.hpp +++ b/extras/Hadrons/Modules/MContraction/WeakHamiltonian.hpp @@ -109,7 +109,7 @@ protected:\ /* execution */ \ virtual void execute(void);\ };\ -MODULE_REGISTER_NS(modname, T##modname, MContraction); +MODULE_REGISTER(modname, T##modname, MContraction); END_MODULE_NAMESPACE diff --git a/extras/Hadrons/Modules/MFermion/GaugeProp.cc b/extras/Hadrons/Modules/MFermion/GaugeProp.cc new file mode 100644 index 00000000..888b86f1 --- /dev/null +++ b/extras/Hadrons/Modules/MFermion/GaugeProp.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MFermion; + +template class Grid::Hadrons::MFermion::TGaugeProp; + diff --git a/extras/Hadrons/Modules/MFermion/GaugeProp.hpp b/extras/Hadrons/Modules/MFermion/GaugeProp.hpp index 45b9de6c..e85acecb 100644 --- a/extras/Hadrons/Modules/MFermion/GaugeProp.hpp +++ b/extras/Hadrons/Modules/MFermion/GaugeProp.hpp @@ -95,7 +95,7 @@ private: SolverFn *solver_{nullptr}; }; -MODULE_REGISTER_NS(GaugeProp, TGaugeProp, MFermion); +MODULE_REGISTER_TMP(GaugeProp, TGaugeProp, MFermion); /****************************************************************************** * TGaugeProp implementation * ******************************************************************************/ diff --git a/extras/Hadrons/Modules/MGauge/FundtoHirep.hpp b/extras/Hadrons/Modules/MGauge/FundtoHirep.hpp index 508145bc..07274544 100644 --- a/extras/Hadrons/Modules/MGauge/FundtoHirep.hpp +++ b/extras/Hadrons/Modules/MGauge/FundtoHirep.hpp @@ -65,9 +65,9 @@ public: void execute(void); }; -//MODULE_REGISTER_NS(FundtoAdjoint, TFundtoHirep, MGauge); -//MODULE_REGISTER_NS(FundtoTwoIndexSym, TFundtoHirep, MGauge); -//MODULE_REGISTER_NS(FundtoTwoIndexAsym, TFundtoHirep, MGauge); +//MODULE_REGISTER_TMP(FundtoAdjoint, TFundtoHirep, MGauge); +//MODULE_REGISTER_TMP(FundtoTwoIndexSym, TFundtoHirep, MGauge); +//MODULE_REGISTER_TMP(FundtoTwoIndexAsym, TFundtoHirep, MGauge); END_MODULE_NAMESPACE diff --git a/extras/Hadrons/Modules/MGauge/Random.hpp b/extras/Hadrons/Modules/MGauge/Random.hpp index 51a08dbb..ddc81fc1 100644 --- a/extras/Hadrons/Modules/MGauge/Random.hpp +++ b/extras/Hadrons/Modules/MGauge/Random.hpp @@ -57,7 +57,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(Random, TRandom, MGauge); +MODULE_REGISTER(Random, TRandom, MGauge); END_MODULE_NAMESPACE diff --git a/extras/Hadrons/Modules/MGauge/StochEm.hpp b/extras/Hadrons/Modules/MGauge/StochEm.hpp index 9e2ba1fb..aa7fa51f 100644 --- a/extras/Hadrons/Modules/MGauge/StochEm.hpp +++ b/extras/Hadrons/Modules/MGauge/StochEm.hpp @@ -70,7 +70,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(StochEm, TStochEm, MGauge); +MODULE_REGISTER(StochEm, TStochEm, MGauge); END_MODULE_NAMESPACE diff --git a/extras/Hadrons/Modules/MGauge/Unit.hpp b/extras/Hadrons/Modules/MGauge/Unit.hpp index d6ce5a6b..bd0faa25 100644 --- a/extras/Hadrons/Modules/MGauge/Unit.hpp +++ b/extras/Hadrons/Modules/MGauge/Unit.hpp @@ -57,7 +57,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(Unit, TUnit, MGauge); +MODULE_REGISTER(Unit, TUnit, MGauge); END_MODULE_NAMESPACE diff --git a/extras/Hadrons/Modules/MIO/LoadBinary.cc b/extras/Hadrons/Modules/MIO/LoadBinary.cc new file mode 100644 index 00000000..4eb76ee1 --- /dev/null +++ b/extras/Hadrons/Modules/MIO/LoadBinary.cc @@ -0,0 +1,13 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MIO; + +template class Grid::Hadrons::MIO::TLoadBinary; +template class Grid::Hadrons::MIO::TLoadBinary>; +template class Grid::Hadrons::MIO::TLoadBinary>; +template class Grid::Hadrons::MIO::TLoadBinary>; +template class Grid::Hadrons::MIO::TLoadBinary>; +template class Grid::Hadrons::MIO::TLoadBinary>; + diff --git a/extras/Hadrons/Modules/MIO/LoadBinary.hpp b/extras/Hadrons/Modules/MIO/LoadBinary.hpp index d9a8b5f8..f14be5fb 100644 --- a/extras/Hadrons/Modules/MIO/LoadBinary.hpp +++ b/extras/Hadrons/Modules/MIO/LoadBinary.hpp @@ -71,12 +71,12 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(LoadBinary, TLoadBinary, MIO); -MODULE_REGISTER_NS(LoadBinaryScalarSU2, TLoadBinary>, MIO); -MODULE_REGISTER_NS(LoadBinaryScalarSU3, TLoadBinary>, MIO); -MODULE_REGISTER_NS(LoadBinaryScalarSU4, TLoadBinary>, MIO); -MODULE_REGISTER_NS(LoadBinaryScalarSU5, TLoadBinary>, MIO); -MODULE_REGISTER_NS(LoadBinaryScalarSU6, TLoadBinary>, MIO); +MODULE_REGISTER_TMP(LoadBinary, TLoadBinary, MIO); +MODULE_REGISTER_TMP(LoadBinaryScalarSU2, TLoadBinary>, MIO); +MODULE_REGISTER_TMP(LoadBinaryScalarSU3, TLoadBinary>, MIO); +MODULE_REGISTER_TMP(LoadBinaryScalarSU4, TLoadBinary>, MIO); +MODULE_REGISTER_TMP(LoadBinaryScalarSU5, TLoadBinary>, MIO); +MODULE_REGISTER_TMP(LoadBinaryScalarSU6, TLoadBinary>, MIO); /****************************************************************************** * TLoadBinary implementation * diff --git a/extras/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc b/extras/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc new file mode 100644 index 00000000..60637566 --- /dev/null +++ b/extras/Hadrons/Modules/MIO/LoadCoarseEigenPack.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MIO; + +template class Grid::Hadrons::MIO::TLoadCoarseEigenPack>; + diff --git a/extras/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp b/extras/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp index b88844f4..609e5ed4 100644 --- a/extras/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp +++ b/extras/Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp @@ -73,8 +73,7 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(LoadCoarseFermionEigenPack, - ARG(TLoadCoarseEigenPack>), MIO); +MODULE_REGISTER_TMP(LoadCoarseFermionEigenPack, ARG(TLoadCoarseEigenPack>), MIO); /****************************************************************************** * TLoadCoarseEigenPack implementation * diff --git a/extras/Hadrons/Modules/MIO/LoadEigenPack.cc b/extras/Hadrons/Modules/MIO/LoadEigenPack.cc new file mode 100644 index 00000000..1ed0254d --- /dev/null +++ b/extras/Hadrons/Modules/MIO/LoadEigenPack.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MIO; + +template class Grid::Hadrons::MIO::TLoadEigenPack>; + diff --git a/extras/Hadrons/Modules/MIO/LoadEigenPack.hpp b/extras/Hadrons/Modules/MIO/LoadEigenPack.hpp index 5d62b53d..8a3b40e7 100644 --- a/extras/Hadrons/Modules/MIO/LoadEigenPack.hpp +++ b/extras/Hadrons/Modules/MIO/LoadEigenPack.hpp @@ -68,7 +68,7 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(LoadFermionEigenPack, TLoadEigenPack>, MIO); +MODULE_REGISTER_TMP(LoadFermionEigenPack, TLoadEigenPack>, MIO); /****************************************************************************** * TLoadEigenPack implementation * diff --git a/extras/Hadrons/Modules/MIO/LoadNersc.hpp b/extras/Hadrons/Modules/MIO/LoadNersc.hpp index d6742e1e..309edad2 100644 --- a/extras/Hadrons/Modules/MIO/LoadNersc.hpp +++ b/extras/Hadrons/Modules/MIO/LoadNersc.hpp @@ -62,7 +62,7 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(LoadNersc, TLoadNersc, MIO); +MODULE_REGISTER(LoadNersc, TLoadNersc, MIO); END_MODULE_NAMESPACE diff --git a/extras/Hadrons/Modules/MLoop/NoiseLoop.cc b/extras/Hadrons/Modules/MLoop/NoiseLoop.cc new file mode 100644 index 00000000..96707f19 --- /dev/null +++ b/extras/Hadrons/Modules/MLoop/NoiseLoop.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MLoop; + +template class Grid::Hadrons::MLoop::TNoiseLoop; + diff --git a/extras/Hadrons/Modules/MLoop/NoiseLoop.hpp b/extras/Hadrons/Modules/MLoop/NoiseLoop.hpp index e61bf163..588c63da 100644 --- a/extras/Hadrons/Modules/MLoop/NoiseLoop.hpp +++ b/extras/Hadrons/Modules/MLoop/NoiseLoop.hpp @@ -82,7 +82,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(NoiseLoop, TNoiseLoop, MLoop); +MODULE_REGISTER_TMP(NoiseLoop, TNoiseLoop, MLoop); /****************************************************************************** * TNoiseLoop implementation * diff --git a/extras/Hadrons/Modules/MScalar/ChargedProp.hpp b/extras/Hadrons/Modules/MScalar/ChargedProp.hpp index 4d43aec2..72a40cad 100644 --- a/extras/Hadrons/Modules/MScalar/ChargedProp.hpp +++ b/extras/Hadrons/Modules/MScalar/ChargedProp.hpp @@ -80,7 +80,7 @@ private: std::vector phase_; }; -MODULE_REGISTER_NS(ChargedProp, TChargedProp, MScalar); +MODULE_REGISTER(ChargedProp, TChargedProp, MScalar); END_MODULE_NAMESPACE diff --git a/extras/Hadrons/Modules/MScalar/FreeProp.hpp b/extras/Hadrons/Modules/MScalar/FreeProp.hpp index df17f44e..bf7823e6 100644 --- a/extras/Hadrons/Modules/MScalar/FreeProp.hpp +++ b/extras/Hadrons/Modules/MScalar/FreeProp.hpp @@ -70,7 +70,7 @@ private: bool freePropDone_; }; -MODULE_REGISTER_NS(FreeProp, TFreeProp, MScalar); +MODULE_REGISTER(FreeProp, TFreeProp, MScalar); END_MODULE_NAMESPACE diff --git a/extras/Hadrons/Modules/MScalarSUN/Div.cc b/extras/Hadrons/Modules/MScalarSUN/Div.cc new file mode 100644 index 00000000..1045b04a --- /dev/null +++ b/extras/Hadrons/Modules/MScalarSUN/Div.cc @@ -0,0 +1,12 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MScalarSUN; + +template class Grid::Hadrons::MScalarSUN::TDiv>; +template class Grid::Hadrons::MScalarSUN::TDiv>; +template class Grid::Hadrons::MScalarSUN::TDiv>; +template class Grid::Hadrons::MScalarSUN::TDiv>; +template class Grid::Hadrons::MScalarSUN::TDiv>; + diff --git a/extras/Hadrons/Modules/MScalarSUN/Div.hpp b/extras/Hadrons/Modules/MScalarSUN/Div.hpp index 0ecb1dbe..9b30866c 100644 --- a/extras/Hadrons/Modules/MScalarSUN/Div.hpp +++ b/extras/Hadrons/Modules/MScalarSUN/Div.hpp @@ -76,11 +76,11 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(DivSU2, TDiv>, MScalarSUN); -MODULE_REGISTER_NS(DivSU3, TDiv>, MScalarSUN); -MODULE_REGISTER_NS(DivSU4, TDiv>, MScalarSUN); -MODULE_REGISTER_NS(DivSU5, TDiv>, MScalarSUN); -MODULE_REGISTER_NS(DivSU6, TDiv>, MScalarSUN); +MODULE_REGISTER_TMP(DivSU2, TDiv>, MScalarSUN); +MODULE_REGISTER_TMP(DivSU3, TDiv>, MScalarSUN); +MODULE_REGISTER_TMP(DivSU4, TDiv>, MScalarSUN); +MODULE_REGISTER_TMP(DivSU5, TDiv>, MScalarSUN); +MODULE_REGISTER_TMP(DivSU6, TDiv>, MScalarSUN); /****************************************************************************** * TDiv implementation * diff --git a/extras/Hadrons/Modules/MScalarSUN/EMT.cc b/extras/Hadrons/Modules/MScalarSUN/EMT.cc new file mode 100644 index 00000000..0d5d652f --- /dev/null +++ b/extras/Hadrons/Modules/MScalarSUN/EMT.cc @@ -0,0 +1,12 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MScalarSUN; + +template class Grid::Hadrons::MScalarSUN::TEMT>; +template class Grid::Hadrons::MScalarSUN::TEMT>; +template class Grid::Hadrons::MScalarSUN::TEMT>; +template class Grid::Hadrons::MScalarSUN::TEMT>; +template class Grid::Hadrons::MScalarSUN::TEMT>; + diff --git a/extras/Hadrons/Modules/MScalarSUN/EMT.hpp b/extras/Hadrons/Modules/MScalarSUN/EMT.hpp index 8c1239df..445f3445 100644 --- a/extras/Hadrons/Modules/MScalarSUN/EMT.hpp +++ b/extras/Hadrons/Modules/MScalarSUN/EMT.hpp @@ -74,11 +74,11 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(EMTSU2, TEMT>, MScalarSUN); -MODULE_REGISTER_NS(EMTSU3, TEMT>, MScalarSUN); -MODULE_REGISTER_NS(EMTSU4, TEMT>, MScalarSUN); -MODULE_REGISTER_NS(EMTSU5, TEMT>, MScalarSUN); -MODULE_REGISTER_NS(EMTSU6, TEMT>, MScalarSUN); +MODULE_REGISTER_TMP(EMTSU2, TEMT>, MScalarSUN); +MODULE_REGISTER_TMP(EMTSU3, TEMT>, MScalarSUN); +MODULE_REGISTER_TMP(EMTSU4, TEMT>, MScalarSUN); +MODULE_REGISTER_TMP(EMTSU5, TEMT>, MScalarSUN); +MODULE_REGISTER_TMP(EMTSU6, TEMT>, MScalarSUN); /****************************************************************************** * TEMT implementation * diff --git a/extras/Hadrons/Modules/MScalarSUN/ShiftProbe.cc b/extras/Hadrons/Modules/MScalarSUN/ShiftProbe.cc new file mode 100644 index 00000000..339bd9a8 --- /dev/null +++ b/extras/Hadrons/Modules/MScalarSUN/ShiftProbe.cc @@ -0,0 +1,12 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MScalarSUN; + +template class Grid::Hadrons::MScalarSUN::TShiftProbe>; +template class Grid::Hadrons::MScalarSUN::TShiftProbe>; +template class Grid::Hadrons::MScalarSUN::TShiftProbe>; +template class Grid::Hadrons::MScalarSUN::TShiftProbe>; +template class Grid::Hadrons::MScalarSUN::TShiftProbe>; + diff --git a/extras/Hadrons/Modules/MScalarSUN/ShiftProbe.hpp b/extras/Hadrons/Modules/MScalarSUN/ShiftProbe.hpp index 8d52327e..41b8c553 100644 --- a/extras/Hadrons/Modules/MScalarSUN/ShiftProbe.hpp +++ b/extras/Hadrons/Modules/MScalarSUN/ShiftProbe.hpp @@ -79,11 +79,11 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(ShiftProbeSU2, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_NS(ShiftProbeSU3, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_NS(ShiftProbeSU4, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_NS(ShiftProbeSU5, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_NS(ShiftProbeSU6, TShiftProbe>, MScalarSUN); +MODULE_REGISTER_TMP(ShiftProbeSU2, TShiftProbe>, MScalarSUN); +MODULE_REGISTER_TMP(ShiftProbeSU3, TShiftProbe>, MScalarSUN); +MODULE_REGISTER_TMP(ShiftProbeSU4, TShiftProbe>, MScalarSUN); +MODULE_REGISTER_TMP(ShiftProbeSU5, TShiftProbe>, MScalarSUN); +MODULE_REGISTER_TMP(ShiftProbeSU6, TShiftProbe>, MScalarSUN); /****************************************************************************** * TShiftProbe implementation * diff --git a/extras/Hadrons/Modules/MScalarSUN/TrKinetic.cc b/extras/Hadrons/Modules/MScalarSUN/TrKinetic.cc new file mode 100644 index 00000000..8c959dca --- /dev/null +++ b/extras/Hadrons/Modules/MScalarSUN/TrKinetic.cc @@ -0,0 +1,12 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MScalarSUN; + +template class Grid::Hadrons::MScalarSUN::TTrKinetic>; +template class Grid::Hadrons::MScalarSUN::TTrKinetic>; +template class Grid::Hadrons::MScalarSUN::TTrKinetic>; +template class Grid::Hadrons::MScalarSUN::TTrKinetic>; +template class Grid::Hadrons::MScalarSUN::TTrKinetic>; + diff --git a/extras/Hadrons/Modules/MScalarSUN/TrKinetic.hpp b/extras/Hadrons/Modules/MScalarSUN/TrKinetic.hpp index f1b520de..e448b61e 100644 --- a/extras/Hadrons/Modules/MScalarSUN/TrKinetic.hpp +++ b/extras/Hadrons/Modules/MScalarSUN/TrKinetic.hpp @@ -76,11 +76,11 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(TrKineticSU2, TTrKinetic>, MScalarSUN); -MODULE_REGISTER_NS(TrKineticSU3, TTrKinetic>, MScalarSUN); -MODULE_REGISTER_NS(TrKineticSU4, TTrKinetic>, MScalarSUN); -MODULE_REGISTER_NS(TrKineticSU5, TTrKinetic>, MScalarSUN); -MODULE_REGISTER_NS(TrKineticSU6, TTrKinetic>, MScalarSUN); +MODULE_REGISTER_TMP(TrKineticSU2, TTrKinetic>, MScalarSUN); +MODULE_REGISTER_TMP(TrKineticSU3, TTrKinetic>, MScalarSUN); +MODULE_REGISTER_TMP(TrKineticSU4, TTrKinetic>, MScalarSUN); +MODULE_REGISTER_TMP(TrKineticSU5, TTrKinetic>, MScalarSUN); +MODULE_REGISTER_TMP(TrKineticSU6, TTrKinetic>, MScalarSUN); /****************************************************************************** * TTrKinetic implementation * diff --git a/extras/Hadrons/Modules/MScalarSUN/TrMag.cc b/extras/Hadrons/Modules/MScalarSUN/TrMag.cc new file mode 100644 index 00000000..3be84f92 --- /dev/null +++ b/extras/Hadrons/Modules/MScalarSUN/TrMag.cc @@ -0,0 +1,12 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MScalarSUN; + +template class Grid::Hadrons::MScalarSUN::TTrMag>; +template class Grid::Hadrons::MScalarSUN::TTrMag>; +template class Grid::Hadrons::MScalarSUN::TTrMag>; +template class Grid::Hadrons::MScalarSUN::TTrMag>; +template class Grid::Hadrons::MScalarSUN::TTrMag>; + diff --git a/extras/Hadrons/Modules/MScalarSUN/TrMag.hpp b/extras/Hadrons/Modules/MScalarSUN/TrMag.hpp index 879951d5..efadc16f 100644 --- a/extras/Hadrons/Modules/MScalarSUN/TrMag.hpp +++ b/extras/Hadrons/Modules/MScalarSUN/TrMag.hpp @@ -76,11 +76,11 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(TrMagSU2, TTrMag>, MScalarSUN); -MODULE_REGISTER_NS(TrMagSU3, TTrMag>, MScalarSUN); -MODULE_REGISTER_NS(TrMagSU4, TTrMag>, MScalarSUN); -MODULE_REGISTER_NS(TrMagSU5, TTrMag>, MScalarSUN); -MODULE_REGISTER_NS(TrMagSU6, TTrMag>, MScalarSUN); +MODULE_REGISTER_TMP(TrMagSU2, TTrMag>, MScalarSUN); +MODULE_REGISTER_TMP(TrMagSU3, TTrMag>, MScalarSUN); +MODULE_REGISTER_TMP(TrMagSU4, TTrMag>, MScalarSUN); +MODULE_REGISTER_TMP(TrMagSU5, TTrMag>, MScalarSUN); +MODULE_REGISTER_TMP(TrMagSU6, TTrMag>, MScalarSUN); /****************************************************************************** * TTrMag implementation * diff --git a/extras/Hadrons/Modules/MScalarSUN/TrPhi.cc b/extras/Hadrons/Modules/MScalarSUN/TrPhi.cc new file mode 100644 index 00000000..58c6df75 --- /dev/null +++ b/extras/Hadrons/Modules/MScalarSUN/TrPhi.cc @@ -0,0 +1,12 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MScalarSUN; + +template class Grid::Hadrons::MScalarSUN::TTrPhi>; +template class Grid::Hadrons::MScalarSUN::TTrPhi>; +template class Grid::Hadrons::MScalarSUN::TTrPhi>; +template class Grid::Hadrons::MScalarSUN::TTrPhi>; +template class Grid::Hadrons::MScalarSUN::TTrPhi>; + diff --git a/extras/Hadrons/Modules/MScalarSUN/TrPhi.hpp b/extras/Hadrons/Modules/MScalarSUN/TrPhi.hpp index aa98bfb3..3f43a7b1 100644 --- a/extras/Hadrons/Modules/MScalarSUN/TrPhi.hpp +++ b/extras/Hadrons/Modules/MScalarSUN/TrPhi.hpp @@ -76,11 +76,11 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(TrPhiSU2, TTrPhi>, MScalarSUN); -MODULE_REGISTER_NS(TrPhiSU3, TTrPhi>, MScalarSUN); -MODULE_REGISTER_NS(TrPhiSU4, TTrPhi>, MScalarSUN); -MODULE_REGISTER_NS(TrPhiSU5, TTrPhi>, MScalarSUN); -MODULE_REGISTER_NS(TrPhiSU6, TTrPhi>, MScalarSUN); +MODULE_REGISTER_TMP(TrPhiSU2, TTrPhi>, MScalarSUN); +MODULE_REGISTER_TMP(TrPhiSU3, TTrPhi>, MScalarSUN); +MODULE_REGISTER_TMP(TrPhiSU4, TTrPhi>, MScalarSUN); +MODULE_REGISTER_TMP(TrPhiSU5, TTrPhi>, MScalarSUN); +MODULE_REGISTER_TMP(TrPhiSU6, TTrPhi>, MScalarSUN); /****************************************************************************** * TTrPhi implementation * diff --git a/extras/Hadrons/Modules/MScalarSUN/TransProj.cc b/extras/Hadrons/Modules/MScalarSUN/TransProj.cc new file mode 100644 index 00000000..09a469ea --- /dev/null +++ b/extras/Hadrons/Modules/MScalarSUN/TransProj.cc @@ -0,0 +1,12 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MScalarSUN; + +template class Grid::Hadrons::MScalarSUN::TTransProj>; +template class Grid::Hadrons::MScalarSUN::TTransProj>; +template class Grid::Hadrons::MScalarSUN::TTransProj>; +template class Grid::Hadrons::MScalarSUN::TTransProj>; +template class Grid::Hadrons::MScalarSUN::TTransProj>; + diff --git a/extras/Hadrons/Modules/MScalarSUN/TransProj.hpp b/extras/Hadrons/Modules/MScalarSUN/TransProj.hpp index 4532b4ab..b525b053 100644 --- a/extras/Hadrons/Modules/MScalarSUN/TransProj.hpp +++ b/extras/Hadrons/Modules/MScalarSUN/TransProj.hpp @@ -77,11 +77,11 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(TransProjSU2, TTransProj>, MScalarSUN); -MODULE_REGISTER_NS(TransProjSU3, TTransProj>, MScalarSUN); -MODULE_REGISTER_NS(TransProjSU4, TTransProj>, MScalarSUN); -MODULE_REGISTER_NS(TransProjSU5, TTransProj>, MScalarSUN); -MODULE_REGISTER_NS(TransProjSU6, TTransProj>, MScalarSUN); +MODULE_REGISTER_TMP(TransProjSU2, TTransProj>, MScalarSUN); +MODULE_REGISTER_TMP(TransProjSU3, TTransProj>, MScalarSUN); +MODULE_REGISTER_TMP(TransProjSU4, TTransProj>, MScalarSUN); +MODULE_REGISTER_TMP(TransProjSU5, TTransProj>, MScalarSUN); +MODULE_REGISTER_TMP(TransProjSU6, TTransProj>, MScalarSUN); /****************************************************************************** * TTransProj implementation * diff --git a/extras/Hadrons/Modules/MScalarSUN/TwoPoint.cc b/extras/Hadrons/Modules/MScalarSUN/TwoPoint.cc new file mode 100644 index 00000000..6e009bb6 --- /dev/null +++ b/extras/Hadrons/Modules/MScalarSUN/TwoPoint.cc @@ -0,0 +1,12 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MScalarSUN; + +template class Grid::Hadrons::MScalarSUN::TTwoPoint>; +template class Grid::Hadrons::MScalarSUN::TTwoPoint>; +template class Grid::Hadrons::MScalarSUN::TTwoPoint>; +template class Grid::Hadrons::MScalarSUN::TTwoPoint>; +template class Grid::Hadrons::MScalarSUN::TTwoPoint>; + diff --git a/extras/Hadrons/Modules/MScalarSUN/TwoPoint.hpp b/extras/Hadrons/Modules/MScalarSUN/TwoPoint.hpp index 5ec56714..e50e23d7 100644 --- a/extras/Hadrons/Modules/MScalarSUN/TwoPoint.hpp +++ b/extras/Hadrons/Modules/MScalarSUN/TwoPoint.hpp @@ -87,11 +87,11 @@ private: std::vector> mom_; }; -MODULE_REGISTER_NS(TwoPointSU2, TTwoPoint>, MScalarSUN); -MODULE_REGISTER_NS(TwoPointSU3, TTwoPoint>, MScalarSUN); -MODULE_REGISTER_NS(TwoPointSU4, TTwoPoint>, MScalarSUN); -MODULE_REGISTER_NS(TwoPointSU5, TTwoPoint>, MScalarSUN); -MODULE_REGISTER_NS(TwoPointSU6, TTwoPoint>, MScalarSUN); +MODULE_REGISTER_TMP(TwoPointSU2, TTwoPoint>, MScalarSUN); +MODULE_REGISTER_TMP(TwoPointSU3, TTwoPoint>, MScalarSUN); +MODULE_REGISTER_TMP(TwoPointSU4, TTwoPoint>, MScalarSUN); +MODULE_REGISTER_TMP(TwoPointSU5, TTwoPoint>, MScalarSUN); +MODULE_REGISTER_TMP(TwoPointSU6, TTwoPoint>, MScalarSUN); /****************************************************************************** * TTwoPoint implementation * diff --git a/extras/Hadrons/Modules/MSink/Point.cc b/extras/Hadrons/Modules/MSink/Point.cc new file mode 100644 index 00000000..fbb3b2f2 --- /dev/null +++ b/extras/Hadrons/Modules/MSink/Point.cc @@ -0,0 +1,9 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MSink; + +template class Grid::Hadrons::MSink::TPoint; +template class Grid::Hadrons::MSink::TPoint; + diff --git a/extras/Hadrons/Modules/MSink/Point.hpp b/extras/Hadrons/Modules/MSink/Point.hpp index ee824c03..1c14915a 100644 --- a/extras/Hadrons/Modules/MSink/Point.hpp +++ b/extras/Hadrons/Modules/MSink/Point.hpp @@ -72,8 +72,8 @@ private: std::string momphName_; }; -MODULE_REGISTER_NS(Point, TPoint, MSink); -MODULE_REGISTER_NS(ScalarPoint, TPoint, MSink); +MODULE_REGISTER_TMP(Point, TPoint, MSink); +MODULE_REGISTER_TMP(ScalarPoint, TPoint, MSink); /****************************************************************************** * TPoint implementation * diff --git a/extras/Hadrons/Modules/MSink/Smear.cc b/extras/Hadrons/Modules/MSink/Smear.cc new file mode 100644 index 00000000..8ce5f354 --- /dev/null +++ b/extras/Hadrons/Modules/MSink/Smear.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MSink; + +template class Grid::Hadrons::MSink::TSmear; + diff --git a/extras/Hadrons/Modules/MSink/Smear.hpp b/extras/Hadrons/Modules/MSink/Smear.hpp index e72dece0..82a21a80 100644 --- a/extras/Hadrons/Modules/MSink/Smear.hpp +++ b/extras/Hadrons/Modules/MSink/Smear.hpp @@ -70,7 +70,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(Smear, TSmear, MSink); +MODULE_REGISTER_TMP(Smear, TSmear, MSink); /****************************************************************************** * TSmear implementation * diff --git a/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.cc b/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.cc new file mode 100644 index 00000000..64588a5b --- /dev/null +++ b/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.cc @@ -0,0 +1,9 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MSolver; + +template class Grid::Hadrons::MSolver::TLocalCoherenceLanczos; +template class Grid::Hadrons::MSolver::TLocalCoherenceLanczos; + diff --git a/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp b/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp index 2b7c1049..4695d8e2 100644 --- a/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp +++ b/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp @@ -79,12 +79,8 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(LocalCoherenceLanczos, - ARG(TLocalCoherenceLanczos), - MSolver); -MODULE_REGISTER_NS(ZLocalCoherenceLanczos, - ARG(TLocalCoherenceLanczos), - MSolver); +MODULE_REGISTER_TMP(LocalCoherenceLanczos, ARG(TLocalCoherenceLanczos), MSolver); +MODULE_REGISTER_TMP(ZLocalCoherenceLanczos, ARG(TLocalCoherenceLanczos), MSolver); /****************************************************************************** * TLocalCoherenceLanczos implementation * diff --git a/extras/Hadrons/Modules/MSolver/RBPrecCG.cc b/extras/Hadrons/Modules/MSolver/RBPrecCG.cc new file mode 100644 index 00000000..4c0aa48e --- /dev/null +++ b/extras/Hadrons/Modules/MSolver/RBPrecCG.cc @@ -0,0 +1,9 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MSolver; + +template class Grid::Hadrons::MSolver::TRBPrecCG; +template class Grid::Hadrons::MSolver::TRBPrecCG; + diff --git a/extras/Hadrons/Modules/MSolver/RBPrecCG.hpp b/extras/Hadrons/Modules/MSolver/RBPrecCG.hpp index 6e4fbba6..e241161f 100644 --- a/extras/Hadrons/Modules/MSolver/RBPrecCG.hpp +++ b/extras/Hadrons/Modules/MSolver/RBPrecCG.hpp @@ -79,10 +79,8 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(RBPrecCG, - ARG(TRBPrecCG), MSolver); -MODULE_REGISTER_NS(ZRBPrecCG, - ARG(TRBPrecCG), MSolver); +MODULE_REGISTER_TMP(RBPrecCG, ARG(TRBPrecCG), MSolver); +MODULE_REGISTER_TMP(ZRBPrecCG, ARG(TRBPrecCG), MSolver); /****************************************************************************** * TRBPrecCG template implementation * diff --git a/extras/Hadrons/Modules/MSource/Point.cc b/extras/Hadrons/Modules/MSource/Point.cc new file mode 100644 index 00000000..f16c43d2 --- /dev/null +++ b/extras/Hadrons/Modules/MSource/Point.cc @@ -0,0 +1,9 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MSource; + +template class Grid::Hadrons::MSource::TPoint; +template class Grid::Hadrons::MSource::TPoint; + diff --git a/extras/Hadrons/Modules/MSource/Point.hpp b/extras/Hadrons/Modules/MSource/Point.hpp index ac6df252..50297a8b 100644 --- a/extras/Hadrons/Modules/MSource/Point.hpp +++ b/extras/Hadrons/Modules/MSource/Point.hpp @@ -79,8 +79,8 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(Point, TPoint, MSource); -MODULE_REGISTER_NS(ScalarPoint, TPoint, MSource); +MODULE_REGISTER_TMP(Point, TPoint, MSource); +MODULE_REGISTER_TMP(ScalarPoint, TPoint, MSource); /****************************************************************************** * TPoint template implementation * diff --git a/extras/Hadrons/Modules/MSource/SeqConserved.cc b/extras/Hadrons/Modules/MSource/SeqConserved.cc new file mode 100644 index 00000000..9db92c98 --- /dev/null +++ b/extras/Hadrons/Modules/MSource/SeqConserved.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MSource; + +template class Grid::Hadrons::MSource::TSeqConserved; + diff --git a/extras/Hadrons/Modules/MSource/SeqConserved.hpp b/extras/Hadrons/Modules/MSource/SeqConserved.hpp index d7780528..a5d21995 100644 --- a/extras/Hadrons/Modules/MSource/SeqConserved.hpp +++ b/extras/Hadrons/Modules/MSource/SeqConserved.hpp @@ -103,7 +103,7 @@ private: std::string SeqmomphName_; }; -MODULE_REGISTER_NS(SeqConserved, TSeqConserved, MSource); +MODULE_REGISTER_TMP(SeqConserved, TSeqConserved, MSource); /****************************************************************************** diff --git a/extras/Hadrons/Modules/MSource/SeqGamma.cc b/extras/Hadrons/Modules/MSource/SeqGamma.cc new file mode 100644 index 00000000..744ad837 --- /dev/null +++ b/extras/Hadrons/Modules/MSource/SeqGamma.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MSource; + +template class Grid::Hadrons::MSource::TSeqGamma; + diff --git a/extras/Hadrons/Modules/MSource/SeqGamma.hpp b/extras/Hadrons/Modules/MSource/SeqGamma.hpp index 40eda29f..9d99b5b3 100644 --- a/extras/Hadrons/Modules/MSource/SeqGamma.hpp +++ b/extras/Hadrons/Modules/MSource/SeqGamma.hpp @@ -90,7 +90,7 @@ private: std::string momphName_, tName_; }; -MODULE_REGISTER_NS(SeqGamma, TSeqGamma, MSource); +MODULE_REGISTER_TMP(SeqGamma, TSeqGamma, MSource); /****************************************************************************** * TSeqGamma implementation * diff --git a/extras/Hadrons/Modules/MSource/Wall.cc b/extras/Hadrons/Modules/MSource/Wall.cc new file mode 100644 index 00000000..42e19a8f --- /dev/null +++ b/extras/Hadrons/Modules/MSource/Wall.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MSource; + +template class Grid::Hadrons::MSource::TWall; + diff --git a/extras/Hadrons/Modules/MSource/Wall.hpp b/extras/Hadrons/Modules/MSource/Wall.hpp index 5853b11a..9494e739 100644 --- a/extras/Hadrons/Modules/MSource/Wall.hpp +++ b/extras/Hadrons/Modules/MSource/Wall.hpp @@ -84,7 +84,7 @@ private: std::string momphName_, tName_; }; -MODULE_REGISTER_NS(Wall, TWall, MSource); +MODULE_REGISTER_TMP(Wall, TWall, MSource); /****************************************************************************** * TWall implementation * diff --git a/extras/Hadrons/Modules/MSource/Z2.cc b/extras/Hadrons/Modules/MSource/Z2.cc new file mode 100644 index 00000000..e655e253 --- /dev/null +++ b/extras/Hadrons/Modules/MSource/Z2.cc @@ -0,0 +1,9 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MSource; + +template class Grid::Hadrons::MSource::TZ2; +template class Grid::Hadrons::MSource::TZ2; + diff --git a/extras/Hadrons/Modules/MSource/Z2.hpp b/extras/Hadrons/Modules/MSource/Z2.hpp index 4414e37f..065d5fdf 100644 --- a/extras/Hadrons/Modules/MSource/Z2.hpp +++ b/extras/Hadrons/Modules/MSource/Z2.hpp @@ -85,8 +85,8 @@ private: std::string tName_; }; -MODULE_REGISTER_NS(Z2, TZ2, MSource); -MODULE_REGISTER_NS(ScalarZ2, TZ2, MSource); +MODULE_REGISTER_TMP(Z2, TZ2, MSource); +MODULE_REGISTER_TMP(ScalarZ2, TZ2, MSource); /****************************************************************************** * TZ2 template implementation * diff --git a/extras/Hadrons/Modules/MUtilities/TestSeqConserved.cc b/extras/Hadrons/Modules/MUtilities/TestSeqConserved.cc new file mode 100644 index 00000000..94d2c946 --- /dev/null +++ b/extras/Hadrons/Modules/MUtilities/TestSeqConserved.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MUtilities; + +template class Grid::Hadrons::MUtilities::TTestSeqConserved; + diff --git a/extras/Hadrons/Modules/MUtilities/TestSeqConserved.hpp b/extras/Hadrons/Modules/MUtilities/TestSeqConserved.hpp index 6ee1e3c2..bf2370eb 100644 --- a/extras/Hadrons/Modules/MUtilities/TestSeqConserved.hpp +++ b/extras/Hadrons/Modules/MUtilities/TestSeqConserved.hpp @@ -88,7 +88,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(TestSeqConserved, TTestSeqConserved, MUtilities); +MODULE_REGISTER_TMP(TestSeqConserved, TTestSeqConserved, MUtilities); /****************************************************************************** * TTestSeqConserved implementation * diff --git a/extras/Hadrons/Modules/MUtilities/TestSeqGamma.cc b/extras/Hadrons/Modules/MUtilities/TestSeqGamma.cc new file mode 100644 index 00000000..59635c5d --- /dev/null +++ b/extras/Hadrons/Modules/MUtilities/TestSeqGamma.cc @@ -0,0 +1,8 @@ +#include + +using namespace Grid; +using namespace Hadrons; +using namespace MUtilities; + +template class Grid::Hadrons::MUtilities::TTestSeqGamma; + diff --git a/extras/Hadrons/Modules/MUtilities/TestSeqGamma.hpp b/extras/Hadrons/Modules/MUtilities/TestSeqGamma.hpp index df35d887..9284a638 100644 --- a/extras/Hadrons/Modules/MUtilities/TestSeqGamma.hpp +++ b/extras/Hadrons/Modules/MUtilities/TestSeqGamma.hpp @@ -72,7 +72,7 @@ protected: virtual void execute(void); }; -MODULE_REGISTER_NS(TestSeqGamma, TTestSeqGamma, MUtilities); +MODULE_REGISTER_TMP(TestSeqGamma, TTestSeqGamma, MUtilities); /****************************************************************************** * TTestSeqGamma implementation * diff --git a/extras/Hadrons/Modules/templates/Module_in_NS.hpp.template b/extras/Hadrons/Modules/templates/Module_in_NS.hpp.template index ea77b12a..f645d046 100644 --- a/extras/Hadrons/Modules/templates/Module_in_NS.hpp.template +++ b/extras/Hadrons/Modules/templates/Module_in_NS.hpp.template @@ -35,7 +35,7 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(___FILEBASENAME___, T___FILEBASENAME___, ___NAMESPACE___); +MODULE_REGISTER(___FILEBASENAME___, T___FILEBASENAME___, ___NAMESPACE___); END_MODULE_NAMESPACE diff --git a/extras/Hadrons/Modules/templates/Module_tmp_in_NS.hpp.template b/extras/Hadrons/Modules/templates/Module_tmp_in_NS.hpp.template index b79c0ad3..48df254b 100644 --- a/extras/Hadrons/Modules/templates/Module_tmp_in_NS.hpp.template +++ b/extras/Hadrons/Modules/templates/Module_tmp_in_NS.hpp.template @@ -36,7 +36,7 @@ public: virtual void execute(void); }; -MODULE_REGISTER_NS(___FILEBASENAME___, T___FILEBASENAME___, ___NAMESPACE___); +MODULE_REGISTER_TMP(___FILEBASENAME___, T___FILEBASENAME___, ___NAMESPACE___); /****************************************************************************** * T___FILEBASENAME___ implementation * diff --git a/extras/Hadrons/make_module_inst.sh b/extras/Hadrons/make_module_inst.sh new file mode 100755 index 00000000..32ead3f0 --- /dev/null +++ b/extras/Hadrons/make_module_inst.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +for m in `find Modules -name '*.hpp' -type f -print`; do + echo "====== ${m}" + CCFILE=`echo $m | sed -E s/\.hpp/.cc/g` + NS=`echo $m | awk -F '/' '{print $2}'` + NMOD=`grep -E 'MODULE_REGISTER_TMP.+<.+>.?' $m | wc -l` + if [ ! -e ${CCFILE} ] && (( NMOD != 0 )); then + echo "#include " >> ${CCFILE} + echo "" >> ${CCFILE} + echo "using namespace Grid;" >> ${CCFILE} + echo "using namespace Hadrons;" >> ${CCFILE} + echo "using namespace ${NS};" >> ${CCFILE} + echo "" >> ${CCFILE} + for i in `grep -E 'MODULE_REGISTER_TMP.+<.+>.?' $m | sed -E 's/ +//g'` + do + TMPARG=`echo ${i} | grep -oE 'ARG\(.+>\)' | sed -E 's/^ARG\(//g' | sed -E 's/\)$//g'` + SUB=`echo ${i} | sed -E 's/ARG\(.+>\)/@arg@/g' | sed -E 's/,/|/g'` + SUB=`echo ${SUB} | sed -E 's/.+\(//g' | sed -E 's/\);//g'` + SUB=`echo ${SUB} | sed -E "s/@arg@/${TMPARG}/g"` + NAME=`echo ${SUB} | awk -F '|' '{print $1}'` + TYPE=`echo ${SUB} | awk -F '|' '{print $2}'` + echo "template class Grid::Hadrons::${NS}::${TYPE};" >> ${CCFILE} + done + echo "" >> ${CCFILE} + fi +done \ No newline at end of file diff --git a/extras/Hadrons/modules.inc b/extras/Hadrons/modules.inc index 5932cc89..ec954bbe 100644 --- a/extras/Hadrons/modules.inc +++ b/extras/Hadrons/modules.inc @@ -1,14 +1,47 @@ modules_cc =\ Modules/MContraction/WeakHamiltonianEye.cc \ + Modules/MContraction/Baryon.cc \ + Modules/MContraction/Meson.cc \ Modules/MContraction/WeakNeutral4ptDisc.cc \ Modules/MContraction/WeakHamiltonianNonEye.cc \ + Modules/MContraction/WardIdentity.cc \ + Modules/MContraction/DiscLoop.cc \ + Modules/MContraction/Gamma3pt.cc \ + Modules/MFermion/GaugeProp.cc \ + Modules/MSource/Point.cc \ + Modules/MSource/Wall.cc \ + Modules/MSource/SeqConserved.cc \ + Modules/MSource/SeqGamma.cc \ + Modules/MSource/Z2.cc \ + Modules/MSink/Point.cc \ + Modules/MSink/Smear.cc \ + Modules/MSolver/RBPrecCG.cc \ + Modules/MSolver/LocalCoherenceLanczos.cc \ Modules/MGauge/Unit.cc \ Modules/MGauge/StochEm.cc \ Modules/MGauge/Random.cc \ Modules/MGauge/FundtoHirep.cc \ + Modules/MUtilities/TestSeqGamma.cc \ + Modules/MUtilities/TestSeqConserved.cc \ + Modules/MLoop/NoiseLoop.cc \ Modules/MScalar/FreeProp.cc \ Modules/MScalar/ChargedProp.cc \ - Modules/MIO/LoadNersc.cc + Modules/MAction/Wilson.cc \ + Modules/MAction/ZMobiusDWF.cc \ + Modules/MAction/WilsonClover.cc \ + Modules/MAction/DWF.cc \ + Modules/MScalarSUN/TrPhi.cc \ + Modules/MScalarSUN/TrMag.cc \ + Modules/MScalarSUN/TrKinetic.cc \ + Modules/MScalarSUN/EMT.cc \ + Modules/MScalarSUN/ShiftProbe.cc \ + Modules/MScalarSUN/TransProj.cc \ + Modules/MScalarSUN/TwoPoint.cc \ + Modules/MScalarSUN/Div.cc \ + Modules/MIO/LoadEigenPack.cc \ + Modules/MIO/LoadBinary.cc \ + Modules/MIO/LoadNersc.cc \ + Modules/MIO/LoadCoarseEigenPack.cc modules_hpp =\ Modules/MContraction/Baryon.hpp \