From f16ccc9c9f61d785f339480a3570d958791197e8 Mon Sep 17 00:00:00 2001 From: Daniil Kazantsev Date: Sun, 6 Jan 2019 23:16:57 +0000 Subject: adds CudaResetdevice to PatchSelect module --- Core/regularisers_GPU/PatchSelect_GPU_core.cu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3