2 * Copyright 2010 INRIA Saclay
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
7 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
11 #include <isl_union_macro.h>
13 /* Is the domain space of "entry" equal to "space"?
15 static int FN(UNION
,has_domain_space
)(const void *entry
, const void *val
)
17 PART
*part
= (PART
*)entry
;
18 isl_space
*space
= (isl_space
*) val
;
20 if (isl_space_is_params(space
))
21 return isl_space_is_set(part
->dim
);
23 return isl_space_tuple_is_equal(part
->dim
, isl_dim_in
,
27 __isl_give isl_val
*FN(UNION
,eval
)(__isl_take UNION
*u
,
28 __isl_take isl_point
*pnt
)
31 struct isl_hash_table_entry
*entry
;
38 space
= isl_space_copy(pnt
->dim
);
41 hash
= isl_space_get_hash(space
);
42 entry
= isl_hash_table_find(u
->space
->ctx
, &u
->table
,
43 hash
, &FN(UNION
,has_domain_space
),
45 isl_space_free(space
);
47 v
= isl_val_zero(isl_point_get_ctx(pnt
));
50 v
= FN(PART
,eval
)(FN(PART
,copy
)(entry
->data
), pnt
);