mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Hadrons: namespace reorganisation, now everything is in Grid::Hadrons, the 'using Grid::operator<<' statement is used to prevent a very nasty compilation error with GCC.
This commit is contained in:
parent
48fcc34d72
commit
6e83b6a203
@ -29,6 +29,7 @@ directory.
|
|||||||
#include <Hadrons/Environment.hpp>
|
#include <Hadrons/Environment.hpp>
|
||||||
|
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -29,6 +29,7 @@ directory.
|
|||||||
#include <Hadrons/Graph.hpp>
|
#include <Hadrons/Graph.hpp>
|
||||||
|
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -28,6 +28,7 @@ directory.
|
|||||||
#include <Hadrons/CMeson.hpp>
|
#include <Hadrons/CMeson.hpp>
|
||||||
|
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
@ -85,7 +86,7 @@ void CMeson::execute(Environment &env)
|
|||||||
result.corr[iSink].resize(Ns*Ns);
|
result.corr[iSink].resize(Ns*Ns);
|
||||||
for (unsigned int iSrc = 0; iSrc < Ns*Ns; ++iSrc)
|
for (unsigned int iSrc = 0; iSrc < Ns*Ns; ++iSrc)
|
||||||
{
|
{
|
||||||
c = trace(g[iSink]*q1*g[iSrc]*g5*adj(q2)*g5);
|
c = trace(g[iSink]*q1*g[iSrc]*g5*adj(q2)*g5);
|
||||||
sliceSum(c, buf, Tp);
|
sliceSum(c, buf, Tp);
|
||||||
result.corr[iSink][iSrc].resize(buf.size());
|
result.corr[iSink][iSrc].resize(buf.size());
|
||||||
for (unsigned int t = 0; t < buf.size(); ++t)
|
for (unsigned int t = 0; t < buf.size(); ++t)
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
virtual ~Factory(void) = default;
|
virtual ~Factory(void) = default;
|
||||||
// registration
|
// registration
|
||||||
void registerBuilder(const std::string type, const Func &f);
|
void registerBuilder(const std::string type, const Func &f);
|
||||||
// get module list
|
// get builder list
|
||||||
std::vector<std::string> getBuilderList(void) const;
|
std::vector<std::string> getBuilderList(void) const;
|
||||||
// factory
|
// factory
|
||||||
std::unique_ptr<T> create(const std::string type,
|
std::unique_ptr<T> create(const std::string type,
|
||||||
@ -91,7 +91,7 @@ std::unique_ptr<T> Factory<T>::create(const std::string type,
|
|||||||
{
|
{
|
||||||
func = builder_.at(type);
|
func = builder_.at(type);
|
||||||
}
|
}
|
||||||
catch (std::out_of_range)
|
catch (std::out_of_range &)
|
||||||
{
|
{
|
||||||
HADRON_ERROR("object of type '" + type + "' unknown");
|
HADRON_ERROR("object of type '" + type + "' unknown");
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@ directory.
|
|||||||
#include <Hadrons/FermionAction.hpp>
|
#include <Hadrons/FermionAction.hpp>
|
||||||
|
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -28,6 +28,7 @@ directory.
|
|||||||
#include <Hadrons/Global.hpp>
|
#include <Hadrons/Global.hpp>
|
||||||
|
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
HadronsLogger Hadrons::HadronsLogError(1,"Error");
|
HadronsLogger Hadrons::HadronsLogError(1,"Error");
|
||||||
|
@ -28,15 +28,20 @@ directory.
|
|||||||
#ifndef Hadrons_Global_hpp_
|
#ifndef Hadrons_Global_hpp_
|
||||||
#define Hadrons_Global_hpp_
|
#define Hadrons_Global_hpp_
|
||||||
|
|
||||||
#include <Grid.h>
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
#include <Grid.h>
|
||||||
|
|
||||||
#define BEGIN_HADRONS_NAMESPACE \
|
#define BEGIN_HADRONS_NAMESPACE \
|
||||||
|
namespace Grid {\
|
||||||
|
using namespace QCD;\
|
||||||
namespace Hadrons {\
|
namespace Hadrons {\
|
||||||
using namespace Grid;\
|
using Grid::operator<<;
|
||||||
using namespace QCD;
|
#define END_HADRONS_NAMESPACE }}
|
||||||
#define END_HADRONS_NAMESPACE }
|
|
||||||
|
/* the 'using Grid::operator<<;' statement prevents a very nasty compilation
|
||||||
|
* error with GCC (clang compiles fine without it).
|
||||||
|
*/
|
||||||
|
|
||||||
BEGIN_HADRONS_NAMESPACE
|
BEGIN_HADRONS_NAMESPACE
|
||||||
|
|
||||||
|
@ -105,8 +105,8 @@ private:
|
|||||||
void depthFirstSearch(void);
|
void depthFirstSearch(void);
|
||||||
void depthFirstSearch(const T &root);
|
void depthFirstSearch(const T &root);
|
||||||
private:
|
private:
|
||||||
std::map<T, bool> isMarked_;
|
std::map<T, bool> isMarked_;
|
||||||
std::set<Edge> edgeSet_;
|
std::set<Edge> edgeSet_;
|
||||||
};
|
};
|
||||||
|
|
||||||
// build depedency matrix from topological sorts
|
// build depedency matrix from topological sorts
|
||||||
|
@ -27,6 +27,8 @@ directory.
|
|||||||
|
|
||||||
#include <Hadrons/Application.hpp>
|
#include <Hadrons/Application.hpp>
|
||||||
|
|
||||||
|
using namespace Grid;
|
||||||
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
@ -28,6 +28,7 @@ directory.
|
|||||||
#include <Hadrons/MQuark.hpp>
|
#include <Hadrons/MQuark.hpp>
|
||||||
|
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -28,7 +28,9 @@ directory.
|
|||||||
#include <Hadrons/MSource.hpp>
|
#include <Hadrons/MSource.hpp>
|
||||||
|
|
||||||
#define ERROR_SUF " (source '" << getName() << "')"
|
#define ERROR_SUF " (source '" << getName() << "')"
|
||||||
|
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -28,6 +28,7 @@ directory.
|
|||||||
#include <Hadrons/Module.hpp>
|
#include <Hadrons/Module.hpp>
|
||||||
|
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -28,6 +28,7 @@ directory.
|
|||||||
#include <Hadrons/SRBPrecCG.hpp>
|
#include <Hadrons/SRBPrecCG.hpp>
|
||||||
|
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user