27 #ifdef BUILDER_PRINT_CLAIRE_CODE
30 #include "pips_config.h"
43 #define DEBUG_CLAIRE 1
71 #define SEMICOLON ";" NL
74 #define OPENBRACKET "["
75 #define CLOSEBRACKET "]"
78 #define CLOSEPAREN ")"
81 #define CLOSEBRACE "}"
83 #define SHARPDEF "#define"
84 #define COMMENT "//" SPACE
88 #define CLAIRE_TASK_PREFIX "T_"
89 #define CLAIRE_MOTIF_PREFIX "M_"
90 #define CLAIRE_ARRAY_PREFIX "A_"
92 #define CLAIRE_RL NL,TAB,TAB
109 #define current_module_is_a_function() \
110 (entity_function_p(get_current_module_entity()))
120 #define RESULT_NAME "result"
121 static string claire_entity_local_name(
entity var)
168 static string claire_reference_with_explicit_motif(
reference r)
173 string s =
strdup(claire_expression(e));
208 pips_user_error(
"Integer constant expected for CLAIRE loop bounds.\n");
225 #define ITEM_NOT_IN_ARRAY -1
239 static string claire_dim_string(
list ldim,
string name)
243 string origins =
"origins = list<integer>(";
244 string dimensions =
"dimSizes = list<integer>(";
245 string deuxpoints =
" :: ";
246 string data_array =
"DATA_ARRAY(";
247 string data_decl =
"name = symbol!(";
248 string dimstring =
"dim = ";
249 string datatype =
"dataType = INTEGER)";
250 string name4p = name;
251 string * namep =
malloc(
sizeof(
string));
252 int * nbdimptr =
malloc(
sizeof(
int));
257 result =
strdup(
concatenate(name, deuxpoints, data_array, data_decl,
QUOTE, name,
QUOTE,
CLOSEPAREN,
COMMA,
NL, NULL));
293 static string this_entity_clairedeclaration(
entity var)
295 string result =
strdup(
"");
338 bool (*consider_this_entity)(
entity),
342 string result =
strdup(
"");
351 debug(2,
"\n Prettyprinter declaration for variable :",claire_entity_local_name(var));
352 if (consider_this_entity(var))
354 string old =
strdup(result);
355 string svar =
strdup(this_entity_clairedeclaration(var));
357 svar, lastsep? separator:
"", NULL));
366 static string claire_array_in_task(
reference r,
bool first,
int task_number);
368 static string claire_call_from_assignation(
call c,
int task_number,
bool * input_provided){
387 *input_provided =
true;
401 static void claire_call_from_indice(
call c,
string * offset_array,
string paving_array[],
string fitting_array[]){
403 string funname = claire_entity_local_name(called);
418 claire_call_from_indice(
syntax_call(args[0]), offset_array, paving_array, fitting_array);
421 claire_call_from_indice(
syntax_call(args[1]), offset_array, paving_array, fitting_array);
426 paving_array[iterator_nr] =
strdup(
"1");
429 fitting_array[iterator_nr] =
strdup(
"1");
435 paving_array[iterator_nr] =
strdup(
"1");
438 fitting_array[iterator_nr] =
strdup(
"1");
447 paving_array[iterator_nr] =
strdup(
"1");
450 fitting_array[iterator_nr] =
strdup(
"1");
454 claire_call_from_indice(
syntax_call(args[0]), offset_array, paving_array, fitting_array);
456 claire_call_from_indice(
syntax_call(args[1]), offset_array, paving_array, fitting_array);
459 pips_user_error(
"APOTRES doesn't allow negative coefficients in paving and fitting matrices\n");
464 pips_user_error(
"Only scalar * reference are allowed here. Please develop expressions.\n");
471 paving_array[extern_nr] = mult;
474 fitting_array[intern_nr] =
strdup(mult);
484 *offset_array = funname;
491 #define CLAIRE_ARRAY_PREFIX "A_"
493 static string claire_array_in_task(
reference r,
bool first,
int task_number){
512 string offset_array[index_of_array];
516 string paving_array[index_of_array][extern_nb];
521 string fitting_array[index_of_array][intern_nb];
526 bool null_fitting_p =
true;
527 string internal_index_declarations =
strdup(
"");
528 string fitting_declaration =
strdup(
"");
529 string fitting_declaration2 =
strdup(
"");
532 for (i=0; i<index_of_array; i++)
533 offset_array[i] =
"0";
535 for (i=0; i<index_of_array ; i++)
536 for (j=0; j<extern_nb; j++)
537 paving_array[i][j] =
"0";
539 for (i=0; i<index_of_array ; i++)
540 for (j=0; j<intern_nb; j++)
541 fitting_array[i][j] =
"0";
545 "\" /+ \"", varname,
"\"),",
NL,
TAB,
TAB, NULL));
547 result =
strdup(
concatenate(result,
"darray = ", varname,
"," NL,
TAB,
TAB,
"accessMode = ", (first?
"Wmode,":
"Rmode,"),
548 NL,
TAB,
TAB,
"offset = list<VARTYPE>(", NULL));
558 paving_array[indice_nr][iterator_nr] =
strdup(
"1");
561 fitting_array[indice_nr][iterator_nr] =
strdup(
"1");
568 claire_call_from_indice(c, &(offset_array[indice_nr]), paving_array[indice_nr], fitting_array[indice_nr]);
581 for(i=0; i<index_of_array - 1; i++){
590 for(i=0;i<intern_nb; i++){
591 bool is_null_p =
true;
592 for(j = 0; j<index_of_array; j++){
593 is_null_p = is_null_p && (
same_string_p(fitting_array[j][i],
"0"));
596 null_fitting_p =
false;
598 for(j = 0; j<index_of_array-1; j++){
599 fitting_declaration =
strdup(
concatenate(fitting_declaration,
"vartype!(", fitting_array[j][i],
"), ", NULL));
610 fitting_declaration2 =
612 strlen(fitting_declaration) - 2),
621 null_fitting_p =
true;
625 for(i=0;i<extern_nb-1; i++){
627 for(j = 0; j<index_of_array-1; j++){
628 result =
strdup(
concatenate(result,
"vartype!(", paving_array[j][i],
"), ", NULL));
633 for(j = 0; j<index_of_array-1; j++){
634 result =
strdup(
concatenate(result,
"vartype!(", paving_array[j][i],
"), ", NULL));
638 #define MONMAX(a, b) ((a<b)?b:a)
644 for (j = 0; j<intern_nb; j++){
645 bool is_null_p =
true;
646 for(i = 0; i < index_of_array; i++){
647 is_null_p = is_null_p && (
same_string_p(fitting_array[i][j],
"0"));
663 for (j = 0; j<intern_nb; j++){
664 bool is_null_p =
true;
665 for(i = 0; i < index_of_array; i++){
666 is_null_p = is_null_p && (
same_string_p(fitting_array[i][j],
"0"));
669 null_fitting_p =
false;
675 internal_index_declarations =
688 internal_index_declarations =
690 strlen(internal_index_declarations) -2),
700 result =
strdup(
concatenate(result,
NL,
TAB,
"names = list<string>(", internal_index_declarations, NULL));
709 static string claire_call_from_loopnest(
call c,
int task_number){
715 string first_result =
"";
717 bool input_provided =
false, output_provided =
false;
718 string name =
strdup(claire_entity_local_name(called));
733 "Call not allowed in left-hand side argument of assignation.");
735 claire_call_from_assignation(
syntax_call(s), task_number,
736 &input_provided), NULL));
748 first_result = claire_array_in_task(r, first, task_number);
749 output_provided =
true;
754 claire_array_in_task(r, first, task_number), NULL));
755 input_provided =
true;
767 result =
strdup(
concatenate(
"data = list<DATA>(dummyDATA, ", result, first_result, NULL));
772 if(!output_provided){
828 static call claire_loop_from_loop(
loop l,
string * result,
int task_number){
830 string * up =
malloc(
sizeof(
string));
831 string * claire_name =
malloc(
sizeof(
string));
848 *claire_name = claire_entity_local_name(
loop_index(l));
849 if( (*claire_name)[0] ==
'M'){
862 return claire_loop_from_loop(l, result, task_number);
877 return claire_loop_from_loop(l, result, task_number);
889 static string claire_loop_from_sequence(
loop l,
int task_number){
893 string * taskname = (
string *)(
malloc(
sizeof(
string)));
902 string * name =
malloc(
sizeof(
string));
903 string * up =
malloc(
sizeof(
string));
913 " :: TASK(unitSpentTime = vartype!(1),"
914 NL,
TAB,
"exLoopNest = LOOPNEST(deep = ", NULL));
923 *name = claire_entity_local_name(
loop_index(l));
929 if((*name)[0] ==
'M'){
942 c = claire_loop_from_loop(l, &result, task_number);
955 c = claire_loop_from_loop(l, &result, task_number);
958 pips_user_error(
"Only loops and one significant call allowed in a loop.");
961 pips_user_error(
"Only loops and one significant call allowed in a loop.");
982 result =
strdup(
concatenate(result, claire_call_from_loopnest(c, task_number), NULL));
996 static string claire_statement_from_sequence(
statement s,
int task_number){
1003 result = claire_loop_from_sequence(l, task_number);
1024 static string claire_sequence_from_task(
sequence seq){
1026 int task_number = 0;
1029 string oldresult =
strdup(result);
1030 string current =
strdup(claire_statement_from_sequence(s, task_number));
1049 static string claire_tasks_with_motif(
statement stat){
1052 string result =
"tasks\n";
1062 result = claire_sequence_from_task(seq);
1069 result =
strdup(
concatenate(result,
NL,
NL,
"PRES:APPLICATION := APPLICATION(name = symbol!(",
QUOTE,
global_module_name,
QUOTE,
"), ",
NL,
TAB,NULL));
1086 string decls=
"", tasks=
"", result=
"";
1090 printf(
"Module statement: \n");
1092 printf(
"and declarations: \n");
1096 decls = claire_declarations_with_explicit_motif(
module,
variable_p,
"",
true);
1097 tasks = claire_tasks_with_motif(stat);
1110 #define CLAIREPRETTY ".cl"
1117 string ppt, claire, dir, filename;
1137 debug_on(
"CLAIREPRETTYPRINTER_DEBUG_LEVEL");
1139 ppt = claire_code_string(
module, stat);
1167 stack loops_for_call;
1193 " :: DATA_ARRAY(name = symbol!(",
QUOTE,
1195 , CLAIRE_RL, NULL));
1198 int2a(nb_dim),
",", CLAIRE_RL,NULL));
1324 for (j = 0; j<numberOfTasks; j++)
1350 bool comma_needed =
false;
1354 string lower_bounds =
"";
1355 string upper_bounds =
"";
1356 string name_bounds =
"";
1382 comma_needed =
true;
1388 concatenate(CLAIRE_RL,
TAB,
"lowerBound = list<VARTYPE>(", NULL));
1391 free(lower_bounds), lower_bounds = NULL;
1396 concatenate(CLAIRE_RL,
TAB,
"upperBound = list<VARTYPE>(", NULL));
1400 free(upper_bounds), upper_bounds = NULL;
1408 free(name_bounds), name_bounds = NULL;
1417 static void claire_reference(
int taskNumber,
reference r,
bool wmode,
1425 CLAIRE_TASK_PREFIX,
int2a(taskNumber),
1426 "\" /+ \"", CLAIRE_ARRAY_PREFIX, varname,
"\"),",
1428 "darray = ", CLAIRE_ARRAY_PREFIX, varname,
",",
1431 (wmode?
"Wmode,":
"Rmode,"), CLAIRE_RL,
TAB,
1443 Pcontrainte c, next, cl, cu, cl_dup, cu_dup,lind, lind_dup,
1479 sc_projection_along_variables_ofl_ctrl(&ps,vars_to_eliminate ,
NO_OFL_CTRL);
1481 for(c = sc_inegalites(ps), next=(c==NULL ? NULL : c->
succ);
1483 c=next, next=(c==NULL ? NULL : c->
succ))
1498 nb_indices=
vect_size(indices_in_vecteur);
1499 nb_indices = (nb_indices >2) ? 2 : nb_indices;
1502 c->
succ = bounds[upper][nb_indices+1];
1503 bounds[upper][nb_indices+1] = c;
1509 c->
succ = bounds[lower][nb_indices+1];
1510 bounds[lower][nb_indices+1] = c;
1514 lind->
succ = bounds[ind][nb_indices+1];
1515 bounds[ind][nb_indices+1] = lind;
1526 for(cl = bounds[lower][2], lind= bounds[ind][2]; cl !=NULL; cl=cl->
succ,lind=lind->
succ) {
1527 for(cu = bounds[upper][2]; cu !=NULL; cu =cu->
succ) {
1533 cl_dup->
succ = list_cl, list_cl=cl_dup;
1535 cu_dup->
succ = list_cu, list_cu=cu_dup;
1537 lind_dup->
succ = list_ind, list_ind = lind_dup;
1542 *bound_inf= list_cl;
1543 *bound_sup = list_cu;
1544 *iterator = list_ind;
1549 *bound_inf= bounds[lower][1];
1550 *bound_sup = bounds[upper][1];
1551 *iterator = bounds[ind][1];
1560 *motif_up_bound = 1;
1581 string string_lower =
"";
1582 string string_upper =
"";
1583 string string_names =
"";
1584 string string_offset =
"";
1585 string string_paving =
"";
1586 string string_fitting =
"";
1593 int motif_up_bound =0;
1595 int pav_matrix[10][10], fit_matrix[10][10];
1599 pav_matrix[i][j]=0, fit_matrix[i][j]=0;
1614 for(i=1; i<=dim ; i++)
1619 find_motif(ps, pi, i, dim, &bound_inf, &bound_up, &iterator, &motif_up_bound);
1638 fit_matrix[i][i]= (motif_up_bound >1) ? 1:0;
1646 "vartype!(0)",NULL));
1649 "vartype!(",
int2a(motif_up_bound),
")",NULL));
1655 CLAIRE_MOTIF_PREFIX,
int2a(taskNumber),
"_",
1660 for (j=1; j<=dim_indices ; j++){
1662 for(i=1; i<=dim ; i++)
1666 int2a( pav_matrix[i][j]),
1669 for(i=1; i<=dim ; i++) {
1672 for(j=1; j<=dim ; j++)
1676 int2a( fit_matrix[i][j]),
1683 free(string_offset), string_offset = NULL;
1689 free(string_fitting), string_fitting = NULL;
1695 free(string_paving), string_paving = NULL;
1707 free(string_lower), string_lower = NULL;
1716 free(string_upper), string_upper = NULL;
1724 free(string_names), string_names = NULL;
1732 bool atleast_one_read_ref =
false;
1733 bool atleast_one_written_ref =
false;
1736 for ( lr = l_regions; !
ENDP(lr); lr =
CDR(lr))
1741 atleast_one_read_ref =
true;
1748 claire_tiling(taskNumber,
ref,re,
indices, result);
1753 if (!atleast_one_read_ref)
1757 for ( lr = l_regions; !
ENDP(lr); lr =
CDR(lr))
1762 atleast_one_written_ref =
true;
1768 claire_tiling(taskNumber,
ref,re,
indices, result);
1773 if (!atleast_one_written_ref)
1790 claire_references(taskNumber, l_regions,
indices, result);
1823 claire_loop(st, result);
1824 claire_data (taskNumber, s,sindices, result);
1850 claire_task(taskNumber, &nest,result);
1854 "PRES:APPLICATION := APPLICATION(name = symbol!(",
1861 int2a(taskNumber),
", ", NULL));
1863 int2a(taskNumber) ,
"))",
NL, NULL));
1884 claire_declarations(
module,result);
1885 claire_tasks(stat,result);
1904 #define CLAIREPRETTY ".cl"
1937 debug_on(
"CLAIREPRETTYPRINTER_DEBUG_LEVEL");
1938 pips_debug(1,
"Spec validation before Claire prettyprinter for %s\n",
1944 ppt = claire_code(
module, stat);
1950 fprintf(
out,
"// Claire pretty print for module %s. \n%s",
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
static reference ref
Current stmt (an integer)
void const char const char const int
size_t gen_array_nitems(const gen_array_t a)
gen_array_t gen_array_make(size_t size)
declarations...
void * gen_array_item(const gen_array_t a, size_t i)
void gen_array_append(gen_array_t a, void *what)
void gen_array_free(gen_array_t a)
struct _newgen_struct_statement_ * statement
bool complexity_zero_p(complexity comp)
zero complexity check.
char * complexity_sprint(complexity comp, bool print_stats_p, bool print_local_names_p)
void init_cost_table()
Completes the intrinsic cost table with the costs read from the files specified in the "COMPLEXITY_CO...
complexity load_statement_complexity(statement)
void set_complexity_map(statement_mapping)
#define CONTRAINTE_UNDEFINED_P(c)
#define CONTRAINTE_UNDEFINED
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
Pcontrainte contrainte_dup(Pcontrainte c_in)
Pcontrainte contrainte_dup(Pcontrainte c_in): allocation d'une contrainte c_out prenant la valeur de ...
#define region_write_p(reg)
#define region_system(reg)
#define region_read_p(reg)
useful region macros
#define region
simulation of the type region
entity make_phi_entity(int)
void set_rw_effects(statement_effects)
list load_statement_local_regions(statement)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
static bool variable_p(entity e)
lready exist in cprettyprint but in mode static.
const char * module_name(const char *s)
Return the module part of an entity name.
FILE * safe_fopen(const char *filename, const char *what)
int safe_fclose(FILE *stream, const char *filename)
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
const char * get_current_module_name(void)
Get the name of the current module.
statement set_current_module_statement(statement)
Set the current module statement.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
void gen_context_multi_recurse(void *o, void *context,...)
Multi-recursion with context function visitor.
#define ENDP(l)
Test if a list is empty.
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
#define CAR(pcons)
Get the value of the first element of a list.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define CDR(pcons)
Get the list less its first element.
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define DB_PUT_FILE_RESOURCE
Put a file resource into the current workspace database.
bool statement_call_p(statement)
bool statement_loop_p(statement)
bool return_statement_p(statement)
Test if a statement is a C or Fortran "return".
bool continue_statement_p(statement)
Test if a statement is a CONTINUE, that is the FORTRAN nop, the ";" in C or the "pass" in Python....
bool expression_constant_p(expression)
HPFC module by Fabien COELHO.
bool vect_opposite_except(Pvecteur v1, Pvecteur v2, Variable var)
bool vect_opposite_except(Pvecteur v1, Pvecteur v2, Variable var): test a egalite des projections sel...
int vect_size(Pvecteur v)
package vecteur - reductions
string db_build_file_resource_name(const char *rname, const char *oname, const char *suffix)
returns an allocated file name for a file resource.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
struct nest_context_t * nest_context_p
bool print_claire_code(const char *)
bool print_claire_code_with_explicit_motif(const char *)
claire_prettyprinter.c
#define MEMBER_SEP_STRING
string gen_strndup0(string, size_t)
Like strdup() but copy at most n characters.
char * i2a(int)
I2A (Integer TO Ascii) yields a string for a given Integer.
string strupper(string, const char *)
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
#define same_string_p(s1, s2)
#define STACK_MAP_X(_item, _itemtype, _code, _stack, _downwards)
not needed
stack stack_copy(const stack)
duplicate a stack with its contents.
void * stack_head(const stack)
returns the item on top of stack s
int stack_size(const stack)
observers
void stack_push(void *, stack)
stack use
void stack_free(stack *)
type, bucket_size, policy
stack stack_make(int, int, int)
allocation
void * stack_pop(stack)
POPs one item from stack s.
void string_buffer_append(string_buffer, const string)
append string s (if non empty) to string buffer sb, the duplication is done if needed according to th...
string string_buffer_to_string(const string_buffer)
return malloc'ed string from string buffer sb
string_buffer string_buffer_make(bool dup)
allocate a new string buffer
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
string db_get_current_workspace_directory(void)
list Words_Expression(expression obj)
of string
void print_statement(statement)
Print a statement on stderr.
#define ENTITY_ASSIGN_P(e)
#define PLUS_OPERATOR_NAME
#define entity_declarations(e)
MISC: newgen shorthands.
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
bool entity_subroutine_p(entity e)
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
void print_entities(list l)
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
value EvalExpression(expression e)
Evaluate statically an expression.
bool expression_integer_value(expression e, intptr_t *pval)
int expression_to_int(expression exp)
================================================================
expression make_call_expression(entity e, list l)
Build an expression that call an function entity with an argument list.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
bool array_reference_p(reference r)
predicates on references
int variable_entity_dimension(entity)
variable_entity_dimension(entity v): returns the dimension of variable v; scalar have dimension 0.
#define test_domain
newgen_entity_domain_defined
#define value_constant(x)
#define syntax_reference(x)
#define reference_variable(x)
#define loop_domain
newgen_language_domain_defined
#define instruction_loop(x)
#define dimension_lower(x)
#define call_undefined_p(x)
#define entity_storage(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define code_declarations(x)
#define range_increment(x)
#define value_constant_p(x)
#define call_domain
newgen_callees_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define constant_int_p(x)
@ is_instruction_sequence
#define instruction_tag(x)
#define loop_undefined_p(x)
#define sequence_statements(x)
#define dimension_upper(x)
#define reference_indices(x)
#define instruction_sequence(x)
#define variable_dimensions(x)
#define statement_declarations(x)
#define statement_instruction(x)
#define instruction_call(x)
#define call_arguments(x)
#define statement_undefined_p(x)
#define expression_syntax(x)
#define storage_return_p(x)
#define type_variable_p(x)
#define entity_domain
newgen_syntax_domain_defined
#define STATEMENT(x)
STATEMENT.
#define entity_initial(x)
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
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
internally defined structure.
The structure used to build lists in NewGen.
Warning! Do not modify this file that is automatically generated!
gen_array_t nested_loop_indices
#define CHAIN_SWORD(l, s)
string words_to_string(cons *lw)
static int depth
la sequence de nids
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
#define BASE_NULLE
MACROS SUR LES BASES.
Pbase vect_copy(Pvecteur b)
direct duplication.
void vect_erase_var(Pvecteur *ppv, Variable v)
void vect_erase_var(Pvecteur * ppv, Variable v): projection du vecteur *ppv selon la direction v (i....
void vect_add_elem(Pvecteur *pvect, Variable var, Value val)
void vect_add_elem(Pvecteur * pvect, Variable var, Value val): addition d'un vecteur colineaire au ve...
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...
#define ITEM_NOT_IN_ARRAY
static loop sequence_loop(sequence seq)
static void push_current_statement(statement s, nest_context_p nest)
static int gen_array_index(gen_array_t ar, string item)
static gen_array_t extern_indices_array
array containing extern loop indices names
static gen_array_t array_names
static void store_call_context(call c __attribute__((unused)), nest_context_p nest)
static gen_array_t intern_indices_array
array containing intern loop indices (name : "M_")
static void pop_current_statement(statement s __attribute__((unused)), nest_context_p nest)
static bool valid_specification_p(entity module __attribute__((unused)), statement stat __attribute__((unused)))
static void search_nested_loops_and_calls(statement stmp, nest_context_p nest)
static void find_motif(Psysteme ps, Pvecteur nested_indices, int dim, int nb_dim __attribute__((unused)), Pcontrainte *bound_inf, Pcontrainte *bound_sup, Pcontrainte *iterator, int *motif_up_bound, int *lowerbound, int *upperbound)
static void pop_loop(_UNUSED_ loop l, nest_context_p nest)
static void pop_test(test t __attribute__((unused)), nest_context_p nest __attribute__((unused)))
#define current_module_is_a_function()
static const char * global_module_name
static bool push_test(test t __attribute__((unused)), nest_context_p nest __attribute__((unused)))
static string task_complexity(statement s)
static gen_array_t array_dims
static call sequence_call(sequence seq)
static gen_array_t extern_upperbounds_array
array containing extern upperbounds
static bool call_selection(call c, nest_context_p nest __attribute__((unused)))
static gen_array_t intern_upperbounds_array
array containing intern upperbounds
static gen_array_t tasks_names
array containing the tasks names
static void push_loop(loop l, nest_context_p nest)
static expression expression_plusplus(expression e)