mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
add getDeviceHandle() at OS specific level
Change-Id: I95fc24043f8f603d6270323b0f23a78f9d8ad2f1 Signed-off-by: mraghuwa <mayank.raghuwanshi@intel.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user