2019-03-01 23:14:28 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "runtime/memory_manager/gfx_partition.h"
|
|
|
|
|
|
|
|
using namespace OCLRT;
|
|
|
|
|
|
|
|
class MockGfxPartition : public GfxPartition {
|
|
|
|
public:
|
|
|
|
uint64_t getHeapSize(HeapIndex heapIndex) {
|
|
|
|
return getHeap(heapIndex).getSize();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool heapInitialized(HeapIndex heapIndex) {
|
2019-03-15 18:09:06 +08:00
|
|
|
return getHeapSize(heapIndex) > 0;
|
2019-03-01 23:14:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static std::array<HeapIndex, static_cast<uint32_t>(HeapIndex::TOTAL_HEAPS)> allHeapNames;
|
|
|
|
};
|