mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Namespace
This commit is contained in:
parent
81dcd0e6ea
commit
9f2f294a27
@ -9,17 +9,15 @@
|
|||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace Grid {
|
NAMESPACE_BEGIN(Grid);
|
||||||
namespace QCD {
|
|
||||||
|
|
||||||
// Supported types
|
// Supported types
|
||||||
// enum {Fundamental, Adjoint} repr_type;
|
// enum {Fundamental, Adjoint} repr_type;
|
||||||
|
|
||||||
// Utility to add support to the HMC for representations other than the
|
// Utility to add support to the HMC for representations other than the
|
||||||
// fundamental
|
// fundamental
|
||||||
template <class... Reptypes>
|
template <class... Reptypes>
|
||||||
class Representations {
|
class Representations {
|
||||||
public:
|
public:
|
||||||
typedef std::tuple<Reptypes...> Representation_type;
|
typedef std::tuple<Reptypes...> Representation_type;
|
||||||
|
|
||||||
// Size of the tuple, known at compile time
|
// Size of the tuple, known at compile time
|
||||||
@ -47,11 +45,11 @@ class Representations {
|
|||||||
|
|
||||||
template <std::size_t I = 0>
|
template <std::size_t I = 0>
|
||||||
inline typename std::enable_if<(I == tuple_size), void>::type update(
|
inline typename std::enable_if<(I == tuple_size), void>::type update(
|
||||||
LatticeSourceField& U) {}
|
LatticeSourceField& U) {}
|
||||||
|
|
||||||
template <std::size_t I = 0>
|
template <std::size_t I = 0>
|
||||||
inline typename std::enable_if<(I < tuple_size), void>::type update(
|
inline typename std::enable_if<(I < tuple_size), void>::type update(
|
||||||
LatticeSourceField& U) {
|
LatticeSourceField& U) {
|
||||||
std::get<I>(rep).update_representation(U);
|
std::get<I>(rep).update_representation(U);
|
||||||
update<I + 1>(U);
|
update<I + 1>(U);
|
||||||
}
|
}
|
||||||
@ -77,7 +75,7 @@ struct AccessTypes : AccessTypes<A, TupleClass, N - 1, N - 1, S...> {};
|
|||||||
|
|
||||||
template <template <typename> class A, class TupleClass, size_t... S>
|
template <template <typename> class A, class TupleClass, size_t... S>
|
||||||
struct AccessTypes<A, TupleClass, 0, S...> {
|
struct AccessTypes<A, TupleClass, 0, S...> {
|
||||||
public:
|
public:
|
||||||
typedef typename TupleClass::Representation_Fields Rfields;
|
typedef typename TupleClass::Representation_Fields Rfields;
|
||||||
|
|
||||||
template <std::size_t N>
|
template <std::size_t N>
|
||||||
@ -96,7 +94,7 @@ struct AccessTypes<A, TupleClass, 0, S...> {
|
|||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
NAMESPACE_END(Grid);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user