return 1;
}
-__isl_give isl_multi_aff *isl_multi_aff_set_dim_name(
- __isl_take isl_multi_aff *maff,
- enum isl_dim_type type, unsigned pos, const char *s)
-{
- int i;
-
- maff = isl_multi_aff_cow(maff);
- if (!maff)
- return NULL;
-
- maff->space = isl_space_set_dim_name(maff->space, type, pos, s);
- if (!maff->space)
- return isl_multi_aff_free(maff);
-
- if (type == isl_dim_out)
- return maff;
- for (i = 0; i < maff->n; ++i) {
- maff->p[i] = isl_aff_set_dim_name(maff->p[i], type, pos, s);
- if (!maff->p[i])
- return isl_multi_aff_free(maff);
- }
-
- return maff;
-}
-
__isl_give isl_multi_aff *isl_multi_aff_drop_dims(__isl_take isl_multi_aff *maff,
enum isl_dim_type type, unsigned first, unsigned n)
{
return multi ? isl_space_dim(multi->space, type) : 0;
}
+__isl_give MULTI(BASE) *FN(MULTI(BASE),set_dim_name)(
+ __isl_take MULTI(BASE) *multi,
+ enum isl_dim_type type, unsigned pos, const char *s)
+{
+ int i;
+
+ multi = FN(MULTI(BASE),cow)(multi);
+ if (!multi)
+ return NULL;
+
+ multi->space = isl_space_set_dim_name(multi->space, type, pos, s);
+ if (!multi->space)
+ return FN(MULTI(BASE),free)(multi);
+
+ if (type == isl_dim_out)
+ return multi;
+ for (i = 0; i < multi->n; ++i) {
+ multi->p[i] = FN(EL,set_dim_name)(multi->p[i], type, pos, s);
+ if (!multi->p[i])
+ return FN(MULTI(BASE),free)(multi);
+ }
+
+ return multi;
+}
+
const char *FN(MULTI(BASE),get_tuple_name)(__isl_keep MULTI(BASE) *multi,
enum isl_dim_type type)
{