From 8d04b919321442dc5793cee5e324033a1276bcde Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Wed, 19 Aug 2026 19:39:42 -0400 Subject: [PATCH] Clean up whitespace. Gauge group needs a Gimpl or some other policy parameter. Perhaps rename iGaugeGroupd and pass EITHER vComplexD, vComplexF OR sCompexD / sComplexF Use a typedef to restore the original Gauge group --- Grid/qcd/utils/GaugeGroup.h | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Grid/qcd/utils/GaugeGroup.h b/Grid/qcd/utils/GaugeGroup.h index 6811d247e..e5892bcfe 100644 --- a/Grid/qcd/utils/GaugeGroup.h +++ b/Grid/qcd/utils/GaugeGroup.h @@ -36,7 +36,7 @@ directory // This is the only reason why the second template parameter has a name. #define ONLY_IF_SU \ typename dummy_name = group_name, \ - typename named_dummy = std::enable_if_t < \ + typename named_dummy = std::enable_if_t < \ std::is_same::value && \ is_su::value > @@ -89,10 +89,8 @@ template class GaugeGroup { public: static const int Dimension = ncolour; - static const int AdjointDimension = - compute_adjoint_dimension(ncolour); - static const int AlgebraDimension = - compute_adjoint_dimension(ncolour); + static const int AdjointDimension = compute_adjoint_dimension(ncolour); + static const int AlgebraDimension = compute_adjoint_dimension(ncolour); template using iSU2Matrix = iScalar > >; @@ -101,38 +99,37 @@ class GaugeGroup { template using iAlgebraVector = iScalar > >; template - using iSUnAlgebraMatrix = - iScalar > >; + using iSUnAlgebraMatrix = iScalar > >; static int su2subgroups(void) { return su2subgroups(group_name()); } ////////////////////////////////////////////////////////////////////////////////////////////////// // Types can be accessed as SU<2>::Matrix , SU<2>::vSUnMatrix, // SU<2>::LatticeMatrix etc... ////////////////////////////////////////////////////////////////////////////////////////////////// - typedef iGroupMatrix Matrix; + typedef iGroupMatrix Matrix; typedef iGroupMatrix MatrixF; typedef iGroupMatrix MatrixD; - typedef iGroupMatrix vMatrix; + typedef iGroupMatrix vMatrix; typedef iGroupMatrix vMatrixF; typedef iGroupMatrix vMatrixD; // For the projectors to the algebra // these should be real... // keeping complex for consistency with the SIMD vector types - typedef iAlgebraVector AlgebraVector; + typedef iAlgebraVector AlgebraVector; typedef iAlgebraVector AlgebraVectorF; typedef iAlgebraVector AlgebraVectorD; - typedef iAlgebraVector vAlgebraVector; + typedef iAlgebraVector vAlgebraVector; typedef iAlgebraVector vAlgebraVectorF; typedef iAlgebraVector vAlgebraVectorD; - typedef Lattice LatticeMatrix; + typedef Lattice LatticeMatrix; typedef Lattice LatticeMatrixF; typedef Lattice LatticeMatrixD; - typedef Lattice LatticeAlgebraVector; + typedef Lattice LatticeAlgebraVector; typedef Lattice LatticeAlgebraVectorF; typedef Lattice LatticeAlgebraVectorD; @@ -145,15 +142,15 @@ class GaugeGroup { typedef Lattice LatticeAlgebraMatrixD; - typedef iSU2Matrix SU2Matrix; + typedef iSU2Matrix SU2Matrix; typedef iSU2Matrix SU2MatrixF; typedef iSU2Matrix SU2MatrixD; - typedef iSU2Matrix vSU2Matrix; + typedef iSU2Matrix vSU2Matrix; typedef iSU2Matrix vSU2MatrixF; typedef iSU2Matrix vSU2MatrixD; - typedef Lattice LatticeSU2Matrix; + typedef Lattice LatticeSU2Matrix; typedef Lattice LatticeSU2MatrixF; typedef Lattice LatticeSU2MatrixD; @@ -296,16 +293,18 @@ class GaugeGroup { Umu = ProjectOnGeneralGroup(Umu); } } - - template - static Lattice > > > ProjectOnGeneralGroup(const Lattice > > > &Umu) { + static Lattice > > > + ProjectOnGeneralGroup(const Lattice > > > &Umu) + { return ProjectOnGeneralGroup(Umu, group_name()); } - template // Projects on SU(N), Sp(2N), with unit determinant, by first projecting on general group and then enforcing unit determinant - static void ProjectOnSpecialGroup(Lattice > > > &Umu) { + // Projects on SU(N), Sp(2N), with unit determinant, by first projecting on general group and then enforcing unit determinant + template + static void ProjectOnSpecialGroup(Lattice > > > &Umu) + { Umu = ProjectOnGeneralGroup(Umu); auto det = Determinant(Umu); @@ -319,14 +318,15 @@ class GaugeGroup { } template // reunitarise, resimplectify... previously ProjectSUn - static void ProjectOnSpecialGroup(Lattice >, Nd> > &U) { + static void ProjectOnSpecialGroup(Lattice >, Nd> > &U) + { // Reunitarise for (int mu = 0; mu < Nd; mu++) { auto Umu = PeekIndex(U, mu); ProjectOnSpecialGroup(Umu); PokeIndex(U, Umu, mu); } - } + } template static void HotConfiguration(GridParallelRNG &pRNG, GaugeField &out) {