Files
compute-runtime/unit_tests/mocks/mock_tbx_sockets.h
Milczarek, Slawomir aa18a62d70 A partial unification of AUB and TBX CSR classes
This commit moves initialization of global MMIOs from AUB CSR to Simulated CSR

Change-Id: I93a612d4f0c82e7135287f6508870190790141bc
2018-11-10 13:12:22 -08:00

35 lines
961 B
C++

/*
* Copyright (C) 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/tbx/tbx_sockets.h"
namespace OCLRT {
class MockTbxSockets : public TbxSockets {
public:
MockTbxSockets(){};
~MockTbxSockets() override = default;
bool init(const std::string &hostNameOrIp, uint16_t port) override { return true; };
void close() override{};
bool writeGTT(uint32_t gttOffset, uint64_t entry) override { return true; };
bool readMemory(uint64_t offset, void *data, size_t size) override { return true; };
bool writeMemory(uint64_t offset, const void *data, size_t size, uint32_t type) override {
typeCapturedFromWriteMemory = type;
return true;
};
bool readMMIO(uint32_t offset, uint32_t *data) override { return true; };
bool writeMMIO(uint32_t offset, uint32_t data) override { return true; };
uint32_t typeCapturedFromWriteMemory = 0;
};
} // namespace OCLRT