Rename headers from isl_header.h to isl/header.h
[platform/upstream/isl.git] / include / isl / vec.h
1 /*
2  * Copyright 2008-2009 Katholieke Universiteit Leuven
3  *
4  * Use of this software is governed by the GNU LGPLv2.1 license
5  *
6  * Written by Sven Verdoolaege, K.U.Leuven, Departement
7  * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
8  */
9
10 #ifndef ISL_VEC_H
11 #define ISL_VEC_H
12
13 #include <stdio.h>
14
15 #include <isl/int.h>
16 #include <isl/ctx.h>
17 #include <isl/blk.h>
18
19 #if defined(__cplusplus)
20 extern "C" {
21 #endif
22
23 struct isl_vec {
24         int ref;
25
26         struct isl_ctx *ctx;
27
28         unsigned size;
29         isl_int *el;
30
31         struct isl_blk block;
32 };
33 typedef struct isl_vec isl_vec;
34
35 struct isl_vec *isl_vec_alloc(struct isl_ctx *ctx, unsigned size);
36 struct isl_vec *isl_vec_copy(struct isl_vec *vec);
37 struct isl_vec *isl_vec_cow(struct isl_vec *vec);
38 void isl_vec_free(struct isl_vec *vec);
39
40 void isl_vec_dump(struct isl_vec *vec, FILE *out, int indent);
41
42 void isl_vec_lcm(struct isl_vec *vec, isl_int *lcm);
43 struct isl_vec *isl_vec_ceil(struct isl_vec *vec);
44 struct isl_vec *isl_vec_normalize(struct isl_vec *vec);
45 __isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec);
46 __isl_give isl_vec *isl_vec_scale(__isl_take isl_vec *vec, isl_int m);
47 __isl_give isl_vec *isl_vec_add(__isl_take isl_vec *vec1,
48         __isl_take isl_vec *vec2);
49 __isl_give isl_vec *isl_vec_extend(__isl_take isl_vec *vec, unsigned size);
50 __isl_give isl_vec *isl_vec_zero_extend(__isl_take isl_vec *vec, unsigned size);
51
52 struct isl_vec *isl_vec_read_from_file(struct isl_ctx *ctx,
53                 FILE *input, unsigned input_format);
54
55 #if defined(__cplusplus)
56 }
57 #endif
58
59 #endif