26 #include "pips_config.h"
41 #include "polylib/polylib.h"
47 #define MAX_NB_RAYS (20000)
59 #define VALUE_TO_IRINT(val) (val)
60 #define IRINT_TO_VALUE(i) (i)
66 fprintf(stderr,
"[my_Matrix_Free] in %p\n", *m);
72 fprintf(stderr,
"[my_Matrix_Free] out %p\n", *m);
78 fprintf(stderr,
"[my_Polyhedron_Free] in %p\n", *p);
84 fprintf(stderr,
"[my_Polyhedron_Free] out %p\n", *p);
121 nbrows = mat->NbRows;
124 for (i=0; i<=sc->
nb_eq-1;i++)
126 for (; i<=nbrows-1;i++)
149 static Value eval_constraint_with_vertex(
160 static int francois_debug=0;
163 fprintf(stderr,
"Constraint:\n");
169 fprintf(stderr,
"N[%d]=%ld, ", i, (
long int) N[i]);
194 Value k = eval_constraint_with_vertex(v, b, d, N);
203 Value k = eval_constraint_with_vertex(v, b, d, N);
210 static bool vertex_strictly_meets_inequality_p
213 Value k = eval_constraint_with_vertex(v, b, d, N);
224 static bool redundant_vertex_p(
Psysteme sc,
int d,
Value * N,
bool strict_p)
226 bool redundant_p =
true;
227 Pbase b = sc_base(sc);
232 for(
eq=sc_egalites(sc);
236 redundant_p = vertex_meets_equality_p(v, b, d, N);
239 for(
eq=sc_inegalites(sc);
244 redundant_p = vertex_strictly_meets_inequality_p(v, b, d, N);
246 redundant_p = vertex_meets_inequality_p(v, b, d, N);
272 for (i=0; i<e->size; i++) {
278 for (i=e->size-1; i>=0; i--) {
285 fprintf(stderr,
"cannot represent periodic polynomials in linear\n");
309 const char* variable_names[])
313 Polyhedron *
volatile A = NULL;
314 Matrix *
volatile a = NULL;
315 Polyhedron *
volatile C = NULL;
316 Enumeration *
volatile ehrhart = NULL;
320 if( sc_dimension(ordered_sc) == 0 )
333 assert(!SC_UNDEFINED_P(ordered_sc) && (sc_dimension(ordered_sc) != 0));
336 a = Matrix_Alloc(nbrows, nbcolumns);
344 ehrhart = Polyhedron_Enumerate(
A, C,
MAX_NB_RAYS, variable_names);
@ any_exception_error
catch all
#define value_pdiv(v1, v2)
#define value_notzero_p(val)
#define value_uminus(val)
unary operators on values
#define value_negz_p(val)
#define value_direct_multiply(v1, v2)
#define value_zero_p(val)
#define value_addto(ref, val)
int rank_of_variable(Pbase base, Variable var)
this function returns the rank of the variable var in the base 0 encodes TCST, but I do not know why,...
bdt base
Current expression.
#define CONTRAINTE_UNDEFINED_P(c)
#define contrainte_succ(c)
#define contrainte_vecteur(c)
passage au champ vecteur d'une contrainte "a la Newgen"
#define CONTRAINTE_UNDEFINED
void vect_dump(Pvecteur v)
void vect_dump(Pvecteur v): print sparse vector v on stderr.
Ppolynome make_polynome(float coeff, Variable var, Value expo)
Ppolynome make_polynome(float coeff, Variable var, Value expo) PRIVATE allocates space for,...
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2)
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2) returns pp1 * pp2.
void polynome_add(Ppolynome *ppp, Ppolynome pp2)
void polynome_add(Ppolynome* ppp, Ppolynome pp2) (*ppp) = (*ppp) + pp2.
#define POLYNOME_UNDEFINED
static Variable base_nth(Pbase b, size_t i)
static void contrainte_to_matrix_ligne(Pcontrainte pc, Matrix *mat, int i, Pbase base)
Fonctions de conversion traduisant une Pcontrainte en une ligne de la structure matrix de l'IRISA.
static Ppolynome evalue_to_polynome(evalue *, Pbase)
static void sc_to_matrix(Psysteme sc, Matrix *mat)
Passage du systeme lineaire sc a une matrice matrix (structure Irisa) Cette fonction de conversion es...
#define MAX_NB_RAYS
IRISA/POLYLIB data structures.
static Ppolynome enode_to_polynome(enode *e, Pbase ordered_base)
static void my_Polyhedron_Free(Polyhedron *volatile *p)
static void my_Matrix_Free(Matrix *volatile *m)
#define VALUE_TO_IRINT(val)
Irisa is based on int.
Ppolynome sc_enumerate(Psysteme ordered_sc, Pbase ordered_base, const char *variable_names[])
enumerate the systeme sc using base pb pb contains the unknow variables and sc all the constraints or...
Pcontrainte eq
element du vecteur colonne du systeme donne par l'analyse
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
struct Scontrainte * succ
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_UNDEFINED
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
#define base_dimension(b)
#define VECTEUR_UNDEFINED_P(v)
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...