/* * Copyright 2010 INRIA Saclay * * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, * 91893 Orsay, France */ #include <isl_ctx_private.h> #include <isl/id.h> #include <isl_space_private.h> #include <isl_reordering.h> /* Create a new reordering description based on * the number of source dimensions "src_len" and * (an initial value for) the number of target dimensions "dst_len". * * The caller still needs to fill in the space field and * possibly adjust the target dimensionality if this is not known yet * when this function is called. */ __isl_give isl_reordering *isl_reordering_alloc(isl_ctx *ctx, int src_len, int dst_len) { … } /* Set r->dst_len to the total dimensionality of r->space. */ static __isl_give isl_reordering *isl_reordering_set_dst_len_from_space( __isl_take isl_reordering *r) { … } __isl_give isl_reordering *isl_reordering_copy(__isl_keep isl_reordering *exp) { … } __isl_give isl_reordering *isl_reordering_dup(__isl_keep isl_reordering *r) { … } __isl_give isl_reordering *isl_reordering_cow(__isl_take isl_reordering *r) { … } __isl_null isl_reordering *isl_reordering_free(__isl_take isl_reordering *exp) { … } /* Return the isl_ctx to which "r" belongs. */ isl_ctx *isl_reordering_get_ctx(__isl_keep isl_reordering *r) { … } /* Return the space of "r". */ __isl_keep isl_space *isl_reordering_peek_space(__isl_keep isl_reordering *r) { … } /* Return a copy of the space of "r". */ __isl_give isl_space *isl_reordering_get_space(__isl_keep isl_reordering *r) { … } /* Construct a reordering that maps the parameters of "alignee" * to the corresponding parameters in a new dimension specification * that has the parameters of "aligner" first, followed by * any remaining parameters of "alignee" that do not occur in "aligner". * The other dimensions of "alignee" are mapped to subsequent positions * in order. */ __isl_give isl_reordering *isl_parameter_alignment_reordering( __isl_keep isl_space *alignee, __isl_keep isl_space *aligner) { … } /* Return a reordering that moves the parameters identified by * the elements of "tuple" to a domain tuple inserted into "space". * The parameters that remain, are moved from their original positions * in the list of parameters to their new positions in this list. * The parameters that get removed, are moved to the corresponding * positions in the new domain. Note that these set dimensions * do not necessarily need to appear as parameters in "space". * Any other dimensions are shifted by the number of extra dimensions * introduced, i.e., the number of dimensions in the new domain * that did not appear as parameters in "space". */ __isl_give isl_reordering *isl_reordering_unbind_params_insert_domain( __isl_keep isl_space *space, __isl_keep isl_multi_id *tuple) { … } __isl_give isl_reordering *isl_reordering_extend(__isl_take isl_reordering *exp, unsigned extra) { … } __isl_give isl_reordering *isl_reordering_extend_space( __isl_take isl_reordering *exp, __isl_take isl_space *space) { … } void isl_reordering_dump(__isl_keep isl_reordering *exp) { … }