Home | History | Annotate | Download | only in dist

Lines Matching refs:pw1

679 static __isl_give PW *FN(PW,union_add_)(__isl_take PW *pw1, __isl_take PW *pw2)
686 if (FN(PW,align_params_bin)(&pw1, &pw2) < 0)
689 pw1->dim);
690 if (!OPT_EQUAL_TYPES(pw1->, pw2->))
693 if (FN(PW,check_equal_space)(pw1, pw2) < 0)
696 if (FN(PW,IS_ZERO)(pw1)) {
697 FN(PW,free)(pw1);
703 return pw1;
706 n = (pw1->n + 1) * (pw2->n + 1);
707 res = FN(PW,alloc_size)(isl_space_copy(pw1->dim)
708 OPT_TYPE_ARG(pw1->), n);
710 for (i = 0; i < pw1->n; ++i) {
711 set = isl_set_copy(pw1->p[i].set);
715 common = isl_set_intersect(isl_set_copy(pw1->p[i].set),
725 FN(EL,copy)(pw1->p[i].FIELD),
730 res = FN(PW,add_piece)(res, set, FN(EL,copy)(pw1->p[i].FIELD));
735 for (i = 0; i < pw1->n; ++i)
737 isl_set_copy(pw1->p[i].set));
741 FN(PW,free)(pw1);
746 FN(PW,free)(pw1);
753 /* Compute the sum of "pw1" and "pw2 on the union of their domains,
761 __isl_give PW *FN(PW,union_add)(__isl_take PW *pw1, __isl_take PW *pw2)
763 return FN(PW,union_add_)(pw1, pw2);
770 static __isl_give PW *FN(PW,on_shared_domain_in)(__isl_take PW *pw1,
775 /* Apply "fn" to pairs of elements from pw1 and pw2 on shared domains.
778 static __isl_give PW *FN(PW,on_shared_domain_in)(__isl_take PW *pw1,
785 if (!pw1 || !pw2)
788 n = pw1->n * pw2->n;
789 res = FN(PW,alloc_size)(isl_space_copy(space) OPT_TYPE_ARG(pw1->), n);
791 for (i = 0; i < pw1->n; ++i) {
798 isl_set_copy(pw1->p[i].set),
808 res_ij = fn(FN(EL,copy)(pw1->p[i].FIELD),
817 FN(PW,free)(pw1);
822 FN(PW,free)(pw1);
830 static __isl_give PW *FN(PW,on_shared_domain)(__isl_take PW *pw1,
835 /* Apply "fn" to pairs of elements from pw1 and pw2 on shared domains.
836 * The result of "fn" is assumed to live in the same space as "pw1" and "pw2".
838 static __isl_give PW *FN(PW,on_shared_domain)(__isl_take PW *pw1,
844 if (FN(PW,check_equal_space)(pw1, pw2) < 0)
847 space = isl_space_copy(pw1->dim);
848 return FN(PW,on_shared_domain_in)(pw1, pw2, space, fn);
850 FN(PW,free)(pw1);
1812 /* Is pw1 obviously equal to pw2?
1816 * If "pw1" or "pw2" contain any NaNs, then they are considered
1820 isl_bool FN(PW,plain_is_equal)(__isl_keep PW *pw1, __isl_keep PW *pw2)
1825 if (!pw1 || !pw2)
1828 has_nan = FN(PW,involves_nan)(pw1);
1834 if (pw1 == pw2)
1836 equal = FN(PW,has_equal_space)(pw1, pw2);
1840 pw1 = FN(PW,copy)(pw1);
1842 pw1 = FN(PW,normalize)(pw1);
1844 if (!pw1 || !pw2)
1847 equal = isl_bool_ok(pw1->n == pw2->n);
1848 for (i = 0; equal && i < pw1->n; ++i) {
1849 equal = isl_set_plain_is_equal(pw1->p[i].set, pw2->p[i].set);
1854 equal = FN(EL,plain_is_equal)(pw1->p[i].FIELD, pw2->p[i].FIELD);
1859 FN(PW,free)(pw1);
1863 FN(PW,free)(pw1);