return NULL;
}
-static __isl_give PW *align_params_pw_pw_and(__isl_take PW *pw1,
+static __isl_give PW *FN(PW,align_params_pw_pw_and)(__isl_take PW *pw1,
__isl_take PW *pw2,
__isl_give PW *(*fn)(__isl_take PW *pw1, __isl_take PW *pw2))
{
return NULL;
}
-static __isl_give PW *align_params_pw_set_and(__isl_take PW *pw,
+static __isl_give PW *FN(PW,align_params_pw_set_and)(__isl_take PW *pw,
__isl_take isl_set *set,
__isl_give PW *(*fn)(__isl_take PW *pw, __isl_take isl_set *set))
{
__isl_give PW *FN(PW,add)(__isl_take PW *pw1, __isl_take PW *pw2)
{
- return align_params_pw_pw_and(pw1, pw2, &FN(PW,add_aligned));
+ return FN(PW,align_params_pw_pw_and)(pw1, pw2, &FN(PW,add_aligned));
}
/* Make sure "pw" has room for at least "n" more pieces.
__isl_give PW *FN(PW,add_disjoint)(__isl_take PW *pw1, __isl_take PW *pw2)
{
- return align_params_pw_pw_and(pw1, pw2, &FN(PW,add_disjoint_aligned));
+ return FN(PW,align_params_pw_pw_and)(pw1, pw2,
+ &FN(PW,add_disjoint_aligned));
}
#ifndef NO_NEG
__isl_give PW *FN(PW,intersect_domain)(__isl_take PW *pw,
__isl_take isl_set *context)
{
- return align_params_pw_set_and(pw, context,
+ return FN(PW,align_params_pw_set_and)(pw, context,
&FN(PW,intersect_domain_aligned));
}
__isl_give PW *FN(PW,gist)(__isl_take PW *pw, __isl_take isl_set *context)
{
- return align_params_pw_set_and(pw, context, &FN(PW,gist_aligned));
+ return FN(PW,align_params_pw_set_and)(pw, context, &FN(PW,gist_aligned));
}
__isl_give PW *FN(PW,coalesce)(__isl_take PW *pw)
domain = isl_space_domain(isl_space_copy(dim));
return FN(PW,reset_space_and_domain)(pw, dim, domain);
}
+
+__isl_give PW *FN(PW,set_tuple_id)(__isl_keep PW *pw, enum isl_dim_type type,
+ __isl_take isl_id *id)
+{
+ isl_space *space;
+
+ pw = FN(PW,cow)(pw);
+ if (!pw)
+ return isl_id_free(id);
+
+ space = FN(PW,get_space)(pw);
+ space = isl_space_set_tuple_id(space, type, id);
+
+ return FN(PW,reset_space)(pw, space);
+}
#endif
int FN(PW,has_equal_space)(__isl_keep PW *pw1, __isl_keep PW *pw2)