Skip to content

Commit

Permalink
Fix warning in spin taste and minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
maddyscientist committed Jul 8, 2024
1 parent d604f80 commit bb97c6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
16 changes: 7 additions & 9 deletions include/kernels/spin_taste.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ namespace quda
F out; /** output vector field */
const F in; /** input vector field */

SpinTasteArg(ColorSpinorField &out_, const ColorSpinorField &in_) :
kernel_param(dim3(in_.VolumeCB(), in_.SiteSubset(), 1)), out(out_), in(in_)
SpinTasteArg(ColorSpinorField &out, const ColorSpinorField &in) :
kernel_param(dim3(in.VolumeCB(), in.SiteSubset(), 1)), out(out), in(in)
{
checkOrder(out_, in_); // check all orders match
checkPrecision(out_, in_); // check all precisions match
checkLocation(out_, in_); // check all locations match
if (!in_.isNative()) errorQuda("Unsupported field order colorspinor= %d \n", in_.FieldOrder());
if (!out_.isNative()) errorQuda("Unsupported field order colorspinor= %d \n", out_.FieldOrder());
#pragma unroll
for (int i = 0; i < 4; i++) { X[i] = in_.X()[i]; }
checkOrder(out, in); // check all orders match
checkPrecision(out, in); // check all precisions match
checkLocation(out, in); // check all locations match
checkNative(out, in);
for (int i = 0; i < 4; i++) { X[i] = in.X()[i]; }
}
};

Expand Down
16 changes: 5 additions & 11 deletions lib/spin_taste.cu
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,16 @@ namespace quda
void preTune() { out.backup(); }
void postTune() { out.restore(); }

long long flops() const { return 0; }
long long bytes() const { return 2 * in.Bytes(); }
};

#ifdef GPU_STAGGERED_DIRAC
void applySpinTaste(ColorSpinorField &out, const ColorSpinorField &in, QudaSpinTasteGamma gamma)
{
instantiate<SpinTastePhase_>(out, in, gamma);
//// ensure that ghosts are updated if needed
// if (u.GhostExchange() == QUDA_GHOST_EXCHANGE_PAD) u.exchangeGhost();
}
#else
void applySpinTaste(ColorSpinorField &out, const ColorSpinorField &in, QudaSpinTasteGamma gamma)
{
errorQuda("Gauge tools are not build");
if constexpr(is_enabled<QUDA_STAGGERED_DSLASH>()) {
instantiate<SpinTastePhase_>(out, in, gamma);
} else {
errorQuda("Staggered operator has not been built");
}
}
#endif

} // namespace quda

0 comments on commit bb97c6d

Please sign in to comment.