2018-03-05 09:25:40 +01:00
|
|
|
/*
|
2020-02-22 09:28:27 +01:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-09-18 09:11:08 +02:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
2018-03-05 09:25:40 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-02-24 13:10:44 +01:00
|
|
|
#include "shared/source/built_ins/sip.h"
|
|
|
|
|
2020-02-23 15:20:22 +01:00
|
|
|
#include "opencl/test/unit_test/mocks/mock_execution_environment.h"
|
2020-02-22 09:28:27 +01:00
|
|
|
|
2019-12-03 15:57:45 +01:00
|
|
|
#include <memory>
|
2018-03-05 09:25:40 +01:00
|
|
|
#include <vector>
|
2019-12-03 15:57:45 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2019-12-03 15:57:45 +01:00
|
|
|
class MemoryAllocation;
|
|
|
|
|
2018-03-05 09:25:40 +01:00
|
|
|
class MockSipKernel : public SipKernel {
|
|
|
|
public:
|
2019-12-03 15:57:45 +01:00
|
|
|
using SipKernel::program;
|
|
|
|
using SipKernel::type;
|
|
|
|
|
|
|
|
MockSipKernel(SipKernelType type, Program *sipProgram);
|
|
|
|
MockSipKernel();
|
2020-03-13 09:17:01 +01:00
|
|
|
~MockSipKernel() override;
|
2019-12-03 15:57:45 +01:00
|
|
|
|
2018-03-05 09:25:40 +01:00
|
|
|
static std::vector<char> dummyBinaryForSip;
|
|
|
|
static std::vector<char> getDummyGenBinary();
|
|
|
|
static std::vector<char> getBinary();
|
|
|
|
static void initDummyBinary();
|
|
|
|
static void shutDown();
|
2019-12-03 15:57:45 +01:00
|
|
|
|
|
|
|
GraphicsAllocation *getSipAllocation() const override;
|
|
|
|
|
|
|
|
std::unique_ptr<MemoryAllocation> mockSipMemoryAllocation;
|
2019-12-17 08:11:16 +01:00
|
|
|
MockExecutionEnvironment executionEnvironment;
|
2018-03-05 09:25:40 +01:00
|
|
|
};
|
2019-12-17 08:11:16 +01:00
|
|
|
} // namespace NEO
|