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

This commit is contained in:
Trung Nguyen
2018-07-22 15:12:45 -05:00
parent b612c7ee75
commit 644888d03c

View File

@ -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