Fixed review comments

Tá an tiomantas seo le fáil i:
Rahul Garg
2017-11-21 21:19:06 +05:30
tuismitheoir 9866fa250d
tiomantas 56862b1c35
D'athraigh 4 comhad le 162 breiseanna agus 163 scriosta
+12 -11
Féach ar an gComhad
@@ -841,17 +841,18 @@ hipError_t hipModuleLoadDataEx(hipModule_t *module, const void *image, unsigned
hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const char* name)
{
HIP_INIT_API(texRef, hmod, name);
hipError_t ret = hipSuccess;
hipError_t ret = hipErrorNotFound;
if(texRef == NULL){
return ihipLogStatus(hipErrorInvalidValue);
}
if(name == NULL || hmod == NULL){
return ihipLogStatus(hipErrorNotInitialized);
}
else{
const auto it = hmod->coGlobals.find(name);
if (it == hmod->coGlobals.end()) return ihipLogStatus(hipErrorInvalidValue);
*texRef = reinterpret_cast<textureReference*>(it->second);
return ihipLogStatus(ret);
ret = hipErrorInvalidValue;
} else {
if(name == NULL || hmod == NULL){
ret = hipErrorNotInitialized;
} else{
const auto it = hmod->coGlobals.find(name);
if (it == hmod->coGlobals.end()) return ihipLogStatus(hipErrorInvalidValue);
*texRef = reinterpret_cast<textureReference*>(it->second);
ret = hipSuccess;
}
}
return ihipLogStatus(ret);
}