PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include "genC.h"
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "ray_dte.h"
#include "sommet.h"
#include "sg.h"
#include "sc.h"
#include "polyedre.h"
#include "union.h"
#include "matrice.h"
#include "matrix.h"
#include "ri.h"
#include "ri-util.h"
#include "graph.h"
#include "dg.h"
#include "paf_ri.h"
#include "constants.h"
#include "misc.h"
#include "static_controlize.h"
#include "paf-util.h"
#include "array_dfg.h"
#include "prgm_mapping.h"
Go to the source code of this file.
Typedefs | |
typedef dfg_vertex_label | vertex_label |
Newgen includes More... | |
typedef dfg_arc_label | arc_label |
Functions | |
void | broadcast (graph g) |
======================================================================== More... | |
entity | base_find_var_with_rank (Pbase b, int r) |
======================================================================== More... | |
void | broadcast_of_dataflow (dataflow df, int stmt, predicate exec_domain) |
======================================================================== More... | |
list | contraintes_to_list (Pcontrainte pc) |
======================================================================== More... | |
Pcontrainte | list_to_contraintes (list l_pc) |
======================================================================== More... | |
boolean | compare_eq_occ (chunk *eq1, chunk *eq2) |
======================================================================== More... | |
void | fprint_l_psysteme (FILE *fp, list l_ps) |
======================================================================== More... | |
void | count_eq_occ (list l_ps) |
======================================================================== More... | |
void | sort_eq_in_systems (list l_ps) |
======================================================================== More... | |
void | mapping_on_broadcast (int stmt, Psysteme K) |
======================================================================== More... | |
list | broadcast_conditions (list lambda, list df_l, list *sigma) |
======================================================================== More... | |
list | stmt_bdt_directions (int stmt, list ind_l, list par_l) |
========================================================================= More... | |
Variables | |
list | prgm_parameter_l |
global variables More... | |
typedef dfg_arc_label arc_label |
Definition at line 71 of file broadcast.c.
typedef dfg_vertex_label vertex_label |
========================================================================
Definition at line 122 of file broadcast.c.
References base_dimension, pips_internal_error, Svecteur::succ, and Svecteur::var.
Referenced by broadcast_of_dataflow().
void broadcast | ( | graph | g | ) |
========================================================================
List of the nodes of the DFG
List of successors of one node
List of dataflows of one successor
Statement number associated with one successor
We look for broadcasts on all nodes
We look for broadcasts on all successors of one node
We look for broadcasts on all dataflows of one successor
Definition at line 87 of file broadcast.c.
References broadcast_of_dataflow(), CAR, CDR, DATAFLOW, dfg_arc_label_dataflows, graph_vertices, NIL, sink_stmt, SUCCESSOR, successor_arc_label, successor_vertex, VERTEX, VERTEX_DOMAIN, vertex_int_stmt(), and vertex_successors.
Referenced by prgm_mapping().
========================================================================
add 1, because of TCST
We remove broadcast vectors contained in the time space
No condition: broadcast on all the processors
No condition yet, we'll try to zero out its distance
R is a sub-matrix of inv_A containing the (n-k) last columns.
If one condition is not are satisfied, we try to cut this edge AND we try to ensure that a subspace of the distribution space will coincide with a subspace of the broadcast space.
Definition at line 728 of file broadcast.c.
References A, ACCESS, adg_number_to_statement(), B, CAR, CHUNK, communication_broadcast, completer_base(), CONS, contrainte_make(), contraintes_with_sym_cst_to_matrices(), DATAFLOW, dataflow_communication, DtfToSink, Ssysteme::egalites, ENDP, fprint_dataflow(), fprint_pred(), fprint_psysteme(), fprint_vvs(), fprintf(), gen_append(), gen_length(), gen_nconc(), get_debug_level(), get_stco_from_current_map(), get_stmt_index_coeff(), hash_get(), int, is_broadcast_p(), list_to_base(), mapping_on_broadcast(), matrice_free, matrice_general_inversion(), matrice_new, matrice_nulle(), matrice_transpose(), Ssysteme::nb_eq, NIL, POP, predicate_system, predicate_undefined, prgm_parameter_l, pu_matrices_to_contraintes(), sc_add_egalite(), sc_dup(), sc_make(), solve_system_by_succ_elim(), sort_eq_in_systems(), static_control_to_indices(), stmt_bdt_directions(), StmtToLamb, StmtToPdim, Scontrainte::succ, user_error, Scontrainte::vecteur, and vecteurs_libres_p().
Referenced by prgm_mapping().
========================================================================
Matrix of transformation equations (n x m)
Left matrix for the hermite decomposition (n x n)
Right matrix for the hermite decomposition (m x m)
Matrix of Hermite (n x m)
Sub-matrix of Q: the m-r last columns
Number of transformation equations
Number of englobing loops
Rank of H
Equations of broadcast vectors
Governing predicate
Communication of the dataflow
Base of index of the englobing loops
Equations of transformations
Equations of broadcast vectors
List of the transformations
Transformation system of equations
Englobing loops indices (li) and structure parameters (lp)
Base of the index of the englobing loops
We compute the size the matrix A
Create the basis of the new sc
Definition at line 170 of file broadcast.c.
References A, ACCESS, adg_number_to_statement(), B, Ssysteme::base, base_dimension, base_find_var_with_rank(), communication_broadcast, communication_undefined, contrainte_make(), dataflow_communication, dataflow_governing_pred, dataflow_transformation, DENOMINATOR, Ssysteme::egalites, find_implicit_equation(), gen_append(), get_stco_from_current_map(), gov_pred, list_to_base(), make_communication(), make_expression_equalities(), make_predicate(), matrice_hermite(), matrice_hermite_rank(), matrice_new, Ssysteme::nb_eq, NIL, predicate_system, predicate_undefined, prgm_parameter_l, pu_contraintes_to_matrices(), Q, sc_add_egalite(), sc_creer_base(), sc_dup(), sc_intersection(), sc_new(), sc_normalize(), sc_rm(), static_control_to_indices(), Scontrainte::succ, trans_l, vect_add(), vect_dup(), vect_new(), and Scontrainte::vecteur.
Referenced by broadcast().
boolean compare_eq_occ | ( | chunk * | eq1, |
chunk * | eq2 | ||
) |
========================================================================
Definition at line 394 of file broadcast.c.
References Scontrainte::eq_sat.
Referenced by sort_eq_in_systems().
list contraintes_to_list | ( | Pcontrainte | pc | ) |
========================================================================
Definition at line 346 of file broadcast.c.
References CHUNK, CONS, gen_nconc(), NIL, and Scontrainte::succ.
Referenced by sort_eq_in_systems().
void count_eq_occ | ( | list | l_ps | ) |
========================================================================
Initialization of eq_sat to 1, each equation appears at least once.
We count the occurence of each equation in all the others systems
Definition at line 431 of file broadcast.c.
References CAR, CHUNK, Ssysteme::egalites, ENDP, Scontrainte::eq_sat, malloc(), POP, Scontrainte::succ, vect_add(), vect_substract(), Scontrainte::vecteur, and VECTEUR_NUL.
Referenced by sort_eq_in_systems().
void fprint_l_psysteme | ( | FILE * | fp, |
list | l_ps | ||
) |
========================================================================
Definition at line 407 of file broadcast.c.
References CAR, CHUNK, ENDP, fprint_psysteme(), fprintf(), and POP.
Pcontrainte list_to_contraintes | ( | list | l_pc | ) |
========================================================================
Definition at line 364 of file broadcast.c.
References CAR, CHUNK, CONTRAINTE_UNDEFINED, CONTRAINTE_UNDEFINED_P, ENDP, POP, and Scontrainte::succ.
Referenced by sort_eq_in_systems().
========================================================================
We get the placement function of statement "stmt".
Don't do anything if all the placement function dimensions' are already mapped.
First, it gets the dimensions already mapped, they constitutes a space A.
Second, it looks for the greatest subspace K' of K (the broadcast space) such as A and K' are disjoint.
Third, it maps some of the remaining dimensions of the placement function with some of the dimension of K'.
To each dimension of the placement function, we have associated a variable mu.
Definition at line 532 of file broadcast.c.
References A, adg_number_to_statement(), BASE_NULLE, broadcast_dimensions(), CAR, CHUNK, CONS, contrainte_dup(), Ssysteme::egalites, ENDP, ENTITY, fprint_entity_list(), fprint_pla_pp_dims(), fprint_psysteme(), fprintf(), gen_append(), gen_length(), gen_nconc(), get_debug_level(), get_stco_from_current_map(), hash_get(), int, list_to_base(), make_polynome(), Ssysteme::nb_eq, NIL, pfunc, PLACEMENT, placement_dims, placement_statement, placement_undefined, plc_placements, polynome_add(), polynome_fprint(), polynome_mult(), POP, prgm_parameter_l, pu_is_inferior_var(), pu_variable_name(), pu_vect_fprint(), sc_add_egalite(), sc_dup(), sc_new(), sc_rm(), static_control_to_indices(), StmtToLamb, StmtToMu, StmtToPdim, Scontrainte::succ, Scontrainte::vecteur, vecteur_to_polynome(), and vecteurs_libres_p().
Referenced by broadcast_conditions().
void sort_eq_in_systems | ( | list | l_ps | ) |
========================================================================
We count the occurence of each equation
We sort the list of equations of each systems using these numbers
Definition at line 490 of file broadcast.c.
References CAR, CHUNK, compare_eq_occ(), contraintes_to_list(), count_eq_occ(), Ssysteme::egalites, ENDP, gen_length(), general_merge_sort(), list_to_contraintes(), and POP.
Referenced by broadcast_conditions().
=========================================================================
Definition at line 919 of file broadcast.c.
References bdt_schedules, bdt_undefined, CAR, CDR, CHUNK, CONS, contrainte_make(), ENDP, ENTITY, EXPRESSION, expression_constant_p(), expression_normalized, gen_nconc(), list_to_base(), NIL, NORMALIZE_EXPRESSION, normalized_linear, POP, sc_add_egalite(), sc_creer_base(), sc_dup(), sc_new(), SCHEDULE, schedule_dims, schedule_statement, the_bdt, vect_coeff(), and vecteurs_libres_p().
Referenced by broadcast_conditions().
|
extern |
global variables
Definition at line 115 of file prgm_mapping.c.
Referenced by broadcast_conditions(), broadcast_of_dataflow(), and mapping_on_broadcast().