mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-15 10:14:56 +08:00
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>
33 lines
710 B
C++
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
|