Fix bug fetching from texture memory 86/5186/2
authorDavid <dhardy@ks.uiuc.edu>
Thu, 23 May 2019 18:45:20 +0000 (13:45 -0500)
committerDavid Hardy <dhardy@ks.uiuc.edu>
Thu, 23 May 2019 18:50:07 +0000 (13:50 -0500)
Texture memory fetching for van der Waals coefficients had been broken
for running on Kepler with compute capability less than 3.5.

Change-Id: Ic031f28a1ada8287cc16505fce31f78511c9a475

src/CudaComputeNonbondedKernel.cu

index 4d564f7..7e968ad 100644 (file)
@@ -31,7 +31,7 @@ void calcForceEnergy(const float r2, const float qi, const float qj,
 #if __CUDA_ARCH__ >= 350
   float2 ljab = __ldg(&vdwCoefTable[vdwIndex]);
 #else
-  float2 ljab = tex1D<float2>(vdwCoefTableTex, vdwIndex);
+  float2 ljab = tex1Dfetch<float2>(vdwCoefTableTex, vdwIndex);
 #endif
 
   float rinv = rsqrtf(r2);