2022-08-03 00:08:54 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2022 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "shared/source/memory_manager/prefetch_manager.h"
|
2022-08-04 09:45:19 +08:00
|
|
|
#include "shared/source/memory_manager/unified_memory_manager.h"
|
2022-08-03 00:08:54 +08:00
|
|
|
|
|
|
|
using namespace NEO;
|
|
|
|
|
|
|
|
class MockPrefetchManager : public PrefetchManager {
|
|
|
|
public:
|
2022-11-30 08:48:56 +08:00
|
|
|
void migrateAllocationsToGpu(PrefetchContext &prefetchContext, SVMAllocsManager &unifiedMemoryManager, Device &device, CommandStreamReceiver &csr) override {
|
|
|
|
PrefetchManager::migrateAllocationsToGpu(prefetchContext, unifiedMemoryManager, device, csr);
|
2022-08-04 09:45:19 +08:00
|
|
|
migrateAllocationsToGpuCalled = true;
|
|
|
|
}
|
|
|
|
|
2022-11-22 20:33:16 +08:00
|
|
|
void removeAllocations(PrefetchContext &prefetchContext) override {
|
|
|
|
PrefetchManager::removeAllocations(prefetchContext);
|
|
|
|
removeAllocationsCalled = true;
|
|
|
|
}
|
|
|
|
|
2022-08-04 09:45:19 +08:00
|
|
|
bool migrateAllocationsToGpuCalled = false;
|
2022-11-22 20:33:16 +08:00
|
|
|
bool removeAllocationsCalled = false;
|
2022-08-03 00:08:54 +08:00
|
|
|
};
|