Home | History | Annotate | Download | only in isl
      1 #ifndef ISL_OBJ_H
      2 #define ISL_OBJ_H
      3 
      4 #include <isl/set_type.h>
      5 #include <isl/map_type.h>
      6 #include <isl/union_set_type.h>
      7 #include <isl/union_map_type.h>
      8 #include <isl/polynomial_type.h>
      9 #include <isl/printer.h>
     10 
     11 #if defined(__cplusplus)
     12 extern "C" {
     13 #endif
     14 
     15 struct isl_obj_vtable {
     16 	void *(*copy)(void *v1);
     17 	void *(*add)(void *v1, void *v2);
     18 	__isl_give isl_printer *(*print)(__isl_take isl_printer *p, void *v);
     19 	void (*free)(void *v);
     20 };
     21 typedef struct isl_obj_vtable *isl_obj_type;
     22 extern struct isl_obj_vtable isl_obj_none_vtable;
     23 #define isl_obj_none		(&isl_obj_none_vtable)
     24 extern struct isl_obj_vtable isl_obj_int_vtable;
     25 #define isl_obj_int		(&isl_obj_int_vtable)
     26 extern struct isl_obj_vtable isl_obj_set_vtable;
     27 #define isl_obj_set		(&isl_obj_set_vtable)
     28 extern struct isl_obj_vtable isl_obj_union_set_vtable;
     29 #define isl_obj_union_set	(&isl_obj_union_set_vtable)
     30 extern struct isl_obj_vtable isl_obj_map_vtable;
     31 #define isl_obj_map		(&isl_obj_map_vtable)
     32 extern struct isl_obj_vtable isl_obj_union_map_vtable;
     33 #define isl_obj_union_map	(&isl_obj_union_map_vtable)
     34 extern struct isl_obj_vtable isl_obj_pw_qpolynomial_vtable;
     35 #define isl_obj_pw_qpolynomial	(&isl_obj_pw_qpolynomial_vtable)
     36 extern struct isl_obj_vtable isl_obj_union_pw_qpolynomial_vtable;
     37 #define isl_obj_union_pw_qpolynomial	(&isl_obj_union_pw_qpolynomial_vtable)
     38 extern struct isl_obj_vtable isl_obj_pw_qpolynomial_fold_vtable;
     39 #define isl_obj_pw_qpolynomial_fold	(&isl_obj_pw_qpolynomial_fold_vtable)
     40 extern struct isl_obj_vtable isl_obj_union_pw_qpolynomial_fold_vtable;
     41 #define isl_obj_union_pw_qpolynomial_fold	(&isl_obj_union_pw_qpolynomial_fold_vtable)
     42 struct isl_obj {
     43 	isl_obj_type	type;
     44 	void		*v;
     45 };
     46 
     47 struct isl_int_obj;
     48 typedef struct isl_int_obj isl_int_obj;
     49 
     50 __isl_give isl_int_obj *isl_int_obj_alloc(isl_ctx *ctx, isl_int v);
     51 void isl_int_obj_free(__isl_take isl_int_obj *i);
     52 __isl_give isl_int_obj *isl_int_obj_add(__isl_take isl_int_obj *i1,
     53 	__isl_take isl_int_obj *i2);
     54 __isl_give isl_int_obj *isl_int_obj_sub(__isl_take isl_int_obj *i1,
     55 	__isl_take isl_int_obj *i2);
     56 __isl_give isl_int_obj *isl_int_obj_mul(__isl_take isl_int_obj *i1,
     57 	__isl_take isl_int_obj *i2);
     58 void isl_int_obj_get_int(__isl_keep isl_int_obj *i, isl_int *v);
     59 
     60 #if defined(__cplusplus)
     61 }
     62 #endif
     63 
     64 #endif
     65