Commit 2db43eae authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Modified pForce4a -> pForce4

parent aeb5dc66
......@@ -298,13 +298,13 @@ __global__ void METHOD_NAME(kCalculateCDLJObcGbsaSoftcore, Forces1_kernel)(unsig
unsigned int offset = x + tgx + (x >> GRIDBITS) * cSim.stride;
#endif
float4 of = cSim.pForce4a[offset];
float4 of = cSim.pForce4[offset];
float bf = cSim.pBornForce[offset];
of.x += af.x;
of.y += af.y;
of.z += af.z;
bf += af.w;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
cSim.pBornForce[offset] = bf;
}
......@@ -691,13 +691,13 @@ __global__ void METHOD_NAME(kCalculateCDLJObcGbsaSoftcore, Forces1_kernel)(unsig
#else
unsigned int offset = x + tgx + (y >> GRIDBITS) * cSim.stride;
#endif
float4 of = cSim.pForce4a[offset];
float4 of = cSim.pForce4[offset];
float bf = cSim.pBornForce[offset];
of.x += af.x;
of.y += af.y;
of.z += af.z;
bf += af.w;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
cSim.pBornForce[offset] = bf;
#ifdef USE_OUTPUT_BUFFER_PER_WARP
......@@ -705,44 +705,44 @@ __global__ void METHOD_NAME(kCalculateCDLJObcGbsaSoftcore, Forces1_kernel)(unsig
#else
offset = y + tgx + (x >> GRIDBITS) * cSim.stride;
#endif
of = cSim.pForce4a[offset];
of = cSim.pForce4[offset];
bf = cSim.pBornForce[offset];
of.x += sA[threadIdx.x].fx;
of.y += sA[threadIdx.x].fy;
of.z += sA[threadIdx.x].fz;
bf += sA[threadIdx.x].fb;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
cSim.pBornForce[offset] = bf;
#if 0
#ifdef USE_OUTPUT_BUFFER_PER_WARP
unsigned int offset = x + tgx + warp*cSim.stride;
float4 of = cSim.pForce4a[offset];
float4 of = cSim.pForce4[offset];
of.x += af.x;
of.y += af.y;
of.z += af.z;
of.w += af.w;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
cSim.pBornForce[offset] = af.w;
offset = y + tgx + warp*cSim.stride;
of = cSim.pForce4a[offset];
of = cSim.pForce4[offset];
of.x += sA[threadIdx.x].fx;
of.y += sA[threadIdx.x].fy;
of.z += sA[threadIdx.x].fz;
of.w += sA[threadIdx.x].fb;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
cSim.pBornForce[offset] = af.w;
#else
unsigned int offset = x + tgx + (y >> GRIDBITS) * cSim.stride;
cSim.pForce4a[offset] = af;
cSim.pForce4[offset] = af;
cSim.pBornForce[offset] = af.w;
af.x = sA[threadIdx.x].fx;
af.y = sA[threadIdx.x].fy;
af.z = sA[threadIdx.x].fz;
af.w = sA[threadIdx.x].fb;
offset = y + tgx + (x >> GRIDBITS) * cSim.stride;
cSim.pForce4a[offset] = af;
cSim.pForce4[offset] = af;
cSim.pBornForce[offset] = af.w;
#endif
......
......@@ -130,7 +130,7 @@ __global__ void kCalculateGBVISoftcoreForces2a_kernel()
}
// Write results
cSim.pForce4a[pos] = force;
cSim.pForce4[pos] = force;
}
......
......@@ -26,7 +26,7 @@
#include "GpuLJ14Softcore.h"
#include "GpuFreeEnergyCudaKernels.h"
#include <cuda.h>
//#include <cuda.h>
static __constant__ cudaGmxSimulation cSim;
static __constant__ cudaFreeEnergySimulationNonbonded14 feSim;
......
......@@ -250,18 +250,18 @@ __global__ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int*
float4 of;
#ifdef USE_OUTPUT_BUFFER_PER_WARP
unsigned int offset = x + tgx + warp*cSim.stride;
of = cSim.pForce4a[offset];
of = cSim.pForce4[offset];
of.x += af.x;
of.y += af.y;
of.z += af.z;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
#else
of.x = af.x;
of.y = af.y;
of.z = af.z;
of.w = 0.0f;
unsigned int offset = x + tgx + (x >> GRIDBITS) * cSim.stride;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
#endif
}
else // 100% utilization
......@@ -564,29 +564,29 @@ __global__ void METHOD_NAME(kCalculateCDLJSoftcore, Forces_kernel)(unsigned int*
float4 of;
#ifdef USE_OUTPUT_BUFFER_PER_WARP
unsigned int offset = x + tgx + warp*cSim.stride;
of = cSim.pForce4a[offset];
of = cSim.pForce4[offset];
of.x += af.x;
of.y += af.y;
of.z += af.z;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
offset = y + tgx + warp*cSim.stride;
of = cSim.pForce4a[offset];
of = cSim.pForce4[offset];
of.x += sA[threadIdx.x].fx;
of.y += sA[threadIdx.x].fy;
of.z += sA[threadIdx.x].fz;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
#else
of.x = af.x;
of.y = af.y;
of.z = af.z;
of.w = 0.0f;
unsigned int offset = x + tgx + (y >> GRIDBITS) * cSim.stride;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
of.x = sA[threadIdx.x].fx;
of.y = sA[threadIdx.x].fy;
of.z = sA[threadIdx.x].fz;
offset = y + tgx + (x >> GRIDBITS) * cSim.stride;
cSim.pForce4a[offset] = of;
cSim.pForce4[offset] = of;
#endif
lasty = y;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment