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