Debian Codegraph @

third_party/aub_stream/aubstream/allocation_params.h

raw
1 /*
2 * Copyright (C) 2022 Intel Corporation
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #pragma once
9 #include <cstddef>
10 #include <cstdint>
11 #include <type_traits>
12
13 namespace aub_stream {
14
15 struct AllocationParams {
16 AllocationParams() = delete;
17 AllocationParams(uint64_t gfxAddress, const void *memory, size_t size, uint32_t memoryBanks, int hint, size_t pageSize)
18 : gfxAddress(gfxAddress), memory(memory), size(size), memoryBanks(memoryBanks), hint(hint), pageSize(pageSize) {
19 additionalParams = {};
20 }
21
22 uint64_t gfxAddress = 0;
23 const void *memory = nullptr;
24 size_t size = 0;
25 uint32_t memoryBanks = 0;
26 int hint = 0;
27 size_t pageSize = 0;
28
29 struct AdditionalParams {
30 bool compressionEnabled : 1;
31 bool uncached : 1;
32 bool padding : 6;
33 };
34
35 AdditionalParams additionalParams;
36 };
37
38 static_assert(std::is_standard_layout<AllocationParams>::value, "AllocationParams is not standard layout type");
39
40 } // namespace aub_stream