From f86375c992bf47f659cf2944b49fda3a9689f464 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Tue, 17 Jan 2023 09:47:09 -0600 Subject: [PATCH] Attempted to ensure that extra gets allocated in the exactly same way as other added fields (charge, quat and vel) --- lib/gpu/lal_atom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gpu/lal_atom.cpp b/lib/gpu/lal_atom.cpp index f195bf5287..03f3b477c9 100644 --- a/lib/gpu/lal_atom.cpp +++ b/lib/gpu/lal_atom.cpp @@ -124,7 +124,7 @@ bool AtomT::alloc(const int nall) { UCL_READ_ONLY)==UCL_SUCCESS); gpu_bytes+=v.device.row_bytes(); } - if (_extra_fields>0 && _host_view==false) { + if (_extra_fields>0 && !_host_view) { success=success && (extra.alloc(_max_atoms*_extra_fields,*dev,UCL_WRITE_ONLY, UCL_READ_ONLY)==UCL_SUCCESS); gpu_bytes+=extra.device.row_bytes();