2020-02-11 18:39:25 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-23 22:20:22 +08:00
|
|
|
#include "opencl/test/unit_test/mocks/mock_platform.h"
|
2020-02-15 00:36:30 +08:00
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/device/device.h"
|
2020-02-15 00:36:30 +08:00
|
|
|
|
2020-02-11 18:39:25 +08:00
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
bool initPlatform() {
|
|
|
|
auto pPlatform = platform();
|
2020-02-15 00:36:30 +08:00
|
|
|
return pPlatform->initialize(DeviceFactory::createDevices(*pPlatform->peekExecutionEnvironment()));
|
|
|
|
}
|
|
|
|
bool MockPlatform::initializeWithNewDevices() {
|
|
|
|
return Platform::initialize(DeviceFactory::createDevices(executionEnvironment));
|
2020-02-11 18:39:25 +08:00
|
|
|
}
|
|
|
|
} // namespace NEO
|