Commit 6a83f3ee authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed compilation errors on some older compilers

parent ce22c4ed
......@@ -857,7 +857,7 @@ double CudaIntegrationUtilities::computeKineticEnergy(double timeShift) {
int paddedNumParticles = context.getPaddedNumAtoms();
long long* force = (long long*) context.getPinnedBuffer();
context.getForce().download(force);
double forceScale = timeShift/0x100000000;
double forceScale = timeShift/0x100000000LL;
double energy = 0.0;
if (context.getUseDoublePrecision() || context.getUseMixedPrecision()) {
vector<double4> velm;
......
......@@ -288,7 +288,7 @@ void CudaUpdateStateDataKernel::getForces(ContextImpl& context, vector<Vec3>& fo
int numParticles = context.getSystem().getNumParticles();
int paddedNumParticles = cu.getPaddedNumAtoms();
forces.resize(numParticles);
double scale = 1.0/(double) 0x100000000;
double scale = 1.0/(double) 0x100000000LL;
for (int i = 0; i < numParticles; ++i)
forces[order[i]] = Vec3(scale*force[i], scale*force[i+paddedNumParticles], scale*force[i+paddedNumParticles*2]);
}
......
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