mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "offline_compiler/decoder/binary_decoder.h"
|
|
|
|
#include "mock_iga_wrapper.h"
|
|
|
|
struct MockDecoder : public BinaryDecoder {
|
|
MockDecoder() : MockDecoder("", "", "") {
|
|
}
|
|
MockDecoder(const std::string &file, const std::string &patch, const std::string &dump)
|
|
: BinaryDecoder(file, patch, dump) {
|
|
this->iga.reset(new MockIgaWrapper);
|
|
setMessagePrinter(MessagePrinter{true});
|
|
};
|
|
using BinaryDecoder::binaryFile;
|
|
using BinaryDecoder::decode;
|
|
using BinaryDecoder::getSize;
|
|
using BinaryDecoder::iga;
|
|
using BinaryDecoder::kernelHeader;
|
|
using BinaryDecoder::parseTokens;
|
|
using BinaryDecoder::patchTokens;
|
|
using BinaryDecoder::pathToDump;
|
|
using BinaryDecoder::pathToPatch;
|
|
using BinaryDecoder::processBinary;
|
|
using BinaryDecoder::processKernel;
|
|
using BinaryDecoder::programHeader;
|
|
using BinaryDecoder::readPatchTokens;
|
|
using BinaryDecoder::readStructFields;
|
|
|
|
MockIgaWrapper *getMockIga() const {
|
|
return static_cast<MockIgaWrapper *>(iga.get());
|
|
}
|
|
};
|