2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2022-05-09 17:40:30 +00:00
|
|
|
* Copyright (C) 2020-2022 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2021-01-21 13:10:13 +01:00
|
|
|
#include "shared/test/common/mocks/mock_device.h"
|
2020-04-02 09:35:50 +02:00
|
|
|
|
2020-03-18 13:08:45 +01:00
|
|
|
#include "opencl/test/unit_test/mocks/mock_cl_device.h"
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
struct HardwareInfo;
|
|
|
|
|
2020-05-28 14:05:12 +02:00
|
|
|
struct ClDeviceFixture {
|
2022-06-28 16:27:56 +00:00
|
|
|
void SetUp(); // NOLINT(readability-identifier-naming)
|
|
|
|
void setUpImpl(const NEO::HardwareInfo *hardwareInfo);
|
|
|
|
void TearDown(); // NOLINT(readability-identifier-naming)
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2018-07-25 17:12:44 +02:00
|
|
|
MockDevice *createWithUsDeviceId(unsigned short usDeviceId);
|
|
|
|
|
|
|
|
MockDevice *pDevice = nullptr;
|
2020-01-14 14:32:11 +01:00
|
|
|
MockClDevice *pClDevice = nullptr;
|
2018-07-25 17:12:44 +02:00
|
|
|
volatile uint32_t *pTagMemory = nullptr;
|
2019-05-08 17:16:25 +02:00
|
|
|
HardwareInfo hardwareInfo = {};
|
2018-07-25 17:12:44 +02:00
|
|
|
PLATFORM platformHelper = {};
|
2021-05-19 21:41:59 +00:00
|
|
|
OsContext *osContext = nullptr;
|
2020-10-08 11:36:31 +02:00
|
|
|
const uint32_t rootDeviceIndex = 0u;
|
2021-10-15 12:02:31 +00:00
|
|
|
MockClExecutionEnvironment *pClExecutionEnvironment = nullptr;
|
2017-12-21 00:45:38 +01:00
|
|
|
};
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|