2018-11-11 05:25:48 +08:00
|
|
|
/*
|
2023-03-01 05:08:09 +08:00
|
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
2018-11-11 05:25:48 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/execution_environment/execution_environment.h"
|
2022-11-16 22:01:52 +08:00
|
|
|
#include "shared/source/execution_environment/root_device_environment.h"
|
2019-02-08 22:08:35 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2019-11-15 16:59:48 +08:00
|
|
|
|
|
|
|
struct MockRootDeviceEnvironment : public RootDeviceEnvironment {
|
2023-06-23 22:26:00 +08:00
|
|
|
using RootDeviceEnvironment::hwInfo;
|
2023-03-01 05:08:09 +08:00
|
|
|
using RootDeviceEnvironment::isDummyAllocationInitialized;
|
2019-11-15 16:59:48 +08:00
|
|
|
using RootDeviceEnvironment::RootDeviceEnvironment;
|
|
|
|
~MockRootDeviceEnvironment() override = default;
|
|
|
|
|
2022-11-16 22:01:52 +08:00
|
|
|
void initAubCenter(bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType) override;
|
2018-11-11 05:25:48 +08:00
|
|
|
bool initAubCenterCalled = false;
|
2018-11-26 06:58:12 +08:00
|
|
|
bool localMemoryEnabledReceived = false;
|
|
|
|
std::string aubFileNameReceived = "";
|
2019-03-19 18:57:45 +08:00
|
|
|
bool useMockAubCenter = true;
|
2019-07-24 20:07:14 +08:00
|
|
|
};
|
2019-11-15 16:59:48 +08:00
|
|
|
|
|
|
|
struct MockExecutionEnvironment : ExecutionEnvironment {
|
2023-08-04 17:10:42 +08:00
|
|
|
using ExecutionEnvironment::adjustCcsCountImpl;
|
2021-07-30 17:56:58 +08:00
|
|
|
using ExecutionEnvironment::directSubmissionController;
|
2023-08-04 17:10:42 +08:00
|
|
|
using ExecutionEnvironment::rootDeviceEnvironments;
|
2021-07-30 17:56:58 +08:00
|
|
|
|
2019-11-15 16:59:48 +08:00
|
|
|
~MockExecutionEnvironment() override = default;
|
2022-11-16 22:01:52 +08:00
|
|
|
MockExecutionEnvironment();
|
|
|
|
MockExecutionEnvironment(const HardwareInfo *hwInfo);
|
|
|
|
MockExecutionEnvironment(const HardwareInfo *hwInfo, bool useMockAubCenter, uint32_t numRootDevices);
|
|
|
|
void initGmm();
|
2019-11-15 16:59:48 +08:00
|
|
|
};
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|