mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
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>
42 lines
961 B
C++
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
|