arithmetique-local.h File Reference

#include <stdio.h>
#include <limits.h>
#include "boolean.h"
#include "arithmetic_errors.h"
Include dependency graph for arithmetique-local.h:

Go to the source code of this file.

Data Structures

struct  frac
struct  col

Defines

#define LINEAR_VALUE_STRING   "int"
 # #### # # #### # #### # # #### # # # ## # # # # # # ## # # # # # # # # # # # # # # # # # # # # # # # # ### # # # # # # # ### # # # # ## # # # # # # ## # # ###### #### # # #### ###### #### # # ####
#define VALUE_FMT   "%d"
#define VALUE_CONST(val)   (val)
#define VALUE_NAN   INT_MIN
#define VALUE_MIN   (INT_MIN+1)
#define VALUE_MAX   INT_MAX
#define VALUE_ZERO   0
#define VALUE_ONE   1
#define VALUE_MONE   -1
#define VALUE_TO_LONG(val)   ((long)(val))
#define VALUE_TO_INT(val)   ((int)(val))
#define VALUE_TO_FLOAT(val)   ((float)(val))
#define VALUE_TO_DOUBLE(val)   ((double)(val))
#define int_to_value(i)   ((Value)(i))
 end LINEAR_VALUE_IS_INT
#define long_to_value(l)   ((Value)(l))
#define float_to_value(f)   ((Value)(f))
#define double_to_value(d)   ((Value)(d))
#define value_eq(v1, v2)   ((v1)==(v2))
 boolean operators on values
#define value_ne(v1, v2)   ((v1)!=(v2))
#define value_gt(v1, v2)   ((v1)>(v2))
#define value_ge(v1, v2)   ((v1)>=(v2))
#define value_lt(v1, v2)   ((v1)<(v2))
#define value_le(v1, v2)   ((v1)<=(v2))
#define value_sign(v)   (value_eq(v,VALUE_ZERO)?0:value_lt(v,VALUE_ZERO)?-1:1)
 trian operators on values
#define value_compare(v1, v2)   (value_eq(v1,v2)?0:value_lt(v1,v2)?-1:1)
#define value_plus(v1, v2)   ((v1)+(v2))
 binary operators on values
#define value_div(v1, v2)   ((v1)/(v2))
#define value_mod(v1, v2)   ((v1)%(v2))
#define value_direct_multiply(v1, v2)   ((v1)*(v2))
#define value_minus(v1, v2)   ((v1)-(v2))
#define value_pdiv(v1, v2)   (divide(v1,v2))
#define value_pmod(v1, v2)   (modulo(v1,v2))
#define value_min(v1, v2)   (value_le(v1,v2)? (v1): (v2))
#define value_max(v1, v2)   (value_ge(v1,v2)? (v1): (v2))
#define value_or(v1, v2)   ((v1)|(v2))
#define value_and(v1, v2)   ((v1)&(v2))
#define value_lshift(v1, v2)   ((v1)<<(v2))
#define value_rshift(v1, v2)   ((v1)>>(v2))
#define value_assign(ref, val)   (ref=(val))
 assigments
#define value_addto(ref, val)   (ref+=(val))
#define value_increment(ref)   (ref++)
#define value_direct_product(ref, val)   (ref*=(val))
#define value_multiply(ref, val)   value_assign(ref,value_mult(ref,val))
#define value_substract(ref, val)   (ref-=(val))
#define value_decrement(ref)   (ref--)
#define value_division(ref, val)   (ref/=(val))
#define value_modulus(ref, val)   (ref%=(val))
#define value_pdivision(ref, val)   value_assign(ref,value_pdiv(ref,val))
#define value_oppose(ref)   value_assign(ref,value_uminus(ref))
#define value_absolute(ref)   value_assign(ref,value_abs(ref))
#define value_minimum(ref, val)   value_assign(ref,value_min(ref,val))
#define value_maximum(ref, val)   value_assign(ref,value_max(ref,val))
#define value_orto(ref, val)   (ref |= (val))
#define value_andto(ref, val)   (ref &= (val))
#define value_uminus(val)   (-(val))
 unary operators on values
#define value_not(val)   (~(val))
#define value_abs(val)
#define value_pos_p(val)   value_gt(val,VALUE_ZERO)
#define value_neg_p(val)   value_lt(val,VALUE_ZERO)
#define value_posz_p(val)   value_ge(val,VALUE_ZERO)
#define value_negz_p(val)   value_le(val,VALUE_ZERO)
#define value_zero_p(val)   value_eq(val,VALUE_ZERO)
#define value_notzero_p(val)   value_ne(val,VALUE_ZERO)
#define value_one_p(val)   value_eq(val,VALUE_ONE)
#define value_notone_p(val)   value_ne(val,VALUE_ONE)
#define value_mone_p(val)   value_eq(val,VALUE_MONE)
#define value_notmone_p(val)   value_ne(val,VALUE_MONE)
#define value_min_p(val)   value_eq(val,VALUE_MIN)
#define value_max_p(val)   value_eq(val,VALUE_MAX)
#define value_notmin_p(val)   value_ne(val,VALUE_MIN)
#define value_notmax_p(val)   value_ne(val,VALUE_MAX)
#define value_protected_hard_idiv_multiply(v, w, throw)
 (|v| < MAX / |w|) => v*w is okay I could check ((v*w)/w)==v but a tmp would be useful
#define value_protected_multiply(v, w, throw)   value_protected_hard_idiv_multiply(v,w,throw)
 is a software idiv is assumed, quick check performed first
#define value_protected_mult(v, w)   value_protected_multiply(v,w,THROW(overflow_error))
 protected versions
#define value_protected_product(v, w)   v=value_protected_mult(v,w)
#define value_mult(v, w)
 whether the default is protected or not this define makes no sense any more.
#define value_product(v, w)   v=value_mult(v,w)
#define SIGN(x)   (((x)>0)? 1 : ((x)==0? 0 : -1))
 was: define value_mult(v,w) value_direct_multiply(v,w) define value_product(v,w) value_direct_product(v,w) could be: protected versions.
#define DIVIDE(x, y)
 division avec reste toujours positif basee sur les equations: a/(-b) = - (a/b) (-a)/b = - ((a+b-1)/b) ou a et b sont des entiers positifs
#define POSITIVE_DIVIDE(x, y)   ((x)>0 ? (x)/(y) : - (-(x)+(y)-1)/(y))
 division avec reste toujours positif quand y est positif: assert(y>=0)
#define MODULO(x, y)   ((y)>0 ? POSITIVE_MODULO(x,y) : POSITIVE_MODULO(-x,-y))
 modulo a resultat toujours positif
#define POSITIVE_MODULO(x, y)
 modulo par rapport a un nombre positif: assert(y>=0)
#define pgcd(a, b)   pgcd_slow(a,b)
 Pour la recherche de performance, selection d'une implementation particuliere des fonctions.
#define divide(a, b)   DIVIDE(a,b)
#define modulo(a, b)   MODULO(a,b)

Typedefs

typedef int Value
typedef struct col tableau

Enumerations

enum  linear_exception_t {
  overflow_error = 1, simplex_arithmetic_error = 2, user_exception_error = 4, parser_exception_error = 8,
  timeout_error = 16, any_exception_error = ~0, overflow_error = 1, simplex_arithmetic_error = 2,
  user_exception_error = 4, parser_exception_error = 8, timeout_error = 16, any_exception_error = ~0
}
 

package arithmetique

More...

Define Documentation

#define divide ( a,
b   )     DIVIDE(a,b)
#define DIVIDE ( x,
 ) 
Value:
((y)>0? POSITIVE_DIVIDE(x,y) : \
                     -POSITIVE_DIVIDE((x),(-(y))))

division avec reste toujours positif basee sur les equations: a/(-b) = - (a/b) (-a)/b = - ((a+b-1)/b) ou a et b sont des entiers positifs

Definition at line 483 of file arithmetique-local.h.

Referenced by update_operator_to_operator().

#define double_to_value (  )     ((Value)(d))

Definition at line 256 of file arithmetique-local.h.

#define float_to_value ( f   )     ((Value)(f))

Definition at line 255 of file arithmetique-local.h.

Referenced by polynome_sscanf(), polynome_to_vecteur(), and prototype_factorize().

#define int_to_value ( i   )     ((Value)(i))
#define LINEAR_VALUE_STRING   "int"

# #### # # #### # #### # # #### # # # ## # # # # # # ## # # # # # # # # # # # # # # # # # # # # # # # # ### # # # # # # # ### # # # # ## # # # # # # ## # # ###### #### # # #### ###### #### # # ####

put there because I cannot have these constants with ansi options.default: LINEAR_VALUE_IS_INT

Definition at line 231 of file arithmetique-local.h.

Referenced by initialize_sc().

#define long_to_value (  )     ((Value)(l))

Definition at line 254 of file arithmetique-local.h.

#define modulo ( a,
b   )     MODULO(a,b)

Definition at line 509 of file arithmetique-local.h.

#define MODULO ( x,
 )     ((y)>0 ? POSITIVE_MODULO(x,y) : POSITIVE_MODULO(-x,-y))

modulo a resultat toujours positif

Definition at line 490 of file arithmetique-local.h.

Referenced by update_operator_to_operator().

#define pgcd ( a,
b   )     pgcd_slow(a,b)
#define POSITIVE_DIVIDE ( x,
 )     ((x)>0 ? (x)/(y) : - (-(x)+(y)-1)/(y))

division avec reste toujours positif quand y est positif: assert(y>=0)

Definition at line 487 of file arithmetique-local.h.

#define POSITIVE_MODULO ( x,
 ) 
Value:
((x) > 0 ? (x)%(y) : \
                              ((x)%(y) == 0 ? 0 : ((y)-(-(x))%(y))))

modulo par rapport a un nombre positif: assert(y>=0)

Ce n'est pas la macro la plus efficace que j'aie jamais ecrite: il faut faire, dans le pire des cas, deux appels a la routine .rem, qui n'est surement pas plus cablee que la division ou la multiplication

Definition at line 498 of file arithmetique-local.h.

#define SIGN ( x   )     (((x)>0)? 1 : ((x)==0? 0 : -1))

was: define value_mult(v,w) value_direct_multiply(v,w) define value_product(v,w) value_direct_product(v,w) could be: protected versions.

..LINEAR_VALUE_IS_CHARS is used for type checking. some operations are not allowed on (char*), thus they are switched to some other operation here...valeur absolueminimum et maximum if they are defined somewhere else, they are very likely to be defined the same way. Thus the previous def is not overwritten.signe d'un entier: -1, 0 ou 1

Definition at line 475 of file arithmetique-local.h.

#define value_abs ( val   ) 
#define value_absolute ( ref   )     value_assign(ref,value_abs(ref))
#define value_addto ( ref,
val   )     (ref+=(val))
#define value_and ( v1,
v2   )     ((v1)&(v2))

Definition at line 284 of file arithmetique-local.h.

#define value_andto ( ref,
val   )     (ref &= (val))

Definition at line 305 of file arithmetique-local.h.

#define value_assign ( ref,
val   )     (ref=(val))
#define value_compare ( v1,
v2   )     (value_eq(v1,v2)?0:value_lt(v1,v2)?-1:1)
#define VALUE_CONST ( val   )     (val)
#define value_decrement ( ref   )     (ref--)

Definition at line 296 of file arithmetique-local.h.

Referenced by cfloor(), and set_dimensions_of_local_variable_family().

#define value_direct_multiply ( v1,
v2   )     ((v1)*(v2))
#define value_direct_product ( ref,
val   )     (ref*=(val))

Definition at line 293 of file arithmetique-local.h.

#define value_div ( v1,
v2   )     ((v1)/(v2))
#define value_division ( ref,
val   )     (ref/=(val))
#define value_eq ( v1,
v2   )     ((v1)==(v2))
#define VALUE_FMT   "%d"
#define value_ge ( v1,
v2   )     ((v1)>=(v2))
#define value_gt ( v1,
v2   )     ((v1)>(v2))
#define value_increment ( ref   )     (ref++)

Definition at line 292 of file arithmetique-local.h.

Referenced by array_indices_communication(), eclater(), and lvbase_add().

#define value_le ( v1,
v2   )     ((v1)<=(v2))
#define value_lshift ( v1,
v2   )     ((v1)<<(v2))

Definition at line 285 of file arithmetique-local.h.

#define value_lt ( v1,
v2   )     ((v1)<(v2))
#define value_max ( v1,
v2   )     (value_ge(v1,v2)? (v1): (v2))
#define VALUE_MAX   INT_MAX
#define value_max_p ( val   )     value_eq(val,VALUE_MAX)
#define value_maximum ( ref,
val   )     value_assign(ref,value_max(ref,val))

Definition at line 303 of file arithmetique-local.h.

Referenced by loop_bounds_to_tile_bounds().

#define value_min ( v1,
v2   )     (value_le(v1,v2)? (v1): (v2))
#define VALUE_MIN   (INT_MIN+1)
#define value_min_p ( val   )     value_eq(val,VALUE_MIN)
#define value_minimum ( ref,
val   )     value_assign(ref,value_min(ref,val))

Definition at line 302 of file arithmetique-local.h.

Referenced by loop_bounds_to_tile_bounds().

#define value_minus ( v1,
v2   )     ((v1)-(v2))
#define value_mod ( v1,
v2   )     ((v1)%(v2))
#define value_modulus ( ref,
val   )     (ref%=(val))

Definition at line 298 of file arithmetique-local.h.

Referenced by gomory_trait_eq().

#define VALUE_MONE   -1

Definition at line 240 of file arithmetique-local.h.

Referenced by add_affine_bound_conditions(), add_var_sup(), anonymctol(), array_indices_communication(), array_partial_subscript_value(), arrays_last_dims_linearization_sc(), arrays_same_first_dimensions_sc(), bezout_grl(), build_sc_machine(), build_sc_with_several_uniform_ref(), build_third_comb(), compute_entity_to_declaration_constraints(), converti_psysmin_psysmax(), data_to_prec_for_variables(), elim_var_with_eg(), fonct_max(), fonct_max_all(), fonct_max_d(), fonct_min_d(), fortran_user_function_call_to_transformer(), full_linearization(), generate_one_message(), generate_system_for_equal_variables(), generate_work_sharing_system(), generic_abs_to_transformer(), generic_equality_to_transformer(), generic_minmax_to_transformer(), hpfc_compute_distribute_constraints(), hpfc_compute_entity_to_new_declaration(), iabs_to_transformer(), in_effects_of_loop(), integer_divide_to_transformer(), integer_minmax_to_transformer(), integer_multiply_to_transformer(), integer_power_to_transformer(), is2(), logical_binary_operation_to_transformer(), logical_constant_to_transformer(), logical_unary_operation_to_transformer(), loop_bound_evaluation_to_transformer(), loop_bounds_to_tile_bounds(), loop_index_domaine_to_contrainte(), loop_regions_normalize(), majlowbounds(), make_scanning_over_one_tile(), makecolumnfree(), modulo_to_transformer(), out_effects_from_loop_to_body(), partial_linearization(), pgcd_interne(), plint_degen(), prepare_reindexing(), private_regions_of_loop(), reduce_loop_bound(), relation_to_transformer(), remove_variables_if_possible(), sc_find_equalities(), sc_image_computation(), sc_lexicographic_sort(), sc_minmax_of_variables(), sc_oppose(), sc_simplexe_feasibility_ofl_ctrl(), sc_to_tableau(), set_dimensions_of_local_variable_family(), simple_addition_to_transformer(), slx_parse(), step_interlaced_iteration_regions_p(), substitute_var_with_vec(), sys_int_redond(), syst_parse(), tile_change_of_basis(), Tiling_buffer_allocation(), transformer_add_condition_information_updown(), transformer_add_loop_index_initialization(), transformer_add_sign_information(), transformer_convex_hulls(), transformer_derivative_fix_point(), transformer_logical_inequalities_add(), translate_array_effect(), and var_with_unity_coeff_p().

#define value_mone_p ( val   )     value_eq(val,VALUE_MONE)
#define value_mult ( v,
 ) 
#define value_multiply ( ref,
val   )     value_assign(ref,value_mult(ref,val))

Definition at line 294 of file arithmetique-local.h.

#define VALUE_NAN   INT_MIN
#define value_ne ( v1,
v2   )     ((v1)!=(v2))
#define value_neg_p ( val   )     value_lt(val,VALUE_ZERO)
#define value_negz_p ( val   )     value_le(val,VALUE_ZERO)
#define value_not ( val   )     (~(val))

Definition at line 310 of file arithmetique-local.h.

#define value_notmax_p ( val   )     value_ne(val,VALUE_MAX)

Definition at line 330 of file arithmetique-local.h.

Referenced by evaluate_var_to_complexity().

#define value_notmin_p ( val   )     value_ne(val,VALUE_MIN)

Definition at line 329 of file arithmetique-local.h.

Referenced by evaluate_var_to_complexity().

#define value_notmone_p ( val   )     value_ne(val,VALUE_MONE)

Definition at line 326 of file arithmetique-local.h.

Referenced by lower_bound_generation(), and test_bound_generation().

#define value_notone_p ( val   )     value_ne(val,VALUE_ONE)
#define value_notzero_p ( val   )     value_ne(val,VALUE_ZERO)

Definition at line 322 of file arithmetique-local.h.

Referenced by adg_contrainte_fprint(), ajouter(), array_indices_communication(), arrays_same_ith_dimension_p(), bezout(), bezout_grl(), build_sc_with_several_uniform_ref(), chose_variable_to_project_for_feasability(), constraint_distribution(), constraint_to_bound(), contrainte_normalize(), contrainte_subst_ofl_ctrl(), contrainte_to_text_1(), contrainte_to_text_2(), contrainte_var_min_coeff(), correctm(), cost_of_constant_operations(), cout_nul(), divide_fast(), eclater(), elim_var_with_eg(), emptycolelim(), emptylhs(), eq_var_nophi_min_coeff(), eq_var_phi(), eval_var(), expression_equal_in_context_p(), expression_integer_constant_p(), extgcd(), fourier0(), fprint_contrainte_vecteur(), gcd_and_constant_dependence_test(), gcd_subtract(), gcdtest(), gomory_eq(), gomory_trait_eq(), heuristique_1(), heuristique_3(), igvoir3(), internal_sc_feasibility(), ipivotage2(), iprimal(), is2(), last_dims_offset(), loop_bounds_to_tile_bounds(), loop_regions_normalize(), lowbound(), make_loop_indice_equation(), mat_coeff_nnul(), mat_min(), mat_sys_conv(), matrice_diagonale_p(), matrice_fprint(), matrice_fscan(), matrice_identite_p(), matrice_normalize(), matrice_nulle_p(), matrice_triangulaire_p(), matrice_unimodulaire_triangulaire_inversion(), matrices_to_constraints(), matrices_to_constraints_with_sym_cst(), matrices_to_contraintes_with_sym_cst(), matrices_to_loop_sc(), matrices_to_sc(), matrix_coeff_nnul(), matrix_fscan(), matrix_identity_p(), matrix_min(), matrix_unimodular_triangular_inversion(), modulo_fast(), my_contrainte_normalize(), my_matrices_to_constraints_with_sym_cst(), my_matrices_to_constraints_with_sym_cst_2(), normalizable_and_linear_loop_p(), partial_redundancy_elimination_expression(), pgcd2(), pgcd2in(), pgcd_fast(), pgcd_slow(), pivoter_pas(), possible(), pu_contrainte_fprint(), pu_matrices_to_contraintes(), pu_vect_fprint(), Pvecteur_to_assign_statement(), redundant(), sc_elim_triang_integer_redund_constraint_p(), sc_integer_projection_information(), sc_projection_along_variable_ofl_ctrl_timeout_ctrl(), sc_resol_smith(), sc_simplexe_feasibility_ofl_ctrl(), smith_int(), sol_entiere(), sol_positive(), sol_positive_simpl(), substitute_var_with_vec(), TestDependence(), TestDiCnst(), transformer_affect_linear_p(), transformer_equality_fix_point(), trivial_expression_p(), vars_in_vect_p(), vect_check(), vect_coeff_sum(), vect_const_p(), vect_normalize(), voirbornes(), and vzcut().

#define VALUE_ONE   1

Definition at line 239 of file arithmetique-local.h.

Referenced by add_affine_bound_conditions(), add_var_sup(), adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), adg_get_predicate_of_loops(), adg_list_to_vect(), adg_max_of_leaves(), affine_to_transformer(), ajout_dte(), align_check(), array_indices_communication(), array_partial_subscript_value(), array_scalar_access_to_bank_communication(), array_translation_sc(), arrays_last_dims_linearization_sc(), arrays_same_first_dimensions_sc(), arrays_same_ith_dimension_p(), base_add_variable(), base_append(), base_copy(), base_dup(), base_normalize(), base_union(), bezout(), bezout_grl(), bounds_equal_p(), build_contraction_matrices(), build_esv_list(), build_image_base(), build_sc_machine(), build_sc_nredund_1pass_ofl_ctrl(), build_sc_with_several_uniform_ref(), build_third_comb(), build_transfer_matrix(), c_convex_effects_on_actual_parameter_forward_translation(), c_convex_effects_on_formal_parameter_backward_translation(), calculate_delay(), call_rwt(), cfloor(), claire_tiling(), comp_exec_domain(), complex_bound_computation(), complexity_float_add(), complexity_sigma(), compute_entity_to_declaration_constraints(), cons_coef(), constraints_to_loop_bound(), contrainte_reverse(), converti_psysmin_psysmax(), cout_nul(), data_to_prec_for_variables(), dj_system_complement(), elim_var_with_eg(), entity_list_to_base(), eq_in_ineq(), exponentiate(), expression_flt(), expression_less_than_in_context(), extgcd(), extract_constraint_from_inequalities(), failuresp(), find_eg(), find_implicit_equation(), fonct_init(), fonct_max(), fonct_max_all(), fonct_max_d(), fonct_min(), fonct_min_all(), fonct_min_d(), fonct_read(), fortran_user_function_call_to_transformer(), full_linearization(), fusion(), fusion_buffer(), gcdtest(), generate_one_message(), generate_system_for_equal_variables(), generate_work_sharing_system(), generic_abs_to_transformer(), generic_equality_to_transformer(), generic_minmax_to_transformer(), global_to_last_dims_offset(), gomory_trait_eq(), Hierarchical_tiling(), hpfc_compute_align_constraints(), hpfc_compute_distribute_constraints(), hpfc_compute_entity_to_new_declaration(), hpfc_compute_unicity_constraints(), iabs_to_transformer(), in_effects_of_loop(), inequaldivision(), integer_minmax_to_transformer(), integer_multiply_to_transformer(), integer_power_to_transformer(), interactive_partitioning_matrix(), iprimalplus(), is2(), list_to_base(), listehb(), logical_binary_function_to_transformer(), logical_binary_operation_to_transformer(), logical_constant_to_transformer(), logical_unary_operation_to_transformer(), loop_bound_evaluation_to_transformer(), loop_bounds_to_tile_bounds(), loop_executed_once_p(), loop_index_domaine_to_contrainte(), loop_nest_to_tile(), loop_regions_normalize(), lower_bound_generation(), make_base_of_nest(), make_constraint_expression(), make_datum_movement(), make_load_blocks(), make_loop_indice_equation(), make_monome(), make_movement_scalar_wp65(), make_movements_loop_body_wp65(), make_scanning_over_one_tile(), make_single_var_complexity(), make_store_blocks(), make_tile_constraints(), mat_coeff_nnul(), mat_min(), mat_perm_col(), mat_perm_lig(), matrice_determinant(), matrice_general_inversion(), matrice_hermite(), matrice_identite(), matrice_index_sys(), matrice_normalizec(), matrice_nulle(), matrice_sous_determinant(), matrice_triangulaire_inversion(), matrices_to_loop_sc(), matrices_to_sc(), matrix_coeff_nnul(), matrix_determinant(), matrix_general_inversion(), matrix_hermite(), matrix_identity(), matrix_min(), matrix_new(), matrix_normalizec(), matrix_nulle(), matrix_perm_col(), matrix_perm_line(), matrix_sub_determinant(), matrix_triangular_inversion(), mk_rn(), modulo_to_transformer(), monome_del_var(), monome_monome_div(), monome_monome_mult(), movement_computation(), my_system_remove_variables(), node_successors_to_matrix(), NormalizeReference(), number_replaces_var(), offset_of_reference(), old_vecteur_to_polynome(), out_effects_from_loop_to_body(), pa_path_to_few_disjunct_ofl_ctrl(), partial_linearization(), permutation(), permutation2(), pgcd_slow(), plint_degen(), polynome_constant_p(), polynome_decr(), polynome_incr(), polynome_power_n(), polynome_scalar_add(), polynome_scalar_addition(), polynome_sscanf(), polynome_sum_of_power(), polynome_TCST(), position_one_element(), prepare_reindexing(), private_regions_of_loop(), processor_loop(), Pvecteur_to_assign_statement(), pvecteur_to_polynome(), reference_conversion_computation(), reference_last_indices_offset(), reference_to_polynome(), region_exact_projection_along_parameters(), region_exact_projection_along_variable(), region_translation_init(), relation_to_transformer(), remove_temporal_variables_from_system(), remove_variables_if_possible(), sc_add_phi_equation(), sc_base_add_variable(), sc_consistent_p(), sc_convex_hull(), sc_empty(), sc_entities_cfc_variables(), sc_image_computation(), sc_integer_inequalities_combination_ofl_ctrl(), sc_loop_proper_precondition(), sc_minmax_of_pvector(), sc_minmax_of_variables(), sc_projection_ofl_along_list_of_variables(), sc_projection_on_variables(), sc_resol_smith(), sc_simplexe_feasibility_ofl_ctrl(), sc_to_minimal_basis(), sc_weak_consistent_p(), set_dimensions_of_local_variable_family(), set_information_for_code_optimizations(), set_interprocedural_translation_context_sc(), sg_to_sc_chernikova(), simple_addition_to_transformer(), simple_affine_to_transformer(), simplify_sc_to_complexity(), size_of_array(), slx_parse(), smith_int(), step_interlaced_iteration_regions_p(), substitute_var_with_vec(), sys_int_redond(), syst_parse(), test_bound_generation(), tile_membership(), tile_membership_constraints(), tiling(), Tiling2_buffer(), Tiling_buffer_allocation(), top_down_abc_dimension(), transformer_add_condition_information_updown(), transformer_add_integer_relation_information(), transformer_add_sign_information(), transformer_convex_hulls(), transformer_derivative_fix_point(), transformer_equality_fix_point(), transformer_logical_inequalities_add(), translate_array_effect(), translate_call_to_callee_frame(), translate_reference_to_callee_frame(), translate_to_module_frame(), update_basis(), upperbound(), ValueNumberOfElements(), ValueSizeOfDimension(), var_ecart_sup(), var_posit(), var_with_unity_coeff_p(), variables_in_declaration_list(), vect_pgcd_all(), vect_pgcd_except(), vecteur_bezout(), vecteur_mult(), vecteur_to_polynome(), xml_Loops(), xml_TaskParameters(), and xml_tiling().

#define value_one_p ( val   )     value_eq(val,VALUE_ONE)
#define value_oppose ( ref   )     value_assign(ref,value_uminus(ref))
#define value_or ( v1,
v2   )     ((v1)|(v2))

Definition at line 283 of file arithmetique-local.h.

#define value_orto ( ref,
val   )     (ref |= (val))

Definition at line 304 of file arithmetique-local.h.

#define value_pdiv ( v1,
v2   )     (divide(v1,v2))
#define value_pdivision ( ref,
val   )     value_assign(ref,value_pdiv(ref,val))

Definition at line 299 of file arithmetique-local.h.

Referenced by evaluate_divide_if_possible(), and vect_div().

#define value_plus ( v1,
v2   )     ((v1)+(v2))
#define value_pmod ( v1,
v2   )     (modulo(v1,v2))

Definition at line 280 of file arithmetique-local.h.

Referenced by sc_find_equalities().

#define value_pos_p ( val   )     value_gt(val,VALUE_ZERO)

Definition at line 317 of file arithmetique-local.h.

Referenced by abs_ofl_ctrl(), add_var_sup(), adg_contrainte_fprint(), ajout(), bound_redund_with_sc_p(), cfloor(), combiner_ofl_with_test(), compare_region_constraints(), compare_the_constraints(), complex_bound_computation(), constraint_integer_combination(), constraint_sort(), constraints_for_bounds(), constraints_sort_info(), constraints_to_loop_bound(), contrainte_to_text_1(), contrainte_to_text_2(), contrainte_var_min_coeff(), evaluate_divide_if_possible(), extract_constraint_from_inequalities(), find_motif(), find_pattern(), fourier1(), fourier22(), fprint_contrainte_vecteur(), heuristique_1(), heuristique_3(), in_effects_of_loop(), inegalite_comb_ofl_ctrl(), iprimal(), is2(), lignes_entrant(), majlowbounds(), majuu(), make_constraint_expression(), matrice_diagonale_inversion(), matrice_fscan(), matrice_general_inversion(), matrice_normalize(), matrice_substract(), matrice_triangulaire_inversion(), matrix_add(), matrix_diagonal_inversion(), matrix_fscan(), matrix_general_inversion(), matrix_normalize(), matrix_pr_quot(), matrix_substract(), matrix_triangular_inversion(), partial_redundancy_elimination_expression(), pgcd_interne(), pr_quot(), pu_contrainte_fprint(), pu_vect_fprint(), redundant(), sc_elim_double_constraints(), sc_elim_triang_integer_redund_constraint_p(), sc_fourier_motzkin_variable_elimination_ofl_ctrl(), sc_integer_projection_information(), sc_minmax_of_variable(), sc_minmax_of_variable_optim(), set_dimensions_of_local_variable_family(), set_information_for_code_optimizations(), simple_dead_loop_p(), sol_positive_simpl(), sommet_normalize(), test_borne(), test_bound_generation(), TestDiVariables(), translate_call_to_callee_frame(), trivial_expression_p(), update_indices_for_local_computation(), useless(), vect_parallel(), vect_printout_order_decided_p(), vect_proport(), vect_sprint_as_monome(), and vecteur_lower_bound().

#define value_posz_p ( val   )     value_ge(val,VALUE_ZERO)
#define value_product ( v,
 )     v=value_mult(v,w)
#define value_protected_hard_idiv_multiply ( v,
w,
throw   ) 
Value:

(|v| < MAX / |w|) => v*w is okay I could check ((v*w)/w)==v but a tmp would be useful

Definition at line 339 of file arithmetique-local.h.

#define value_protected_mult ( v,
 )     value_protected_multiply(v,w,THROW(overflow_error))

protected versions

Definition at line 358 of file arithmetique-local.h.

Referenced by vect_cl_ofl_ctrl().

#define value_protected_multiply ( v,
w,
throw   )     value_protected_hard_idiv_multiply(v,w,throw)

is a software idiv is assumed, quick check performed first

Definition at line 352 of file arithmetique-local.h.

#define value_protected_product ( v,
 )     v=value_protected_mult(v,w)

Definition at line 360 of file arithmetique-local.h.

#define value_rshift ( v1,
v2   )     ((v1)>>(v2))

Definition at line 286 of file arithmetique-local.h.

#define value_sign ( v   )     (value_eq(v,VALUE_ZERO)?0:value_lt(v,VALUE_ZERO)?-1:1)
#define value_substract ( ref,
val   )     (ref-=(val))
#define VALUE_TO_DOUBLE ( val   )     ((double)(val))

Definition at line 244 of file arithmetique-local.h.

Referenced by ligne_pivot(), lignes_entrant(), plint_pas(), and var_pivotd().

#define VALUE_TO_FLOAT ( val   )     ((float)(val))
#define VALUE_TO_INT ( val   )     ((int)(val))
#define VALUE_TO_LONG ( val   )     ((long)(val))

Definition at line 241 of file arithmetique-local.h.

#define value_uminus ( val   )     (-(val))

unary operators on values

Definition at line 309 of file arithmetique-local.h.

Referenced by abs_ofl_ctrl(), array_indices_communication(), bezout_grl(), bounds_equal_p(), buffer_acces(), build_transfer_matrix(), calculate_delay(), complex_bound_computation(), compute_bound_tiled_nest(), contrainte_fprint(), contrainte_normalize(), contrainte_subst_ofl_ctrl(), contrainte_to_matrix_ligne(), contrainte_to_text_1(), contrainte_to_text_2(), divide_fast(), eq_diff_const(), extract_constraint_on_var(), fast(), fastplus(), find_eg(), fourier1(), fprint_contrainte_vecteur(), fusion(), fusion_buffer(), gomory_eq(), heuristique_1(), heuristique_3(), Hierarchical_tiling(), hpfc_compute_lid(), inegalite_comb_ofl_ctrl(), init_janus(), ipivotage2(), iprimal(), iprimalplus(), is2(), lignes_entrant(), loop_bounds_to_tile_bounds(), loop_index_domaine_to_contrainte(), loop_regions_normalize(), lower_bound_generation(), make_loop_indice_equation(), make_tile_constraints(), mat_maj_col(), mat_maj_lig(), mat_sys_conv(), matrix_hermite(), matrix_maj_col(), matrix_maj_line(), matrix_uminus(), my_contrainte_normalize(), one_receive_message(), pivoter_pas(), plint_pas(), ppcm(), Pvecteur_separate_on_sign(), reference_last_indices_offset(), sc_find_equalities(), sc_image_computation(), sc_integer_inequalities_combination_ofl_ctrl(), sc_minmax_of_variable(), sc_minmax_of_variable2(), sc_minmax_of_variable_optim(), sc_minmax_of_variables(), sc_simplexe_feasibility_ofl_ctrl(), sc_value_of_variable(), set_information_for_code_optimizations(), simplify_common_variables(), simplify_sc_to_complexity(), slx_parse(), sol_finale(), sol_positive(), sol_positive_simpl(), splitpb(), syst_parse(), test_bound_generation(), tile_membership(), tile_membership_constraints(), Tiling2_buffer(), Tiling_buffer_allocation(), transformer_equality_fix_point(), vect_cl_ofl_ctrl(), vect_lexicographic_unsafe_compare_generic(), vect_oppos(), vect_opposite_except(), vect_parallel(), vect_subst(), and vect_substract().

#define VALUE_ZERO   0

Definition at line 238 of file arithmetique-local.h.

Referenced by add_coeff_vect(), add_parameter_aliases_for_this_call_site(), adg_contrainte_fprint(), ajouter(), anonymctol(), array_indices_communication(), arrays_last_dims_linearization_sc(), arrays_same_first_dimensions_sc(), atomize_one_message(), base_G_h1_unnull(), bezout(), bezout_grl(), boundssum(), build1(), build_sc_machine(), build_sc_with_several_uniform_ref(), calculate_delay(), call_rwt(), cfloor(), choose(), chose_variable_to_project_for_feasability(), compare_the_constraints(), complex_bound_computation(), compute_receive_content(), computebounds(), contrainte_fprint(), contrainte_normalize(), contrainte_to_text_1(), contrainte_var_min_coeff(), cutiteration(), data_to_prec_for_variables(), dn_multiply(), dualentier(), elim_var_with_eg(), eq_diff_const(), eq_sum_const(), eq_var_nophi_min_coeff(), eval_var(), expression_and_precondition_to_integer_interval(), extgcd(), extract_constraint_from_equalitites(), extract_constraint_from_inequalities(), fast(), find_eg(), formal_regions_backward_translation(), fortran_user_function_call_to_transformer(), fprint_contrainte_vecteur(), generate_system_for_equal_variables(), generate_work_sharing_system(), gomory_eq(), gomory_trait_eq(), heuristique_1(), Hierarchical_tiling(), hpfc_compute_align_constraints(), hpfc_compute_entity_to_new_declaration(), inequaldivision(), integer_expression_and_precondition_to_integer_interval(), internal_sc_feasibility(), ipivotage2(), iprimal(), iprimalplus(), is2(), loop_bounds_to_tile_bounds(), loop_nest_to_wp65_code(), loop_regions_normalize(), lowbound(), lower_bound_generation(), majlowbounds(), majuu(), make_loop_indice_equation(), makecolumnfree(), mat_coeff_nnul(), mat_min(), matrice_identite(), matrice_multiply(), matrice_nulle(), matrix_coeff_nnul(), matrix_hermite(), matrix_identity(), matrix_min(), matrix_multiply(), matrix_nulle(), matrix_smith(), matrix_sub_determinant(), my_contrainte_normalize(), new_value_in_transfer_equation(), normalizable_and_linear_loop_p(), pgcdseg(), pgcdsegment(), pivoter_pas(), plint_degen(), plint_pas(), ppcm(), pu_contrainte_fprint(), pu_vect_fprint(), real_regions_forward_translation(), region_projection_along_index_safe_p(), sc_elim_simple_redund_with_ineq(), sc_find_equalities(), sc_functional_graph_p(), sc_minmax_of_variable2(), sc_normalize2(), sc_projection_along_variable_ofl_ctrl_timeout_ctrl(), sc_simplexe_feasibility_ofl_ctrl(), sc_variable_rename(), scanning_base_hyperplane(), set_dimensions_of_local_variable_family(), simplify_deducable_variables(), sol_positive(), sol_positive_simpl(), step_nb_phi_vecteur(), syst_parse(), test_bound_generation(), tile_membership_constraints(), Tiling2_buffer(), Tiling_buffer_allocation(), transfer_equation_p(), transformer_derivative_fix_point(), update_basis(), upper_bound_generation(), var_pivotd(), vect_cl_ofl_ctrl(), vect_coeff(), vect_coeff_sum(), vect_max0(), vect_min0(), vect_partial_eval(), vect_prod_scal(), vect_subst(), vect_sum(), and wvoir().

#define value_zero_p ( val   )     value_eq(val,VALUE_ZERO)

Typedef Documentation

typedef struct col tableau
typedef int Value

Definition at line 232 of file arithmetique-local.h.


Enumeration Type Documentation

package arithmetique

Francois Irigoin, mai 1989

Modifications

  • reprise de DIVIDE qui etait faux (Remi Triolet, Francois Irigoin, april 90)
  • simplification de POSITIVE_DIVIDE par suppression d'un moduloWe would like linear to be generic about the "integer" type used to represent integer values. Thus Value is defined here. It should be changed to "int" "long" or "long long". In an ideal world, any source modification should be limited to this package.

Indeed, we cannot switch easily to bignums that need constructors dans destructors... That would lead to too many modifications... C++ would make things easier and cleaner...

Fabien COELHOfor FILE *to be included for _MIN and _MAX: include <limits.h>Global constants to designate exceptions. To be used in the type field.

Enumerator:
overflow_error 
simplex_arithmetic_error 
user_exception_error 
parser_exception_error 
timeout_error 
any_exception_error 

catch all

overflow_error 
simplex_arithmetic_error 
user_exception_error 
parser_exception_error 
timeout_error 
any_exception_error 

catch all

Definition at line 59 of file arithmetique-local.h.

00059              {
00060   overflow_error = 1,
00061   simplex_arithmetic_error = 2,
00062   user_exception_error = 4,
00063   parser_exception_error = 8,
00064   timeout_error = 16,
00065   /* catch all */
00066   any_exception_error = ~0
00067 } linear_exception_t;

Generated by  doxygen 1.6.2-20100208