1
Fork 0
mirror of https://github.com/Steffo99/unimore-hpc-assignments.git synced 2024-11-25 17:44:23 +00:00

Add cudaFree instructions

This commit is contained in:
Stefano Pigozzi 2022-12-01 16:22:43 +01:00
parent 6b770e1ef2
commit ae73536d76

View file

@ -351,6 +351,27 @@ __host__ int main(int argc, char** argv)
// Y = cudaMemcpy(); // 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( polybench_prevent_dce(
print_array(Y) print_array(Y)