summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Core/regularisers_GPU/PatchSelect_GPU_core.cu4
1 files changed, 3 insertions, 1 deletions
diff --git a/Core/regularisers_GPU/PatchSelect_GPU_core.cu b/Core/regularisers_GPU/PatchSelect_GPU_core.cu
index d173124..98c8488 100644
--- a/Core/regularisers_GPU/PatchSelect_GPU_core.cu
+++ b/Core/regularisers_GPU/PatchSelect_GPU_core.cu
@@ -449,10 +449,12 @@ extern "C" int PatchSelect_GPU_main(float *A, unsigned short *H_i, unsigned shor
checkCudaErrors(cudaMemcpy(H_j, H_j_d, N*M*NumNeighb*sizeof(unsigned short),cudaMemcpyDeviceToHost) );
checkCudaErrors(cudaMemcpy(Weights, Weights_d, N*M*NumNeighb*sizeof(float),cudaMemcpyDeviceToHost) );
+
cudaFree(Ad);
cudaFree(H_i_d);
cudaFree(H_j_d);
- cudaFree(Weights_d);
+ cudaFree(Weights_d);
cudaFree(Eucl_Vec_d);
+ cudaDeviceReset();
return 0;
}