2019-08-05 21:16:57 +08:00
|
|
|
/*
|
2023-05-02 20:27:55 +08:00
|
|
|
* Copyright (C) 2019-2023 Intel Corporation
|
2019-08-05 21:16:57 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/memory_properties/memory_properties_flags_common.inl"
|
2019-08-05 21:16:57 +08:00
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
2021-08-05 23:51:25 +08:00
|
|
|
class Device;
|
|
|
|
|
2020-04-22 20:37:30 +08:00
|
|
|
struct MemoryProperties {
|
2022-04-26 18:25:41 +08:00
|
|
|
uint64_t handle = 0;
|
|
|
|
uint64_t handleType = 0;
|
|
|
|
uintptr_t hostptr = 0;
|
2021-08-05 23:51:25 +08:00
|
|
|
const Device *pDevice = nullptr;
|
2023-05-02 20:27:55 +08:00
|
|
|
std::vector<Device *> associatedDevices;
|
2022-04-04 23:39:57 +08:00
|
|
|
uint32_t memCacheClos = 0;
|
2019-08-22 18:31:07 +08:00
|
|
|
union {
|
|
|
|
MemoryFlags flags;
|
|
|
|
uint32_t allFlags = 0;
|
|
|
|
};
|
2019-12-05 17:32:42 +08:00
|
|
|
union {
|
|
|
|
MemoryAllocFlags allocFlags;
|
|
|
|
uint32_t allAllocFlags = 0;
|
|
|
|
};
|
2020-04-22 20:37:30 +08:00
|
|
|
static_assert(sizeof(MemoryProperties::flags) == sizeof(MemoryProperties::allFlags) && sizeof(MemoryProperties::allocFlags) == sizeof(MemoryProperties::allAllocFlags), "");
|
2019-08-05 21:16:57 +08:00
|
|
|
};
|
|
|
|
} // namespace NEO
|