SWDEV-481860 - Match malloc/hipMalloc calls with free/hipFree calls in all samples.
Change-Id: Ib44551b3f60cd90fa7158e4ed016ef5549a34ef7
This commit is contained in:
committed by
Jaydeepkumar Patel
vanhempi
dac779c834
commit
b89a7c6201
@@ -100,5 +100,11 @@ int main(int argc, char* argv[]) {
|
||||
checkHipErrors(hipErrorUnknown);
|
||||
}
|
||||
}
|
||||
|
||||
checkHipErrors(hipFree(A_d));
|
||||
checkHipErrors(hipFree(C_d));
|
||||
free(A_h);
|
||||
free(C_h);
|
||||
|
||||
printf("PASSED!\n");
|
||||
}
|
||||
|
||||
@@ -94,5 +94,10 @@ int main(int argc, char *argv[])
|
||||
CHECK(cudaErrorUnknown);
|
||||
}
|
||||
}
|
||||
|
||||
CHECK ( cudaFree(A_d));
|
||||
CHECK ( cudaFree(C_d));
|
||||
free(A_h);
|
||||
free(C_h);
|
||||
printf ("PASSED!\n");
|
||||
}
|
||||
|
||||
@@ -92,5 +92,11 @@ int main(int argc, char* argv[]) {
|
||||
CHECK(hipErrorUnknown);
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(hipFree(A_d));
|
||||
CHECK(hipFree(C_d));
|
||||
free(A_h);
|
||||
free(C_h);
|
||||
|
||||
printf("PASSED!\n");
|
||||
}
|
||||
|
||||
@@ -86,5 +86,9 @@ int main() {
|
||||
} else {
|
||||
std::cout << "success\n";
|
||||
}
|
||||
free(hInput);
|
||||
free(hOutput);
|
||||
checkHipErrors(hipFree(dInput));
|
||||
checkHipErrors(hipFree(dOutput));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -84,5 +84,11 @@ int main(int argc, char *argv[])
|
||||
checkHipErrors(hipErrorUnknown);
|
||||
}
|
||||
}
|
||||
|
||||
checkHipErrors(hipFree(A_d));
|
||||
checkHipErrors(hipFree(C_d));
|
||||
free(A_h);
|
||||
free(C_h);
|
||||
|
||||
printf ("PASSED!\n");
|
||||
}
|
||||
|
||||
@@ -84,5 +84,9 @@ int main(int argc, char *argv[])
|
||||
checkHipErrors(hipErrorUnknown);
|
||||
}
|
||||
}
|
||||
checkHipErrors(hipFree(A_d));
|
||||
checkHipErrors(hipFree(C_d));
|
||||
free(A_h);
|
||||
free(C_h);
|
||||
printf ("PASSED!\n");
|
||||
}
|
||||
|
||||
@@ -85,5 +85,9 @@ int main(int argc, char *argv[])
|
||||
checkHipErrors(hipErrorUnknown);
|
||||
}
|
||||
}
|
||||
checkHipErrors(hipFree(A_d));
|
||||
checkHipErrors(hipFree(C_d));
|
||||
free(A_h);
|
||||
free(C_h);
|
||||
printf ("PASSED!\n");
|
||||
}
|
||||
|
||||
@@ -85,5 +85,9 @@ int main(int argc, char *argv[])
|
||||
checkHipErrors(hipErrorUnknown);
|
||||
}
|
||||
}
|
||||
checkHipErrors(hipFree(A_d));
|
||||
checkHipErrors(hipFree(C_d));
|
||||
free(A_h);
|
||||
free(C_h);
|
||||
printf ("PASSED!\n");
|
||||
}
|
||||
|
||||
@@ -85,5 +85,9 @@ int main(int argc, char *argv[])
|
||||
checkHipErrors(hipErrorUnknown);
|
||||
}
|
||||
}
|
||||
checkHipErrors(hipFree(A_d));
|
||||
checkHipErrors(hipFree(C_d));
|
||||
free(A_h);
|
||||
free(C_h);
|
||||
printf ("PASSED!\n");
|
||||
}
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user