/* Copyright (c) Advanced Micro Devices, Inc. All rights reserved. * * SPDX-License-Identifier: MIT */ #pragma once #include "backend.h" #include "buffer.h" #include "file.h" #include #include #include namespace hipFile { struct MBackend : Backend { MOCK_METHOD(int, score, (const std::shared_ptr &, const std::shared_ptr &, size_t, hoff_t, hoff_t), (const, override)); MOCK_METHOD(ssize_t, io, (hipFile::IoType type, std::shared_ptr, std::shared_ptr, size_t, hoff_t, hoff_t), (override)); MOCK_METHOD(ssize_t, _io_impl, (hipFile::IoType type, std::shared_ptr, std::shared_ptr, size_t, hoff_t, hoff_t), (override)); }; struct MBackendWithFallback : BackendWithFallback { MOCK_METHOD(int, score, (const std::shared_ptr &, const std::shared_ptr &, size_t, hoff_t, hoff_t), (const, override)); MOCK_METHOD(ssize_t, _io_impl, (IoType type, std::shared_ptr file, std::shared_ptr buffer, size_t size, hoff_t file_offset, hoff_t buffer_offset), (override)); MOCK_METHOD(bool, is_fallback_eligible, (std::exception_ptr e_ptr, ssize_t nbytes), (const, override)); }; }