PIPS
reductions_private.c
Go to the documentation of this file.
1 /*
2  * THIS FILE HAS BEEN AUTOMATICALLY GENERATED BY NEWGEN.
3  *
4  * PLEASE DO NOT MODIFY IT.
5  */
6 
7 
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <string.h>
11 #include "genC.h"
12 #include "reductions_private.h"
13 
14 /* PSTATEMENT_REDUCTIONS
15  */
18 }
20  gen_free((gen_chunk*) p);
21 }
24 }
27  return gen_consistent_p((gen_chunk*) p);
28 }
30  return gen_defined_p((gen_chunk*) p);
31 }
34 }
38  message_assert("defined references to domain pstatement_reductions",
40  memcpy(r, v, sizeof(struct _newgen_struct_pstatement_reductions_));
41 }
43  // should clear up contents...
44  free(p);
45 }
47  gen_write(f, (gen_chunk*) p);
48 }
51 }
54 }
57 }
60 }
63 }
66 }
69 }
70 
71 /* REDUCTION_OPERATOR
72  */
75 }
77  gen_free((gen_chunk*) p);
78 }
81 }
84  return gen_consistent_p((gen_chunk*) p);
85 }
87  return gen_defined_p((gen_chunk*) p);
88 }
91 }
95  message_assert("defined references to domain reduction_operator",
97  memcpy(r, v, sizeof(struct _newgen_struct_reduction_operator_));
98 }
100  // should clear up contents...
101  free(p);
102 }
104  gen_write(f, (gen_chunk*) p);
105 }
107  return (reduction_operator) gen_read(f);
108 }
110  switch (tag) {
111  case is_reduction_operator_none: return "none";
112  case is_reduction_operator_min: return "min";
113  case is_reduction_operator_max: return "max";
114  case is_reduction_operator_sum: return "sum";
115  case is_reduction_operator_csum: return "csum";
116  case is_reduction_operator_prod: return "prod";
117  case is_reduction_operator_and: return "and";
118  case is_reduction_operator_or: return "or";
119  case is_reduction_operator_bitwise_and: return "bitwise_and";
120  case is_reduction_operator_bitwise_or: return "bitwise_or";
121  case is_reduction_operator_bitwise_xor: return "bitwise_xor";
122  case is_reduction_operator_eqv: return "eqv";
123  case is_reduction_operator_neqv: return "neqv";
124  default: return string_undefined;
125  }
126 }
129 }
132 }
135 }
138 }
141 }
144 }
147 }
150 }
153 }
156 }
159 }
162 }
165 }
168 }
169 
170 /* REDUCTION
171  */
173  return (reduction) gen_copy_tree((gen_chunk*) p);
174 }
176  gen_free((gen_chunk*) p);
177 }
180 }
182  check_reduction(p);
183  return gen_consistent_p((gen_chunk*) p);
184 }
186  return gen_defined_p((gen_chunk*) p);
187 }
190 }
192  check_reduction(r);
193  check_reduction(v);
194  message_assert("defined references to domain reduction",
196  memcpy(r, v, sizeof(struct _newgen_struct_reduction_));
197 }
199  // should clear up contents...
200  free(p);
201 }
202 void write_reduction(FILE* f, reduction p) {
203  gen_write(f, (gen_chunk*) p);
204 }
206  return (reduction) gen_read(f);
207 }
209  return (reduction) gen_alloc(5*sizeof(gen_chunk), GEN_CHECK_ALLOC, reduction_domain, a1, a2, a3, a4);
210 }
211 
212 /* REDUCTIONS
213  */
215  return (reductions) gen_copy_tree((gen_chunk*) p);
216 }
218  gen_free((gen_chunk*) p);
219 }
222 }
224  check_reductions(p);
225  return gen_consistent_p((gen_chunk*) p);
226 }
228  return gen_defined_p((gen_chunk*) p);
229 }
232 }
234  check_reductions(r);
235  check_reductions(v);
236  message_assert("defined references to domain reductions",
238  memcpy(r, v, sizeof(struct _newgen_struct_reductions_));
239 }
241  // should clear up contents...
242  free(p);
243 }
244 void write_reductions(FILE* f, reductions p) {
245  gen_write(f, (gen_chunk*) p);
246 }
248  return (reductions) gen_read(f);
249 }
252 }
253 
reduction_operator make_reduction_operator_or(void)
bool reduction_operator_consistent_p(reduction_operator p)
reduction copy_reduction(reduction p)
REDUCTION.
void free_reduction(reduction p)
bool pstatement_reductions_defined_p(pstatement_reductions p)
void update_pstatement_reductions(pstatement_reductions f, statement k, reductions v)
reduction read_reduction(FILE *f)
list gen_pstatement_reductions_cons(pstatement_reductions p, list l)
list gen_reduction_operator_cons(reduction_operator p, list l)
reduction_operator make_reduction_operator_csum(void)
reductions read_reductions(FILE *f)
bool reduction_defined_p(reduction p)
void reductions_non_recursive_free(reductions p)
reduction_operator make_reduction_operator_max(void)
void reduction_non_recursive_free(reduction p)
reductions apply_pstatement_reductions(pstatement_reductions f, statement k)
reductions check_reductions(reductions p)
pstatement_reductions make_pstatement_reductions(void)
bool bound_pstatement_reductions_p(pstatement_reductions f, statement k)
reductions copy_reductions(reductions p)
REDUCTIONS.
void reduction_operator_non_recursive_free(reduction_operator p)
list gen_reductions_cons(reductions p, list l)
void free_reduction_operator(reduction_operator p)
reduction_operator read_reduction_operator(FILE *f)
reduction_operator make_reduction_operator(enum reduction_operator_utype tag, void *val)
reduction_operator make_reduction_operator_and(void)
reduction make_reduction(reference a1, reduction_operator a2, list a3, list a4)
void pstatement_reductions_assign_contents(pstatement_reductions r, pstatement_reductions v)
void write_reduction(FILE *f, reduction p)
string reduction_operator_tag_as_string(enum reduction_operator_utype tag)
reduction_operator make_reduction_operator_eqv(void)
reductions delete_pstatement_reductions(pstatement_reductions f, statement k)
pstatement_reductions check_pstatement_reductions(pstatement_reductions p)
reduction_operator make_reduction_operator_prod(void)
reduction_operator make_reduction_operator_none(void)
reduction_operator make_reduction_operator_bitwise_or(void)
reduction_operator check_reduction_operator(reduction_operator p)
bool reduction_consistent_p(reduction p)
void free_pstatement_reductions(pstatement_reductions p)
list gen_reduction_cons(reduction p, list l)
reduction check_reduction(reduction p)
void pstatement_reductions_non_recursive_free(pstatement_reductions p)
reduction_operator copy_reduction_operator(reduction_operator p)
REDUCTION_OPERATOR.
reduction_operator make_reduction_operator_bitwise_xor(void)
reduction_operator make_reduction_operator_sum(void)
reductions make_reductions(list a)
void reduction_assign_contents(reduction r, reduction v)
bool pstatement_reductions_consistent_p(pstatement_reductions p)
reduction_operator make_reduction_operator_bitwise_and(void)
void write_reductions(FILE *f, reductions p)
void extend_pstatement_reductions(pstatement_reductions f, statement k, reductions v)
bool reductions_defined_p(reductions p)
bool reductions_consistent_p(reductions p)
void free_reductions(reductions p)
void reductions_assign_contents(reductions r, reductions v)
void write_pstatement_reductions(FILE *f, pstatement_reductions p)
reduction_operator make_reduction_operator_min(void)
bool reduction_operator_defined_p(reduction_operator p)
pstatement_reductions read_pstatement_reductions(FILE *f)
reduction_operator make_reduction_operator_neqv(void)
void write_reduction_operator(FILE *f, reduction_operator p)
pstatement_reductions copy_pstatement_reductions(pstatement_reductions p)
PSTATEMENT_REDUCTIONS.
void reduction_operator_assign_contents(reduction_operator r, reduction_operator v)
#define GEN_CHECK_ALLOC
Definition: genC.h:307
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
gen_chunk * gen_copy_tree(gen_chunk *obj)
Definition: genClib.c:1429
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745
void free(void *)
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900
#define REDUCTION_OPERATOR_NEWGEN_DOMAIN
Definition: hpf_private.h:47
#define message_assert(msg, ex)
Definition: newgen_assert.h:47
#define HASH_GET(start, image, h, k)
Definition: newgen_map.h:30
#define HASH_EXTEND(start, image, h, k, v)
Definition: newgen_map.h:36
#define HASH_DELETE(start, image, h, k)
Definition: newgen_map.h:38
#define HASH_UPDATE(start, image, h, k, v)
Definition: newgen_map.h:34
#define HASH_BOUND_P(start, image, h, k)
Definition: newgen_map.h:32
int tag
TAG.
Definition: newgen_types.h:92
#define string_undefined
Definition: newgen_types.h:40
#define UU
Definition: newgen_types.h:98
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
#define reductions_domain
newgen_reduction_domain_defined
reduction_operator_utype
@ is_reduction_operator_bitwise_xor
@ is_reduction_operator_none
@ is_reduction_operator_min
@ is_reduction_operator_bitwise_and
@ is_reduction_operator_neqv
@ is_reduction_operator_max
@ is_reduction_operator_bitwise_or
@ is_reduction_operator_csum
@ is_reduction_operator_eqv
@ is_reduction_operator_prod
@ is_reduction_operator_or
@ is_reduction_operator_and
@ is_reduction_operator_sum
#define pstatement_reductions_domain
newgen_statement_domain_defined
#define reduction_domain
newgen_reduction_operator_domain_defined
#define reduction_operator_domain
newgen_pstatement_reductions_domain_defined
#define PSTATEMENT_REDUCTIONS_NEWGEN_DOMAIN
#define REDUCTIONS_NEWGEN_DOMAIN
#define REDUCTION_NEWGEN_DOMAIN
#define pstatement_reductions_hash_table(x)
#define intptr_t
Definition: stdint.in.h:294
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