Introduce ihipModuleGetGlobal

This commit is contained in:
Michael Kuron
2018-11-06 09:54:34 +01:00
والد 4390c82121
کامیت 31acf1c268
3فایلهای تغییر یافته به همراه14 افزوده شده و 6 حذف شده
+8 -3
مشاهده پرونده
@@ -463,14 +463,19 @@ hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t h
const char* name) {
HIP_INIT_API(dptr, bytes, hmod, name);
if (!dptr || !bytes) return ihipLogStatus(hipErrorInvalidValue);
return ihipLogStatus(ihipModuleGetGlobal(dptr, bytes, hmod, name));
}
if (!name) return ihipLogStatus(hipErrorNotInitialized);
hipError_t ihipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t hmod,
const char* name) {
if (!dptr || !bytes) return hipErrorInvalidValue;
if (!name) return hipErrorNotInitialized;
const auto r = hmod ? read_agent_global_from_module(dptr, bytes, hmod, name)
: read_agent_global_from_process(dptr, bytes, name);
return ihipLogStatus(r);
return r;
}
namespace