From 1cc8fc15aa5ab4ed74b210be4351e5b728023c1c Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 30 Mar 2010 17:27:11 +0200 Subject: [PATCH] iscc: add coalesce operations --- doc/isl.tex | 20 ++++++++++++++++++++ iscc.c | 9 +++++++++ 2 files changed, 29 insertions(+) diff --git a/doc/isl.tex b/doc/isl.tex index 6df7f93..70f2832 100644 --- a/doc/isl.tex +++ b/doc/isl.tex @@ -92,6 +92,26 @@ number of elements in the set $s$ $q$ := \ai[\tt]{card} $m$ & number of elements in the image of a domain element \\ +$s_2$ := \ai[\tt]{coalesce} $s_1$ & +simplify the representation of set $s_1$ by trying +to combine pairs of basic sets into a single +basic set +\\ +$m_2$ := \ai[\tt]{coalesce} $m_1$ & +simplify the representation of map $m_1$ by trying +to combine pairs of basic maps into a single +basic map +\\ +$q_2$ := \ai[\tt]{coalesce} $q_1$ & +simplify the representation of $q_1$ by trying +to combine pairs of basic sets in the domain +of $q_1$ into a single basic set +\\ +$f_2$ := \ai[\tt]{coalesce} $f_1$ & +simplify the representation of $f_1$ by trying +to combine pairs of basic sets in the domain +of $f_1$ into a single basic set +\\ $s$ := \ai[\tt]{dom} $m$ & domain of map $m$ \\ diff --git a/iscc.c b/iscc.c index 2f96d83..0d8e0a9 100644 --- a/iscc.c +++ b/iscc.c @@ -327,6 +327,15 @@ struct isc_named_un_op named_un_ops[] = { (isc_un_op_fn) &isl_set_card } }, {"card", { -1, isl_obj_map, isl_obj_pw_qpolynomial, (isc_un_op_fn) &isl_map_card } }, + {"coalesce", { -1, isl_obj_set, isl_obj_set, + (isc_un_op_fn) &isl_set_coalesce } }, + {"coalesce", { -1, isl_obj_map, isl_obj_map, + (isc_un_op_fn) &isl_map_coalesce } }, + {"coalesce", { -1, isl_obj_pw_qpolynomial, isl_obj_pw_qpolynomial, + (isc_un_op_fn) &isl_pw_qpolynomial_coalesce } }, + {"coalesce", { -1, isl_obj_pw_qpolynomial_fold, + isl_obj_pw_qpolynomial_fold, + (isc_un_op_fn) &isl_pw_qpolynomial_fold_coalesce } }, {"dom", { -1, isl_obj_map, isl_obj_set, (isc_un_op_fn) &isl_map_domain } }, {"dom", { -1, isl_obj_pw_qpolynomial, isl_obj_set, -- 2.11.4.GIT