Debian Codegraph @

dune/uggrid/parallel/ddd/dddtypes.hh

raw
1 // SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2 // SPDX-License-Identifier: LGPL-2.1-or-later
3 #ifndef DUNE_UGGRID_PARALLEL_DDD_DDDTYPES_HH
4 #define DUNE_UGGRID_PARALLEL_DDD_DDDTYPES_HH 1
5
6 #include <cinttypes>
7 #include <cstddef>
8
9 namespace DDD {
10
11 class DDDContext;
12
13 using DDD_GID = std::uint_least64_t;
14 using DDD_TYPE = unsigned int;
15 using DDD_IF = unsigned int;
16 using DDD_PROC = unsigned int;
17 using DDD_PRIO = unsigned int;
18 using DDD_ATTR = unsigned int;
19
20 using DDD_OBJ = char*;
21
22 struct DDD_HEADER;
23 using DDD_HDR = DDD_HEADER*;
24
25 /* handler prototypes */
26
27 /* handlers related to certain DDD_TYPE (i.e., member functions) */
28 using HandlerLDATACONSTRUCTOR = void (*)(DDDContext& context, DDD_OBJ);
29 using HandlerDESTRUCTOR = void (*)(DDDContext& context, DDD_OBJ);
30 using HandlerDELETE = void (*)(DDDContext& context, DDD_OBJ);
31 using HandlerUPDATE = void (*)(DDDContext& context, DDD_OBJ);
32 using HandlerOBJMKCONS = void (*)(DDDContext& context, DDD_OBJ, int);
33 using HandlerSETPRIORITY = void (*)(DDDContext& context, DDD_OBJ, DDD_PRIO);
34 using HandlerXFERCOPY = void (*)(DDDContext& context, DDD_OBJ, DDD_PROC, DDD_PRIO);
35 using HandlerXFERDELETE = void (*)(DDDContext& context, DDD_OBJ);
36 using HandlerXFERGATHER = void (*)(DDDContext& context, DDD_OBJ, int, DDD_TYPE, void *);
37 using HandlerXFERSCATTER = void (*)(DDDContext& context, DDD_OBJ, int, DDD_TYPE, void *, int);
38 using HandlerXFERGATHERX = void (*)(DDDContext& context, DDD_OBJ, int, DDD_TYPE, char **);
39 using HandlerXFERSCATTERX = void (*)(DDDContext& context, DDD_OBJ, int, DDD_TYPE, char **, int);
40 using HandlerXFERCOPYMANIP = void (*)(DDDContext& context, DDD_OBJ);
41
42 /* handlers not related to DDD_TYPE (i.e., global functions) */
43 using HandlerGetRefType = DDD_TYPE (*)(DDDContext& context, DDD_OBJ, DDD_OBJ);
44
45 using ExecProcPtr = int (*)(DDDContext& context, DDD_OBJ);
46 using ExecProcXPtr = int (*)(DDDContext& context, DDD_OBJ, DDD_PROC, DDD_PRIO);
47 using ComProcPtr2 = int (*)(DDDContext& context, DDD_OBJ, void *);
48 using ComProcXPtr = int (*)(DDDContext& context, DDD_OBJ, void *, DDD_PROC, DDD_PRIO);
49
50 /* PRIVATE INTERFACE */
51
52 using RETCODE = int;
53
54 struct COUPLING;
55 struct ELEM_DESC;
56 struct TYPE_DESC;
57
58 namespace Basic {
59
60 /*
61 * types used by lowcomm
62 */
63
64 /**
65 * opaque data type for message types
66 */
67 struct MSG_TYPE;
68
69 /**
70 * opaque data type for messages
71 */
72 struct MSG_DESC;
73
74 /**
75 * handle for messages
76 */
77 using LC_MSGHANDLE = MSG_DESC*;
78
79 /**
80 * handle for message types (on send AND recv side)
81 */
82 using LC_MSGTYPE = MSG_TYPE*;
83
84 /**
85 * component of message (on send AND recv side)
86 */
87 using LC_MSGCOMP = int;
88
89 using AllocFunc = void* (*)(std::size_t);
90 using FreeFunc = void (*)(void*);
91
92 /*
93 * types used by notify
94 */
95 struct NOTIFY_DESC;
96 struct NOTIFY_INFO;
97
98 } /* namespace Basic */
99
100 namespace Ident {
101
102 enum class IdentMode : unsigned char;
103
104 struct ID_PLIST;
105
106 } /* namespace Ident */
107
108 namespace Join {
109
110 enum class JoinMode : unsigned char;
111
112 struct JIJoinSet;
113 struct JIAddCplSet;
114
115 } /* namespace Join */
116
117 namespace Prio {
118
119 enum class PrioMode : unsigned char;
120
121 } /* namespace Prio */
122
123 namespace Xfer {
124
125 enum class XferMode : unsigned char;
126
127 struct AddDataSegm;
128 struct SizesSegm;
129
130 struct XICopyObj;
131 struct XICopyObjSet;
132 struct XISetPrioSet;
133
134 // From sll.ht instances:
135 #define SLL_TYPES(T) struct Segm##T; struct T;
136 SLL_TYPES(XIDelCmd)
137 SLL_TYPES(XIDelObj)
138 SLL_TYPES(XINewCpl)
139 SLL_TYPES(XIOldCpl)
140 SLL_TYPES(XIAddCpl)
141 SLL_TYPES(XIDelCpl)
142 SLL_TYPES(XIModCpl)
143 #undef SLL_TYPES
144
145 } /* namespace Xfer */
146
147 } /* namespace DDD */
148
149 #endif