Files
compute-runtime/shared/source/helpers/heap_assigner.h
Mateusz Hoppe 97faeae16f feature: heapAssigner per root device
- create heapAssigner per root device in memory manager to allow per
device config

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-10-19 19:52:24 +02:00

31 lines
921 B
C++

/*
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <cstdint>
namespace NEO {
enum class AllocationType;
enum class HeapIndex : uint32_t;
struct HardwareInfo;
struct HeapAssigner {
HeapAssigner(bool allowExternalHeap);
~HeapAssigner() = default;
bool useExternal32BitHeap(AllocationType allocType);
bool useInternal32BitHeap(AllocationType allocType);
bool use32BitHeap(AllocationType allocType);
HeapIndex get32BitHeapIndex(AllocationType allocType, bool useLocalMem, const HardwareInfo &hwInfo, bool useFrontWindow);
static bool heapTypeExternalWithFrontWindowPool(HeapIndex heap);
static bool isInternalHeap(HeapIndex heap);
static HeapIndex mapExternalWindowIndex(HeapIndex index);
static HeapIndex mapInternalWindowIndex(HeapIndex index);
bool apiAllowExternalHeapForSshAndDsh = false;
};
} // namespace NEO