Debian Codegraph @

dune/uggrid/gm/cw.h

raw
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 // SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4 // SPDX-License-Identifier: LGPL-2.1-or-later
5 /****************************************************************************/
6 /* */
7 /* File: cw.h */
8 /* */
9 /* Purpose: control word definitions header file */
10 /* */
11 /* Author: Peter Bastian */
12 /* Institut fuer Computeranwendungen III */
13 /* Universitaet Stuttgart */
14 /* Pfaffenwaldring 27 */
15 /* 70569 Stuttgart */
16 /* email: [email protected] */
17 /* */
18 /* History: 11.01.95 begin, ug version 3.0 */
19 /* */
20 /* Remarks: */
21 /* */
22 /****************************************************************************/
23
24
25 /****************************************************************************/
26 /* */
27 /* auto include mechanism and other include files */
28 /* */
29 /****************************************************************************/
30
31 #ifndef __CW__
32 #define __CW__
33
34 #include <dune/uggrid/low/namespace.h>
35
36 START_UGDIM_NAMESPACE
37
38 /** @name Macros for the control word management */
39 /*@{*/
40 /** \brief max number of entries */
41 #define MAX_CONTROL_ENTRIES 100
42 /*@}*/
43
44 /** \brief Manage part of a control word */
45 typedef struct {
46
47 /** \brief this struct is used */
48 INT used;
49
50 /** \brief name string */
51 const char *name;
52
53 /** \brief pointer to corresponding control word */
54 INT control_word;
55
56 /** \brief shift in control word */
57 INT offset_in_word;
58
59 /** \brief number of bits used */
60 INT length;
61
62 /** \brief bitwise object ID */
63 INT objt_used;
64
65 /** \brief copy from control word (faster) */
66 UINT offset_in_object;
67
68 /** \brief 1 where bits are used */
69 UINT mask;
70
71 /** \brief 0 where bits are used */
72 UINT xor_mask;
73
74 } CONTROL_ENTRY;
75
76 /** \brief Predefined control words */
77 extern CONTROL_ENTRY
78 control_entries[MAX_CONTROL_ENTRIES];
79
80 /****************************************************************************/
81 /* */
82 /* function definitions */
83 /* */
84 /****************************************************************************/
85
86 INT InitCW (void);
87
88 END_UGDIM_NAMESPACE
89
90 #endif