mirror of
https://github.com/paboyle/Grid.git
synced 2025-07-31 19:57:07 +01:00
Hadrons: macro refactoring for library portability
This commit is contained in:
@@ -119,7 +119,7 @@ void TWardIdentity<FImpl>::setup(void)
|
||||
Ls_ = env().getObjectLs(par().q);
|
||||
if (Ls_ != env().getObjectLs(par().action))
|
||||
{
|
||||
HADRON_ERROR(Size, "Ls mismatch between quark action and propagator");
|
||||
HADRONS_ERROR(Size, "Ls mismatch between quark action and propagator");
|
||||
}
|
||||
envTmpLat(PropagatorField, "tmp");
|
||||
envTmpLat(PropagatorField, "vector_WI");
|
||||
|
@@ -177,7 +177,7 @@ void TGaugeProp<FImpl>::execute(void)
|
||||
{
|
||||
if (Ls_ != env().getObjectLs(par().source))
|
||||
{
|
||||
HADRON_ERROR(Size, "Ls mismatch between quark action and source");
|
||||
HADRONS_ERROR(Size, "Ls mismatch between quark action and source");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -112,7 +112,7 @@ void TDiv<SImpl>::setup(void)
|
||||
{
|
||||
if (par().op.size() != env().getNd())
|
||||
{
|
||||
HADRON_ERROR(Size, "the number of components differs from number of dimensions");
|
||||
HADRONS_ERROR(Size, "the number of components differs from number of dimensions");
|
||||
}
|
||||
envCreateLat(ComplexField, getName());
|
||||
}
|
||||
|
@@ -134,14 +134,14 @@ void TShiftProbe<SImpl>::execute(void)
|
||||
shift = strToVec<ShiftPair>(par().shifts);
|
||||
if (shift.size() % 2 != 0)
|
||||
{
|
||||
HADRON_ERROR(Size, "the number of shifts is odd");
|
||||
HADRONS_ERROR(Size, "the number of shifts is odd");
|
||||
}
|
||||
sign = (shift.size() % 4 == 0) ? 1 : -1;
|
||||
for (auto &s: shift)
|
||||
{
|
||||
if (s.first >= env().getNd())
|
||||
{
|
||||
HADRON_ERROR(Size, "dimension to large for shift <"
|
||||
HADRONS_ERROR(Size, "dimension to large for shift <"
|
||||
+ std::to_string(s.first) + " "
|
||||
+ std::to_string(s.second) + ">" );
|
||||
}
|
||||
|
@@ -119,7 +119,7 @@ void TTrPhi<SImpl>::setup(void)
|
||||
{
|
||||
if (par().maxPow < 2)
|
||||
{
|
||||
HADRON_ERROR(Size, "'maxPow' should be at least equal to 2");
|
||||
HADRONS_ERROR(Size, "'maxPow' should be at least equal to 2");
|
||||
}
|
||||
envTmpLat(Field, "phi2");
|
||||
envTmpLat(Field, "buf");
|
||||
|
@@ -143,7 +143,7 @@ void TTwoPoint<SImpl>::setup(void)
|
||||
mom_[i] = strToVec<int>(par().mom[i]);
|
||||
if (mom_[i].size() != nd - 1)
|
||||
{
|
||||
HADRON_ERROR(Size, "momentum number of components different from "
|
||||
HADRONS_ERROR(Size, "momentum number of components different from "
|
||||
+ std::to_string(nd-1));
|
||||
}
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ inline void dmu(Field &out, const Field &in, const unsigned int mu, const DiffTy
|
||||
|
||||
if (mu >= env.getNd())
|
||||
{
|
||||
HADRON_ERROR(Range, "Derivative direction out of range");
|
||||
HADRONS_ERROR(Range, "Derivative direction out of range");
|
||||
}
|
||||
switch(type)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ inline void dmu(Field &out, const Field &in, const unsigned int mu, const DiffTy
|
||||
out = 0.5*(Cshift(in, mu, 1) - Cshift(in, mu, -1));
|
||||
break;
|
||||
default:
|
||||
HADRON_ERROR(Argument, "Derivative type invalid");
|
||||
HADRONS_ERROR(Argument, "Derivative type invalid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ inline void dmuAcc(Field &out, const Field &in, const unsigned int mu, const Dif
|
||||
|
||||
if (mu >= env.getNd())
|
||||
{
|
||||
HADRON_ERROR(Range, "Derivative direction out of range");
|
||||
HADRONS_ERROR(Range, "Derivative direction out of range");
|
||||
}
|
||||
switch(type)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ inline void dmuAcc(Field &out, const Field &in, const unsigned int mu, const Dif
|
||||
out += 0.5*(Cshift(in, mu, 1) - Cshift(in, mu, -1));
|
||||
break;
|
||||
default:
|
||||
HADRON_ERROR(Argument, "Derivative type invalid");
|
||||
HADRONS_ERROR(Argument, "Derivative type invalid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -127,7 +127,7 @@ void TRBPrecCG<FImpl, nBasis>::setup(void)
|
||||
{
|
||||
if (par().maxIteration == 0)
|
||||
{
|
||||
HADRON_ERROR(Argument, "zero maximum iteration");
|
||||
HADRONS_ERROR(Argument, "zero maximum iteration");
|
||||
}
|
||||
|
||||
LOG(Message) << "setting up Schur red-black preconditioned CG for"
|
||||
|
@@ -123,7 +123,7 @@ void TTestSeqConserved<FImpl>::setup(void)
|
||||
auto Ls = env().getObjectLs(par().q);
|
||||
if (Ls != env().getObjectLs(par().action))
|
||||
{
|
||||
HADRON_ERROR(Size, "Ls mismatch between quark action and propagator");
|
||||
HADRONS_ERROR(Size, "Ls mismatch between quark action and propagator");
|
||||
}
|
||||
envTmpLat(PropagatorField, "tmp");
|
||||
envTmpLat(LatticeComplex, "c");
|
||||
|
Reference in New Issue
Block a user