Ensure that every device has execution environment.

Change-Id: I77a203fb5ffd2c6a9309091f5e048f71c58c4c04
This commit is contained in:
Mrozek, Michal
2018-07-10 17:14:20 +02:00
committed by sys_ocldev
parent 92266e4ad1
commit 4fb02f2e99
6 changed files with 23 additions and 26 deletions

View File

@@ -31,7 +31,11 @@
using namespace OCLRT;
MockDevice::MockDevice(const HardwareInfo &hwInfo)
: Device(hwInfo) {
: MockDevice(hwInfo, new ExecutionEnvironment) {
}
OCLRT::MockDevice::MockDevice(const HardwareInfo &hwInfo, ExecutionEnvironment *executionEnvironment)
: Device(hwInfo, executionEnvironment) {
memoryManager = new OsAgnosticMemoryManager;
this->osTime = MockOSTime::create();
mockWaTable = *hwInfo.pWaTable;
@@ -83,7 +87,7 @@ OCLRT::FailMemoryManager::FailMemoryManager(int32_t fail) : MockMemoryManager()
this->fail = fail;
}
MockAlignedMallocManagerDevice::MockAlignedMallocManagerDevice(const HardwareInfo &hwInfo) : MockDevice(hwInfo) {
MockAlignedMallocManagerDevice::MockAlignedMallocManagerDevice(const HardwareInfo &hwInfo, ExecutionEnvironment *executionEnvironment) : MockDevice(hwInfo, executionEnvironment) {
//delete regular OsAgnosticMemoryManager
delete memoryManager;
//and create specific