1#ifndef ISL_VAL_PRIVATE_H
2#define ISL_VAL_PRIVATE_H
3
4#include <isl/int.h>
5#include <isl/val.h>
6#include <isl/local_space.h>
7#include <isl_reordering.h>
8
9/* Represents a "value", which may be an integer value, a rational value,
10 * plus or minus infinity or "not a number".
11 *
12 * Internally, +infinity is represented as 1/0,
13 * -infinity as -1/0 and NaN as 0/0.
14 *
15 * A rational value is always normalized before it is passed to the user.
16 */
17struct isl_val {
18	int ref;
19	isl_ctx *ctx;
20
21	isl_int n;
22	isl_int d;
23};
24
25#undef EL
26#define EL isl_val
27
28#include <isl_list_templ.h>
29
30__isl_give isl_val *isl_val_alloc(isl_ctx *ctx);
31__isl_give isl_val *isl_val_normalize(__isl_take isl_val *v);
32__isl_give isl_val *isl_val_int_from_isl_int(isl_ctx *ctx, isl_int n);
33__isl_give isl_val *isl_val_rat_from_isl_int(isl_ctx *ctx,
34	isl_int n, isl_int d);
35__isl_give isl_val *isl_val_cow(__isl_take isl_val *val);
36
37__isl_give isl_val *isl_val_insert_dims(__isl_take isl_val *v,
38	enum isl_dim_type type, unsigned first, unsigned n);
39__isl_give isl_val *isl_val_drop_dims(__isl_take isl_val *v,
40	enum isl_dim_type type, unsigned first, unsigned n);
41__isl_give isl_val *isl_val_set_dim_name(__isl_take isl_val *v,
42	enum isl_dim_type type, unsigned pos, const char *s);
43__isl_give isl_val *isl_val_reset_domain_space(__isl_take isl_val *v,
44	__isl_take isl_space *space);
45__isl_give isl_val *isl_val_realign_domain(__isl_take isl_val *v,
46	__isl_take isl_reordering *r);
47__isl_give isl_val *isl_val_zero_on_domain(__isl_take isl_local_space *ls);
48
49__isl_give isl_val *isl_val_scale_val(__isl_take isl_val *v1,
50	__isl_take isl_val *v2);
51
52int isl_val_check_match_domain_space(__isl_keep isl_val *v,
53	__isl_keep isl_space *space);
54
55#undef BASE
56#define BASE val
57
58#include <isl_multi_templ.h>
59
60#endif
61