mirror of
https://github.com/Steffo99/unimore-hpc-assignments.git
synced 2024-11-22 08:04:25 +00:00
Add cudaFree instructions
This commit is contained in:
parent
6b770e1ef2
commit
ae73536d76
1 changed files with 21 additions and 0 deletions
21
atax/atax.cu
21
atax/atax.cu
|
@ -351,6 +351,27 @@ __host__ int main(int argc, char** argv)
|
|||
|
||||
// Y = cudaMemcpy();
|
||||
|
||||
debug("[CUDA] Freeing A...");
|
||||
if(cudaFree(A)) {
|
||||
debug("[CUDA] Could not free A!");
|
||||
return 1;
|
||||
}
|
||||
debug("[CUDA] Freed A!");
|
||||
|
||||
debug("[CUDA] Freeing X...");
|
||||
if(cudaFree(X)) {
|
||||
debug("[CUDA] Could not free X!");
|
||||
return 1;
|
||||
}
|
||||
debug("[CUDA] Freed X!");
|
||||
|
||||
debug("[CUDA] Freeing Y...");
|
||||
if(cudaFree(Y)) {
|
||||
debug("[CUDA] Could not free Y!");
|
||||
return 1;
|
||||
}
|
||||
debug("[CUDA] Freed Y!");
|
||||
|
||||
/*
|
||||
polybench_prevent_dce(
|
||||
print_array(Y)
|
||||
|
|
Loading…
Reference in a new issue