struct isl_map *isl_map_dup(struct isl_map *map);
struct isl_map *isl_map_add(struct isl_map *map, struct isl_basic_map *bmap);
struct isl_map *isl_map_identity(struct isl_dim *set_dim);
+struct isl_map *isl_map_identity_like(struct isl_map *model);
struct isl_map *isl_map_identity_like_basic_map(struct isl_basic_map *model);
struct isl_map *isl_map_finalize(struct isl_map *map);
void isl_map_free(struct isl_map *map);
return map_identity(dim);
}
+struct isl_map *isl_map_identity_like(struct isl_map *model)
+{
+ if (!model || !model->dim)
+ return NULL;
+ isl_assert(model->ctx,
+ model->dim->n_in == model->dim->n_out, return NULL);
+ return map_identity(isl_dim_copy(model->dim));
+}
+
struct isl_map *isl_map_identity_like_basic_map(struct isl_basic_map *model)
{
if (!model || !model->dim)