mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Namespace
This commit is contained in:
parent
fde2e07bf4
commit
cc349c6512
@ -25,16 +25,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
See the full license in the file "LICENSE" in the top level distribution
|
See the full license in the file "LICENSE" in the top level distribution
|
||||||
directory
|
directory
|
||||||
*************************************************************************************/
|
*************************************************************************************/
|
||||||
/* END LEGAL */
|
/* END LEGAL */
|
||||||
#ifndef GRID_GENERIC_HMC_RUNNER
|
#ifndef GRID_GENERIC_HMC_RUNNER
|
||||||
#define GRID_GENERIC_HMC_RUNNER
|
#define GRID_GENERIC_HMC_RUNNER
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace Grid {
|
NAMESPACE_BEGIN(Grid);
|
||||||
namespace QCD {
|
|
||||||
|
|
||||||
|
|
||||||
// very ugly here but possibly resolved if we had a base Reader class
|
// very ugly here but possibly resolved if we had a base Reader class
|
||||||
template < class ReaderClass >
|
template < class ReaderClass >
|
||||||
@ -44,12 +42,11 @@ public:
|
|||||||
virtual void initialize(ReaderClass& ) = 0;
|
virtual void initialize(ReaderClass& ) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <class Implementation,
|
template <class Implementation,
|
||||||
template <typename, typename, typename> class Integrator,
|
template <typename, typename, typename> class Integrator,
|
||||||
class RepresentationsPolicy = NoHirep, class ReaderClass = XmlReader>
|
class RepresentationsPolicy = NoHirep, class ReaderClass = XmlReader>
|
||||||
class HMCWrapperTemplate: public HMCRunnerBase<ReaderClass> {
|
class HMCWrapperTemplate: public HMCRunnerBase<ReaderClass> {
|
||||||
public:
|
public:
|
||||||
INHERIT_FIELD_TYPES(Implementation);
|
INHERIT_FIELD_TYPES(Implementation);
|
||||||
typedef Implementation ImplPolicy; // visible from outside
|
typedef Implementation ImplPolicy; // visible from outside
|
||||||
template <typename S = NoSmearing<Implementation> >
|
template <typename S = NoSmearing<Implementation> >
|
||||||
@ -88,8 +85,8 @@ class HMCWrapperTemplate: public HMCRunnerBase<ReaderClass> {
|
|||||||
arg != "CheckpointStart") {
|
arg != "CheckpointStart") {
|
||||||
std::cout << GridLogError << "Unrecognized option in --StartingType\n";
|
std::cout << GridLogError << "Unrecognized option in --StartingType\n";
|
||||||
std::cout
|
std::cout
|
||||||
<< GridLogError
|
<< GridLogError
|
||||||
<< "Valid [HotStart, ColdStart, TepidStart, CheckpointStart]\n";
|
<< "Valid [HotStart, ColdStart, TepidStart, CheckpointStart]\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
Parameters.StartingType = arg;
|
Parameters.StartingType = arg;
|
||||||
@ -134,7 +131,7 @@ class HMCWrapperTemplate: public HMCRunnerBase<ReaderClass> {
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <class SmearingPolicy>
|
template <class SmearingPolicy>
|
||||||
void Runner(SmearingPolicy &Smearing) {
|
void Runner(SmearingPolicy &Smearing) {
|
||||||
auto UGrid = Resources.GetCartesian();
|
auto UGrid = Resources.GetCartesian();
|
||||||
@ -160,8 +157,8 @@ class HMCWrapperTemplate: public HMCRunnerBase<ReaderClass> {
|
|||||||
} else if (Parameters.StartingType == "CheckpointStart") {
|
} else if (Parameters.StartingType == "CheckpointStart") {
|
||||||
// CheckpointRestart
|
// CheckpointRestart
|
||||||
Resources.GetCheckPointer()->CheckpointRestore(Parameters.StartTrajectory, U,
|
Resources.GetCheckPointer()->CheckpointRestore(Parameters.StartTrajectory, U,
|
||||||
Resources.GetSerialRNG(),
|
Resources.GetSerialRNG(),
|
||||||
Resources.GetParallelRNG());
|
Resources.GetParallelRNG());
|
||||||
}
|
}
|
||||||
|
|
||||||
Smearing.set_Field(U);
|
Smearing.set_Field(U);
|
||||||
@ -198,22 +195,21 @@ using ConjugateHMCRunnerD = HMCWrapperTemplate<ConjugateGimplD, Integrator>;
|
|||||||
template <class RepresentationsPolicy,
|
template <class RepresentationsPolicy,
|
||||||
template <typename, typename, typename> class Integrator>
|
template <typename, typename, typename> class Integrator>
|
||||||
using GenericHMCRunnerHirep =
|
using GenericHMCRunnerHirep =
|
||||||
HMCWrapperTemplate<PeriodicGimplR, Integrator, RepresentationsPolicy>;
|
HMCWrapperTemplate<PeriodicGimplR, Integrator, RepresentationsPolicy>;
|
||||||
|
|
||||||
template <class Implementation, class RepresentationsPolicy,
|
template <class Implementation, class RepresentationsPolicy,
|
||||||
template <typename, typename, typename> class Integrator>
|
template <typename, typename, typename> class Integrator>
|
||||||
using GenericHMCRunnerTemplate = HMCWrapperTemplate<Implementation, Integrator, RepresentationsPolicy>;
|
using GenericHMCRunnerTemplate = HMCWrapperTemplate<Implementation, Integrator, RepresentationsPolicy>;
|
||||||
|
|
||||||
typedef HMCWrapperTemplate<ScalarImplR, MinimumNorm2, ScalarFields>
|
typedef HMCWrapperTemplate<ScalarImplR, MinimumNorm2, ScalarFields>
|
||||||
ScalarGenericHMCRunner;
|
ScalarGenericHMCRunner;
|
||||||
|
|
||||||
typedef HMCWrapperTemplate<ScalarAdjImplR, MinimumNorm2, ScalarMatrixFields>
|
typedef HMCWrapperTemplate<ScalarAdjImplR, MinimumNorm2, ScalarMatrixFields>
|
||||||
ScalarAdjGenericHMCRunner;
|
ScalarAdjGenericHMCRunner;
|
||||||
|
|
||||||
template <int Colours>
|
template <int Colours>
|
||||||
using ScalarNxNAdjGenericHMCRunner = HMCWrapperTemplate < ScalarNxNAdjImplR<Colours>, MinimumNorm2, ScalarNxNMatrixFields<Colours> >;
|
using ScalarNxNAdjGenericHMCRunner = HMCWrapperTemplate < ScalarNxNAdjImplR<Colours>, MinimumNorm2, ScalarNxNMatrixFields<Colours> >;
|
||||||
|
|
||||||
} // namespace QCD
|
NAMESPACE_END(Grid);
|
||||||
} // namespace Grid
|
|
||||||
|
|
||||||
#endif // GRID_GENERIC_HMC_RUNNER
|
#endif // GRID_GENERIC_HMC_RUNNER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user