mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Change-Id: I03db1ee2024a3450dcfc01a0d6d592362a5344b1 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
38 lines
839 B
C++
38 lines
839 B
C++
/*
|
|
* Copyright (C) 2019-2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "core/memory_manager/gfx_partition.h"
|
|
|
|
#include "gmock/gmock.h"
|
|
|
|
using namespace NEO;
|
|
|
|
class MockGfxPartition : public GfxPartition {
|
|
public:
|
|
using GfxPartition::osMemory;
|
|
|
|
uint64_t getHeapSize(HeapIndex heapIndex) {
|
|
return getHeap(heapIndex).getSize();
|
|
}
|
|
|
|
bool heapInitialized(HeapIndex heapIndex) {
|
|
return getHeapSize(heapIndex) > 0;
|
|
}
|
|
|
|
void *getReservedCpuAddressRange() {
|
|
return reservedCpuAddressRange;
|
|
}
|
|
|
|
size_t getReservedCpuAddressRangeSize() {
|
|
return reservedCpuAddressRangeSize;
|
|
}
|
|
|
|
MOCK_METHOD2(freeGpuAddressRange, void(uint64_t gpuAddress, size_t size));
|
|
|
|
static std::array<HeapIndex, static_cast<uint32_t>(HeapIndex::TOTAL_HEAPS)> allHeapNames;
|
|
};
|