mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Reorganization directory structure [2/n]
Change-Id: I47962d17d755e80dcd9476e1ed75560f433f6115
This commit is contained in:
committed by
Jaroslaw Chodor
parent
d015d3633f
commit
e8852a68c4
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "helpers/execution_environment_helper.h"
|
||||
|
||||
#include "core/os_interface/device_factory.h"
|
||||
#include "core/unit_tests/helpers/debug_manager_state_restore.h"
|
||||
#include "opencl/source/platform/platform.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
ExecutionEnvironment *getExecutionEnvironmentImpl(HardwareInfo *&hwInfo, uint32_t rootDeviceEnvironments) {
|
||||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(rootDeviceEnvironments);
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateMultipleRootDevices.set(rootDeviceEnvironments);
|
||||
size_t numDevicesReturned = 0;
|
||||
hwInfo = nullptr;
|
||||
DeviceFactory::getDevices(numDevicesReturned, *executionEnvironment);
|
||||
hwInfo = executionEnvironment->getMutableHardwareInfo();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
|
||||
return executionEnvironment;
|
||||
}
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user