2018-09-17 21:42:15 +08:00
|
|
|
/*
|
2019-02-27 18:39:32 +08:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-09-17 21:42:15 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "unit_tests/fixtures/device_instrumentation_fixture.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2018-09-17 21:42:15 +08:00
|
|
|
#include "unit_tests/helpers/execution_environment_helper.h"
|
|
|
|
#include "unit_tests/mocks/mock_device.h"
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-09-17 21:42:15 +08:00
|
|
|
void DeviceInstrumentationFixture::SetUp(bool instrumentation) {
|
|
|
|
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo);
|
|
|
|
if (instrumentation)
|
|
|
|
hwInfo->capabilityTable.instrumentationEnabled = true;
|
2019-05-06 18:33:44 +08:00
|
|
|
device = std::unique_ptr<Device>(Device::create<Device>(executionEnvironment, 0));
|
2018-09-17 21:42:15 +08:00
|
|
|
}
|
2019-05-06 18:33:44 +08:00
|
|
|
} // namespace NEO
|