pass the number of parameters to functions reading polyhedra
[cloog/uuh.git] / include / cloog / domain.h
blob80a26bb4f4ce77dfa5bd4582c139bd6a296eaa96
2 /**-------------------------------------------------------------------**
3 ** CLooG **
4 **-------------------------------------------------------------------**
5 ** domain.h **
6 **-------------------------------------------------------------------**
7 ** First version: october 28th 2001 **
8 **-------------------------------------------------------------------**/
11 /******************************************************************************
12 * CLooG : the Chunky Loop Generator (experimental) *
13 ******************************************************************************
14 * *
15 * Copyright (C) 2001-2005 Cedric Bastoul *
16 * *
17 * This is free software; you can redistribute it and/or modify it under the *
18 * terms of the GNU General Public License as published by the Free Software *
19 * Foundation; either version 2 of the License, or (at your option) any later *
20 * version. *
21 * *
22 * This software is distributed in the hope that it will be useful, but *
23 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
24 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
25 * for more details. *
26 * *
27 * You should have received a copy of the GNU General Public License along *
28 * with software; if not, write to the Free Software Foundation, Inc., *
29 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
30 * *
31 * CLooG, the Chunky Loop Generator *
32 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
33 * *
34 ******************************************************************************/
37 #ifndef CLOOG_DOMAIN_H
38 #define CLOOG_DOMAIN_H
39 #if defined(__cplusplus)
40 extern "C"
42 #endif
45 #ifdef CLOOG_POLYLIB
46 #include <cloog/polylib/domain.h>
47 #else
48 struct cloogdomain;
49 typedef struct cloogdomain CloogDomain ;
50 struct cloogscattering;
51 typedef struct cloogscattering CloogScattering;
52 #endif
55 /**
56 * CloogScatteringList structure:
57 * this structure reprensents a node of a linked list of CloogScattering structures.
59 struct cloogscatteringlist {
60 CloogScattering *domain; /**< An element of the list. */
61 struct cloogscatteringlist *next;/**< Pointer to the next element of the list.*/
62 } ;
63 typedef struct cloogscatteringlist CloogScatteringList;
66 /******************************************************************************
67 * PolyLib interface *
68 ******************************************************************************/
69 void cloog_domain_print(FILE *, CloogDomain *) ;
70 void cloog_domain_print_constraints(FILE *, CloogDomain *,
71 int print_number);
72 void cloog_domain_free(CloogDomain *) ;
73 void cloog_scattering_free(CloogScattering *);
74 CloogDomain * cloog_domain_copy(CloogDomain *) ;
75 CloogDomain * cloog_domain_convex(CloogDomain * Pol) ;
76 CloogDomain * cloog_domain_simple_convex(CloogDomain * domain, int nb_par);
77 CloogDomain * cloog_domain_simplify(CloogDomain *, CloogDomain *) ;
78 CloogDomain * cloog_domain_union(CloogDomain *, CloogDomain *) ;
79 CloogDomain * cloog_domain_intersection(CloogDomain *, CloogDomain *) ;
80 CloogDomain * cloog_domain_difference(CloogDomain *, CloogDomain *) ;
81 void cloog_domain_sort(CloogDomain**,unsigned,unsigned,unsigned,int *);
82 CloogDomain * cloog_domain_empty(int) ;
85 /******************************************************************************
86 * Structure display function *
87 ******************************************************************************/
88 void cloog_domain_print_structure(FILE *file, CloogDomain *domain, int level,
89 const char *name);
90 void cloog_scattering_list_print(FILE *, CloogScatteringList *);
93 /******************************************************************************
94 * Memory deallocation function *
95 ******************************************************************************/
96 void cloog_scattering_list_free(CloogScatteringList *);
99 /*+****************************************************************************
100 * Reading function *
101 ******************************************************************************/
102 CloogDomain * cloog_domain_read(FILE *foo, int nb_par, CloogOptions *options);
103 CloogDomain * cloog_domain_union_read(FILE *foo, int nb_par,
104 CloogOptions *options);
105 CloogScatteringList * cloog_scattering_list_read(FILE * foo,
106 int nb_parameters, CloogOptions *options);
109 /******************************************************************************
110 * Processing functions *
111 ******************************************************************************/
112 CloogConstraints *cloog_domain_constraints(CloogDomain *);
113 int cloog_domain_isempty(CloogDomain *) ;
114 CloogDomain * cloog_domain_universe(unsigned dim, CloogOptions *options);
115 CloogDomain * cloog_domain_project(CloogDomain *, int, int) ;
116 CloogDomain * cloog_domain_extend(CloogDomain *, int, int) ;
117 int cloog_domain_never_integral(CloogDomain *) ;
118 void cloog_domain_stride(CloogDomain *, int, int, cloog_int_t *, cloog_int_t *);
119 int cloog_domain_integral_lowerbound(CloogDomain *, int, cloog_int_t *);
120 void cloog_domain_lowerbound_update(CloogDomain *, int, cloog_int_t);
121 int cloog_domain_lazy_disjoint(CloogDomain *, CloogDomain *) ;
122 int cloog_domain_lazy_equal(CloogDomain *, CloogDomain *) ;
123 int cloog_scattering_lazy_block(CloogScattering *, CloogScattering *,
124 CloogScatteringList *, int);
125 int cloog_scattering_lazy_isscalar(CloogScattering *, int);
126 int cloog_scattering_list_lazy_same(CloogScatteringList *);
127 void cloog_scattering_scalar(CloogScattering *, int, cloog_int_t *);
128 CloogDomain * cloog_domain_cut_first(CloogDomain *) ;
129 CloogScattering * cloog_scattering_erase_dimension(CloogScattering *, int);
131 int cloog_domain_dimension(CloogDomain *) ;
132 int cloog_scattering_dimension(CloogScattering *, CloogDomain *);
133 int cloog_domain_isconvex(CloogDomain *) ;
134 CloogDomain * cloog_domain_cube(int dim, cloog_int_t min, cloog_int_t max,
135 CloogOptions *options);
136 CloogDomain * cloog_domain_scatter(CloogDomain *domain, CloogScattering *scatt);
137 int cloog_scattering_fully_specified(CloogScattering *scattering,
138 CloogDomain *domain);
140 #if defined(__cplusplus)
142 #endif
143 #endif /* define _H */