Files
compute-runtime/unit_tests/helpers/execution_environment_helper.cpp
Jobczyk, Lukasz 9ecb3193af Reverse logic of creating Memory Manager - part 3
-Move a Device::getEnabled64kbPages method's logic
 to the Memory Manager constructor

Change-Id: Ide88898000e5817a79f9a6ad5dfc9d680bec0533
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-03-25 14:42:16 +01:00

25 lines
677 B
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/helpers/execution_environment_helper.h"
#include "runtime/os_interface/device_factory.h"
#include "runtime/platform/platform.h"
namespace OCLRT {
ExecutionEnvironment *getExecutionEnvironmentImpl(HardwareInfo *&hwInfo) {
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
size_t numDevicesReturned = 0;
hwInfo = nullptr;
DeviceFactory::getDevices(&hwInfo, numDevicesReturned, *executionEnvironment);
executionEnvironment->initializeMemoryManager();
return executionEnvironment;
}
} // namespace OCLRT