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>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -29,6 +29,7 @@ directory.
|
||||
#include <Hadrons/Graph.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -28,6 +28,7 @@ directory.
|
||||
#include <Hadrons/CMeson.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
/******************************************************************************
|
||||
@ -85,7 +86,7 @@ void CMeson::execute(Environment &env)
|
||||
result.corr[iSink].resize(Ns*Ns);
|
||||
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);
|
||||
result.corr[iSink][iSrc].resize(buf.size());
|
||||
for (unsigned int t = 0; t < buf.size(); ++t)
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
virtual ~Factory(void) = default;
|
||||
// registration
|
||||
void registerBuilder(const std::string type, const Func &f);
|
||||
// get module list
|
||||
// get builder list
|
||||
std::vector<std::string> getBuilderList(void) const;
|
||||
// factory
|
||||
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);
|
||||
}
|
||||
catch (std::out_of_range)
|
||||
catch (std::out_of_range &)
|
||||
{
|
||||
HADRON_ERROR("object of type '" + type + "' unknown");
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ directory.
|
||||
#include <Hadrons/FermionAction.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -28,6 +28,7 @@ directory.
|
||||
#include <Hadrons/Global.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
HadronsLogger Hadrons::HadronsLogError(1,"Error");
|
||||
|
@ -28,15 +28,20 @@ directory.
|
||||
#ifndef Hadrons_Global_hpp_
|
||||
#define Hadrons_Global_hpp_
|
||||
|
||||
#include <Grid.h>
|
||||
#include <set>
|
||||
#include <stack>
|
||||
#include <Grid.h>
|
||||
|
||||
#define BEGIN_HADRONS_NAMESPACE \
|
||||
namespace Grid {\
|
||||
using namespace QCD;\
|
||||
namespace Hadrons {\
|
||||
using namespace Grid;\
|
||||
using namespace QCD;
|
||||
#define END_HADRONS_NAMESPACE }
|
||||
using Grid::operator<<;
|
||||
#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
|
||||
|
||||
|
@ -105,8 +105,8 @@ private:
|
||||
void depthFirstSearch(void);
|
||||
void depthFirstSearch(const T &root);
|
||||
private:
|
||||
std::map<T, bool> isMarked_;
|
||||
std::set<Edge> edgeSet_;
|
||||
std::map<T, bool> isMarked_;
|
||||
std::set<Edge> edgeSet_;
|
||||
};
|
||||
|
||||
// build depedency matrix from topological sorts
|
||||
|
@ -27,6 +27,8 @@ directory.
|
||||
|
||||
#include <Hadrons/Application.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -28,6 +28,7 @@ directory.
|
||||
#include <Hadrons/MQuark.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -28,7 +28,9 @@ directory.
|
||||
#include <Hadrons/MSource.hpp>
|
||||
|
||||
#define ERROR_SUF " (source '" << getName() << "')"
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -28,6 +28,7 @@ directory.
|
||||
#include <Hadrons/Module.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -28,6 +28,7 @@ directory.
|
||||
#include <Hadrons/SRBPrecCG.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace QCD;
|
||||
using namespace Hadrons;
|
||||
|
||||
/******************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user