-
Notifications
You must be signed in to change notification settings - Fork 17
/
types.hpp
83 lines (58 loc) · 1.67 KB
/
types.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*******************************************************************************
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
******************************************************************************/
#ifndef DML_DETAIL_COMMON_TYPES_HPP
#define DML_DETAIL_COMMON_TYPES_HPP
#include <cstddef>
#include <cstdint>
namespace dml::detail
{
using byte_t = std::uint8_t;
struct alignas(64u) descriptor
{
descriptor() noexcept : bytes()
{
for (auto& byte : bytes)
{
byte = 0u;
}
}
byte_t bytes[64];
};
struct alignas(32) completion_record
{
completion_record() noexcept : bytes()
{
for (auto& byte : bytes)
{
byte = 0u;
}
}
byte_t bytes[32];
};
using size_t = std::size_t;
using transfer_size_t = std::uint32_t;
using operation_t = std::uint8_t;
using status_t = std::uint8_t;
using flags_t = std::uint16_t;
using operation_specific_flags_t = std::uint8_t;
using completion_interrupt_handle_t = std::uint16_t;
using transfer_size_t = std::uint32_t;
using address_t = uintptr_t;
using pattern_t = uint64_t;
using result_t = uint8_t;
using crc_value_t = uint32_t;
using dif_flags_t = uint8_t;
using dif_status_t = uint8_t;
using dif_ref_tag_t = uint32_t;
using dif_app_tag_t = uint16_t;
struct dif_parameters
{
dif_ref_tag_t ref_tag_seed;
dif_app_tag_t app_tag_mask;
dif_app_tag_t app_tag_seed;
};
} // namespace dml::detail
#endif //DML_DETAIL_COMMON_TYPES_HPP