From 6647417b2cae739cf0a50b0e458db38208862c49 Mon Sep 17 00:00:00 2001 From: M Clark Date: Thu, 14 May 2015 10:41:08 -0700 Subject: [PATCH 1/2] Added direct/inverse labelling to TwistCloverDslashCuda. --- lib/dslash_quda.cu | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/dslash_quda.cu b/lib/dslash_quda.cu index 6cce1c3f17..e69a4912a9 100644 --- a/lib/dslash_quda.cu +++ b/lib/dslash_quda.cu @@ -408,12 +408,13 @@ class TwistCloverGamma5Cuda : public Tunable { bool tuneGridDim() const { return false; } // Don't tune the grid dimensions. unsigned int minThreads() const { return in->X(0) * in->X(1) * in->X(2) * in->X(3); } char *saveOut, *saveOutNorm; + char aux_string[TuneKey::aux_n]; public: TwistCloverGamma5Cuda(cudaColorSpinorField *out, const cudaColorSpinorField *in, double kappa, double mu, double epsilon, const int dagger, QudaTwistGamma5Type tw, cFloat *clov, const float *cN, cFloat *clovInv, const float *cN2, int cl_stride) : - out(out), in(in) + clover(clov), cNorm(cN), cloverInv(clovInv), cNrm2(cN2), twist(tw), out(out), in(in) { bindSpinorTex(in); dslashParam.sp_stride = in->Stride(); @@ -421,24 +422,26 @@ class TwistCloverGamma5Cuda : public Tunable { dslashParam.cl_stride = cl_stride; dslashParam.fl_stride = in->VolumeCB(); #endif - twist = tw; - clover = clov; - cNorm = cN; - cloverInv = clovInv; - cNrm2 = cN2; if((in->TwistFlavor() == QUDA_TWIST_PLUS) || (in->TwistFlavor() == QUDA_TWIST_MINUS)) setTwistParam(a, b, kappa, mu, dagger, tw); else{//twist doublet errorQuda("ERROR: Non-degenerated twisted-mass not supported in this regularization\n"); } + + strcpy(aux_string,in->AuxString()); + if (twist == QUDA_TWIST_GAMMA5_DIRECT) { + strcat(aux_string,"direct"); + } else { + strcat(aux_string,"inverse"); + } } virtual ~TwistCloverGamma5Cuda() { unbindSpinorTex(in); } TuneKey tuneKey() const { - return TuneKey(in->VolString(), typeid(*this).name(), in->AuxString()); + return TuneKey(in->VolString(), typeid(*this).name(), aux_string); } void apply(const cudaStream_t &stream) From 2adfd7c511742b52cb6cae781d2dca7d07654b86 Mon Sep 17 00:00:00 2001 From: M Clark Date: Thu, 14 May 2015 10:49:45 -0700 Subject: [PATCH 2/2] Minor formatting fix. --- lib/dslash_quda.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dslash_quda.cu b/lib/dslash_quda.cu index e69a4912a9..80eced4719 100644 --- a/lib/dslash_quda.cu +++ b/lib/dslash_quda.cu @@ -431,9 +431,9 @@ class TwistCloverGamma5Cuda : public Tunable { strcpy(aux_string,in->AuxString()); if (twist == QUDA_TWIST_GAMMA5_DIRECT) { - strcat(aux_string,"direct"); + strcat(aux_string,",direct"); } else { - strcat(aux_string,"inverse"); + strcat(aux_string,",inverse"); } } virtual ~TwistCloverGamma5Cuda() {