File: types.h

package info (click to toggle)
mumps 5.8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,624 kB
  • sloc: fortran: 455,982; ansic: 14,533; makefile: 684; xml: 527; f90: 181; sh: 130
file content (293 lines) | stat: -rw-r--r-- 8,541 bytes parent folder | download | duplicates (4)
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
/*****************************************************************************
/
/ SPACE (SPArse Cholesky Elimination) Library: types.h
/
/ author        J"urgen Schulze, University of Paderborn
/ created       99sep14
/
/ This file contains the fundamental data structures
/
******************************************************************************/

/*****************************************************************************
A macro defining the size of integers 
(modified for compatibility with MUMPS)
******************************************************************************/
#if defined(INTSIZE64) || defined(PORD_INTSIZE64)
#include <inttypes.h>
#define PORD_INT int64_t
#else
#define PORD_INT int
#endif

typedef double FLOAT;
typedef PORD_INT    options_t;
typedef FLOAT  timings_t;

/*****************************************************************************
Graph object
******************************************************************************/
typedef struct _graph {
  PORD_INT    nvtx;
  PORD_INT    nedges;
  PORD_INT    type;
  PORD_INT    totvwght;
  PORD_INT   *xadj;
  PORD_INT   *adjncy;
  PORD_INT   *vwght;
} graph_t;

/*****************************************************************************
Graph bisection object
******************************************************************************/
typedef struct _gbisect {
  graph_t      *G;
  PORD_INT     *color;
  PORD_INT      cwght[3];
} gbisect_t;

/*****************************************************************************
Domain decomposition object
******************************************************************************/
typedef struct _domdec {
  graph_t      *G;
  PORD_INT      ndom;
  PORD_INT      domwght;
  PORD_INT     *vtype;
  PORD_INT     *color;
  PORD_INT      cwght[3];
  PORD_INT     *map;
  struct _domdec *prev, *next;
} domdec_t;

/*****************************************************************************
Bipartite graph object
******************************************************************************/
typedef struct _gbipart {
  graph_t *G;
  PORD_INT     nX;
  PORD_INT     nY;
} gbipart_t;

/*****************************************************************************
Recursive nested dissection object
******************************************************************************/
typedef struct _nestdiss {
  graph_t      *G;
  PORD_INT     *map;
  PORD_INT      depth;
  PORD_INT      nvint;
  PORD_INT     *intvertex;
  PORD_INT     *intcolor;
  PORD_INT      cwght[3];
  struct _nestdiss *parent, *childB, *childW;
} nestdiss_t;

/*****************************************************************************
Multisector object
******************************************************************************/
typedef struct _multisector {
  graph_t      *G;
  PORD_INT     *stage;
  PORD_INT      nstages;
  PORD_INT      nnodes;
  PORD_INT      totmswght;
} multisector_t;

/*****************************************************************************
Elimination graph object
******************************************************************************/
typedef struct _gelim {
  graph_t      *G;
  PORD_INT      maxedges;
  PORD_INT     *len;
  PORD_INT     *elen;
  PORD_INT     *parent;
  PORD_INT     *degree;
  PORD_INT     *score;
} gelim_t;

/*****************************************************************************
Bucket structure object
******************************************************************************/
typedef struct _bucket {
  PORD_INT    maxbin, maxitem;
  PORD_INT    offset;
  PORD_INT    nobj;
  PORD_INT    minbin;
  PORD_INT   *bin;
  PORD_INT   *next;
  PORD_INT   *last;
  PORD_INT   *key;
} bucket_t;

/*****************************************************************************
Minimum priority object
******************************************************************************/
typedef struct _stageinfo stageinfo_t;
typedef struct _minprior {
  gelim_t            *Gelim;
  multisector_t      *ms;
  bucket_t           *bucket;
  stageinfo_t        *stageinfo;
  PORD_INT           *reachset;
  PORD_INT            nreach;
  PORD_INT           *auxaux;
  PORD_INT           *auxbin;
  PORD_INT           *auxtmp;
  PORD_INT            flag;
} minprior_t;
struct _stageinfo {
  PORD_INT   nstep;
  PORD_INT   welim;
  PORD_INT   nzf;
  FLOAT ops;
};

/*****************************************************************************
Elimination tree object
******************************************************************************/
typedef struct _elimtree {
  PORD_INT    nvtx;
  PORD_INT    nfronts;
  PORD_INT    root;
  PORD_INT   *ncolfactor;
  PORD_INT   *ncolupdate;
  PORD_INT   *parent;
  PORD_INT   *firstchild;
  PORD_INT   *silbings;
  PORD_INT   *vtx2front;
} elimtree_t;

/*****************************************************************************
Input matrix object
******************************************************************************/
typedef struct _inputMtx {
  PORD_INT    neqs;
  PORD_INT    nelem;
  FLOAT      *diag;
  FLOAT      *nza;
  PORD_INT   *xnza;
  PORD_INT   *nzasub;
} inputMtx_t;

/*****************************************************************************
Dense matrix object
******************************************************************************/
typedef struct _workspace workspace_t;
typedef struct _denseMtx {
  workspace_t      *ws;
  PORD_INT          front;
  PORD_INT          owned;
  PORD_INT          ncol;
  PORD_INT          nrow;
  PORD_INT          nelem;
  PORD_INT          nfloats;
  PORD_INT         *colind;
  PORD_INT         *rowind;
  PORD_INT         *collen;
  FLOAT            *entries;
  FLOAT            *mem;
  struct _denseMtx *prevMtx, *nextMtx;
} denseMtx_t;
struct _workspace {
  FLOAT          *mem;
  PORD_INT        size;
  PORD_INT        maxsize;
  PORD_INT        incr;
  denseMtx_t     *lastMtx;
};

/*****************************************************************************
Compressed subscript structure object
******************************************************************************/
typedef struct _css {
  PORD_INT    neqs;
  PORD_INT    nind;
  PORD_INT    owned;
  PORD_INT   *xnzl;
  PORD_INT   *nzlsub;
  PORD_INT   *xnzlsub;
} css_t;

/*****************************************************************************
Front subscript object
******************************************************************************/
typedef struct _frontsub {
  elimtree_t      *PTP;
  PORD_INT         nind;
  PORD_INT        *xnzf;
  PORD_INT        *nzfsub;
} frontsub_t;

/*****************************************************************************
Factor matrix object
******************************************************************************/
typedef struct _factorMtx {
  PORD_INT         nelem;
  PORD_INT        *perm;
  FLOAT           *nzl;
  css_t           *css;
  frontsub_t      *frontsub;
} factorMtx_t;

/*****************************************************************************
Mapping object
******************************************************************************/
typedef struct _groupinfo groupinfo_t;
typedef struct {
  elimtree_t       *T;
  PORD_INT          dimQ;
  PORD_INT          maxgroup;
  PORD_INT         *front2group;
  groupinfo_t      *groupinfo;
} mapping_t;
struct _groupinfo {
  FLOAT      ops;
  PORD_INT   nprocs;
  PORD_INT   nfronts;
};

/*****************************************************************************
Topology object
******************************************************************************/
typedef struct {
  PORD_INT      nprocs;
  PORD_INT      mygridId;
  PORD_INT      dimX;
  PORD_INT      dimY;
  PORD_INT      myQId;
  PORD_INT      dimQ;
  PORD_INT      *cube2grid;
#ifdef PARIX
  LinkCB_t      **link;
#endif
#ifdef MPI
  MPI_Comm      comm;
  MPI_Status    status;
#endif
} topology_t;

/*****************************************************************************
Communication buffer object
******************************************************************************/
typedef struct {
  char   *data;
  size_t len;
  size_t maxlen;
} buffer_t;

/*****************************************************************************
Bit mask object
******************************************************************************/
typedef struct {
  PORD_INT   dimQ;
  PORD_INT   maxgroup;
  PORD_INT   mygroupId;
  PORD_INT   offset;
  PORD_INT   *group;
  PORD_INT   *colbits, *colmask;
  PORD_INT   *rowbits, *rowmask;
} mask_t;