From d74c21a386dc8987131630988894de59af1d37de Mon Sep 17 00:00:00 2001 From: paboyle Date: Mon, 15 Jan 2018 09:37:58 +0000 Subject: [PATCH] GLobal edit for QCD namespace removal & NAMESPACE macros --- benchmarks/Benchmark_ITT.cc | 34 +++++++++---------- benchmarks/Benchmark_comms.cc | 2 +- benchmarks/Benchmark_dwf.cc | 2 +- benchmarks/Benchmark_dwf_sweep.cc | 2 +- benchmarks/Benchmark_gparity.cc | 2 +- benchmarks/Benchmark_memory_asynch.cc | 2 +- benchmarks/Benchmark_memory_bandwidth.cc | 2 +- benchmarks/Benchmark_mooee.cc | 2 +- benchmarks/Benchmark_staggered.cc | 2 +- benchmarks/Benchmark_su3.cc | 2 +- benchmarks/Benchmark_wilson.cc | 2 +- benchmarks/Benchmark_wilson_sweep.cc | 2 +- benchmarks/simple_su3_expr.cc | 2 +- benchmarks/simple_su3_test.cc | 2 +- configure.ac | 1 + extras/Hadrons/Application.cc | 2 +- extras/Hadrons/Environment.cc | 2 +- extras/Hadrons/Exceptions.cc | 2 +- extras/Hadrons/Global.cc | 2 +- extras/Hadrons/Global.hpp | 2 +- extras/Hadrons/HadronsXmlRun.cc | 2 +- extras/Hadrons/HadronsXmlSchedule.cc | 2 +- extras/Hadrons/Module.cc | 2 +- extras/Hadrons/VirtualMachine.cc | 2 +- lib/algorithms/approx/Zolotarev.cc | 8 +++-- lib/parallelIO/MetaData.h | 8 ++--- .../action/pseudofermion/TwoFlavourRatio.h | 2 +- lib/qcd/action/scalar/ScalarAction.h | 8 ++--- lib/qcd/action/scalar/ScalarImpl.h | 8 ++--- .../action/scalar/ScalarInteractionAction.h | 4 +-- lib/qcd/hmc/HMCResourceManager.h | 6 ++-- lib/qcd/hmc/HMCRunnerModule.h | 30 ++++++++-------- lib/qcd/hmc/HMC_GridModules.h | 3 -- lib/qcd/modules/ActionModules.h | 22 +++--------- lib/qcd/modules/FermionOperatorModules.h | 18 +++++----- lib/qcd/modules/ObservableModules.h | 12 +++---- lib/qcd/spin/Dirac.h | 6 ++-- lib/util/Init.cc | 16 ++++----- tests/IO/Test_ildg_io.cc | 2 +- tests/IO/Test_ildg_read.cc | 2 +- tests/IO/Test_nersc_io.cc | 2 +- tests/IO/Test_nersc_read.cc | 2 +- tests/IO/Test_serialisation.cc | 2 +- tests/Test_cayley_even_odd_vec.cc | 2 +- tests/Test_cshift.cc | 2 +- tests/Test_dwf_mixedcg_prec.cc | 2 +- tests/Test_dwf_mixedcg_prec_halfcomms.cc | 2 +- tests/Test_simd.cc | 2 +- tests/Test_stencil.cc | 2 +- tests/core/Test_GaugeAction.cc | 2 +- tests/core/Test_RectPlaq.cc | 2 +- tests/core/Test_cf_coarsen_support.cc | 2 +- tests/core/Test_checker.cc | 2 +- tests/core/Test_contfrac_even_odd.cc | 2 +- tests/core/Test_cshift_red_black.cc | 2 +- tests/core/Test_cshift_red_black_rotate.cc | 2 +- tests/core/Test_cshift_rotate.cc | 2 +- tests/core/Test_dwf_eofa_even_odd.cc | 2 +- tests/core/Test_dwf_even_odd.cc | 2 +- tests/core/Test_dwf_rb5d.cc | 2 +- tests/core/Test_fft.cc | 2 +- tests/core/Test_fft_gfix.cc | 2 +- tests/core/Test_fftf.cc | 2 +- tests/core/Test_gparity.cc | 2 +- tests/core/Test_gpwilson_even_odd.cc | 2 +- tests/core/Test_lie_generators.cc | 2 +- tests/core/Test_main.cc | 2 +- tests/core/Test_mobius_eofa_even_odd.cc | 2 +- tests/core/Test_mobius_even_odd.cc | 2 +- tests/core/Test_poisson_fft.cc | 2 +- tests/core/Test_quenched_update.cc | 2 +- tests/core/Test_rng.cc | 2 +- tests/core/Test_rng_fixed.cc | 2 +- tests/core/Test_staggered.cc | 2 +- tests/core/Test_staggered5D.cc | 2 +- tests/core/Test_staggered5Dvec.cc | 2 +- tests/core/Test_wilson_even_odd.cc | 2 +- .../core/Test_wilson_twisted_mass_even_odd.cc | 2 +- tests/core/Test_zmobius_even_odd.cc | 2 +- tests/debug/Test_cayley_cg.cc | 2 +- tests/debug/Test_cayley_coarsen_support.cc | 2 +- tests/debug/Test_cayley_even_odd.cc | 2 +- tests/debug/Test_cayley_ldop_cr.cc | 2 +- tests/debug/Test_cheby.cc | 2 +- tests/debug/Test_heatbath_dwf_eofa.cc | 2 +- tests/debug/Test_heatbath_dwf_eofa_gparity.cc | 2 +- tests/debug/Test_heatbath_mobius_eofa.cc | 2 +- .../Test_heatbath_mobius_eofa_gparity.cc | 2 +- tests/debug/Test_reweight_dwf_eofa.cc | 2 +- tests/debug/Test_reweight_dwf_eofa_gparity.cc | 2 +- tests/debug/Test_reweight_mobius_eofa.cc | 2 +- .../Test_reweight_mobius_eofa_gparity.cc | 2 +- tests/debug/Test_zmm.cc | 2 +- tests/debug/test_Grid_jacobi.cc | 2 +- tests/forces/Test_contfrac_force.cc | 2 +- tests/forces/Test_dwf_force.cc | 2 +- tests/forces/Test_dwf_force_eofa.cc | 2 +- tests/forces/Test_dwf_gpforce.cc | 2 +- tests/forces/Test_dwf_gpforce_eofa.cc | 2 +- tests/forces/Test_gp_rect_force.cc | 2 +- tests/forces/Test_gpdwf_force.cc | 2 +- tests/forces/Test_gpwilson_force.cc | 2 +- tests/forces/Test_laplacian_force.cc | 2 +- tests/forces/Test_mobius_force.cc | 2 +- tests/forces/Test_mobius_force_eofa.cc | 2 +- tests/forces/Test_mobius_gpforce_eofa.cc | 2 +- tests/forces/Test_partfrac_force.cc | 2 +- tests/forces/Test_rect_force.cc | 2 +- tests/forces/Test_wilson_force.cc | 2 +- tests/forces/Test_zmobius_force.cc | 2 +- .../hadrons/Test_hadrons_3pt_contractions.cc | 2 +- .../hadrons/Test_hadrons_conserved_current.cc | 2 +- .../Test_hadrons_meson_conserved_3pt.cc | 2 +- tests/hadrons/Test_hadrons_seq_gamma.cc | 2 +- tests/hmc/Test_hmc_EODWFRatio.cc | 2 +- tests/hmc/Test_hmc_EODWFRatioLsVectorised.cc | 2 +- tests/hmc/Test_hmc_EODWFRatio_Gparity.cc | 2 +- tests/hmc/Test_hmc_EOMobiusRatio.cc | 2 +- .../hmc/Test_hmc_EOMobiusRatioManyFlavour.cc | 2 +- tests/hmc/Test_hmc_EOWilsonFermionGauge.cc | 2 +- tests/hmc/Test_hmc_EOWilsonRatio.cc | 2 +- tests/hmc/Test_hmc_Factories.cc | 2 +- tests/hmc/Test_hmc_GparityIwasakiGauge.cc | 2 +- tests/hmc/Test_hmc_GparityWilsonGauge.cc | 2 +- tests/hmc/Test_hmc_IwasakiGauge.cc | 2 +- tests/hmc/Test_hmc_RectGauge.cc | 2 +- tests/hmc/Test_hmc_ScalarAction.cc | 2 +- tests/hmc/Test_hmc_ScalarActionNxN.cc | 2 +- .../hmc/Test_hmc_WilsonAdjointFermionGauge.cc | 2 +- tests/hmc/Test_hmc_WilsonFermionGauge.cc | 2 +- tests/hmc/Test_hmc_WilsonGauge.cc | 2 +- ..._WilsonMixedRepresentationsFermionGauge.cc | 2 +- tests/hmc/Test_hmc_WilsonRatio.cc | 2 +- tests/hmc/Test_hmc_WilsonTMFermionGauge.cc | 2 +- ...hmc_WilsonTwoIndexSymmetricFermionGauge.cc | 2 +- tests/hmc/Test_multishift_sqrt.cc | 2 +- tests/hmc/Test_remez.cc | 2 +- tests/hmc/Test_rhmc_EOWilson1p1.cc | 2 +- tests/hmc/Test_rhmc_EOWilsonRatio.cc | 2 +- tests/hmc/Test_rhmc_Wilson1p1.cc | 2 +- tests/hmc/Test_rhmc_WilsonRatio.cc | 2 +- tests/lanczos/Test_dwf_compressed_lanczos.cc | 2 +- .../Test_dwf_compressed_lanczos_reorg.cc | 2 +- ..._dwf_compressed_lanczos_reorg_synthetic.cc | 2 +- tests/lanczos/Test_dwf_lanczos.cc | 2 +- tests/lanczos/Test_synthetic_lanczos.cc | 2 +- tests/lanczos/Test_wilson_lanczos.cc | 2 +- tests/qdpxx/Test_qdpxx_munprec.cc | 2 +- tests/qdpxx/Test_qdpxx_stag.cc | 4 +-- tests/smearing/Test_WilsonFlow.cc | 2 +- tests/solver/Test_cf_cr_unprec.cc | 2 +- tests/solver/Test_contfrac_cg.cc | 2 +- tests/solver/Test_dwf_cg_prec.cc | 2 +- tests/solver/Test_dwf_cg_prec_LsVec.cc | 2 +- tests/solver/Test_dwf_cg_schur.cc | 2 +- tests/solver/Test_dwf_cg_unprec.cc | 2 +- tests/solver/Test_dwf_cr_unprec.cc | 2 +- tests/solver/Test_dwf_fpgcr.cc | 2 +- tests/solver/Test_dwf_hdcr.cc | 2 +- tests/solver/Test_dwf_mrhs_cg.cc | 2 +- tests/solver/Test_dwf_mrhs_cg_mpi.cc | 2 +- tests/solver/Test_dwf_mrhs_cg_mpieo.cc | 2 +- tests/solver/Test_laplacian.cc | 2 +- tests/solver/Test_split_grid.cc | 2 +- tests/solver/Test_staggered_block_cg_prec.cc | 2 +- .../solver/Test_staggered_block_cg_unprec.cc | 2 +- tests/solver/Test_staggered_cg_prec.cc | 2 +- tests/solver/Test_staggered_cg_schur.cc | 2 +- tests/solver/Test_staggered_cg_unprec.cc | 2 +- tests/solver/Test_wilson_cg_prec.cc | 2 +- tests/solver/Test_wilson_cg_schur.cc | 2 +- tests/solver/Test_wilson_cg_unprec.cc | 2 +- tests/solver/Test_wilson_cr_unprec.cc | 2 +- tests/solver/Test_zmobius_cg_prec.cc | 2 +- tests/testu01/Test_smallcrush.cc | 2 +- 175 files changed, 245 insertions(+), 261 deletions(-) diff --git a/benchmarks/Benchmark_ITT.cc b/benchmarks/Benchmark_ITT.cc index 666e4830..b637679a 100644 --- a/benchmarks/Benchmark_ITT.cc +++ b/benchmarks/Benchmark_ITT.cc @@ -30,7 +30,7 @@ Author: paboyle using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; typedef WilsonFermion5D WilsonFermion5DR; typedef WilsonFermion5D WilsonFermion5DF; @@ -369,19 +369,19 @@ public: #endif controls Cases [] = { #ifdef AVX512 - { QCD::WilsonKernelsStatic::OptInlineAsm , QCD::WilsonKernelsStatic::CommsThenCompute ,CartesianCommunicator::CommunicatorPolicySequential }, - { QCD::WilsonKernelsStatic::OptInlineAsm , QCD::WilsonKernelsStatic::CommsAndCompute ,CartesianCommunicator::CommunicatorPolicySequential }, + { WilsonKernelsStatic::OptInlineAsm , WilsonKernelsStatic::CommsThenCompute ,CartesianCommunicator::CommunicatorPolicySequential }, + { WilsonKernelsStatic::OptInlineAsm , WilsonKernelsStatic::CommsAndCompute ,CartesianCommunicator::CommunicatorPolicySequential }, #endif - { QCD::WilsonKernelsStatic::OptHandUnroll, QCD::WilsonKernelsStatic::CommsThenCompute ,CartesianCommunicator::CommunicatorPolicySequential }, - { QCD::WilsonKernelsStatic::OptHandUnroll, QCD::WilsonKernelsStatic::CommsAndCompute ,CartesianCommunicator::CommunicatorPolicySequential }, - { QCD::WilsonKernelsStatic::OptGeneric , QCD::WilsonKernelsStatic::CommsThenCompute ,CartesianCommunicator::CommunicatorPolicySequential }, - { QCD::WilsonKernelsStatic::OptGeneric , QCD::WilsonKernelsStatic::CommsAndCompute ,CartesianCommunicator::CommunicatorPolicySequential } + { WilsonKernelsStatic::OptHandUnroll, WilsonKernelsStatic::CommsThenCompute ,CartesianCommunicator::CommunicatorPolicySequential }, + { WilsonKernelsStatic::OptHandUnroll, WilsonKernelsStatic::CommsAndCompute ,CartesianCommunicator::CommunicatorPolicySequential }, + { WilsonKernelsStatic::OptGeneric , WilsonKernelsStatic::CommsThenCompute ,CartesianCommunicator::CommunicatorPolicySequential }, + { WilsonKernelsStatic::OptGeneric , WilsonKernelsStatic::CommsAndCompute ,CartesianCommunicator::CommunicatorPolicySequential } }; for(int c=0;c using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; struct time_statistics{ double mean; diff --git a/benchmarks/Benchmark_dwf.cc b/benchmarks/Benchmark_dwf.cc index 73621bbe..24339e5c 100644 --- a/benchmarks/Benchmark_dwf.cc +++ b/benchmarks/Benchmark_dwf.cc @@ -24,7 +24,7 @@ using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; template struct scal { diff --git a/benchmarks/Benchmark_dwf_sweep.cc b/benchmarks/Benchmark_dwf_sweep.cc index 37e47062..e1eab85a 100644 --- a/benchmarks/Benchmark_dwf_sweep.cc +++ b/benchmarks/Benchmark_dwf_sweep.cc @@ -30,7 +30,7 @@ Author: paboyle using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; template struct scal { diff --git a/benchmarks/Benchmark_gparity.cc b/benchmarks/Benchmark_gparity.cc index f6036aa8..be0c8b54 100644 --- a/benchmarks/Benchmark_gparity.cc +++ b/benchmarks/Benchmark_gparity.cc @@ -2,7 +2,7 @@ #include using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; template struct scal { diff --git a/benchmarks/Benchmark_memory_asynch.cc b/benchmarks/Benchmark_memory_asynch.cc index 2124b137..20a32e3e 100644 --- a/benchmarks/Benchmark_memory_asynch.cc +++ b/benchmarks/Benchmark_memory_asynch.cc @@ -30,7 +30,7 @@ Author: paboyle using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; int main (int argc, char ** argv) { diff --git a/benchmarks/Benchmark_memory_bandwidth.cc b/benchmarks/Benchmark_memory_bandwidth.cc index 848f271d..61ce2300 100644 --- a/benchmarks/Benchmark_memory_bandwidth.cc +++ b/benchmarks/Benchmark_memory_bandwidth.cc @@ -30,7 +30,7 @@ Author: paboyle using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; int main (int argc, char ** argv) { diff --git a/benchmarks/Benchmark_mooee.cc b/benchmarks/Benchmark_mooee.cc index 1e51c9d2..037e6dc6 100644 --- a/benchmarks/Benchmark_mooee.cc +++ b/benchmarks/Benchmark_mooee.cc @@ -30,7 +30,7 @@ Author: paboyle using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; int main (int argc, char ** argv) diff --git a/benchmarks/Benchmark_staggered.cc b/benchmarks/Benchmark_staggered.cc index f5325b28..f3cfef75 100644 --- a/benchmarks/Benchmark_staggered.cc +++ b/benchmarks/Benchmark_staggered.cc @@ -30,7 +30,7 @@ Author: paboyle using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; int main (int argc, char ** argv) { diff --git a/benchmarks/Benchmark_su3.cc b/benchmarks/Benchmark_su3.cc index 035af2d9..49e34136 100644 --- a/benchmarks/Benchmark_su3.cc +++ b/benchmarks/Benchmark_su3.cc @@ -30,7 +30,7 @@ Author: Peter Boyle using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; int main (int argc, char ** argv) { diff --git a/benchmarks/Benchmark_wilson.cc b/benchmarks/Benchmark_wilson.cc index 55042d6a..9585558b 100644 --- a/benchmarks/Benchmark_wilson.cc +++ b/benchmarks/Benchmark_wilson.cc @@ -30,7 +30,7 @@ Author: paboyle using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; template struct scal { diff --git a/benchmarks/Benchmark_wilson_sweep.cc b/benchmarks/Benchmark_wilson_sweep.cc index a189ac58..01befa76 100644 --- a/benchmarks/Benchmark_wilson_sweep.cc +++ b/benchmarks/Benchmark_wilson_sweep.cc @@ -23,7 +23,7 @@ Author: Richard Rollins using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; template struct scal { diff --git a/benchmarks/simple_su3_expr.cc b/benchmarks/simple_su3_expr.cc index 0c6092f6..7e53cce0 100644 --- a/benchmarks/simple_su3_expr.cc +++ b/benchmarks/simple_su3_expr.cc @@ -29,7 +29,7 @@ Author: Peter Boyle using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; void su3_test_mult_expression(LatticeColourMatrix &z, LatticeColourMatrix &x,LatticeColourMatrix &y) { diff --git a/benchmarks/simple_su3_test.cc b/benchmarks/simple_su3_test.cc index 79437c23..41ef3184 100644 --- a/benchmarks/simple_su3_test.cc +++ b/benchmarks/simple_su3_test.cc @@ -29,7 +29,7 @@ Author: Peter Boyle using namespace std; using namespace Grid; -using namespace Grid::QCD; + ; void su3_test_mult_routine(LatticeColourMatrix &z, LatticeColourMatrix &x,LatticeColourMatrix &y) diff --git a/configure.ac b/configure.ac index 468d9d5f..57dd458a 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,7 @@ if test "${OPENMP_CXXFLAGS}X" != "X"; then AM_CXXFLAGS="$OPENMP_CXXFLAGS $AM_CXXFLAGS" AM_LDFLAGS="$OPENMP_CXXFLAGS $AM_LDFLAGS" fi +ac_openmp=yes ############### Checks for header files AC_CHECK_HEADERS(stdint.h) diff --git a/extras/Hadrons/Application.cc b/extras/Hadrons/Application.cc index 9a3366d4..649cae9b 100644 --- a/extras/Hadrons/Application.cc +++ b/extras/Hadrons/Application.cc @@ -31,7 +31,7 @@ See the full license in the file "LICENSE" in the top level distribution directo #include using namespace Grid; -using namespace QCD; + using namespace Hadrons; #define BIG_SEP "===============" diff --git a/extras/Hadrons/Environment.cc b/extras/Hadrons/Environment.cc index 6de13e86..83d20d3c 100644 --- a/extras/Hadrons/Environment.cc +++ b/extras/Hadrons/Environment.cc @@ -32,7 +32,7 @@ See the full license in the file "LICENSE" in the top level distribution directo #include using namespace Grid; -using namespace QCD; + using namespace Hadrons; #define ERROR_NO_ADDRESS(address)\ diff --git a/extras/Hadrons/Exceptions.cc b/extras/Hadrons/Exceptions.cc index bf532c21..b251939f 100644 --- a/extras/Hadrons/Exceptions.cc +++ b/extras/Hadrons/Exceptions.cc @@ -54,4 +54,4 @@ CONST_EXC(Io, Runtime("IO error: " + msg, loc)) CONST_EXC(Memory, Runtime("memory error: " + msg, loc)) CONST_EXC(Parsing, Runtime("parsing error: " + msg, loc)) CONST_EXC(Program, Runtime("program error: " + msg, loc)) -CONST_EXC(System, Runtime("system error: " + msg, loc)) \ No newline at end of file +CONST_EXC(System, Runtime("system error: " + msg, loc)) diff --git a/extras/Hadrons/Global.cc b/extras/Hadrons/Global.cc index 130ede96..54507bdf 100644 --- a/extras/Hadrons/Global.cc +++ b/extras/Hadrons/Global.cc @@ -30,7 +30,7 @@ See the full license in the file "LICENSE" in the top level distribution directo #include using namespace Grid; -using namespace QCD; + using namespace Hadrons; HadronsLogger Hadrons::HadronsLogError(1,"Error"); diff --git a/extras/Hadrons/Global.hpp b/extras/Hadrons/Global.hpp index ebfe94dc..ebca2aad 100644 --- a/extras/Hadrons/Global.hpp +++ b/extras/Hadrons/Global.hpp @@ -41,7 +41,7 @@ See the full license in the file "LICENSE" in the top level distribution directo #define BEGIN_HADRONS_NAMESPACE \ namespace Grid {\ -using namespace QCD;\ + \ namespace Hadrons {\ using Grid::operator<<; #define END_HADRONS_NAMESPACE }} diff --git a/extras/Hadrons/HadronsXmlRun.cc b/extras/Hadrons/HadronsXmlRun.cc index 0dff8f9a..ab858844 100644 --- a/extras/Hadrons/HadronsXmlRun.cc +++ b/extras/Hadrons/HadronsXmlRun.cc @@ -30,7 +30,7 @@ See the full license in the file "LICENSE" in the top level distribution directo #include using namespace Grid; -using namespace QCD; + using namespace Hadrons; int main(int argc, char *argv[]) diff --git a/extras/Hadrons/HadronsXmlSchedule.cc b/extras/Hadrons/HadronsXmlSchedule.cc index a8ca9a63..2ac84817 100644 --- a/extras/Hadrons/HadronsXmlSchedule.cc +++ b/extras/Hadrons/HadronsXmlSchedule.cc @@ -30,7 +30,7 @@ See the full license in the file "LICENSE" in the top level distribution directo #include using namespace Grid; -using namespace QCD; + using namespace Hadrons; int main(int argc, char *argv[]) diff --git a/extras/Hadrons/Module.cc b/extras/Hadrons/Module.cc index e5ef0fe4..93e9316f 100644 --- a/extras/Hadrons/Module.cc +++ b/extras/Hadrons/Module.cc @@ -30,7 +30,7 @@ See the full license in the file "LICENSE" in the top level distribution directo #include using namespace Grid; -using namespace QCD; + using namespace Hadrons; /****************************************************************************** diff --git a/extras/Hadrons/VirtualMachine.cc b/extras/Hadrons/VirtualMachine.cc index e0035bc1..30de8a43 100644 --- a/extras/Hadrons/VirtualMachine.cc +++ b/extras/Hadrons/VirtualMachine.cc @@ -31,7 +31,7 @@ See the full license in the file "LICENSE" in the top level distribution directo #include using namespace Grid; -using namespace QCD; + using namespace Hadrons; /****************************************************************************** diff --git a/lib/algorithms/approx/Zolotarev.cc b/lib/algorithms/approx/Zolotarev.cc index bf57105d..c2efd41c 100644 --- a/lib/algorithms/approx/Zolotarev.cc +++ b/lib/algorithms/approx/Zolotarev.cc @@ -516,7 +516,9 @@ zolotarev_data* higham(PRECISION epsilon, int n) { free(d); return zd; } -}} + +NAMESPACE_END(Approx); +NAMESPACE_END(Grid); #ifdef TEST @@ -585,6 +587,7 @@ static PRECISION zolotarev_cayley_eval(PRECISION x, zolotarev_data* rdata) { return (ONE - T) / (ONE + T); } + /* Test program. Apart from printing out the parameters for R(x) it produces * the following data files for plotting (unless NPLOT is defined): * @@ -724,5 +727,4 @@ int main(int argc, char** argv) { } #endif /* TEST */ -NAMESPACE_END(Approx); -NAMESPACE_END(Grid); + diff --git a/lib/parallelIO/MetaData.h b/lib/parallelIO/MetaData.h index a6abcf43..8c350402 100644 --- a/lib/parallelIO/MetaData.h +++ b/lib/parallelIO/MetaData.h @@ -177,14 +177,14 @@ template inline void PrepareMetaData(Lattice & field, FieldMet inline void GaugeStatistics(Lattice & data,FieldMetaData &header) { // How to convert data precision etc... - header.link_trace=Grid::QCD::WilsonLoops::linkTrace(data); - header.plaquette =Grid::QCD::WilsonLoops::avgPlaquette(data); + header.link_trace=WilsonLoops::linkTrace(data); + header.plaquette =WilsonLoops::avgPlaquette(data); } inline void GaugeStatistics(Lattice & data,FieldMetaData &header) { // How to convert data precision etc... - header.link_trace=Grid::QCD::WilsonLoops::linkTrace(data); - header.plaquette =Grid::QCD::WilsonLoops::avgPlaquette(data); + header.link_trace=WilsonLoops::linkTrace(data); + header.plaquette =WilsonLoops::avgPlaquette(data); } template<> inline void PrepareMetaData(Lattice & field, FieldMetaData &header) { diff --git a/lib/qcd/action/pseudofermion/TwoFlavourRatio.h b/lib/qcd/action/pseudofermion/TwoFlavourRatio.h index 7897bb12..21f30000 100644 --- a/lib/qcd/action/pseudofermion/TwoFlavourRatio.h +++ b/lib/qcd/action/pseudofermion/TwoFlavourRatio.h @@ -168,6 +168,6 @@ public: }; }; -NAMESPACE_END(Grid): +NAMESPACE_END(Grid); #endif diff --git a/lib/qcd/action/scalar/ScalarAction.h b/lib/qcd/action/scalar/ScalarAction.h index 421cb91a..8480b4b7 100644 --- a/lib/qcd/action/scalar/ScalarAction.h +++ b/lib/qcd/action/scalar/ScalarAction.h @@ -36,7 +36,7 @@ directory NAMESPACE_BEGIN(Grid); template -class ScalarAction : public QCD::Action { +class ScalarAction : public Action { public: INHERIT_FIELD_TYPES(Impl); @@ -58,7 +58,7 @@ public: virtual void refresh(const Field &U, GridParallelRNG &pRNG) {} // noop as no pseudoferms virtual RealD S(const Field &p) { - return (mass_square * 0.5 + QCD::Nd) * ScalarObs::sumphisquared(p) + + return (mass_square * 0.5 + Nd) * ScalarObs::sumphisquared(p) + (lambda / 24.) * ScalarObs::sumphifourth(p) + ScalarObs::sumphider(p); }; @@ -69,9 +69,9 @@ public: Field p2(p._grid); ScalarObs::phisquared(p2, p); tmp = -(Cshift(p, 0, -1) + Cshift(p, 0, 1)); - for (int mu = 1; mu < QCD::Nd; mu++) tmp -= Cshift(p, mu, -1) + Cshift(p, mu, 1); + for (int mu = 1; mu < Nd; mu++) tmp -= Cshift(p, mu, -1) + Cshift(p, mu, 1); - force =+(mass_square + 2. * QCD::Nd) * p + (lambda / 6.) * p2 * p + tmp; + force =+(mass_square + 2. * Nd) * p + (lambda / 6.) * p2 * p + tmp; } }; diff --git a/lib/qcd/action/scalar/ScalarImpl.h b/lib/qcd/action/scalar/ScalarImpl.h index 7efd88fe..84fb9923 100644 --- a/lib/qcd/action/scalar/ScalarImpl.h +++ b/lib/qcd/action/scalar/ScalarImpl.h @@ -91,7 +91,7 @@ template class ScalarAdjMatrixImplTypes { public: typedef S Simd; - typedef QCD::SU Group; + typedef SU Group; template using iImplField = iScalar>>; @@ -146,9 +146,9 @@ typedef ScalarImplTypes ScalarImplCF; typedef ScalarImplTypes ScalarImplCD; // Hardcoding here the size of the matrices -typedef ScalarAdjMatrixImplTypes ScalarAdjImplR; -typedef ScalarAdjMatrixImplTypes ScalarAdjImplF; -typedef ScalarAdjMatrixImplTypes ScalarAdjImplD; +typedef ScalarAdjMatrixImplTypes ScalarAdjImplR; +typedef ScalarAdjMatrixImplTypes ScalarAdjImplF; +typedef ScalarAdjMatrixImplTypes ScalarAdjImplD; template using ScalarNxNAdjImplR = ScalarAdjMatrixImplTypes; template using ScalarNxNAdjImplF = ScalarAdjMatrixImplTypes; diff --git a/lib/qcd/action/scalar/ScalarInteractionAction.h b/lib/qcd/action/scalar/ScalarInteractionAction.h index eeca6e98..97547655 100644 --- a/lib/qcd/action/scalar/ScalarInteractionAction.h +++ b/lib/qcd/action/scalar/ScalarInteractionAction.h @@ -36,7 +36,7 @@ directory NAMESPACE_BEGIN(Grid); template -class ScalarInteractionAction : public QCD::Action { +class ScalarInteractionAction : public Action { public: INHERIT_FIELD_TYPES(Impl); private: @@ -116,7 +116,7 @@ public: static Stencil phiStencil(p._grid, npoint, 0, directions, displacements); phiStencil.HaloExchange(p, compressor); - //for (int mu = 0; mu < QCD::Nd; mu++) force -= Cshift(p, mu, -1) + Cshift(p, mu, 1); + //for (int mu = 0; mu < Nd; mu++) force -= Cshift(p, mu, -1) + Cshift(p, mu, 1); for (int point = 0; point < npoint; point++) { parallel_for (int i = 0; i < p._grid->oSites(); i++) { const vobj *temp; diff --git a/lib/qcd/hmc/HMCResourceManager.h b/lib/qcd/hmc/HMCResourceManager.h index aeff5b8e..f4f5f8a1 100644 --- a/lib/qcd/hmc/HMCResourceManager.h +++ b/lib/qcd/hmc/HMCResourceManager.h @@ -53,9 +53,9 @@ NAMESPACE_BEGIN(Grid); // HMC Resource manager template class HMCResourceManager { - typedef HMCModuleBase< QCD::BaseHmcCheckpointer > CheckpointerBaseModule; - typedef HMCModuleBase< QCD::HmcObservable > ObservableBaseModule; - typedef ActionModuleBase< QCD::Action, GridModule > ActionBaseModule; + typedef HMCModuleBase< BaseHmcCheckpointer > CheckpointerBaseModule; + typedef HMCModuleBase< HmcObservable > ObservableBaseModule; + typedef ActionModuleBase< Action, GridModule > ActionBaseModule; // Named storage for grid pairs (std + red-black) std::unordered_map Grids; diff --git a/lib/qcd/hmc/HMCRunnerModule.h b/lib/qcd/hmc/HMCRunnerModule.h index a750cde0..fa714a1c 100644 --- a/lib/qcd/hmc/HMCRunnerModule.h +++ b/lib/qcd/hmc/HMCRunnerModule.h @@ -36,18 +36,18 @@ NAMESPACE_BEGIN(Grid); // if we had a virtual reader would have been unecessary template class HMCModule - : public Parametrized< QCD::HMCparameters >, - public HMCModuleBase< QCD::HMCRunnerBase > { + : public Parametrized< HMCparameters >, + public HMCModuleBase< HMCRunnerBase > { public: - typedef HMCModuleBase< QCD::HMCRunnerBase > Base; + typedef HMCModuleBase< HMCRunnerBase > Base; typedef typename Base::Product Product; std::unique_ptr HMCPtr; - HMCModule(QCD::HMCparameters Par) : Parametrized(Par) {} + HMCModule(HMCparameters Par) : Parametrized(Par) {} template - HMCModule(Reader& R) : Parametrized(R, "HMC"){}; + HMCModule(Reader& R) : Parametrized(R, "HMC"){}; Product* getPtr() { if (!HMCPtr) initialize(); @@ -62,7 +62,7 @@ private: // Factory template class HMCRunnerModuleFactory - : public Factory < HMCModuleBase< QCD::HMCRunnerBase > , Reader > { + : public Factory < HMCModuleBase< HMCRunnerBase > , Reader > { public: typedef Reader TheReader; // use SINGLETON FUNCTOR MACRO HERE @@ -88,36 +88,36 @@ private: // macro for these template < class ImplementationPolicy, class RepresentationPolicy, class ReaderClass > -class HMCLeapFrog: public HMCModule< QCD::GenericHMCRunnerTemplate, ReaderClass >{ - typedef HMCModule< QCD::GenericHMCRunnerTemplate, ReaderClass > HMCBaseMod; +class HMCLeapFrog: public HMCModule< GenericHMCRunnerTemplate, ReaderClass >{ + typedef HMCModule< GenericHMCRunnerTemplate, ReaderClass > HMCBaseMod; using HMCBaseMod::HMCBaseMod; // aquire resource virtual void initialize(){ - this->HMCPtr.reset(new QCD::GenericHMCRunnerTemplate(this->Par_) ); + this->HMCPtr.reset(new GenericHMCRunnerTemplate(this->Par_) ); } }; template < class ImplementationPolicy, class RepresentationPolicy, class ReaderClass > -class HMCMinimumNorm2: public HMCModule< QCD::GenericHMCRunnerTemplate, ReaderClass >{ - typedef HMCModule< QCD::GenericHMCRunnerTemplate, ReaderClass > HMCBaseMod; +class HMCMinimumNorm2: public HMCModule< GenericHMCRunnerTemplate, ReaderClass >{ + typedef HMCModule< GenericHMCRunnerTemplate, ReaderClass > HMCBaseMod; using HMCBaseMod::HMCBaseMod; // aquire resource virtual void initialize(){ - this->HMCPtr.reset(new QCD::GenericHMCRunnerTemplate(this->Par_)); + this->HMCPtr.reset(new GenericHMCRunnerTemplate(this->Par_)); } }; template < class ImplementationPolicy, class RepresentationPolicy, class ReaderClass > -class HMCForceGradient: public HMCModule< QCD::GenericHMCRunnerTemplate, ReaderClass >{ - typedef HMCModule< QCD::GenericHMCRunnerTemplate, ReaderClass > HMCBaseMod; +class HMCForceGradient: public HMCModule< GenericHMCRunnerTemplate, ReaderClass >{ + typedef HMCModule< GenericHMCRunnerTemplate, ReaderClass > HMCBaseMod; using HMCBaseMod::HMCBaseMod; // aquire resource virtual void initialize(){ - this->HMCPtr.reset(new QCD::GenericHMCRunnerTemplate(this->Par_) ); + this->HMCPtr.reset(new GenericHMCRunnerTemplate(this->Par_) ); } }; diff --git a/lib/qcd/hmc/HMC_GridModules.h b/lib/qcd/hmc/HMC_GridModules.h index 9967bf53..4236063c 100644 --- a/lib/qcd/hmc/HMC_GridModules.h +++ b/lib/qcd/hmc/HMC_GridModules.h @@ -104,7 +104,6 @@ class GridFourDimModule : public GridModule public: GridFourDimModule() { - using namespace QCD; set_full(SpaceTimeGrid::makeFourDimGrid( GridDefaultLatt(), GridDefaultSimd(4, vector_type::Nsimd()), @@ -114,7 +113,6 @@ public: GridFourDimModule(const std::vector tweak_simd) { - using namespace QCD; if (tweak_simd.size() != 4) { std::cout << GridLogError @@ -148,7 +146,6 @@ public: GridFourDimModule(const GridModuleParameters Params) { - using namespace QCD; std::vector lattice_v = Params.getLattice(); std::vector mpi_v = Params.getMpi(); if (lattice_v.size() == 4) diff --git a/lib/qcd/modules/ActionModules.h b/lib/qcd/modules/ActionModules.h index 8006bd5c..cef4c036 100644 --- a/lib/qcd/modules/ActionModules.h +++ b/lib/qcd/modules/ActionModules.h @@ -52,9 +52,9 @@ public: template class ActionModule : public Parametrized, - public ActionModuleBase< QCD::Action , QCD::GridModule > { + public ActionModuleBase< Action , GridModule > { public: - typedef ActionModuleBase< QCD::Action, QCD::GridModule > Base; + typedef ActionModuleBase< Action, GridModule > Base; typedef typename Base::Product Product; typedef APar Parameters; @@ -467,31 +467,19 @@ public: }; -}// QCD temporarily here - - - - - - - //////////////////////////////////////// // Factories specialisations //////////////////////////////////////// - - - // use the same classed defined by Antonin, does not make sense to rewrite // Factory is perfectly fine // Registar must be changed because I do not want to use the ModuleFactory - // explicit ref to LatticeGaugeField must be changed or put in the factory -//typedef ActionModuleBase< QCD::Action< QCD::LatticeGaugeField >, QCD::GridModule > HMC_LGTActionModBase; -//typedef ActionModuleBase< QCD::Action< QCD::LatticeReal >, QCD::GridModule > HMC_ScalarActionModBase; +//typedef ActionModuleBase< Action< LatticeGaugeField >, GridModule > HMC_LGTActionModBase; +//typedef ActionModuleBase< Action< LatticeReal >, GridModule > HMC_ScalarActionModBase; template class HMC_ActionModuleFactory - : public Factory < ActionModuleBase< QCD::Action< Field >, QCD::GridModule > , Reader > { + : public Factory < ActionModuleBase< Action< Field >, GridModule > , Reader > { public: typedef Reader TheReader; // use SINGLETON FUNCTOR MACRO HERE diff --git a/lib/qcd/modules/FermionOperatorModules.h b/lib/qcd/modules/FermionOperatorModules.h index b1a3ad04..5af1378e 100644 --- a/lib/qcd/modules/FermionOperatorModules.h +++ b/lib/qcd/modules/FermionOperatorModules.h @@ -37,19 +37,19 @@ NAMESPACE_BEGIN(Grid); template < class Product> class FermionOperatorModuleBase : public HMCModuleBase{ public: - virtual void AddGridPair(QCD::GridModule&) = 0; + virtual void AddGridPair(GridModule&) = 0; }; template