2018-07-14 00:50:55 +08:00
|
|
|
/*
|
2020-02-23 05:21:06 +08:00
|
|
|
* Copyright (C) 2018-2020 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
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/helpers/extendable_enum.h"
|
2018-07-14 00:50:55 +08:00
|
|
|
|
|
|
|
namespace MemoryPool {
|
|
|
|
struct Type : ExtendableEnum {
|
|
|
|
constexpr Type(uint32_t val) : ExtendableEnum(val) {}
|
|
|
|
};
|
|
|
|
constexpr Type MemoryNull{0};
|
|
|
|
constexpr Type System4KBPages{1};
|
|
|
|
constexpr Type System64KBPages{2};
|
|
|
|
constexpr Type System4KBPagesWith32BitGpuAddressing{3};
|
|
|
|
constexpr Type System64KBPagesWith32BitGpuAddressing{4};
|
|
|
|
constexpr Type SystemCpuInaccessible{5};
|
2019-03-18 21:53:06 +08:00
|
|
|
constexpr Type LocalMemory{6};
|
2018-07-25 00:36:26 +08:00
|
|
|
|
|
|
|
inline bool isSystemMemoryPool(Type pool) {
|
2019-02-28 18:21:01 +08:00
|
|
|
return pool == System4KBPages ||
|
|
|
|
pool == System64KBPages ||
|
|
|
|
pool == System4KBPagesWith32BitGpuAddressing ||
|
|
|
|
pool == System64KBPagesWith32BitGpuAddressing;
|
2018-07-25 00:36:26 +08:00
|
|
|
}
|
2018-07-14 00:50:55 +08:00
|
|
|
} // namespace MemoryPool
|