File: isl_val_private.h

package info (click to toggle)
isl 0.20-2
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 12,708 kB
  • sloc: ansic: 125,702; python: 5,770; sh: 4,291; cpp: 1,057; makefile: 497; lisp: 54; perl: 9
file content (75 lines) | stat: -rw-r--r-- 2,459 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef ISL_VAL_PRIVATE_H
#define ISL_VAL_PRIVATE_H

#include <isl_int.h>
#include <isl/val.h>
#include <isl/local_space.h>
#include <isl_reordering.h>

/* Represents a "value", which may be an integer value, a rational value,
 * plus or minus infinity or "not a number".
 *
 * Internally, +infinity is represented as 1/0,
 * -infinity as -1/0 and NaN as 0/0.
 *
 * A rational value is always normalized before it is passed to the user.
 */
struct isl_val {
	int ref;
	isl_ctx *ctx;

	isl_int n;
	isl_int d;
};

#undef EL
#define EL isl_val

#include <isl_list_templ.h>

__isl_give isl_val *isl_val_alloc(isl_ctx *ctx);
__isl_give isl_val *isl_val_normalize(__isl_take isl_val *v);
__isl_give isl_val *isl_val_int_from_isl_int(isl_ctx *ctx, isl_int n);
__isl_give isl_val *isl_val_rat_from_isl_int(isl_ctx *ctx,
	isl_int n, isl_int d);
__isl_give isl_val *isl_val_cow(__isl_take isl_val *val);

isl_stat isl_val_get_num_isl_int(__isl_keep isl_val *v, isl_int *n);

isl_bool isl_val_involves_dims(__isl_keep isl_val *v, enum isl_dim_type type,
	unsigned first, unsigned n);
__isl_give isl_val *isl_val_insert_dims(__isl_take isl_val *v,
	enum isl_dim_type type, unsigned first, unsigned n);
__isl_give isl_val *isl_val_drop_dims(__isl_take isl_val *v,
	enum isl_dim_type type, unsigned first, unsigned n);
__isl_give isl_val *isl_val_set_dim_name(__isl_take isl_val *v,
	enum isl_dim_type type, unsigned pos, const char *s);
__isl_give isl_space *isl_val_get_space(__isl_keep isl_val *v);
__isl_give isl_val *isl_val_reset_domain_space(__isl_take isl_val *v,
	__isl_take isl_space *space);
__isl_give isl_val *isl_val_align_params(__isl_take isl_val *v,
	__isl_take isl_space *space);
__isl_give isl_val *isl_val_realign_domain(__isl_take isl_val *v,
	__isl_take isl_reordering *r);
__isl_give isl_val *isl_val_zero_on_domain(__isl_take isl_local_space *ls);

__isl_give isl_val *isl_val_scale_val(__isl_take isl_val *v1,
	__isl_take isl_val *v2);
__isl_give isl_val *isl_val_scale_down_val(__isl_take isl_val *v1,
	__isl_take isl_val *v2);
__isl_give isl_val *isl_val_mod_val(__isl_take isl_val *v1,
	__isl_take isl_val *v2);

int isl_val_plain_is_equal(__isl_keep isl_val *val1, __isl_keep isl_val *val2);

isl_bool isl_val_matching_params(__isl_keep isl_val *v,
	__isl_keep isl_space *space);
isl_stat isl_val_check_match_domain_space(__isl_keep isl_val *v,
	__isl_keep isl_space *space);

#undef BASE
#define BASE val

#include <isl_multi_templ.h>

#endif