Do not overallocate shiftVec and fshifts buffers in OpenCL
[alexxy/gromacs.git] / src / gromacs / nbnxm / opencl / nbnxm_ocl_data_mgmt.cpp
index 0583d0a73d7d6896aa7ebacf2febbfeaea4b9717..b823973a6812fe2707598370e1ab03c6e2329d5a 100644 (file)
@@ -107,10 +107,10 @@ static void init_atomdata_first(NBAtomData* ad, int ntypes, const DeviceContext&
 {
     ad->numTypes = ntypes;
 
-    allocateDeviceBuffer(&ad->shiftVec, SHIFTS * DIM, deviceContext);
+    allocateDeviceBuffer(&ad->shiftVec, SHIFTS, deviceContext);
     ad->shiftVecUploaded = false;
 
-    allocateDeviceBuffer(&ad->fShift, SHIFTS * DIM, deviceContext);
+    allocateDeviceBuffer(&ad->fShift, SHIFTS, deviceContext);
     allocateDeviceBuffer(&ad->eLJ, 1, deviceContext);
     allocateDeviceBuffer(&ad->eElec, 1, deviceContext);