/* * Copyright 2017 Sven Verdoolaege * * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege. */ #include <isl_multi_macro.h> /* Compute the sum of "multi1" and "multi2" on the union of their domains, * with the actual sum on the shared domain and * the defined expression on the symmetric difference of the domains. * * We simply iterate over the elements in both arguments and * call isl_union_pw_aff_union_add on each of them, if there is * at least one element. * * Otherwise, the two expressions have an explicit domain and * the union of these explicit domains is computed. * This assumes that the explicit domains are either both in terms * of specific domains elements or both in terms of parameters. * However, if one of the expressions does not have any constraints * on its explicit domain, then this is allowed as well and the result * is the expression with no constraints on its explicit domain. */ __isl_give MULTI(BASE) *FN(MULTI(BASE),union_add)( __isl_take MULTI(BASE) *multi1, __isl_take MULTI(BASE) *multi2) { … }