reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/polly/lib/External/isl/isl_union_eval.c
   16 static __isl_give isl_val *FN(UNION,eval_void)(__isl_take UNION *u,
   16 static __isl_give isl_val *FN(UNION,eval_void)(__isl_take UNION *u,
   22 	FN(UNION,free)(u);
   29 static int FN(UNION,has_domain_space)(const void *entry, const void *val)
   41 __isl_give isl_val *FN(UNION,eval)(__isl_take UNION *u,
   41 __isl_give isl_val *FN(UNION,eval)(__isl_take UNION *u,
   56 		return FN(UNION,eval_void)(u, pnt);
   63 				    hash, &FN(UNION,has_domain_space),
   72 	FN(UNION,free)(u);
   75 	FN(UNION,free)(u);
tools/polly/lib/External/isl/isl_union_multi.c
   26 S(UNION,group) {
   36 struct UNION {
   46 S(UNION,foreach_group_data)
   48 	isl_stat (*fn)(__isl_keep S(UNION,group) *group, void *user);
   54 static isl_stat FN(UNION,call_on_group)(void **entry, void *user)
   56 	S(UNION,group) *group = *entry;
   57 	S(UNION,foreach_group_data) *data;
   59 	data = (S(UNION,foreach_group_data) *) user;
   65 static isl_stat FN(UNION,foreach_group)(__isl_keep UNION *u,
   65 static isl_stat FN(UNION,foreach_group)(__isl_keep UNION *u,
   66 	isl_stat (*fn)(__isl_keep S(UNION,group) *group, void *user),
   69 	S(UNION,foreach_group_data) data = { fn, user };
   75 				      &FN(UNION,call_on_group), &data);
   82 static isl_stat FN(UNION,count_part)(__isl_keep S(UNION,group) *group,
   82 static isl_stat FN(UNION,count_part)(__isl_keep S(UNION,group) *group,
   96 int FN(FN(UNION,n),BASE)(__isl_keep UNION *u)
   96 int FN(FN(UNION,n),BASE)(__isl_keep UNION *u)
  101 	if (FN(UNION,foreach_group)(u, &FN(UNION,count_part), &n) < 0)
  101 	if (FN(UNION,foreach_group)(u, &FN(UNION,count_part), &n) < 0)
  109 static isl_stat FN(UNION,free_group_entry)(void **entry, void *user)
  119 static __isl_null S(UNION,group) *FN(UNION,group_free)(
  119 static __isl_null S(UNION,group) *FN(UNION,group_free)(
  120 	__isl_take S(UNION,group) *group)
  129 				&FN(UNION,free_group_entry), NULL);
  139 static __isl_give S(UNION,group) *FN(UNION,group_alloc)(
  139 static __isl_give S(UNION,group) *FN(UNION,group_alloc)(
  143 	S(UNION,group) *group;
  148 	group = isl_calloc_type(ctx, S(UNION,group));
  153 		return FN(UNION,group_free)(group);
  163 static int FN(UNION,has_space)(const void *entry, const void *val)
  174 static __isl_give S(UNION,group) *FN(UNION,group_cow)(
  174 static __isl_give S(UNION,group) *FN(UNION,group_cow)(
  175 	__isl_take S(UNION,group) *group)
  180 S(UNION,foreach_data)
  186 static isl_stat FN(UNION,call_on_copy)(void **entry, void *user)
  189 	S(UNION,foreach_data) *data = (S(UNION,foreach_data) *) user;
  189 	S(UNION,foreach_data) *data = (S(UNION,foreach_data) *) user;
  199 static isl_stat FN(UNION,group_call_on_copy)(__isl_keep S(UNION,group) *group,
  199 static isl_stat FN(UNION,group_call_on_copy)(__isl_keep S(UNION,group) *group,
  209 				      &FN(UNION,call_on_copy), user);
  212 isl_stat FN(FN(UNION,foreach),BASE)(__isl_keep UNION *u,
  212 isl_stat FN(FN(UNION,foreach),BASE)(__isl_keep UNION *u,
  215 	S(UNION,foreach_data) data = { fn, user };
  220 	return FN(UNION,foreach_group)(u, &FN(UNION,group_call_on_copy), &data);
  220 	return FN(UNION,foreach_group)(u, &FN(UNION,group_call_on_copy), &data);
  226 static int FN(UNION,group_has_domain_space)(const void *entry, const void *val)
  228 	S(UNION,group) *group = (S(UNION,group) *) entry;
  228 	S(UNION,group) *group = (S(UNION,group) *) entry;
  244 static struct isl_hash_table_entry *FN(UNION,find_part_entry)(
  245 	__isl_keep UNION *u, __isl_keep isl_space *space, int reserve)
  250 	S(UNION,group) *group;
  255 	ctx = FN(UNION,get_ctx)(u);
  258 			    &FN(UNION,group_has_domain_space), space, reserve);
  263 		group = FN(UNION,group_alloc)(domain, 1);
  268 			group = FN(UNION,group_cow)(group);
  274 				&FN(UNION,has_space), space, reserve);
  286 static __isl_give UNION *FN(UNION,remove_part_entry)(__isl_take UNION *u,
  286 static __isl_give UNION *FN(UNION,remove_part_entry)(__isl_take UNION *u,
  286 static __isl_give UNION *FN(UNION,remove_part_entry)(__isl_take UNION *u,
  293 	S(UNION,group) *group;
  296 		return FN(UNION,free)(u);
  299 	ctx = FN(UNION,get_ctx)(u);
  302 			    &FN(UNION,group_has_domain_space), part->dim, 0);
  305 			return FN(UNION,free)(u));
  314 	FN(UNION,group_free)(group);
  321 static isl_bool FN(UNION,disjoint_domain)(__isl_keep PART *part1,
  341 static isl_stat FN(UNION,check_disjoint_domain_entry)(void **entry, void *user)
  354 	disjoint = FN(UNION,disjoint_domain)(part, other);
  371 static isl_stat FN(UNION,check_disjoint_domain_other)(__isl_keep UNION *u,
  371 static isl_stat FN(UNION,check_disjoint_domain_other)(__isl_keep UNION *u,
  377 	S(UNION,group) *group;
  381 	ctx = FN(UNION,get_ctx)(u);
  384 			    &FN(UNION,group_has_domain_space), part->dim, 0);
  389 			      &FN(UNION,check_disjoint_domain_entry), part);
  396 static isl_stat FN(UNION,check_disjoint_domain)(__isl_keep PART *part1,
  401 	disjoint = FN(UNION,disjoint_domain)(part1, part2);
  414 S(UNION,foreach_inplace_data)
  423 static isl_stat FN(UNION,group_call_inplace)(__isl_keep S(UNION,group) *group,
  423 static isl_stat FN(UNION,group_call_inplace)(__isl_keep S(UNION,group) *group,
  427 	S(UNION,foreach_inplace_data) *data;
  432 	data = (S(UNION,foreach_inplace_data) *) user;
  440 static isl_stat FN(UNION,foreach_inplace)(__isl_keep UNION *u,
  440 static isl_stat FN(UNION,foreach_inplace)(__isl_keep UNION *u,
  443 	S(UNION,foreach_inplace_data) data = { fn, user };
  445 	return FN(UNION,foreach_group)(u, &FN(UNION,group_call_inplace), &data);
  445 	return FN(UNION,foreach_group)(u, &FN(UNION,group_call_inplace), &data);
  451 static isl_bool FN(UNION,has_single_reference)(__isl_keep UNION *u)
  451 static isl_bool FN(UNION,has_single_reference)(__isl_keep UNION *u)
  458 static isl_stat FN(UNION,free_u_entry)(void **entry, void *user)
  460 	S(UNION,group) *group = *entry;
  461 	FN(UNION,group_free)(group);
tools/polly/lib/External/isl/isl_union_neg.c
   15 static __isl_give PART *FN(UNION,neg_entry)(__isl_take PART *part, void *user)
   22 __isl_give UNION *FN(UNION,neg)(__isl_take UNION *u)
   22 __isl_give UNION *FN(UNION,neg)(__isl_take UNION *u)
   22 __isl_give UNION *FN(UNION,neg)(__isl_take UNION *u)
   24 	return FN(UNION,transform_inplace)(u, &FN(UNION,neg_entry), NULL);
   24 	return FN(UNION,transform_inplace)(u, &FN(UNION,neg_entry), NULL);
tools/polly/lib/External/isl/isl_union_single.c
   20 struct UNION {
   32 int FN(FN(UNION,n),BASE)(__isl_keep UNION *u)
   32 int FN(FN(UNION,n),BASE)(__isl_keep UNION *u)
   37 S(UNION,foreach_data)
   43 static isl_stat FN(UNION,call_on_copy)(void **entry, void *user)
   46 	S(UNION,foreach_data) *data = (S(UNION,foreach_data) *)user;
   46 	S(UNION,foreach_data) *data = (S(UNION,foreach_data) *)user;
   54 isl_stat FN(FN(UNION,foreach),BASE)(__isl_keep UNION *u,
   54 isl_stat FN(FN(UNION,foreach),BASE)(__isl_keep UNION *u,
   57 	S(UNION,foreach_data) data = { fn, user };
   63 				      &FN(UNION,call_on_copy), &data);
   68 static int FN(UNION,has_same_domain_space)(const void *entry, const void *val)
   89 static struct isl_hash_table_entry *FN(UNION,find_part_entry)(
   90 	__isl_keep UNION *u, __isl_keep isl_space *space, int reserve)
  101 	ctx = FN(UNION,get_ctx)(u);
  104 			&FN(UNION,has_same_domain_space), space, reserve);
  118 	isl_die(FN(UNION,get_ctx)(u), isl_error_invalid,
  125 static __isl_give UNION *FN(UNION,remove_part_entry)(__isl_take UNION *u,
  125 static __isl_give UNION *FN(UNION,remove_part_entry)(__isl_take UNION *u,
  125 static __isl_give UNION *FN(UNION,remove_part_entry)(__isl_take UNION *u,
  131 		return FN(UNION,free)(u);
  133 	ctx = FN(UNION,get_ctx)(u);
  147 static isl_stat FN(UNION,check_disjoint_domain_other)(__isl_keep UNION *u,
  147 static isl_stat FN(UNION,check_disjoint_domain_other)(__isl_keep UNION *u,
  159 static isl_stat FN(UNION,check_disjoint_domain)(__isl_keep PART *part1,
  169 static isl_stat FN(UNION,foreach_inplace)(__isl_keep UNION *u,
  169 static isl_stat FN(UNION,foreach_inplace)(__isl_keep UNION *u,
  176 	ctx = FN(UNION,get_ctx)(u);
  183 static isl_bool FN(UNION,has_single_reference)(__isl_keep UNION *u)
  183 static isl_bool FN(UNION,has_single_reference)(__isl_keep UNION *u)
  190 static isl_stat FN(UNION,free_u_entry)(void **entry, void *user)
tools/polly/lib/External/isl/isl_union_templ.c
   13 __isl_give UNION *FN(UNION,cow)(__isl_take UNION *u);
   13 __isl_give UNION *FN(UNION,cow)(__isl_take UNION *u);
   13 __isl_give UNION *FN(UNION,cow)(__isl_take UNION *u);
   15 isl_ctx *FN(UNION,get_ctx)(__isl_keep UNION *u)
   15 isl_ctx *FN(UNION,get_ctx)(__isl_keep UNION *u)
   22 static __isl_keep isl_space *FN(UNION,peek_space)(__isl_keep UNION *u)
   22 static __isl_keep isl_space *FN(UNION,peek_space)(__isl_keep UNION *u)
   31 __isl_give isl_space *FN(UNION,get_space)(__isl_keep UNION *u)
   31 __isl_give isl_space *FN(UNION,get_space)(__isl_keep UNION *u)
   33 	return isl_space_copy(FN(UNION,peek_space)(u));
   39 unsigned FN(UNION,dim)(__isl_keep UNION *u, enum isl_dim_type type)
   39 unsigned FN(UNION,dim)(__isl_keep UNION *u, enum isl_dim_type type)
   45 		isl_die(FN(UNION,get_ctx)(u), isl_error_invalid,
   55 int FN(UNION,find_dim_by_name)(__isl_keep UNION *u, enum isl_dim_type type,
   55 int FN(UNION,find_dim_by_name)(__isl_keep UNION *u, enum isl_dim_type type,
   64 static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_space *dim,
   64 static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_space *dim,
   67 static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_space *dim, int size)
   67 static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_space *dim, int size)
   70 	UNION *u;
   76 	u = isl_calloc_type(dim->ctx, UNION);
   86 		return FN(UNION,free)(u);
   95 __isl_give UNION *FN(UNION,ZERO)(__isl_take isl_space *dim, enum isl_fold type)
   95 __isl_give UNION *FN(UNION,ZERO)(__isl_take isl_space *dim, enum isl_fold type)
   97 	return FN(UNION,alloc)(dim, type, 16);
  100 __isl_give UNION *FN(UNION,ZERO)(__isl_take isl_space *dim)
  100 __isl_give UNION *FN(UNION,ZERO)(__isl_take isl_space *dim)
  102 	return FN(UNION,alloc)(dim, 16);
  106 __isl_give UNION *FN(UNION,copy)(__isl_keep UNION *u)
  106 __isl_give UNION *FN(UNION,copy)(__isl_keep UNION *u)
  106 __isl_give UNION *FN(UNION,copy)(__isl_keep UNION *u)
  120 __isl_give PART *FN(FN(UNION,extract),BASE)(__isl_keep UNION *u,
  120 __isl_give PART *FN(FN(UNION,extract),BASE)(__isl_keep UNION *u,
  125 	space = isl_space_replace_params(space, FN(UNION,peek_space)(u));
  127 	entry = FN(UNION,find_part_entry)(u, space, 0);
  150 static __isl_give UNION *FN(UNION,add_part_generic)(__isl_take UNION *u,
  150 static __isl_give UNION *FN(UNION,add_part_generic)(__isl_take UNION *u,
  150 static __isl_give UNION *FN(UNION,add_part_generic)(__isl_take UNION *u,
  167 	u = FN(UNION,align_params)(u, FN(PART,get_space)(part));
  168 	part = FN(PART,align_params)(part, FN(UNION,get_space)(u));
  170 	u = FN(UNION,cow)(u);
  175 	if (FN(UNION,check_disjoint_domain_other)(u, part) < 0)
  177 	entry = FN(UNION,find_part_entry)(u, part->dim, 1);
  185 		    FN(UNION,check_disjoint_domain)(entry->data, part) < 0)
  195 			u = FN(UNION,remove_part_entry)(u, entry);
  202 	FN(UNION,free)(u);
  209 __isl_give UNION *FN(FN(UNION,add),BASE)(__isl_take UNION *u,
  209 __isl_give UNION *FN(FN(UNION,add),BASE)(__isl_take UNION *u,
  209 __isl_give UNION *FN(FN(UNION,add),BASE)(__isl_take UNION *u,
  212 	return FN(UNION,add_part_generic)(u, part, 1);
  219 static __isl_give UNION *FN(UNION,alloc_same_size_on_space)(__isl_keep UNION *u,
  219 static __isl_give UNION *FN(UNION,alloc_same_size_on_space)(__isl_keep UNION *u,
  219 static __isl_give UNION *FN(UNION,alloc_same_size_on_space)(__isl_keep UNION *u,
  224 	return FN(UNION,alloc)(space, u->type, u->table.n);
  232 static __isl_give UNION *FN(UNION,alloc_same_size_on_space)(__isl_keep UNION *u,
  232 static __isl_give UNION *FN(UNION,alloc_same_size_on_space)(__isl_keep UNION *u,
  232 static __isl_give UNION *FN(UNION,alloc_same_size_on_space)(__isl_keep UNION *u,
  237 	return FN(UNION,alloc)(space, u->table.n);
  247 static __isl_give UNION *FN(UNION,alloc_same_size)(__isl_keep UNION *u)
  247 static __isl_give UNION *FN(UNION,alloc_same_size)(__isl_keep UNION *u)
  247 static __isl_give UNION *FN(UNION,alloc_same_size)(__isl_keep UNION *u)
  249 	return FN(UNION,alloc_same_size_on_space)(u, FN(UNION,get_space)(u));
  249 	return FN(UNION,alloc_same_size_on_space)(u, FN(UNION,get_space)(u));
  256 S(UNION,transform_data)
  261 	UNION *res;
  266 static isl_stat FN(UNION,transform_entry)(__isl_take PART *part, void *user)
  268 	S(UNION,transform_data) *data = (S(UNION,transform_data) *)user;
  268 	S(UNION,transform_data) *data = (S(UNION,transform_data) *)user;
  271 	data->res = FN(FN(UNION,add),BASE)(data->res, part);
  281 static __isl_give UNION *FN(UNION,transform_space)(__isl_take UNION *u,
  281 static __isl_give UNION *FN(UNION,transform_space)(__isl_take UNION *u,
  281 static __isl_give UNION *FN(UNION,transform_space)(__isl_take UNION *u,
  285 	S(UNION,transform_data) data = { fn, user };
  287 	data.res = FN(UNION,alloc_same_size_on_space)(u, space);
  288 	if (FN(FN(UNION,foreach),BASE)(u,
  289 					&FN(UNION,transform_entry), &data) < 0)
  290 		data.res = FN(UNION,free)(data.res);
  291 	FN(UNION,free)(u);
  298 static __isl_give UNION *FN(UNION,transform)(__isl_take UNION *u,
  298 static __isl_give UNION *FN(UNION,transform)(__isl_take UNION *u,
  298 static __isl_give UNION *FN(UNION,transform)(__isl_take UNION *u,
  301 	return FN(UNION,transform_space)(u, FN(UNION,get_space)(u), fn, user);
  301 	return FN(UNION,transform_space)(u, FN(UNION,get_space)(u), fn, user);
  306 static isl_stat FN(UNION,transform_inplace_entry)(void **part, void *user)
  308 	S(UNION,transform_data) *data = (S(UNION,transform_data) *) user;
  308 	S(UNION,transform_data) *data = (S(UNION,transform_data) *) user;
  323 static __isl_give UNION *FN(UNION,transform_inplace)(__isl_take UNION *u,
  323 static __isl_give UNION *FN(UNION,transform_inplace)(__isl_take UNION *u,
  323 static __isl_give UNION *FN(UNION,transform_inplace)(__isl_take UNION *u,
  328 	single_ref = FN(UNION,has_single_reference)(u);
  330 		return FN(UNION,free)(u);
  332 		S(UNION,transform_data) data = { fn, user };
  333 		if (FN(UNION,foreach_inplace)(u,
  334 				&FN(UNION,transform_inplace_entry), &data) < 0)
  335 			return FN(UNION,free)(u);
  338 	return FN(UNION,transform)(u, fn, user);
  344 static __isl_give PART *FN(UNION,copy_part)(__isl_take PART *part, void *user)
  349 __isl_give UNION *FN(UNION,dup)(__isl_keep UNION *u)
  349 __isl_give UNION *FN(UNION,dup)(__isl_keep UNION *u)
  349 __isl_give UNION *FN(UNION,dup)(__isl_keep UNION *u)
  351 	u = FN(UNION,copy)(u);
  352 	return FN(UNION,transform)(u, &FN(UNION,copy_part), NULL);
  352 	return FN(UNION,transform)(u, &FN(UNION,copy_part), NULL);
  355 __isl_give UNION *FN(UNION,cow)(__isl_take UNION *u)
  355 __isl_give UNION *FN(UNION,cow)(__isl_take UNION *u)
  355 __isl_give UNION *FN(UNION,cow)(__isl_take UNION *u)
  363 	return FN(UNION,dup)(u);
  366 __isl_null UNION *FN(UNION,free)(__isl_take UNION *u)
  366 __isl_null UNION *FN(UNION,free)(__isl_take UNION *u)
  366 __isl_null UNION *FN(UNION,free)(__isl_take UNION *u)
  375 				&FN(UNION,free_u_entry), NULL);
  382 static __isl_give PART *FN(UNION,align_entry)(__isl_take PART *part, void *user)
  393 static __isl_give UNION *FN(UNION,realign_domain)(__isl_take UNION *u,
  393 static __isl_give UNION *FN(UNION,realign_domain)(__isl_take UNION *u,
  393 static __isl_give UNION *FN(UNION,realign_domain)(__isl_take UNION *u,
  402 	u = FN(UNION,transform_space)(u, space, &FN(UNION,align_entry), r);
  402 	u = FN(UNION,transform_space)(u, space, &FN(UNION,align_entry), r);
  406 	FN(UNION,free)(u);
  413 __isl_give UNION *FN(UNION,align_params)(__isl_take UNION *u,
  413 __isl_give UNION *FN(UNION,align_params)(__isl_take UNION *u,
  413 __isl_give UNION *FN(UNION,align_params)(__isl_take UNION *u,
  433 	return FN(UNION,realign_domain)(u, r);
  436 	FN(UNION,free)(u);
  443 static isl_stat FN(UNION,union_add_part)(__isl_take PART *part, void *user)
  445 	UNION **u = (UNION **)user;
  445 	UNION **u = (UNION **)user;
  447 	*u = FN(UNION,add_part_generic)(*u, part, 0);
  462 static __isl_give UNION *FN(UNION,union_add_)(__isl_take UNION *u1,
  462 static __isl_give UNION *FN(UNION,union_add_)(__isl_take UNION *u1,
  462 static __isl_give UNION *FN(UNION,union_add_)(__isl_take UNION *u1,
  463 	__isl_take UNION *u2)
  465 	u1 = FN(UNION,align_params)(u1, FN(UNION,get_space)(u2));
  465 	u1 = FN(UNION,align_params)(u1, FN(UNION,get_space)(u2));
  466 	u2 = FN(UNION,align_params)(u2, FN(UNION,get_space)(u1));
  466 	u2 = FN(UNION,align_params)(u2, FN(UNION,get_space)(u1));
  468 	u1 = FN(UNION,cow)(u1);
  473 	if (FN(FN(UNION,foreach),BASE)(u2, &FN(UNION,union_add_part), &u1) < 0)
  473 	if (FN(FN(UNION,foreach),BASE)(u2, &FN(UNION,union_add_part), &u1) < 0)
  476 	FN(UNION,free)(u2);
  480 	FN(UNION,free)(u1);
  481 	FN(UNION,free)(u2);
  485 __isl_give UNION *FN(FN(UNION,from),BASE)(__isl_take PART *part)
  485 __isl_give UNION *FN(FN(UNION,from),BASE)(__isl_take PART *part)
  488 	UNION *u;
  497 	u = FN(UNION,ZERO)(dim, part->type);
  499 	u = FN(UNION,ZERO)(dim);
  501 	u = FN(FN(UNION,add),BASE)(u, part);
  506 S(UNION,match_bin_data) {
  507 	UNION *u2;
  508 	UNION *res;
  516 static isl_stat FN(UNION,match_bin_entry)(__isl_take PART *part, void *user)
  518 	S(UNION,match_bin_data) *data = user;
  524 	entry2 = FN(UNION,find_part_entry)(data->u2, space, 0);
  536 		isl_die(FN(UNION,get_ctx)(data->u2), isl_error_invalid,
  542 	data->res = FN(FN(UNION,add),BASE)(data->res, part);
  555 static __isl_give UNION *FN(UNION,match_bin_op)(__isl_take UNION *u1,
  555 static __isl_give UNION *FN(UNION,match_bin_op)(__isl_take UNION *u1,
  555 static __isl_give UNION *FN(UNION,match_bin_op)(__isl_take UNION *u1,
  556 	__isl_take UNION *u2,
  562 static __isl_give UNION *FN(UNION,match_bin_op)(__isl_take UNION *u1,
  562 static __isl_give UNION *FN(UNION,match_bin_op)(__isl_take UNION *u1,
  562 static __isl_give UNION *FN(UNION,match_bin_op)(__isl_take UNION *u1,
  563 	__isl_take UNION *u2,
  566 	S(UNION,match_bin_data) data = { NULL, NULL, fn };
  568 	u1 = FN(UNION,align_params)(u1, FN(UNION,get_space)(u2));
  568 	u1 = FN(UNION,align_params)(u1, FN(UNION,get_space)(u2));
  569 	u2 = FN(UNION,align_params)(u2, FN(UNION,get_space)(u1));
  569 	u2 = FN(UNION,align_params)(u2, FN(UNION,get_space)(u1));
  575 	data.res = FN(UNION,alloc_same_size)(u1);
  576 	if (FN(FN(UNION,foreach),BASE)(u1,
  577 				    &FN(UNION,match_bin_entry), &data) < 0)
  580 	FN(UNION,free)(u1);
  581 	FN(UNION,free)(u2);
  584 	FN(UNION,free)(u1);
  585 	FN(UNION,free)(u2);
  586 	FN(UNION,free)(data.res);
  596 __isl_give UNION *FN(UNION,add)(__isl_take UNION *u1, __isl_take UNION *u2)
  596 __isl_give UNION *FN(UNION,add)(__isl_take UNION *u1, __isl_take UNION *u2)
  596 __isl_give UNION *FN(UNION,add)(__isl_take UNION *u1, __isl_take UNION *u2)
  596 __isl_give UNION *FN(UNION,add)(__isl_take UNION *u1, __isl_take UNION *u2)
  599 	return FN(UNION,union_add_)(u1, u2);
  601 	return FN(UNION,match_bin_op)(u1, u2, &FN(PART,add));
  608 __isl_give UNION *FN(UNION,sub)(__isl_take UNION *u1, __isl_take UNION *u2)
  608 __isl_give UNION *FN(UNION,sub)(__isl_take UNION *u1, __isl_take UNION *u2)
  608 __isl_give UNION *FN(UNION,sub)(__isl_take UNION *u1, __isl_take UNION *u2)
  608 __isl_give UNION *FN(UNION,sub)(__isl_take UNION *u1, __isl_take UNION *u2)
  610 	return FN(UNION,match_bin_op)(u1, u2, &FN(PART,sub));
  614 S(UNION,any_set_data) {
  619 static __isl_give PART *FN(UNION,any_set_entry)(__isl_take PART *part,
  622 	S(UNION,any_set_data) *data = user;
  629 static __isl_give UNION *FN(UNION,any_set_op)(__isl_take UNION *u,
  629 static __isl_give UNION *FN(UNION,any_set_op)(__isl_take UNION *u,
  629 static __isl_give UNION *FN(UNION,any_set_op)(__isl_take UNION *u,
  633 	S(UNION,any_set_data) data = { NULL, fn };
  635 	u = FN(UNION,align_params)(u, isl_set_get_space(set));
  636 	set = isl_set_align_params(set, FN(UNION,get_space)(u));
  642 	u = FN(UNION,transform)(u, &FN(UNION,any_set_entry), &data);
  642 	u = FN(UNION,transform)(u, &FN(UNION,any_set_entry), &data);
  646 	FN(UNION,free)(u);
  653 __isl_give UNION *FN(UNION,intersect_params)(__isl_take UNION *u,
  653 __isl_give UNION *FN(UNION,intersect_params)(__isl_take UNION *u,
  653 __isl_give UNION *FN(UNION,intersect_params)(__isl_take UNION *u,
  656 	return FN(UNION,any_set_op)(u, set, &FN(PW,intersect_params));
  662 __isl_give UNION *FN(UNION,gist_params)(__isl_take UNION *u,
  662 __isl_give UNION *FN(UNION,gist_params)(__isl_take UNION *u,
  662 __isl_give UNION *FN(UNION,gist_params)(__isl_take UNION *u,
  665 	return FN(UNION,any_set_op)(u, set, &FN(PW,gist_params));
  668 S(UNION,match_domain_data) {
  670 	UNION *res;
  674 static int FN(UNION,set_has_dim)(const void *entry, const void *val)
  686 static isl_stat FN(UNION,match_domain_entry)(__isl_take PART *part, void *user)
  688 	S(UNION,match_domain_data) *data = user;
  696 				     hash, &FN(UNION,set_has_dim), space, 0);
  705 	data->res = FN(FN(UNION,add),BASE)(data->res, part);
  716 static __isl_give UNION *FN(UNION,match_domain_op)(__isl_take UNION *u,
  716 static __isl_give UNION *FN(UNION,match_domain_op)(__isl_take UNION *u,
  716 static __isl_give UNION *FN(UNION,match_domain_op)(__isl_take UNION *u,
  720 	S(UNION,match_domain_data) data = { NULL, NULL, fn };
  722 	u = FN(UNION,align_params)(u, isl_union_set_get_space(uset));
  723 	uset = isl_union_set_align_params(uset, FN(UNION,get_space)(u));
  729 	data.res = FN(UNION,alloc_same_size)(u);
  730 	if (FN(FN(UNION,foreach),BASE)(u,
  731 				   &FN(UNION,match_domain_entry), &data) < 0)
  734 	FN(UNION,free)(u);
  738 	FN(UNION,free)(u);
  740 	FN(UNION,free)(data.res);
  748 __isl_give UNION *FN(UNION,intersect_domain)(__isl_take UNION *u,
  748 __isl_give UNION *FN(UNION,intersect_domain)(__isl_take UNION *u,
  748 __isl_give UNION *FN(UNION,intersect_domain)(__isl_take UNION *u,
  752 		return FN(UNION,intersect_params)(u,
  754 	return FN(UNION,match_domain_op)(u, uset, &FN(PW,intersect_domain));
  761 static __isl_give PART *FN(UNION,subtract_domain_entry)(__isl_take PART *part,
  775 __isl_give UNION *FN(UNION,subtract_domain)(__isl_take UNION *u,
  775 __isl_give UNION *FN(UNION,subtract_domain)(__isl_take UNION *u,
  775 __isl_give UNION *FN(UNION,subtract_domain)(__isl_take UNION *u,
  778 	u = FN(UNION,transform)(u, &FN(UNION,subtract_domain_entry), uset);
  778 	u = FN(UNION,transform)(u, &FN(UNION,subtract_domain_entry), uset);
  783 __isl_give UNION *FN(UNION,gist)(__isl_take UNION *u,
  783 __isl_give UNION *FN(UNION,gist)(__isl_take UNION *u,
  783 __isl_give UNION *FN(UNION,gist)(__isl_take UNION *u,
  787 		return FN(UNION,gist_params)(u, isl_set_from_union_set(uset));
  788 	return FN(UNION,match_domain_op)(u, uset, &FN(PW,gist));
  795 static isl_stat FN(UNION,coalesce_entry)(void **entry, void *user)
  810 __isl_give UNION *FN(UNION,coalesce)(__isl_take UNION *u)
  810 __isl_give UNION *FN(UNION,coalesce)(__isl_take UNION *u)
  810 __isl_give UNION *FN(UNION,coalesce)(__isl_take UNION *u)
  812 	if (FN(UNION,foreach_inplace)(u, &FN(UNION,coalesce_entry), NULL) < 0)
  812 	if (FN(UNION,foreach_inplace)(u, &FN(UNION,coalesce_entry), NULL) < 0)
  817 	FN(UNION,free)(u);
  821 static isl_stat FN(UNION,domain_entry)(__isl_take PART *part, void *user)
  830 __isl_give isl_union_set *FN(UNION,domain)(__isl_take UNION *u)
  830 __isl_give isl_union_set *FN(UNION,domain)(__isl_take UNION *u)
  834 	uset = isl_union_set_empty(FN(UNION,get_space)(u));
  835 	if (FN(FN(UNION,foreach),BASE)(u, &FN(UNION,domain_entry), &uset) < 0)
  835 	if (FN(FN(UNION,foreach),BASE)(u, &FN(UNION,domain_entry), &uset) < 0)
  838 	FN(UNION,free)(u);
  843 	FN(UNION,free)(u);
  850 static __isl_give UNION *FN(UNION,negate_type)(__isl_take UNION *u)
  850 static __isl_give UNION *FN(UNION,negate_type)(__isl_take UNION *u)
  850 static __isl_give UNION *FN(UNION,negate_type)(__isl_take UNION *u)
  852 	u = FN(UNION,cow)(u);
  862 static __isl_give UNION *FN(UNION,negate_type)(__isl_take UNION *u)
  862 static __isl_give UNION *FN(UNION,negate_type)(__isl_take UNION *u)
  862 static __isl_give UNION *FN(UNION,negate_type)(__isl_take UNION *u)
  870 static __isl_give PART *FN(UNION,scale_val_entry)(__isl_take PART *part,
  880 __isl_give UNION *FN(UNION,scale_val)(__isl_take UNION *u,
  880 __isl_give UNION *FN(UNION,scale_val)(__isl_take UNION *u,
  880 __isl_give UNION *FN(UNION,scale_val)(__isl_take UNION *u,
  891 		UNION *zero;
  892 		isl_space *space = FN(UNION,get_space)(u);
  894 		zero = FN(UNION,ZERO)(space, u->type);
  896 		zero = FN(UNION,ZERO)(space);
  898 		FN(UNION,free)(u);
  907 	u = FN(UNION,transform_inplace)(u, &FN(UNION,scale_val_entry), v);
  907 	u = FN(UNION,transform_inplace)(u, &FN(UNION,scale_val_entry), v);
  909 		u = FN(UNION,negate_type)(u);
  915 	FN(UNION,free)(u);
  921 static __isl_give PART *FN(UNION,scale_down_val_entry)(__isl_take PART *part,
  931 __isl_give UNION *FN(UNION,scale_down_val)(__isl_take UNION *u,
  931 __isl_give UNION *FN(UNION,scale_down_val)(__isl_take UNION *u,
  931 __isl_give UNION *FN(UNION,scale_down_val)(__isl_take UNION *u,
  948 	u = FN(UNION,transform_inplace)(u, &FN(UNION,scale_down_val_entry), v);
  948 	u = FN(UNION,transform_inplace)(u, &FN(UNION,scale_down_val_entry), v);
  950 		u = FN(UNION,negate_type)(u);
  956 	FN(UNION,free)(u);
  960 S(UNION,plain_is_equal_data)
  962 	UNION *u2;
  966 static isl_stat FN(UNION,plain_is_equal_entry)(void **entry, void *user)
  968 	S(UNION,plain_is_equal_data) *data = user;
  972 	entry2 = FN(UNION,find_part_entry)(data->u2, pw->dim, 0);
  988 isl_bool FN(UNION,plain_is_equal)(__isl_keep UNION *u1, __isl_keep UNION *u2)
  988 isl_bool FN(UNION,plain_is_equal)(__isl_keep UNION *u1, __isl_keep UNION *u2)
  988 isl_bool FN(UNION,plain_is_equal)(__isl_keep UNION *u1, __isl_keep UNION *u2)
  990 	S(UNION,plain_is_equal_data) data = { NULL, isl_bool_true };
  999 	n1 = FN(FN(UNION,n),BASE)(u1);
 1000 	n2 = FN(FN(UNION,n),BASE)(u2);
 1006 	u1 = FN(UNION,copy)(u1);
 1007 	u2 = FN(UNION,copy)(u2);
 1008 	u1 = FN(UNION,align_params)(u1, FN(UNION,get_space)(u2));
 1008 	u1 = FN(UNION,align_params)(u1, FN(UNION,get_space)(u2));
 1009 	u2 = FN(UNION,align_params)(u2, FN(UNION,get_space)(u1));
 1009 	u2 = FN(UNION,align_params)(u2, FN(UNION,get_space)(u1));
 1014 	if (FN(UNION,foreach_inplace)(u1,
 1015 			       &FN(UNION,plain_is_equal_entry), &data) < 0 &&
 1019 	FN(UNION,free)(u1);
 1020 	FN(UNION,free)(u2);
 1024 	FN(UNION,free)(u1);
 1025 	FN(UNION,free)(u2);
 1033 static isl_stat FN(UNION,involves_nan_entry)(void **entry, void *user)
 1047 isl_bool FN(UNION,involves_nan)(__isl_keep UNION *u)
 1047 isl_bool FN(UNION,involves_nan)(__isl_keep UNION *u)
 1054 	if (FN(UNION,foreach_inplace)(u,
 1055 				    &FN(UNION,involves_nan_entry), &nan) < 0 &&
 1065 S(UNION,drop_dims_data) {
 1073 static __isl_give PART *FN(UNION,drop_dims_entry)(__isl_take PART *part,
 1076 	S(UNION,drop_dims_data) *data = user;
 1084 __isl_give UNION *FN(UNION,drop_dims)( __isl_take UNION *u,
 1084 __isl_give UNION *FN(UNION,drop_dims)( __isl_take UNION *u,
 1084 __isl_give UNION *FN(UNION,drop_dims)( __isl_take UNION *u,
 1088 	S(UNION,drop_dims_data) data = { type, first, n };
 1094 		isl_die(FN(UNION,get_ctx)(u), isl_error_invalid,
 1096 			return FN(UNION,free)(u));
 1098 	space = FN(UNION,get_space)(u);
 1100 	return FN(UNION,transform_space)(u, space, &FN(UNION,drop_dims_entry),
 1100 	return FN(UNION,transform_space)(u, space, &FN(UNION,drop_dims_entry),
 1108 S(UNION,set_dim_name_data) {
 1116 static __isl_give PART *FN(UNION,set_dim_name_entry)(__isl_take PART *part,
 1119 	S(UNION,set_dim_name_data) *data = user;
 1127 __isl_give UNION *FN(UNION,set_dim_name)(__isl_take UNION *u,
 1127 __isl_give UNION *FN(UNION,set_dim_name)(__isl_take UNION *u,
 1127 __isl_give UNION *FN(UNION,set_dim_name)(__isl_take UNION *u,
 1130 	S(UNION,set_dim_name_data) data = { pos, s };
 1137 		isl_die(FN(UNION,get_ctx)(u), isl_error_invalid,
 1139 			return FN(UNION,free)(u));
 1141 	space = FN(UNION,get_space)(u);
 1143 	return FN(UNION,transform_space)(u, space,
 1144 					&FN(UNION,set_dim_name_entry), &data);
 1150 static __isl_give PART *FN(UNION,reset_user_entry)(__isl_take PART *part,
 1159 __isl_give UNION *FN(UNION,reset_user)(__isl_take UNION *u)
 1159 __isl_give UNION *FN(UNION,reset_user)(__isl_take UNION *u)
 1159 __isl_give UNION *FN(UNION,reset_user)(__isl_take UNION *u)
 1163 	space = FN(UNION,get_space)(u);
 1165 	return FN(UNION,transform_space)(u, space, &FN(UNION,reset_user_entry),
 1165 	return FN(UNION,transform_space)(u, space, &FN(UNION,reset_user_entry),
 1171 static isl_stat FN(UNION,add_to_list)(void **entry, void *user)
 1188 __isl_give LIST(PART) *FN(FN(UNION,get),LIST(BASE))(__isl_keep UNION *u)
 1188 __isl_give LIST(PART) *FN(FN(UNION,get),LIST(BASE))(__isl_keep UNION *u)
 1195 	n = FN(FN(UNION,n),BASE)(u);
 1198 	list = FN(LIST(PART),alloc)(FN(UNION,get_ctx(u)), n);
 1199 	if (FN(UNION,foreach_inplace)(u, &FN(UNION,add_to_list), &list) < 0)
 1199 	if (FN(UNION,foreach_inplace)(u, &FN(UNION,add_to_list), &list) < 0)