Files
compute-runtime/shared/test/common/helpers/device_caps_reader_test_helper.h
Radoslaw Jablonski 2a236d079c feature: add device caps helpers
Related-To: NEO-13039

Signed-off-by: Radoslaw Jablonski <radoslaw.jablonski@intel.com>
2025-07-30 15:03:38 +02:00

28 lines
597 B
C++

/*
* Copyright (C) 2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/debug_helpers.h"
#include "shared/source/helpers/device_caps_reader.h"
using namespace NEO;
class DeviceCapsReaderMock : public DeviceCapsReader {
public:
DeviceCapsReaderMock(std::vector<uint32_t> &caps) : caps(caps) {}
std::vector<uint32_t> caps;
uint32_t operator[](size_t offsetDw) const override {
if (offsetDw >= caps.size()) {
DEBUG_BREAK_IF(true);
return 0;
}
return caps[offsetDw];
}
};