~mmach/netext73/isl

« back to all changes in this revision

Viewing changes to isl_union_pw_templ.c

  • Committer: mmach
  • Date: 2020-11-29 19:49:17 UTC
  • Revision ID: netbit73@gmail.com-20201129194917-qo0ok1xcw924ou1l
0.23

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#define xCAT(A,B) A ## B
 
2
#define CAT(A,B) xCAT(A,B)
 
3
#undef EL
 
4
#define EL CAT(isl_,BASE)
 
5
#undef PW_BASE
 
6
#define PW_BASE CAT(pw_,BASE)
 
7
#undef PW
 
8
#define PW CAT(isl_,PW_BASE)
 
9
#undef UNION_BASE
 
10
#define UNION_BASE CAT(union_,PW_BASE)
 
11
#undef UNION
 
12
#define UNION CAT(isl_,UNION_BASE)
 
13
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
 
14
#define FN(TYPE,NAME) xFN(TYPE,NAME)
 
15
 
 
16
/* Create a union piecewise expression
 
17
 * with the given base expression on a universe domain.
 
18
 */
 
19
__isl_give UNION *FN(FN(UNION,from),BASE)(__isl_take EL *el)
 
20
{
 
21
        return FN(FN(UNION,from),PW_BASE)(FN(FN(PW,from),BASE)(el));
 
22
}