mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00

Change-Id: I5e5b4cc45947a8841282c7d431fb69d9c397a2d4 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
26 lines
725 B
C++
26 lines
725 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 NEO {
|
|
|
|
ExecutionEnvironment *getExecutionEnvironmentImpl(HardwareInfo *&hwInfo) {
|
|
ExecutionEnvironment *executionEnvironment = platformImpl->peekExecutionEnvironment();
|
|
size_t numDevicesReturned = 0;
|
|
hwInfo = nullptr;
|
|
DeviceFactory::getDevices(numDevicesReturned, *executionEnvironment);
|
|
hwInfo = executionEnvironment->getMutableHardwareInfo();
|
|
executionEnvironment->initializeMemoryManager();
|
|
|
|
return executionEnvironment;
|
|
}
|
|
} // namespace NEO
|