diff options
author | Daniil Kazantsev <dkazanc@hotmail.com> | 2019-01-06 23:16:57 +0000 |
---|---|---|
committer | Daniil Kazantsev <dkazanc@hotmail.com> | 2019-01-06 23:16:57 +0000 |
commit | f16ccc9c9f61d785f339480a3570d958791197e8 (patch) | |
tree | c9c9a03de0bbe2193ae9b1cf4f1be8c8a002629d | |
parent | 07fb80445f83758e4aed94a461cf1cf2b869318a (diff) | |
download | regularization-f16ccc9c9f61d785f339480a3570d958791197e8.tar.gz regularization-f16ccc9c9f61d785f339480a3570d958791197e8.tar.bz2 regularization-f16ccc9c9f61d785f339480a3570d958791197e8.tar.xz regularization-f16ccc9c9f61d785f339480a3570d958791197e8.zip |
adds CudaResetdevice to PatchSelect module
-rw-r--r-- | Core/regularisers_GPU/PatchSelect_GPU_core.cu | 4 |
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; } |