Lines Matching full:group

19 /* A group of expressions defined over the same domain space "domain_space".
24 * reference to each group.
26 S(UNION,group) { in S() argument
45 * "fn" is the function that needs to be called on each group.
49 isl_stat (*fn)(__isl_keep S(UNION,group) *group, void *user); in S()
53 /* Call data->fn on the group stored at *entry.
57 S(UNION,group) *group = *entry; in FN()
61 return data->fn(group, data->user); in FN()
64 /* Call "fn" on each group of expressions in "u".
67 isl_stat (*fn)(__isl_keep S(UNION,group) *group, void *user), in FN()
80 * of expressions in a UNION. Add the number of expressions in "group"
83 static isl_stat FN(UNION,count_part)(__isl_keep S(UNION,group) *group, in FN()
88 if (!group) in FN()
91 *n += group->part_table.n; in FN()
107 /* Free an entry in a group of expressions.
108 * Each entry in such a group is a single expression.
118 /* Free all memory allocated for "group" and return NULL.
120 static __isl_null S(UNION,group) *FN(UNION,group_free)( in S() argument
121 __isl_take S(UNION,group) *group) in S()
125 if (!group) in S()
128 ctx = isl_space_get_ctx(group->domain_space); in S()
129 isl_hash_table_foreach(ctx, &group->part_table, in S()
131 isl_hash_table_clear(&group->part_table); in S()
132 isl_space_free(group->domain_space); in S()
133 free(group); in S()
137 /* Allocate a group of expressions defined over the same domain space
140 static __isl_give S(UNION,group) *FN(UNION,group_alloc)( in S() argument
144 S(UNION,group) *group; in S()
149 group = isl_calloc_type(ctx, S(UNION,group)); in S()
150 if (!group) in S()
152 group->domain_space = domain_space; in S()
153 if (isl_hash_table_init(ctx, &group->part_table, size) < 0) in S()
154 return FN(UNION,group_free)(group); in S()
156 return group; in S()
174 /* Return a group equal to "group", but with a single reference.
175 * Since all groups have only a single reference, simply return "group".
177 static __isl_give S(UNION,group) *FN(UNION,group_cow)( in S() argument
178 __isl_take S(UNION,group) *group) in S()
180 return group; in S()
200 /* Call data->fn on a copy of each expression in "group".
202 static isl_stat FN(UNION,group_call_on_copy)(__isl_keep S(UNION,group) *group, in FN()
207 if (!group) in FN()
210 ctx = isl_space_get_ctx(group->domain_space); in FN()
211 return isl_hash_table_foreach(ctx, &group->part_table, in FN()
226 /* Is the domain space of the group of expressions at "entry"
232 S(UNION,group) *group = (S(UNION,group) *) entry; in FN()
235 return isl_space_has_domain_tuples(group->domain_space, space); in FN()
244 * First look for the group of expressions with the same domain space,
246 * Then look for the expression living in the specified space in that group.
254 S(UNION,group) *group; in FN()
267 group = FN(UNION,group_alloc)(domain, 1); in FN()
268 group_entry->data = group; in FN()
270 group = group_entry->data; in FN()
272 group = FN(UNION,group_cow)(group); in FN()
274 if (!group) in FN()
277 return isl_hash_table_find(ctx, &group->part_table, hash, in FN()
283 * First look the group_entry in "u" holding the group that
284 * contains "part_entry". Remove "part_entry" from that group.
285 * If the group becomes empty, then also remove the group_entry from "u".
295 S(UNION,group) *group; in FN()
309 isl_die(ctx, isl_error_internal, "missing group", in FN()
311 group = group_entry->data; in FN()
312 isl_hash_table_remove(ctx, &group->part_table, part_entry); in FN()
315 if (group->part_table.n != 0) in FN()
319 FN(UNION,group_free)(group); in FN()
372 * If there is no group of expressions in "u" with the same domain space,
374 * in that group.
383 S(UNION,group) *group; in FN()
396 group = group_entry->data; in FN()
397 return isl_hash_table_foreach(ctx, &group->part_table, in FN()
430 * each part entry in the group.
432 static isl_stat FN(UNION,group_call_inplace)(__isl_keep S(UNION,group) *group, in FN()
438 if (!group) in FN()
442 ctx = isl_space_get_ctx(group->domain_space); in FN()
443 return isl_hash_table_foreach(ctx, &group->part_table, in FN()
459 S(UNION,group) *group = *entry; in FN()
460 FN(UNION,group_free)(group); in FN()
473 /* Set "single" to true if this group of expressions
476 static isl_stat FN(UNION,group_single_space)(__isl_keep S(UNION,group) *group, in FN()
481 if (!group) in FN()
483 *single = isl_bool_ok(group->part_table.n == 1); in FN()