mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
37 lines
848 B
C++
37 lines
848 B
C++
/*
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
namespace NEO {
|
|
|
|
enum class MemoryPool {
|
|
MemoryNull,
|
|
System4KBPages,
|
|
System64KBPages,
|
|
System4KBPagesWith32BitGpuAddressing,
|
|
System64KBPagesWith32BitGpuAddressing,
|
|
SystemCpuInaccessible,
|
|
LocalCpuInaccessible,
|
|
LocalMemory,
|
|
};
|
|
|
|
namespace MemoryPoolHelper {
|
|
|
|
template <typename... Args>
|
|
inline bool isSystemMemoryPool(Args... pool) {
|
|
return ((pool == MemoryPool::System4KBPages ||
|
|
pool == MemoryPool::System64KBPages ||
|
|
pool == MemoryPool::System4KBPagesWith32BitGpuAddressing ||
|
|
pool == MemoryPool::SystemCpuInaccessible ||
|
|
pool == MemoryPool::System64KBPagesWith32BitGpuAddressing) &&
|
|
...);
|
|
}
|
|
|
|
} // namespace MemoryPoolHelper
|
|
} // namespace NEO
|