caught device memory leak
authorLawrence Cayton <lcayton@tuebingen.mpg.de>
Tue, 5 Apr 2011 16:57:07 +0000 (18:57 +0200)
committerLawrence Cayton <lcayton@tuebingen.mpg.de>
Tue, 5 Apr 2011 16:57:07 +0000 (18:57 +0200)
rbc.cu

diff --git a/rbc.cu b/rbc.cu
index 3237fe1..c8b8f79 100644 (file)
--- a/rbc.cu
+++ b/rbc.cu
@@ -58,6 +58,7 @@ void queryRBC(const matrix q, const rbcStruct rbcS, unint *NNs, real* NNdists){
   computeNNs(rbcS.dx, rbcS.dxMap, dq, dqMap, dcP, NNs, NNdists, compLength);
   
   free(qMap);
+  cudaFree(dqMap);
   freeCompPlan(&dcP);
   cudaFree(dq.mat);
   free(cM.mat);