mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-27 22:25:56 +01:00
remove namespace QCD from directory HMC
This commit is contained in:
parent
ad01290545
commit
9210b0aa6e
@ -31,7 +31,6 @@ directory
|
|||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
using namespace Grid::QCD;
|
|
||||||
|
|
||||||
Grid_init(&argc, &argv);
|
Grid_init(&argc, &argv);
|
||||||
int threads = GridThread::GetThreads();
|
int threads = GridThread::GetThreads();
|
||||||
|
@ -34,19 +34,18 @@ directory
|
|||||||
#define MIXED_PRECISION
|
#define MIXED_PRECISION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Grid{
|
NAMESPACE_BEGIN(Grid);
|
||||||
namespace QCD{
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Need a plan for gauge field update for mixed precision in HMC (2x speed up)
|
* Need a plan for gauge field update for mixed precision in HMC (2x speed up)
|
||||||
* -- Store the single prec action operator.
|
* -- Store the single prec action operator.
|
||||||
* -- Clone the gauge field from the operator function argument.
|
* -- Clone the gauge field from the operator function argument.
|
||||||
* -- Build the mixed precision operator dynamically from the passed operator and single prec clone.
|
* -- Build the mixed precision operator dynamically from the passed operator and single prec clone.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<class FermionOperatorD, class FermionOperatorF, class SchurOperatorD, class SchurOperatorF>
|
template<class FermionOperatorD, class FermionOperatorF, class SchurOperatorD, class SchurOperatorF>
|
||||||
class MixedPrecisionConjugateGradientOperatorFunction : public OperatorFunction<typename FermionOperatorD::FermionField> {
|
class MixedPrecisionConjugateGradientOperatorFunction : public OperatorFunction<typename FermionOperatorD::FermionField> {
|
||||||
public:
|
public:
|
||||||
typedef typename FermionOperatorD::FermionField FieldD;
|
typedef typename FermionOperatorD::FermionField FieldD;
|
||||||
typedef typename FermionOperatorF::FermionField FieldF;
|
typedef typename FermionOperatorF::FermionField FieldF;
|
||||||
|
|
||||||
@ -162,12 +161,12 @@ namespace Grid{
|
|||||||
std::cout << GridLogMessage << "Calling mixed precision Conjugate Gradient" <<std::endl;
|
std::cout << GridLogMessage << "Calling mixed precision Conjugate Gradient" <<std::endl;
|
||||||
MPCG(src,psi);
|
MPCG(src,psi);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}};
|
|
||||||
|
NAMESPACE_END(Grid);
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
using namespace Grid::QCD;
|
|
||||||
|
|
||||||
Grid_init(&argc, &argv);
|
Grid_init(&argc, &argv);
|
||||||
int threads = GridThread::GetThreads();
|
int threads = GridThread::GetThreads();
|
||||||
|
@ -34,19 +34,18 @@ directory
|
|||||||
#define MIXED_PRECISION
|
#define MIXED_PRECISION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Grid{
|
NAMESPACE_BEGIN(Grid);
|
||||||
namespace QCD{
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Need a plan for gauge field update for mixed precision in HMC (2x speed up)
|
* Need a plan for gauge field update for mixed precision in HMC (2x speed up)
|
||||||
* -- Store the single prec action operator.
|
* -- Store the single prec action operator.
|
||||||
* -- Clone the gauge field from the operator function argument.
|
* -- Clone the gauge field from the operator function argument.
|
||||||
* -- Build the mixed precision operator dynamically from the passed operator and single prec clone.
|
* -- Build the mixed precision operator dynamically from the passed operator and single prec clone.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template<class FermionOperatorD, class FermionOperatorF, class SchurOperatorD, class SchurOperatorF>
|
template<class FermionOperatorD, class FermionOperatorF, class SchurOperatorD, class SchurOperatorF>
|
||||||
class MixedPrecisionConjugateGradientOperatorFunction : public OperatorFunction<typename FermionOperatorD::FermionField> {
|
class MixedPrecisionConjugateGradientOperatorFunction : public OperatorFunction<typename FermionOperatorD::FermionField> {
|
||||||
public:
|
public:
|
||||||
typedef typename FermionOperatorD::FermionField FieldD;
|
typedef typename FermionOperatorD::FermionField FieldD;
|
||||||
typedef typename FermionOperatorF::FermionField FieldF;
|
typedef typename FermionOperatorF::FermionField FieldF;
|
||||||
|
|
||||||
@ -145,12 +144,13 @@ namespace Grid{
|
|||||||
std::cout << GridLogMessage << "Calling mixed precision Conjugate Gradient" <<std::endl;
|
std::cout << GridLogMessage << "Calling mixed precision Conjugate Gradient" <<std::endl;
|
||||||
MPCG(src,psi);
|
MPCG(src,psi);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}};
|
|
||||||
|
NAMESPACE_END(Grid);
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
using namespace Grid::QCD;
|
|
||||||
|
|
||||||
Grid_init(&argc, &argv);
|
Grid_init(&argc, &argv);
|
||||||
int threads = GridThread::GetThreads();
|
int threads = GridThread::GetThreads();
|
||||||
|
@ -31,7 +31,6 @@ directory
|
|||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
using namespace Grid::QCD;
|
|
||||||
|
|
||||||
Grid_init(&argc, &argv);
|
Grid_init(&argc, &argv);
|
||||||
int threads = GridThread::GetThreads();
|
int threads = GridThread::GetThreads();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user