2018-07-14 00:50:55 +08:00
|
|
|
/*
|
2022-06-02 05:13:52 +08:00
|
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
2018-07-14 00:50:55 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-07-14 00:50:55 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-06-02 05:13:52 +08:00
|
|
|
namespace NEO {
|
2018-07-14 00:50:55 +08:00
|
|
|
|
2022-06-02 05:13:52 +08:00
|
|
|
enum class MemoryPool {
|
|
|
|
MemoryNull,
|
|
|
|
System4KBPages,
|
|
|
|
System64KBPages,
|
|
|
|
System4KBPagesWith32BitGpuAddressing,
|
|
|
|
System64KBPagesWith32BitGpuAddressing,
|
|
|
|
SystemCpuInaccessible,
|
|
|
|
LocalMemory,
|
2018-07-14 00:50:55 +08:00
|
|
|
};
|
2018-07-25 00:36:26 +08:00
|
|
|
|
2022-06-02 05:13:52 +08:00
|
|
|
namespace MemoryPoolHelper {
|
|
|
|
|
2022-12-20 16:39:42 +08:00
|
|
|
template <typename... Args>
|
|
|
|
inline bool isSystemMemoryPool(Args... pool) {
|
|
|
|
return ((pool == MemoryPool::System4KBPages ||
|
|
|
|
pool == MemoryPool::System64KBPages ||
|
|
|
|
pool == MemoryPool::System4KBPagesWith32BitGpuAddressing ||
|
|
|
|
pool == MemoryPool::System64KBPagesWith32BitGpuAddressing) &&
|
|
|
|
...);
|
2018-07-25 00:36:26 +08:00
|
|
|
}
|
2022-06-02 05:13:52 +08:00
|
|
|
|
|
|
|
} // namespace MemoryPoolHelper
|
|
|
|
} // namespace NEO
|