1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-09 21:50:45 +01:00

Gamma adj fix: now in Grid namespace to avoid collisions

This commit is contained in:
Antonin Portelli 2017-01-30 10:53:04 -08:00
parent a0cfbb6e88
commit 1140573027
2 changed files with 8 additions and 15 deletions

View File

@ -51,14 +51,6 @@ namespace QCD {
static const int Nhs=2; // half spinor static const int Nhs=2; // half spinor
static const int Nds=8; // double stored gauge field static const int Nds=8; // double stored gauge field
static const int Ngp=2; // gparity index range static const int Ngp=2; // gparity index range
// if no adj funtion in QCD:: redirect to Grid::
// this avoids QCD:: adj functions to screen the Grid:: ones
template <typename T>
inline auto adj(T x)->decltype(Grid::adj(x))
{
return Grid::adj(x);
}
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// QCD iMatrix types // QCD iMatrix types

View File

@ -33,7 +33,6 @@ See the full license in the file "LICENSE" in the top level distribution directo
#define GRID_QCD_DIRAC_H #define GRID_QCD_DIRAC_H
// code generated by the Mathematica notebook gamma-gen/gamma-gen.nb // code generated by the Mathematica notebook gamma-gen/gamma-gen.nb
#include <array> #include <array>
namespace Grid { namespace Grid {
@ -88,11 +87,6 @@ inline Gamma operator*(const Gamma &g1, const Gamma &g2)
return Gamma(Gamma::mul[g1.g][g2.g]); return Gamma(Gamma::mul[g1.g][g2.g]);
} }
inline Gamma adj(const Gamma &g)
{
return Gamma(Gamma::adj[g.g]);
}
template<class vtype> template<class vtype>
inline void multMinusGamma5(iVector<vtype, Ns> &ret, const iVector<vtype, Ns> &rhs) inline void multMinusGamma5(iVector<vtype, Ns> &ret, const iVector<vtype, Ns> &rhs)
{ {
@ -1446,6 +1440,13 @@ inline auto operator*(const iMatrix<vtype, Ns> &arg, const Gamma &G)
return ret; return ret;
} }
}} }
inline QCD::Gamma adj(const QCD::Gamma &g)
{
return QCD::Gamma(QCD::Gamma::adj[g.g]);
}
}
#endif #endif