Files
compute-runtime/unit_tests/mocks/mock_platform.cpp
Mateusz Jablonski 33c1a16f2f Initialize execution environment before creating platform
Related-To: NEO-4208
Change-Id: I3a242bfcc149aad01966693f99fbfc51ba71483d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-13 14:48:00 +01:00

19 lines
435 B
C++

/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/mocks/mock_platform.h"
namespace NEO {
bool initPlatform() {
auto pPlatform = platform();
auto executionEnvironment = pPlatform->peekExecutionEnvironment();
size_t numRootDevices = 0u;
getDevices(numRootDevices, *executionEnvironment);
return pPlatform->initialize(numRootDevices, 0u);
}
} // namespace NEO