Files
compute-runtime/shared/source/memory_manager/memory_pool.h
Krzysztof Gibala dc1fe7d59a Change MemoryPool to enum class
Use enum class for MemoryPool in GraphicsAllocation
This change will ensure that GA is constructed in the proper way

- Rename namespace for isSystemMemoryPool method
- Add method getMemoryPoolString for logging actual pool which is in used
- Remove wrong pattern in GraphicsAllocation constructor

Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-06-02 12:46:15 +02:00

33 lines
710 B
C++

/*
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
namespace NEO {
enum class MemoryPool {
MemoryNull,
System4KBPages,
System64KBPages,
System4KBPagesWith32BitGpuAddressing,
System64KBPagesWith32BitGpuAddressing,
SystemCpuInaccessible,
LocalMemory,
};
namespace MemoryPoolHelper {
inline bool isSystemMemoryPool(MemoryPool pool) {
return pool == MemoryPool::System4KBPages ||
pool == MemoryPool::System64KBPages ||
pool == MemoryPool::System4KBPagesWith32BitGpuAddressing ||
pool == MemoryPool::System64KBPagesWith32BitGpuAddressing;
}
} // namespace MemoryPoolHelper
} // namespace NEO