PIPS
|
#include <stdio.h>
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
Go to the source code of this file.
Functions | |
Variable | variable_of_rank () |
Variable | search_var_of_higher_rank () |
bool | var_with_unity_coeff_p (Psysteme sc, Variable var) |
This function returns true: if all positive OR all negative coefficients of the variable var in the system are equal to 1. More... | |
void | sc_integer_projection_information (Psysteme sc, Pbase index_base, int sc_info[][4], int dim_h, int n) |
This function gives information about the variables and the constraints of the system. More... | |
void | constraint_integer_combination (Pbase index_base, Pcontrainte ineq1, Pcontrainte ineq2, int rank, Variable *right_var, int *right_rank, Value *right_coeff, Variable *left_var, int *left_rank, Value *left_coeff) |
This function computes the coefficients of the constraint resulting from the elimination of the variable of rank "rank" from the 2 inequalities ineq1 and ineq2. More... | |
void constraint_integer_combination | ( | Pbase | index_base, |
Pcontrainte | ineq1, | ||
Pcontrainte | ineq2, | ||
int | rank, | ||
Variable * | right_var, | ||
int * | right_rank, | ||
Value * | right_coeff, | ||
Variable * | left_var, | ||
int * | left_rank, | ||
Value * | left_coeff | ||
) |
This function computes the coefficients of the constraint resulting from the elimination of the variable of rank "rank" from the 2 inequalities ineq1 and ineq2.
Assuming that: ineq1 is the constraint a0 X2 + + E0 + b0 <= 0 ineq2 is the constraint - a1 X2 + E1 + b1 <=0 where E1 contains X1, E0 contains X0 and a0,a1 >0 then the result of the fonction will be: right_var = X0, right_rank=rank(X0), right_ceoff=ceofficient of X0 in E0 left_var = X1, left_rank=rank(X10, left_coeff=coefficient of X1 in E1
right_rank | RIGHT |
left_rank | LEFT |
Definition at line 234 of file sc_integer_analyze.c.
References CONTRAINTE_UNDEFINED, rank, rank_of_variable(), search_var_of_higher_rank(), value_pos_p, variable_of_rank(), vect_coeff(), and Scontrainte::vecteur.
Referenced by bound_distribution(), complex_bound_computation(), sc_elim_triang_integer_redund_constraint_p(), and sc_integer_projection_information().
void sc_integer_projection_information | ( | Psysteme | sc, |
Pbase | index_base, | ||
int | sc_info[][4], | ||
int | dim_h, | ||
int | n | ||
) |
This function gives information about the variables and the constraints of the system.
These informations are stored in the array sc_info.
the first information: if the variable must be kept as loop index then sc_info[rank of the variable][1] is greater than 1.
the second information: sc_info[rank of the variable][2] is the number of constraints constraining the variable as upper bound.
ths third information: sc_info[rank of the variable][3] is the number of constraints constraining the variable as lower bound.
Initialisation of the array sc_info
Computation of variables that must be kept as loop indices.
if the variable rank is greater than n, the constraints may be eliminated if they do not appear in constraints of higher rank and having to be keept
Computation of the number of constraints contraining a variable either as lower bound or upper bound
If the variable is a loop index then the constraint ineq gives an upper or a lower bound directly
If the variable is not a loop index then the constraint ineq combined with another constraint pc gives an upper or a lower bound for another variable
If the variable is a loop index then the constraint ineq gives an upper or a lower bound directly
Definition at line 87 of file sc_integer_analyze.c.
References constraint_integer_combination(), CONTRAINTE_UNDEFINED_P, Ssysteme::inegalites, rank_of_variable(), search_higher_rank(), search_var_of_higher_rank(), Scontrainte::succ, value_neg_p, value_notzero_p, value_pos_p, value_sign, variable_of_rank(), vect_coeff(), and Scontrainte::vecteur.
Referenced by movement_computation(), and parallel_tiling().
Variable search_var_of_higher_rank | ( | ) |
Referenced by constraint_distribution(), constraint_integer_combination(), and sc_integer_projection_information().
This function returns true: if all positive OR all negative coefficients of the variable var in the system are equal to 1.
That's mean that the FM projection can be used without problem on integer domain
Definition at line 46 of file sc_integer_analyze.c.
References CONTRAINTE_UNDEFINED_P, Scontrainte::succ, value_gt, value_lt, VALUE_MONE, VALUE_ONE, var_in_sc_p(), vect_coeff(), and Scontrainte::vecteur.
Referenced by movement_computation().
Variable variable_of_rank | ( | ) |
Referenced by bound_distribution(), bound_generation(), build_integer_sc_nredund(), complex_bound_computation(), constraint_distribution(), constraint_integer_combination(), lower_bound_generation(), make_scanning_over_one_tile(), make_scanning_over_tiles(), make_tile_constraints(), reference_conversion_expression(), reference_translation(), sc_integer_projection_information(), test_bound_generation(), tile_change_of_basis(), tile_membership(), transformer_equality_fix_point(), upper_bound_generation(), and vect_make_dense().