Files
compute-runtime/shared/source/memory_manager/prefetch_manager.h
Warchulski, Jaroslaw 8de3898abc Cleanup includes 31
Cleaned up files:
shared/source/command_stream/experimental_command_buffer.h
shared/source/helpers/get_info.h
shared/source/helpers/local_id_gen.h
shared/source/memory_manager/gfx_partition.h
shared/source/memory_manager/host_ptr_manager.h
shared/source/memory_manager/prefetch_manager.h
shared/test/common/mocks/mock_memory_manager.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-16 11:45:55 +01:00

42 lines
961 B
C++

/*
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/non_copyable_or_moveable.h"
#include "shared/source/utilities/spinlock.h"
#include <memory>
#include <vector>
namespace NEO {
struct SvmAllocationData;
class CommandStreamReceiver;
class Device;
class SVMAllocsManager;
struct PrefetchContext {
std::vector<SvmAllocationData> allocations;
SpinLock lock;
};
class PrefetchManager : public NonCopyableOrMovableClass {
public:
static std::unique_ptr<PrefetchManager> create();
virtual ~PrefetchManager() = default;
void insertAllocation(PrefetchContext &context, SvmAllocationData &svmData);
MOCKABLE_VIRTUAL void migrateAllocationsToGpu(PrefetchContext &context, SVMAllocsManager &unifiedMemoryManager, Device &device, CommandStreamReceiver &csr);
MOCKABLE_VIRTUAL void removeAllocations(PrefetchContext &context);
};
} // namespace NEO