Update hipGetChanDesc.cpp

Removed bool variable 'testResult' from global scope and confined it to the function.
This commit is contained in:
lthakur
2018-07-17 13:40:54 +05:30
committed by GitHub
parent a185e8c1f9
commit e2eeee29da
+2 -6
View File
@@ -33,12 +33,10 @@ using namespace std;
#define R 8 //rows, height
#define C 8 //columns, width
bool testResult = true;
bool runTest(void);
int main(int argc, char** argv) {
testResult=runTest();
bool testResult=runTest();
if (testResult) {
passed();
@@ -47,12 +45,10 @@ int main(int argc, char** argv) {
}
}
bool runTest()
{
bool testResult=true;
hipChannelFormatDesc chan_test,chan_desc=hipCreateChannelDesc(32,0,0,0,hipChannelFormatKindSigned);
hipArray *hipArray;
HIPCHECK(hipMallocArray(&hipArray, &chan_desc,C,R,0));
HIPCHECK(hipGetChannelDesc(&chan_test,hipArray));