From 644888d03c495258655518d9cf40f51e79acb033 Mon Sep 17 00:00:00 2001 From: Trung Nguyen <ndactrung@gmail.com> Date: Sun, 22 Jul 2018 15:12:45 -0500 Subject: [PATCH] Fixed bugs with time_q and time_quat not calling start() and stop() when _charge and/or _rot in Atom are true for OpenCL builds --- lib/gpu/lal_atom.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/gpu/lal_atom.h b/lib/gpu/lal_atom.h index f6a0b109f2..57880d7ca9 100644 --- a/lib/gpu/lal_atom.h +++ b/lib/gpu/lal_atom.h @@ -322,10 +322,12 @@ class Atom { // Copy charges to device asynchronously inline void add_q_data() { + time_q.start(); if (_q_avail==false) { q.update_device(_nall,true); _q_avail=true; } + time_q.stop(); } // Cast quaternions to write buffer @@ -347,10 +349,12 @@ class Atom { // Copy quaternions to device /** Copies nall()*4 elements **/ inline void add_quat_data() { + time_quat.start(); if (_quat_avail==false) { quat.update_device(_nall*4,true); _quat_avail=true; } + time_quat.stop(); } /// Cast velocities and tags to write buffer -- GitLab