Files
compute-runtime/unit_tests/helpers/execution_environment_helper.cpp
Maciej Plewka 9e52684f5b Change namespace from OCLRT to NEO
Change-Id: If965c79d70392db26597aea4c2f3b7ae2820fe96
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2019-03-26 15:48:19 +01:00

25 lines
673 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(&hwInfo, numDevicesReturned, *executionEnvironment);
executionEnvironment->initializeMemoryManager();
return executionEnvironment;
}
} // namespace NEO