add getDeviceHandle() at OS specific level

Change-Id: I95fc24043f8f603d6270323b0f23a78f9d8ad2f1
Signed-off-by: mraghuwa <mayank.raghuwanshi@intel.com>
This commit is contained in:
mraghuwa
2020-08-13 23:33:21 +05:30
committed by sys_ocldev
parent 649dfb93ee
commit 4b8d4285d7
30 changed files with 103 additions and 51 deletions

View File

@@ -19,15 +19,17 @@ MemoryHandleContext::~MemoryHandleContext() {
}
}
ze_result_t MemoryHandleContext::init() {
Device *device = L0::Device::fromHandle(hCoreDevice);
isLmemSupported = device->getDriverHandle()->getMemoryManager()->isLocalMemorySupported(device->getRootDeviceIndex());
if (isLmemSupported) {
Memory *pMemory = new MemoryImp(pOsSysman);
void MemoryHandleContext::createHandle() {
Memory *pMemory = new MemoryImp(pOsSysman);
if (pMemory->initSuccess == true) {
handleList.push_back(pMemory);
} else {
delete pMemory;
}
}
ze_result_t MemoryHandleContext::init() {
createHandle();
return ZE_RESULT_SUCCESS;
}