Fix more bugs fetching from texture memory 91/5191/1
authorDavid <dhardy@ks.uiuc.edu>
Wed, 29 May 2019 22:20:19 +0000 (17:20 -0500)
committerDavid <dhardy@ks.uiuc.edu>
Wed, 29 May 2019 22:20:19 +0000 (17:20 -0500)
The previous bug showed up three times in the CUDA bond code.

Change-Id: I74a205c4de3654990e4358110bd500294d2e83fe

src/ComputeBondedCUDAKernel.cu

index 1f99d18..e5ee672 100644 (file)
@@ -261,7 +261,7 @@ __device__ void modifiedExclusionForce(
 #if __CUDA_ARCH__ >= 350
     float2 ljab = __ldg(&vdwCoefTable[vdwIndex]);
 #else
-    float2 ljab = tex1D<float2>(vdwCoefTableTex, vdwIndex);
+    float2 ljab = tex1Dfetch<float2>(vdwCoefTableTex, vdwIndex);
 #endif
 
     float4 fi = tex1D<float4>(forceTableTex, rinv);
@@ -385,7 +385,7 @@ __device__ void exclusionForce(
 #if __CUDA_ARCH__ >= 350
     float r2_table_val = __ldg(&r2_table[table_i]);
 #else
-    float r2_table_val = tex1D<float>(r2_table_tex, table_i);
+    float r2_table_val = tex1Dfetch<float>(r2_table_tex, table_i);
 #endif
     float diffa = r2 - r2_table_val;
     float qq = xyzqi.w * xyzqj.w;
@@ -393,7 +393,7 @@ __device__ void exclusionForce(
 #if __CUDA_ARCH__ >= 350
     float4 slow = __ldg(&exclusionTable[table_i]);
 #else
-    float4 slow = tex1D<float4>(exclusionTableTex, table_i);
+    float4 slow = tex1Dfetch<float4>(exclusionTableTex, table_i);
 #endif
 
     if (doEnergy) {