Files
compute-runtime/shared/source/helpers/heap_helper.h
kamdiedrich e072275ae6 Reorganization directory structure [3/n]
Change-Id: If3dfa3f6007f8810a6a1ae1a4f0c7da38544648d
2020-02-23 23:48:28 +01:00

32 lines
1.1 KiB
C++

/*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <stddef.h>
#include <stdint.h>
namespace NEO {
class MemoryManager;
class GraphicsAllocation;
class InternalAllocationStorage;
class HeapHelper {
public:
HeapHelper(MemoryManager *memManager, InternalAllocationStorage *storageForReuse, bool isMultiOsContextCapable) : storageForReuse(storageForReuse),
memManager(memManager),
isMultiOsContextCapable(isMultiOsContextCapable) {}
GraphicsAllocation *getHeapAllocation(uint32_t heapType, size_t heapSize, size_t alignment, uint32_t rootDeviceIndex);
void storeHeapAllocation(GraphicsAllocation *heapAllocation);
protected:
InternalAllocationStorage *storageForReuse = nullptr;
MemoryManager *memManager = nullptr;
bool isMultiOsContextCapable = false;
};
} // namespace NEO