2018-07-14 00:50:55 +08:00
|
|
|
/*
|
2023-10-13 00:26:32 +08:00
|
|
|
* Copyright (C) 2018-2023 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 {
|
2023-12-12 17:11:27 +08:00
|
|
|
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) {
|
2023-12-12 17:11:27 +08:00
|
|
|
return ((pool == MemoryPool::system4KBPages ||
|
|
|
|
pool == MemoryPool::system64KBPages ||
|
|
|
|
pool == MemoryPool::system4KBPagesWith32BitGpuAddressing ||
|
|
|
|
pool == MemoryPool::system64KBPagesWith32BitGpuAddressing) &&
|
2022-12-20 16:39:42 +08:00
|
|
|
...);
|
2018-07-25 00:36:26 +08:00
|
|
|
}
|
2022-06-02 05:13:52 +08:00
|
|
|
|
|
|
|
} // namespace MemoryPoolHelper
|
|
|
|
} // namespace NEO
|