mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Hadrons: namespace macro to tackle GCC 5 bug
This commit is contained in:
parent
7a1ac45679
commit
7ae734103e
@ -39,8 +39,13 @@ namespace Hadrons {\
|
|||||||
using Grid::operator<<;
|
using Grid::operator<<;
|
||||||
#define END_HADRONS_NAMESPACE }}
|
#define END_HADRONS_NAMESPACE }}
|
||||||
|
|
||||||
|
#define BEGIN_MODULE_NAMESPACE(name)\
|
||||||
|
namespace name {\
|
||||||
|
using Grid::operator<<;
|
||||||
|
#define END_MODULE_NAMESPACE }
|
||||||
|
|
||||||
/* the 'using Grid::operator<<;' statement prevents a very nasty compilation
|
/* the 'using Grid::operator<<;' statement prevents a very nasty compilation
|
||||||
* error with GCC (clang compiles fine without it).
|
* error with GCC 5 (clang & GCC 6 compile fine without it).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// FIXME: find a way to do that in a more general fashion
|
// FIXME: find a way to do that in a more general fashion
|
||||||
|
@ -37,8 +37,8 @@ BEGIN_HADRONS_NAMESPACE
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Domain wall quark action *
|
* Domain wall quark action *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
namespace MAction
|
BEGIN_MODULE_NAMESPACE(MAction)
|
||||||
{
|
|
||||||
class DWFPar: Serializable
|
class DWFPar: Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -64,7 +64,8 @@ namespace MAction
|
|||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
END_MODULE_NAMESPACE
|
||||||
|
|
||||||
MODULE_REGISTER_NS(DWF, MAction);
|
MODULE_REGISTER_NS(DWF, MAction);
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ BEGIN_HADRONS_NAMESPACE
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Wilson quark action *
|
* Wilson quark action *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
namespace MAction
|
BEGIN_MODULE_NAMESPACE(MAction)
|
||||||
{
|
|
||||||
class WilsonPar: Serializable
|
class WilsonPar: Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -62,7 +62,8 @@ namespace MAction
|
|||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
END_MODULE_NAMESPACE
|
||||||
|
|
||||||
MODULE_REGISTER_NS(Wilson, MAction);
|
MODULE_REGISTER_NS(Wilson, MAction);
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ BEGIN_HADRONS_NAMESPACE
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Meson *
|
* Meson *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
namespace MContraction
|
BEGIN_MODULE_NAMESPACE(MContraction)
|
||||||
{
|
|
||||||
class MesonPar: Serializable
|
class MesonPar: Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -68,7 +68,8 @@ namespace MContraction
|
|||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
END_MODULE_NAMESPACE
|
||||||
|
|
||||||
MODULE_REGISTER_NS(Meson, MContraction);
|
MODULE_REGISTER_NS(Meson, MContraction);
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ BEGIN_HADRONS_NAMESPACE
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Load a NERSC configuration *
|
* Load a NERSC configuration *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
namespace MGauge
|
BEGIN_MODULE_NAMESPACE(MGauge)
|
||||||
{
|
|
||||||
class LoadPar: Serializable
|
class LoadPar: Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -61,7 +61,8 @@ namespace MGauge
|
|||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
END_MODULE_NAMESPACE
|
||||||
|
|
||||||
MODULE_REGISTER_NS(Load, MGauge);
|
MODULE_REGISTER_NS(Load, MGauge);
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ BEGIN_HADRONS_NAMESPACE
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Random gauge *
|
* Random gauge *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
namespace MGauge
|
BEGIN_MODULE_NAMESPACE(MGauge)
|
||||||
{
|
|
||||||
class Random: public Module<NoPar>
|
class Random: public Module<NoPar>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -54,7 +54,8 @@ namespace MGauge
|
|||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
END_MODULE_NAMESPACE
|
||||||
|
|
||||||
MODULE_REGISTER_NS(Random, MGauge);
|
MODULE_REGISTER_NS(Random, MGauge);
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ BEGIN_HADRONS_NAMESPACE
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Unit gauge *
|
* Unit gauge *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
namespace MGauge
|
BEGIN_MODULE_NAMESPACE(MGauge)
|
||||||
{
|
|
||||||
class Unit: public Module<NoPar>
|
class Unit: public Module<NoPar>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -54,7 +54,8 @@ namespace MGauge
|
|||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
END_MODULE_NAMESPACE
|
||||||
|
|
||||||
MODULE_REGISTER_NS(Unit, MGauge);
|
MODULE_REGISTER_NS(Unit, MGauge);
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ BEGIN_HADRONS_NAMESPACE
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Schur red-black preconditioned CG *
|
* Schur red-black preconditioned CG *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
namespace MSolver
|
BEGIN_MODULE_NAMESPACE(MSolver)
|
||||||
{
|
|
||||||
class RBPrecCGPar: Serializable
|
class RBPrecCGPar: Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -62,7 +62,8 @@ namespace MSolver
|
|||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
END_MODULE_NAMESPACE
|
||||||
|
|
||||||
MODULE_REGISTER_NS(RBPrecCG, MSolver);
|
MODULE_REGISTER_NS(RBPrecCG, MSolver);
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ BEGIN_HADRONS_NAMESPACE
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Point *
|
* Point *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
namespace MSource
|
BEGIN_MODULE_NAMESPACE(MSource)
|
||||||
{
|
|
||||||
class PointPar: Serializable
|
class PointPar: Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -72,7 +72,8 @@ namespace MSource
|
|||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
END_MODULE_NAMESPACE
|
||||||
|
|
||||||
MODULE_REGISTER_NS(Point, MSource);
|
MODULE_REGISTER_NS(Point, MSource);
|
||||||
|
|
||||||
|
@ -49,8 +49,8 @@ BEGIN_HADRONS_NAMESPACE
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Z2 *
|
* Z2 *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
namespace MSource
|
BEGIN_MODULE_NAMESPACE(MSource)
|
||||||
{
|
|
||||||
class Z2Par: Serializable
|
class Z2Par: Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -74,7 +74,8 @@ namespace MSource
|
|||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
END_MODULE_NAMESPACE
|
||||||
|
|
||||||
MODULE_REGISTER_NS(Z2, MSource);
|
MODULE_REGISTER_NS(Z2, MSource);
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ BEGIN_HADRONS_NAMESPACE
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* ___FILEBASENAME___ *
|
* ___FILEBASENAME___ *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
namespace ___NAMESPACE___
|
BEGIN_MODULE_NAMESPACE(___NAMESPACE___)
|
||||||
{
|
|
||||||
class ___FILEBASENAME___Par: Serializable
|
class ___FILEBASENAME___Par: Serializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -34,7 +34,8 @@ namespace ___NAMESPACE___
|
|||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
END_MODULE_NAMESPACE
|
||||||
|
|
||||||
MODULE_REGISTER_NS(___FILEBASENAME___, ___NAMESPACE___);
|
MODULE_REGISTER_NS(___FILEBASENAME___, ___NAMESPACE___);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user