SWDEV-470698 - fix formatting, add format check workflow (#657)
This commit is contained in:
committed by
GitHub
parent
5840940caa
commit
f7338717ae
@@ -22,21 +22,21 @@
|
||||
#include "hipMalloc.h"
|
||||
|
||||
int MallocFunc() {
|
||||
int* Ad;
|
||||
hipError_t err;
|
||||
err = hipMalloc(reinterpret_cast<void**>(&Ad), 1024);
|
||||
int* Ad;
|
||||
hipError_t err;
|
||||
err = hipMalloc(reinterpret_cast<void**>(&Ad), 1024);
|
||||
if (err == hipSuccess) {
|
||||
std::cout << "hipMalloc PASSED!" << std::endl;
|
||||
err = hipFree(Ad);
|
||||
if (err == hipSuccess) {
|
||||
std::cout <<"hipMalloc PASSED!" <<std::endl;
|
||||
err = hipFree(Ad);
|
||||
if (err == hipSuccess) {
|
||||
std::cout <<"hipFree PASSED!" <<std::endl;
|
||||
return 1;
|
||||
} else {
|
||||
std::cout <<"hipFree FAILED!" <<std::endl;
|
||||
return 0;
|
||||
}
|
||||
std::cout << "hipFree PASSED!" << std::endl;
|
||||
return 1;
|
||||
} else {
|
||||
std::cout <<"hipMalloc FAILED!" <<std::endl;
|
||||
std::cout << "hipFree FAILED!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
std::cout << "hipMalloc FAILED!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user