From d1f2eaeb4d4b4d4e5f8a6ff1507626bbe61542a8 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 2 Dec 2011 16:12:34 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7284 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- lib/gpu/lal_device.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index d4c2e23857..4428f63638 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -529,12 +529,6 @@ void DeviceT::clear() { if (_init_count==0) { atom.clear(); _neighbor_shared.clear(); - if (_compiled) { - k_zero.clear(); - k_info.clear(); - delete dev_program; - _compiled=false; - } } } } @@ -543,6 +537,12 @@ template void DeviceT::clear_device() { while (_init_count>0) clear(); + if (_compiled) { + k_zero.clear(); + k_info.clear(); + delete dev_program; + _compiled=false; + } if (_device_init) { delete gpu; _device_init=false;