Make MemoryOperationsHandler adapter specific

Change-Id: I978ecaf0fbe3cfc3b645b84d978b7d9234b28bd1
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
Jobczyk, Lukasz
2019-11-28 13:02:11 +01:00
committed by sys_ocldev
parent ec22a08785
commit 44a9ec5c1a
22 changed files with 107 additions and 56 deletions

View File

@@ -5,6 +5,7 @@
*
*/
#include "core/execution_environment/root_device_environment.h"
#include "core/helpers/hw_info.h"
#include "runtime/device/device.h"
#include "runtime/os_interface/device_factory.h"
@@ -33,7 +34,9 @@ bool DeviceFactory::getDevices(size_t &numDevices, ExecutionEnvironment &executi
return false;
}
executionEnvironment.memoryOperationsInterface = std::make_unique<DrmMemoryOperationsHandler>();
for (auto rootDeviceIndex = 0u; rootDeviceIndex < numRootDevices; rootDeviceIndex++) {
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->memoryOperationsInterface = std::make_unique<DrmMemoryOperationsHandler>();
}
executionEnvironment.osInterface.reset(new OSInterface());
executionEnvironment.osInterface->get()->setDrm(drm);