PIPS
hpf.h
Go to the documentation of this file.
1 #ifndef _newgen_hpf_included
2 #define _newgen_hpf_included
3 #define _gen_hpf_start 118
4 /*
5  * THIS FILE HAS BEEN AUTOMATICALLY GENERATED BY NEWGEN.
6  *
7  * PLEASE DO NOT MODIFY IT.
8  */
9 
10 #if !defined(_newgen_entity_domain_defined_)
11 #define _newgen_entity_domain_defined_
12 #define ENTITY_NEWGEN_DOMAIN (entity_domain)
13 #define entity_NEWGEN_DOMAIN (entity_domain)
14 typedef struct _newgen_struct_entity_ * entity;
15 #endif /* _newgen_entity_domain_defined_ */
16 
17 #if !defined(_newgen_expression_domain_defined_)
18 #define _newgen_expression_domain_defined_
19 #define EXPRESSION_NEWGEN_DOMAIN (expression_domain)
20 #define expression_NEWGEN_DOMAIN (expression_domain)
22 #endif /* _newgen_expression_domain_defined_ */
23 
24 #define align_domain (_gen_hpf_start+0)
25 #if !defined(_newgen_align_domain_defined_)
26 #define _newgen_align_domain_defined_
27 #define ALIGN_NEWGEN_DOMAIN (align_domain)
28 #define align_NEWGEN_DOMAIN (align_domain)
29 typedef struct _newgen_struct_align_ * align;
30 #endif /* _newgen_align_domain_defined_ */
31 
32 #define alignment_domain (_gen_hpf_start+1)
33 #if !defined(_newgen_alignment_domain_defined_)
34 #define _newgen_alignment_domain_defined_
35 #define ALIGNMENT_NEWGEN_DOMAIN (alignment_domain)
36 #define alignment_NEWGEN_DOMAIN (alignment_domain)
38 #endif /* _newgen_alignment_domain_defined_ */
39 
40 #define distribute_domain (_gen_hpf_start+2)
41 #if !defined(_newgen_distribute_domain_defined_)
42 #define _newgen_distribute_domain_defined_
43 #define DISTRIBUTE_NEWGEN_DOMAIN (distribute_domain)
44 #define distribute_NEWGEN_DOMAIN (distribute_domain)
46 #endif /* _newgen_distribute_domain_defined_ */
47 
48 #define distribution_domain (_gen_hpf_start+3)
49 #if !defined(_newgen_distribution_domain_defined_)
50 #define _newgen_distribution_domain_defined_
51 #define DISTRIBUTION_NEWGEN_DOMAIN (distribution_domain)
52 #define distribution_NEWGEN_DOMAIN (distribution_domain)
54 #endif /* _newgen_distribution_domain_defined_ */
55 
56 #define style_domain (_gen_hpf_start+4)
57 #if !defined(_newgen_style_domain_defined_)
58 #define _newgen_style_domain_defined_
59 #define STYLE_NEWGEN_DOMAIN (style_domain)
60 #define style_NEWGEN_DOMAIN (style_domain)
61 typedef struct _newgen_struct_style_ * style;
62 #endif /* _newgen_style_domain_defined_ */
63 
64 /* ALIGN
65  */
66 #define ALIGN(x) ((align)((x).p))
67 #define align_CAST(x) ALIGN(x)
68 #define ALIGN_CAST(x) ALIGN(x)
69 #define ALIGN_(x) ((x).e)
70 #define ALIGN_TYPE align
71 #define align_TYPE align
72 #define align_undefined ((align)gen_chunk_undefined)
73 #define align_undefined_p(x) ((x)==align_undefined)
74 
75 extern align copy_align(align);
76 extern void free_align(align);
77 extern align check_align(align);
78 extern bool align_consistent_p(align);
79 extern bool align_defined_p(align);
80 #define gen_ALIGN_cons gen_align_cons
81 extern list gen_align_cons(align, list);
82 extern void align_assign_contents(align, align);
83 extern void align_non_recursive_free(align);
84 extern void write_align(FILE*, align);
85 extern align read_align(FILE*);
86 extern align make_align(list, entity);
87 
90  list _align_alignment_; /* alignment:alignment* */
91  entity _align_template_; /* template:entity */
92 };
93 
94 #define align_domain_number(x) ((x)->_type_)
95 #define align_alignment_(x) align_alignment(x) /* old hack compatible */
96 #define align_alignment(x) ((x)->_align_alignment_)
97 #define align_template_(x) align_template(x) /* old hack compatible */
98 #define align_template(x) ((x)->_align_template_)
99 
100 /* ALIGNMENT
101  */
102 #define ALIGNMENT(x) ((alignment)((x).p))
103 #define alignment_CAST(x) ALIGNMENT(x)
104 #define ALIGNMENT_CAST(x) ALIGNMENT(x)
105 #define ALIGNMENT_(x) ((x).e)
106 #define ALIGNMENT_TYPE alignment
107 #define alignment_TYPE alignment
108 #define alignment_undefined ((alignment)gen_chunk_undefined)
109 #define alignment_undefined_p(x) ((x)==alignment_undefined)
110 
112 extern void free_alignment(alignment);
114 extern bool alignment_consistent_p(alignment);
115 extern bool alignment_defined_p(alignment);
116 #define gen_ALIGNMENT_cons gen_alignment_cons
120 extern void write_alignment(FILE*, alignment);
121 extern alignment read_alignment(FILE*);
123 
126  intptr_t _alignment_arraydim_; /* arraydim:int */
127  intptr_t _alignment_templatedim_; /* templatedim:int */
128  expression _alignment_rate_; /* rate:expression */
129  expression _alignment_constant_; /* constant:expression */
130 };
131 
132 #define alignment_domain_number(x) ((x)->_type_)
133 #define alignment_arraydim_(x) alignment_arraydim(x) /* old hack compatible */
134 #define alignment_arraydim(x) ((x)->_alignment_arraydim_)
135 #define alignment_templatedim_(x) alignment_templatedim(x) /* old hack compatible */
136 #define alignment_templatedim(x) ((x)->_alignment_templatedim_)
137 #define alignment_rate_(x) alignment_rate(x) /* old hack compatible */
138 #define alignment_rate(x) ((x)->_alignment_rate_)
139 #define alignment_constant_(x) alignment_constant(x) /* old hack compatible */
140 #define alignment_constant(x) ((x)->_alignment_constant_)
141 
142 /* DISTRIBUTE
143  */
144 #define DISTRIBUTE(x) ((distribute)((x).p))
145 #define distribute_CAST(x) DISTRIBUTE(x)
146 #define DISTRIBUTE_CAST(x) DISTRIBUTE(x)
147 #define DISTRIBUTE_(x) ((x).e)
148 #define DISTRIBUTE_TYPE distribute
149 #define distribute_TYPE distribute
150 #define distribute_undefined ((distribute)gen_chunk_undefined)
151 #define distribute_undefined_p(x) ((x)==distribute_undefined)
152 
154 extern void free_distribute(distribute);
157 extern bool distribute_defined_p(distribute);
158 #define gen_DISTRIBUTE_cons gen_distribute_cons
162 extern void write_distribute(FILE*, distribute);
163 extern distribute read_distribute(FILE*);
165 
168  list _distribute_distribution_; /* distribution:distribution* */
169  entity _distribute_processors_; /* processors:entity */
170 };
171 
172 #define distribute_domain_number(x) ((x)->_type_)
173 #define distribute_distribution_(x) distribute_distribution(x) /* old hack compatible */
174 #define distribute_distribution(x) ((x)->_distribute_distribution_)
175 #define distribute_processors_(x) distribute_processors(x) /* old hack compatible */
176 #define distribute_processors(x) ((x)->_distribute_processors_)
177 
178 /* DISTRIBUTION
179  */
180 #define DISTRIBUTION(x) ((distribution)((x).p))
181 #define distribution_CAST(x) DISTRIBUTION(x)
182 #define DISTRIBUTION_CAST(x) DISTRIBUTION(x)
183 #define DISTRIBUTION_(x) ((x).e)
184 #define DISTRIBUTION_TYPE distribution
185 #define distribution_TYPE distribution
186 #define distribution_undefined ((distribution)gen_chunk_undefined)
187 #define distribution_undefined_p(x) ((x)==distribution_undefined)
188 
190 extern void free_distribution(distribution);
194 #define gen_DISTRIBUTION_cons gen_distribution_cons
198 extern void write_distribution(FILE*, distribution);
199 extern distribution read_distribution(FILE*);
201 
204  style _distribution_style_; /* style:style */
205  expression _distribution_parameter_; /* parameter:expression */
206 };
207 
208 #define distribution_domain_number(x) ((x)->_type_)
209 #define distribution_style_(x) distribution_style(x) /* old hack compatible */
210 #define distribution_style(x) ((x)->_distribution_style_)
211 #define distribution_parameter_(x) distribution_parameter(x) /* old hack compatible */
212 #define distribution_parameter(x) ((x)->_distribution_parameter_)
213 
214 /* STYLE
215  */
216 #define STYLE(x) ((style)((x).p))
217 #define style_CAST(x) STYLE(x)
218 #define STYLE_CAST(x) STYLE(x)
219 #define STYLE_(x) ((x).e)
220 #define STYLE_TYPE style
221 #define style_TYPE style
222 #define style_undefined ((style)gen_chunk_undefined)
223 #define style_undefined_p(x) ((x)==style_undefined)
224 
225 extern style copy_style(style);
226 extern void free_style(style);
227 extern style check_style(style);
228 extern bool style_consistent_p(style);
229 extern bool style_defined_p(style);
230 #define gen_STYLE_cons gen_style_cons
231 extern list gen_style_cons(style, list);
232 extern void style_assign_contents(style, style);
233 extern void style_non_recursive_free(style);
234 extern void write_style(FILE*, style);
235 extern style read_style(FILE*);
240 };
241 extern string style_tag_as_string(enum style_utype);
242 extern style make_style(enum style_utype, void *);
243 extern style make_style_none(void);
244 extern style make_style_block(void);
245 extern style make_style_cyclic(void);
246 
250  union {
251  gen_chunk _style_none_; /* none:unit */
252  gen_chunk _style_block_; /* block:unit */
253  gen_chunk _style_cyclic_; /* cyclic:unit */
255 };
256 
257 #define style_domain_number(x) ((x)->_type_)
258 #define style_tag(x) ((x)->_style_tag__)
259 #define style_none_p(x) (style_tag(x)==is_style_none)
260 #define style_none_(x) style_none(x) /* old hack compatible */
261 #define style_none(x) ((x)->_style_union_._style_none_.u)
262 #define style_block_p(x) (style_tag(x)==is_style_block)
263 #define style_block_(x) style_block(x) /* old hack compatible */
264 #define style_block(x) ((x)->_style_union_._style_block_.u)
265 #define style_cyclic_p(x) (style_tag(x)==is_style_cyclic)
266 #define style_cyclic_(x) style_cyclic(x) /* old hack compatible */
267 #define style_cyclic(x) ((x)->_style_union_._style_cyclic_.u)
268 
269 #define hpf_spec "\
270 --NEWGEN-START 118\n\
271 import entity from \"ri.newgen\";\n\
272 import expression from \"ri.newgen\";\n\
273 align = alignment:alignment* x template:entity;\n\
274 alignment = arraydim:int x templatedim:int x rate:expression x constant:expression;\n\
275 distribute = distribution:distribution* x processors:entity;\n\
276 distribution = style:style x parameter:expression;\n\
277 style = none:unit + block:unit + cyclic:unit;\n\
278 "
279 #endif
struct _newgen_struct_distribution_ * distribution
Definition: hpf.h:53
void write_distribute(FILE *, distribute)
Definition: hpf.c:130
style read_style(FILE *)
Definition: hpf.c:217
list gen_distribute_cons(distribute, list)
Definition: hpf.c:116
alignment read_alignment(FILE *)
Definition: hpf.c:91
void distribution_assign_contents(distribution, distribution)
Definition: hpf.c:161
bool style_defined_p(style)
Definition: hpf.c:197
void align_non_recursive_free(align)
Definition: hpf.c:42
style make_style_block(void)
Definition: hpf.c:234
void style_assign_contents(style, style)
Definition: hpf.c:203
bool distribute_consistent_p(distribute)
Definition: hpf.c:109
align read_align(FILE *)
Definition: hpf.c:49
bool alignment_defined_p(alignment)
Definition: hpf.c:71
distribution copy_distribution(distribution)
DISTRIBUTION.
Definition: hpf.c:142
alignment copy_alignment(alignment)
ALIGNMENT.
Definition: hpf.c:58
void alignment_assign_contents(alignment, alignment)
Definition: hpf.c:77
bool distribution_consistent_p(distribution)
Definition: hpf.c:151
list gen_distribution_cons(distribution, list)
Definition: hpf.c:158
bool style_consistent_p(style)
Definition: hpf.c:193
alignment check_alignment(alignment)
Definition: hpf.c:64
align make_align(list, entity)
Definition: hpf.c:52
bool align_defined_p(align)
Definition: hpf.c:29
bool alignment_consistent_p(alignment)
Definition: hpf.c:67
struct _newgen_struct_align_ * align
Definition: hpf.h:29
void free_distribution(distribution)
Definition: hpf.c:145
struct _newgen_struct_style_ * style
Definition: hpf.h:61
style make_style_cyclic(void)
Definition: hpf.c:237
align copy_align(align)
ALIGN.
Definition: hpf.c:16
void alignment_non_recursive_free(alignment)
Definition: hpf.c:84
alignment make_alignment(intptr_t, intptr_t, expression, expression)
Definition: hpf.c:94
list gen_align_cons(align, list)
Definition: hpf.c:32
distribute check_distribute(distribute)
Definition: hpf.c:106
void style_non_recursive_free(style)
Definition: hpf.c:210
bool align_consistent_p(align)
Definition: hpf.c:25
distribution check_distribution(distribution)
Definition: hpf.c:148
bool distribution_defined_p(distribution)
Definition: hpf.c:155
void distribution_non_recursive_free(distribution)
Definition: hpf.c:168
distribute make_distribute(list, entity)
Definition: hpf.c:136
distribution make_distribution(style, expression)
Definition: hpf.c:178
style check_style(style)
Definition: hpf.c:190
align check_align(align)
Definition: hpf.c:22
void write_distribution(FILE *, distribution)
Definition: hpf.c:172
list gen_style_cons(style, list)
Definition: hpf.c:200
void distribute_non_recursive_free(distribute)
Definition: hpf.c:126
style make_style_none(void)
Definition: hpf.c:231
style make_style(enum style_utype, void *)
Definition: hpf.c:228
void write_style(FILE *, style)
Definition: hpf.c:214
distribute copy_distribute(distribute)
DISTRIBUTE.
Definition: hpf.c:100
struct _newgen_struct_distribute_ * distribute
Definition: hpf.h:45
string style_tag_as_string(enum style_utype)
Definition: hpf.c:220
void write_alignment(FILE *, alignment)
Definition: hpf.c:88
void free_alignment(alignment)
Definition: hpf.c:61
list gen_alignment_cons(alignment, list)
Definition: hpf.c:74
distribute read_distribute(FILE *)
Definition: hpf.c:133
struct _newgen_struct_expression_ * expression
Definition: hpf.h:21
distribution read_distribution(FILE *)
Definition: hpf.c:175
void align_assign_contents(align, align)
Definition: hpf.c:35
void distribute_assign_contents(distribute, distribute)
Definition: hpf.c:119
void write_align(FILE *, align)
Definition: hpf.c:46
struct _newgen_struct_entity_ * entity
Definition: hpf.h:14
void free_align(align)
Definition: hpf.c:19
struct _newgen_struct_alignment_ * alignment
Definition: hpf.h:37
style_utype
Definition: hpf.h:236
@ is_style_cyclic
Definition: hpf.h:239
@ is_style_block
Definition: hpf.h:238
@ is_style_none
Definition: hpf.h:237
bool distribute_defined_p(distribute)
Definition: hpf.c:113
void free_style(style)
Definition: hpf.c:187
style copy_style(style)
STYLE.
Definition: hpf.c:184
void free_distribute(distribute)
Definition: hpf.c:103
#define intptr_t
Definition: stdint.in.h:294
list _align_alignment_
Definition: hpf.h:90
intptr_t _type_
Definition: hpf.h:89
entity _align_template_
alignment:alignment*
Definition: hpf.h:91
expression _alignment_rate_
templatedim:int
Definition: hpf.h:128
intptr_t _alignment_arraydim_
Definition: hpf.h:126
intptr_t _alignment_templatedim_
arraydim:int
Definition: hpf.h:127
expression _alignment_constant_
rate:expression
Definition: hpf.h:129
list _distribute_distribution_
Definition: hpf.h:168
entity _distribute_processors_
distribution:distribution*
Definition: hpf.h:169
expression _distribution_parameter_
style:style
Definition: hpf.h:205
intptr_t _type_
Definition: hpf.h:248
gen_chunk _style_cyclic_
block:unit
Definition: hpf.h:253
union _newgen_struct_style_::@54 _style_union_
gen_chunk _style_block_
none:unit
Definition: hpf.h:252
gen_chunk _style_none_
Definition: hpf.h:251
enum style_utype _style_tag__
Definition: hpf.h:249
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
A gen_chunk is used to store every object.
Definition: genC.h:58