mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-17 23:37:06 +01:00
Hadrons: macro refactoring for library portability
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user