Update hipModuleGetTexRef API

[ROCm/clr commit: 76f174b536]
This commit is contained in:
Rahul Garg committed 2017-11-19 22:10:46 +05:30
1 orang tua 0f8296b0c2
melakukan 7453c8b25c
3 files changed
+14 -12

No files matched your search

+4 -4
Melihat File
@@ -838,11 +838,11 @@ hipError_t hipModuleLoadDataEx(hipModule_t *module, const void *image, unsigned
return hipModuleLoadData(module, image);
}
hipError_t hipModuleGetTexRef(hipDeviceptr_t *dptr, hipModule_t hmod, const char* name)
hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const char* name)
{
HIP_INIT_API(dptr, hmod, name);
HIP_INIT_API(texRef, hmod, name);
hipError_t ret = hipSuccess;
if(dptr == NULL){
if(texRef == NULL){
return ihipLogStatus(hipErrorInvalidValue);
}
if(name == NULL || hmod == NULL){
@@ -851,7 +851,7 @@ hipError_t hipModuleGetTexRef(hipDeviceptr_t *dptr, hipModule_t hmod, const char
else{
const auto it = coGlobals.find(name);
if (it == coGlobals.end()) return ihipLogStatus(hipErrorInvalidValue);
*dptr = reinterpret_cast<void*>(it->second);
*texRef = reinterpret_cast<textureReference*>(it->second);
return ihipLogStatus(ret);
}
}