Files
compute-runtime/unit_tests/helpers/execution_environment_helper.cpp
Stefanowski, Adam 341fcfc091 [1/n] Move Hardware Info to Execution Environment
- remove gmm_environment_fixture
- remove hwInfo parameter from ExecutionEnvironment methods

Change-Id: Ieb0f9b5b89191fbbaf7676685c77644d42d69c26
Signed-off-by: Adam Stefanowski <adam.stefanowski@intel.com>
2019-03-12 08:39:26 +01:00

28 lines
918 B
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/helpers/execution_environment_helper.h"
#include "runtime/device/device.h"
#include "runtime/helpers/hw_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);
bool enableLocalMemory = HwHelper::get(hwInfo->pPlatform->eRenderCoreFamily).getEnableLocalMemory(*hwInfo);
executionEnvironment->initializeMemoryManager(Device::getEnabled64kbPages(*hwInfo), enableLocalMemory);
return executionEnvironment;
}
} // namespace OCLRT