2018-03-05 16:25:40 +08:00
|
|
|
/*
|
2019-02-27 18:39:32 +08:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-09-18 15:11:08 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
2018-03-05 16:25:40 +08:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "runtime/built_ins/sip.h"
|
2019-12-17 15:11:16 +08:00
|
|
|
#include "unit_tests/mocks/mock_execution_environment.h"
|
2019-02-27 18:39:32 +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();
|
|
|
|
~MockSipKernel();
|
|
|
|
|
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
|