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 /* Evaluate "u" in the void point "pnt".
14 * In particular, return the value NaN.
16 static __isl_give isl_val
*FN(UNION
,eval_void
)(__isl_take UNION
*u
,
17 __isl_take isl_point
*pnt
)
21 ctx
= isl_point_get_ctx(pnt
);
24 return isl_val_nan(ctx
);
27 /* Do the tuples of "space" correspond to those of the domain of "part"?
28 * That is, is the domain space of "part" equal to "space", ignoring parameters?
30 static isl_bool
FN(UNION
,has_domain_space_tuples
)(const void *entry
,
33 PART
*part
= (PART
*)entry
;
34 isl_space
*space
= (isl_space
*) val
;
36 return FN(PART
,has_domain_space_tuples
)(part
, space
);
39 __isl_give isl_val
*FN(UNION
,eval
)(__isl_take UNION
*u
,
40 __isl_take isl_point
*pnt
)
43 struct isl_hash_table_entry
*entry
;
50 is_void
= isl_point_is_void(pnt
);
54 return FN(UNION
,eval_void
)(u
, pnt
);
56 space
= isl_space_copy(pnt
->dim
);
59 hash
= isl_space_get_hash(space
);
60 entry
= isl_hash_table_find(u
->space
->ctx
, &u
->table
,
61 hash
, &FN(UNION
,has_domain_space_tuples
),
63 isl_space_free(space
);
66 if (entry
== isl_hash_table_entry_none
) {
67 v
= isl_val_zero(isl_point_get_ctx(pnt
));
70 v
= FN(PART
,eval
)(FN(PART
,copy
)(entry
->data
), pnt
);