PIPS
make_loop_body.c
Go to the documentation of this file.
1 /*
2 
3  $Id: make_loop_body.c 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27  /*
28  * PACKAGE MOVEMENTS
29  *
30  * Corinne Ancourt - September 1991
31  */
32 
33 #include <stdlib.h>
34 #include <stdio.h>
35 #include <stdlib.h>
36 #include <string.h>
37 
38 /* #include "values.h" */
39 #include "genC.h"
40 #include "linear.h"
41 #include "ri.h"
42 #include "ri-util.h"
43 #include "constants.h"
44 #include "matrice.h"
45 #include "tiling.h"
46 #include "movements.h"
47 #include "misc.h"
48 #include "text-util.h"
49 #include "parser_private.h"
50 #include "polyedre.h"
51 #include "prettyprint.h" // for text_statement(), used in debugging statement
52 
54 {
55  debug(1, "For module %s:\n", entity_name(m));
56  debug_on("PRETTYPRINT_DEBUG_LEVEL");
57  print_statement(s);
58  debug_off();
59 }
60 
62 {
63  debug_on("PRETTYPRINT_DEBUG_LEVEL");
64  text t = text_module(m, s);
65  print_text(stderr, t);
66  free_text(t);
67  debug_off();
68 }
69 
70 extern Value offset_dim1;
71 extern Value offset_dim2;
72 
73 bool
75 entity m;
76 entity v;
77 {
78  value val = entity_initial(m);
79  code c = value_code(val);
80  cons *d, *cp1;
81  d = code_declarations(c);
82 
83  if (d == NIL) return(false) ;
84  for (cp1 = d ; !ENDP(cp1) ; cp1 = CDR( cp1 )) {
85  if (strcmp(entity_local_name(ENTITY(CAR(cp1))),
86  entity_local_name(v)) == 0)
87  return(true);
88  }
89  return (false);
90 }
91 
92 static
93 entity
95 {
96  entity new_ind;
97  string name;
98  new_ind=gen_find_tabulated(
102  st, (char *) NULL),
103  entity_domain);
104 
105  if (new_ind == entity_undefined) {
107  st, NULL));
110  free(name);
111  }
112  return(new_ind);
113 }
114 
115 
116 entity
117 find_operator(entity module, string oper, string str )
118 {
119  entity operator;
120  string name = concatenate(TOP_LEVEL_MODULE_NAME,
123  "_",oper, "_",str,NULL);
124 
125  if ((operator = gen_find_tabulated(name, entity_domain))
126  == entity_undefined)
127  operator=make_entity(strdup(name),
131  UU))),
134  return(operator);
135 }
136 
137 statement
139 {
145  make_call (oper, args)),
146  NIL,
147  NULL,
149 }
150 
151 
152 ␌
153 /* statement make_movements_loop_body_wp65(module,receive_code,
154  * ent,local_indices,var_id,
155  * sc_neg,sc_pos,index_base,rank,
156  * number_of_lower_bounds,
157  * number_of_upper_bounds)
158  *
159  * This function generates the loop body of the movement code. In the case of
160  * bank code generation the loop body must be :
161  *
162  * O1 = .....
163  * O2 = .....
164  * IF (O1.LE.O2) THEN
165  * BANK_/WP65_send/receive_nb_bytes(Prod_id,ES_A(L,O1),O2-O1+1)
166  * ES_A is the emulated shared variable given as entity ent.
167  * Prod_id is the Processeur id. given as a Pvecteur in var_id.
168  * O and L are the local indices for the bank passed like Pbase in
169  * local_indices.
170  *
171  * In the case of engine code generation the loop body must be :
172  *
173  * LI1 = ....
174  * LI2 = ....
175  * IF (LI1.LE.LI2) THEN
176  * BANK_/WP65_send/receive_nb_bytes(Bank_id,L_A(LJ,LI1),LI2-LI1+1)
177  * L_A is the local variable given as entity in ent.
178  * Bank_id is the bank id, given as Pvecteur in var_id.
179  * LJ, and LI are the local indices passed like Pbase in local_indices
180  */
181 statement
182 make_movements_loop_body_wp65(module,receive_code,ent,local_indices,var_id,sc_neg,sc_pos,index_base,rank,number_of_lower_bounds,number_of_upper_bounds)
183 entity module;
184 bool receive_code; /* is true if the code is generated for receive */
185 entity ent; /* corresponds to the shared entiy if bank_code
186  and to the local entity otherwise */
187 Pbase local_indices; /* correspond to O,L if bank_code and to LI,LJ
188  otherwise */
189 Pbase var_id; /* corresponds to the Pvecteur belonging Prod_id
190  if bank_code and Bank_id otherwise */
191 Psysteme sc_neg,sc_pos;
192 Pbase index_base;
193 int rank;
194 int number_of_lower_bounds,number_of_upper_bounds;
195 {
196  expression lower_bound,upper_bound;
197  expression expr_ind1,expr_ind2,expr,expr2,exp_ent,expr_cond;
198  entity new_ind1,new_ind2, mod;
199  entity operator_assign,operator_minus,operator_plus,operator_le,
200  operator_receive,operator_send;
201  string lower_or_equal;
202  statement stat,stat1,stat2,lbody;
203  Pvecteur pvt,ofs = local_indices;
204  type tp = entity_type(ent);
205  Value pmin,pmax;
206  int nb_bytes = 0;
207  text t;
208  test test1;
209  cons * args, * args2, * lex2, * lex3;
210  char *str1;
211  Psysteme sctmp=NULL;
212  debug_on("MOVEMENT_DEBUG_LEVEL");
213  debug(8,"make_movements_loop_body_wp65","begin\n");
214 
215  operator_assign=
218  entity_domain);
219 
220  operator_minus=
223  entity_domain);
224  operator_plus=
227  entity_domain);
228 
229  if (type_variable_p(tp)) {
230  variable var = type_variable(tp);
231  basic b = variable_basic(var);
232  nb_bytes = SizeOfElements(b);
233  }
234 
235  str1=int2a(nb_bytes);
236  operator_receive = find_operator(module, "RECEIVE",str1);
237  operator_send = find_operator(module,"SEND",str1);
238  free(str1);
239 
240  ofs = local_indices;
241 
242  /* create the new indices new_ind1 et new_ind2 corresponding to
243  LI1 et LI2 when the code is generated for engines
244  and O1 et O2 when code is generated for banks
245  vecteur_var(ofs) is respectivly LI or O */
246 
247 
248 
250  expr_ind1 = make_vecteur_expression(vect_new((char *) new_ind1,
251  vecteur_val(ofs)));
252 
254  expr_ind2 = make_vecteur_expression(vect_new((char *) new_ind2,
255  vecteur_val(ofs)));
256 
257  /* build the expression new_ind2 - new_ind1+1 */
258 
259  lex2 = CONS(EXPRESSION,expr_ind1,NIL);
260  expr = make_op_expression(operator_minus,
261  CONS(EXPRESSION,expr_ind2,lex2));
262 
264  expr2 = make_op_expression(operator_plus,
265  CONS(EXPRESSION,expr,lex2));
266 
267  /* build the list of expressions :
268  Prod_id,ES_A(L,O1),O2-O1+1 for bank case and
269  Bank_id,L_A(LJ,LI1),LI2-LI1+1 for engine case
270 
271  */
272 
273  args = CONS(EXPRESSION,expr2,NIL);;
274  pvt =vect_new((char *) new_ind1, vecteur_val(ofs));
276 
277  expr_ind1 = make_vecteur_expression(pvt);
278 
279  pvt =(!VECTEUR_NUL_P(ofs->succ)) ?
283  args2 = CONS(EXPRESSION,
285  NIL);
286  args2 = CONS(EXPRESSION,expr_ind1,args2);
288  make_reference(ent,
289  args2
290  )),
292  args = CONS(EXPRESSION,exp_ent,args);
293  args = CONS(EXPRESSION,make_vecteur_expression(vect_dup(var_id)),args);
294 
295  /* generate the send or the receive call */
296 
297  stat =(receive_code) ? make_statement_operator(operator_receive,args)
298  : make_statement_operator(operator_send,args);
299 
300  /* build the test around stat */
301 
302  sctmp = sc_dup(sc_pos);
303  sctmp = sc_append(sctmp,sc_neg);
304 
305 
306  (void)sc_minmax_of_variable(sctmp, vecteur_var(ofs), &pmin, &pmax);
307  ifdebug(4) {
308  fprint_string_Value(stderr, "borne min ", pmin);
309  fprint_string_Value(stderr, ", borne sup ", pmax);
310  fprintf(stderr,"\n");
311  }
312  /* if (pmin == INT_MIN || pmax == INT_MAX || pmax > pmin) { */
314 
315  expr_ind1 = make_vecteur_expression(vect_new((char *) new_ind1,
316  vecteur_val(ofs)));
317 
319  expr_ind2 = make_vecteur_expression(vect_new((char *) new_ind2,
320  vecteur_val(ofs)));
321 
322 
323  lower_or_equal = concatenate(TOP_LEVEL_MODULE_NAME,
324  MODULE_SEP_STRING,".LE.", NULL);
325 
326  if ((operator_le =
327  gen_find_tabulated(lower_or_equal, entity_domain))
328  == entity_undefined)
330  lower_or_equal);
331  expr_cond = MakeBinaryCall(operator_le,expr_ind1,expr_ind2);
332 
333  test1 = make_test(expr_cond,stat,make_continue_statement(entity_empty_label()));
334  stat = test_to_statement(test1);
335  /* }*/
336  /* build the whole code:
337 
338  O1 = .....
339  O2 = .....
340  IF (O1.LE.O2) THEN
341  BANK_/WP65_send/receive(Prod_id,ES_A(L,O1),O2-O1+1) for bank case
342  or:
343  LI1 = ....
344  LI2 = ....
345  IF (LI1.LE.LI2) THEN
346  BANK_/WP65_send/receive(Bank_id,L_A(LJ,LI1),LI2-LI1+1) for engine case */
347  expr_ind1 = make_vecteur_expression(vect_new((char *) new_ind1,
348  vecteur_val(ofs)));
349  expr_ind2 = make_vecteur_expression(vect_new((char *) new_ind2,
350  vecteur_val(ofs)));
351  lower_bound = lower_bound_generation(sc_neg,index_base,
352  number_of_lower_bounds,
353  rank);
354  lex2 = CONS(EXPRESSION,lower_bound,NIL);
355  stat1 = make_statement_operator(operator_assign,
356  CONS(EXPRESSION,expr_ind1,lex2));
357 
358  upper_bound = upper_bound_generation(sc_pos,index_base,
359  number_of_upper_bounds,
360  rank);
361 
362  lex2 = CONS(EXPRESSION,upper_bound,NIL);
363  stat2 = make_statement_operator(operator_assign,
364  CONS(EXPRESSION,expr_ind2,lex2));
365  lex2 = CONS(STATEMENT,stat,NIL);
366  lex3 = CONS(STATEMENT,stat2,lex2);
367 
368  lbody = make_block_statement(CONS(STATEMENT,stat1,lex3));
369  ifdebug(8) {
371  t = Text_Statement(mod, 2, lbody);
372  print_text(stderr,t);
373  }
374  debug(8,"make_movements_loop_body_wp65","end\n");
375  debug_off();
376 
377 
378  return (lbody);
379 
380 }
381 ␌
382 /* statement make_datum_movement(module,receive_code,ent,
383  * local_indices,var_id)
384  *
385  * This function generates the loop body of the movement code. In the case of
386  * bank code generation the loop body must be :
387  *
388  * BANK_/WP65_ send/receive_nb_bytes(ES_A,O,1,L,Prod_id)
389  * ES_A is the emulated shared variable given as entity ent.
390  * Prod_id is the Processeur id. given as a Pvecteur in var_id.
391  * O and L are the local indices for the bank passed like Pbase in
392  * local_indices.
393  *
394  * In the case of engine code generation the loop body must be :
395  *
396  * BANK_/WP65_send/receive_nb_bytes(L_A,LI,1,LJ,Bank_id)
397  * L_A is the local variable given as entity in ent.
398  * Bank_id is the bank id, given as Pvecteur in var_id.
399  * LJ, and LI are the local indices passed like Pbase in local_indices
400  */
401 statement make_datum_movement(module,receive_code,ent,local_indices,var_id)
402 entity module;
403 bool receive_code; /* is true if the code is generated for receive */
404 entity ent; /* corresponds to the shared entiy if bank_code
405  and to the local entity otherwise */
406 Pbase local_indices; /* correspond to O,L if bank_code and to LJ,LI
407  otherwise */
408 Pbase var_id; /* corresponds to the Pvecteur belonging Prod_id
409  if bank_code and Bank_id otherwise */
410 {
411 
412  expression exp_ent;
413  statement lbody;
414  Pvecteur ofs = local_indices;
415  Pvecteur pvt =VECTEUR_NUL;
416  entity operator_receive,operator_send;
417  cons * args, * args2;
418  type tp = entity_type(ent);
419  int nb_bytes = 0;
420  char *str1;
421  debug_on("MOVEMENT_DEBUG_LEVEL");
422  debug(8,"make_datum_movement","begin\n");
423 
424  if (type_variable_p(tp)) {
425  variable var = type_variable(tp);
426  basic b = variable_basic(var);
427  nb_bytes = SizeOfElements(b);
428  }
429 
430  str1=int2a(nb_bytes);
431  operator_receive = find_operator(module, "RECEIVE",str1);
432  operator_send = find_operator(module,"SEND",str1);
433  free(str1);
434 
435  /* build the list of expressions :
436  Prod_id,ES_A(L,O),1 for bank case and
437  Bank_id,L_A(LJ,LI),1 for engine case
438  */
439 
441  pvt =(!VECTEUR_NUL_P(ofs->succ)) ?
445 
447  pvt =vect_new(vecteur_var(ofs),VALUE_ONE);
450  args2);
451 
453  make_reference(ent,
454  args2
455  )),
457 
458  args = CONS(EXPRESSION,exp_ent,args);
459  args = CONS(EXPRESSION,make_vecteur_expression(vect_dup(var_id)),args);
460  /* generate the send or the receive call */
461 
462  lbody = (receive_code) ?
463  make_statement_operator(operator_receive,args):
464  make_statement_operator(operator_send,args);
465 
466  debug(8,"make_datum_movement","end\n");
467  debug_off();
468  return (lbody);
469 
470 }
471 
472 /* statement make_movement_scalar_wp65(receive_code,r)
473  *
474  * This function generates the loop body of the movement code. In the case of
475  * bank code generation the loop body must be :
476  *
477  * call BANK_/WP65_send/receive_nb_bytes(S)
478  *
479  * In the case of engine code generation the loop body must be :
480  *
481  * call BANK_/WP65_send/receive_nb_bytes(S)
482  *
483  * where nb_bytes is the number of bytes needed for the variable location
484  */
486 entity module;
487 bool receive_code; /* is true if the code is generated for receive */
488 reference r; /* corresponds to scalaire entity */
489 entity var_id;
490 {
491 
492  statement lbody;
493  cons * args;
494  expression expr;
495  list lexp1;
496  entity
497  operator_receive, operator_send,
498  var = reference_variable(r);
499  type t;
500  int nb_bytes=4; /* nb_bytes is the number of bytes
501  needed for the variable location */
502  basic bas;
503  char *str1;
504 
505  debug_on("MOVEMENT_DEBUG_LEVEL");
506  pips_debug(8, "begin\n");
507  pips_debug(8, "considering %s\n", entity_local_name(var));
508 
509  t = entity_type(var);
510 
511  if (type_variable_p(t)) {
512  variable var = type_variable(t);
513  bas = variable_basic(var);
514  nb_bytes = SizeOfElements(bas);
515  }
516  str1=int2a(nb_bytes);
517  operator_receive = find_operator(module, "RECEIVE",str1);
518  operator_send = find_operator(module,"SEND",str1);
519  free(str1);
520 
521  /* build the expression : S */
522  /* args = CONS(EXPRESSION,int_expr(nb_bytes),NIL);*/
523 
527  args = CONS(EXPRESSION,expr,lexp1);
528  args = CONS(EXPRESSION,
530  VALUE_ONE)),args);
531  /* generate the send or the receive call */
532 
533  lbody = (receive_code) ?
534  make_statement_operator(operator_receive,args):
535  make_statement_operator(operator_send,args);
536  ifdebug(9) {
537  pips_debug(9, "returning :\n");
539  }
540 
541  pips_debug(8,"end\n");
542  debug_off();
543  return (lbody);
544 
545 }
546 
547 
548 
549 
functional make_functional(list a1, type a2)
Definition: ri.c:1109
call make_call(entity a1, list a2)
Definition: ri.c:269
expression make_expression(syntax a1, normalized a2)
Definition: ri.c:886
storage make_storage_rom(void)
Definition: ri.c:2285
value make_value(enum value_utype tag, void *val)
Definition: ri.c:2832
reference make_reference(entity a1, list a2)
Definition: ri.c:2083
test make_test(expression a1, statement a2, statement a3)
Definition: ri.c:2607
statement make_statement(entity a1, intptr_t a2, intptr_t a3, string a4, instruction a5, list a6, string a7, extensions a8, synchronization a9)
Definition: ri.c:2222
instruction make_instruction(enum instruction_utype tag, void *val)
Definition: ri.c:1166
syntax make_syntax(enum syntax_utype tag, void *val)
Definition: ri.c:2491
synchronization make_synchronization_none(void)
Definition: ri.c:2424
type make_type(enum type_utype tag, void *val)
Definition: ri.c:2706
void free_text(text p)
Definition: text.c:74
int Value
#define VALUE_ONE
void fprint_string_Value(FILE *, char *, Value)
Definition: io.c:47
string make_entity_fullname(const char *module_name, const char *local_name)
END_EOLE.
Definition: entity_names.c:230
void free(void *)
statement make_block_statement(list)
Make a block statement from a list of statement.
Definition: statement.c:616
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
statement make_continue_statement(entity)
Definition: statement.c:953
Value offset_dim1
include "generation.h"
Definition: code.c:67
statement make_statement_operator(entity oper, cons *args)
bool variable_in_declaration_module_p(entity m, entity v)
statement make_movements_loop_body_wp65(entity module, bool receive_code, entity ent, Pbase local_indices, Pbase var_id, Psysteme sc_neg, Psysteme sc_pos, Pbase index_base, int rank, int number_of_lower_bounds, int number_of_upper_bounds)
statement make_movements_loop_body_wp65(module,receive_code, ent,local_indices,var_id,...
void wp65_debug_print_text(entity m, statement s)
include "values.h"
void wp65_debug_print_module(entity m, statement s)
static entity find_entity(entity module, Pvecteur pv, string st)
entity find_operator(entity module, string oper, string str)
statement make_datum_movement(entity module, bool receive_code, entity ent, Pbase local_indices, Pbase var_id)
statement make_datum_movement(module,receive_code,ent, local_indices,var_id)
statement make_movement_scalar_wp65(entity module, bool receive_code, reference r, entity var_id)
statement make_movement_scalar_wp65(receive_code,r)
Value offset_dim2
Definition: code.c:68
#define debug_on(env)
Definition: misc-local.h:157
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define debug_off()
Definition: misc-local.h:160
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
Definition: debug.c:189
#define SUFFIX_FOR_TEMP_VAR2_IN_INNER_LOOP
#define SUFFIX_FOR_TEMP_VAR1_IN_INNER_LOOP
expression lower_bound_generation(Psysteme sc_neg, Pbase index_base, int number_of_lower_bounds, int loop_rank)
This fonction generates the lower bounds of the "loop_rank"-th loop.
expression upper_bound_generation(Psysteme sc_pos, Pbase index_base, int number_of_upper_bounds, int loop_rank)
This fonction generates the upper bounds of the "loop_rank"-th loop.
expression make_op_expression(entity, cons *)
Definition: operation.c:55
static entity rank
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
Definition: naming-local.h:101
#define MODULE_SEP_STRING
Definition: naming-local.h:30
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
Definition: newgen-local.h:35
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
void * gen_find_tabulated(const char *, int)
Definition: tabulated.c:218
#define string_undefined
Definition: newgen_types.h:40
#define UU
Definition: newgen_types.h:98
static char * module
Definition: pips.c:74
text Text_Statement(entity, int, statement)
text text_module(entity, statement)
void print_statement(statement)
Print a statement on stderr.
Definition: statement.c:98
#define MINUS_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define make_entity(n, t, s, i)
#define test_to_statement(t)
#define STATEMENT_NUMBER_UNDEFINED
default values
#define ASSIGN_OPERATOR_NAME
Definition: ri-util-local.h:95
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...
Definition: entity.c:453
entity FindOrCreateEntity(const char *package, const char *local_name)
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a functi...
Definition: entity.c:1586
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
Definition: entity.c:1450
entity entity_empty_label(void)
Definition: entity.c:1105
const char * module_local_name(entity e)
Returns the module local user name.
Definition: entity.c:582
expression make_vecteur_expression(Pvecteur pv)
make expression for vector (Pvecteur)
Definition: expression.c:1650
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
Definition: expression.c:354
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Definition: expression.c:1188
extensions empty_extensions(void)
extension.c
Definition: extension.c:43
void AddEntityToDeclarations(entity, entity)
END_EOLE.
Definition: variable.c:108
entity make_scalar_integer_entity(const char *, const char *)
Create an integer variable of name "name" in module of name "module_name".
Definition: variable.c:1068
_int SizeOfElements(basic)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
Definition: size.c:297
#define normalized_undefined
Definition: ri.h:1745
#define reference_variable(x)
Definition: ri.h:2326
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755
#define type_variable(x)
Definition: ri.h:2949
@ is_value_unknown
Definition: ri.h:3035
#define code_declarations(x)
Definition: ri.h:784
@ is_syntax_reference
Definition: ri.h:2691
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define entity_undefined
Definition: ri.h:2761
@ is_instruction_call
Definition: ri.h:1474
#define entity_name(x)
Definition: ri.h:2790
#define value_code(x)
Definition: ri.h:3067
@ is_type_void
Definition: ri.h:2904
@ is_type_functional
Definition: ri.h:2901
#define entity_type(x)
Definition: ri.h:2792
#define type_variable_p(x)
Definition: ri.h:2947
#define entity_domain
newgen_syntax_domain_defined
Definition: ri.h:410
#define variable_basic(x)
Definition: ri.h:3120
#define STATEMENT(x)
STATEMENT.
Definition: ri.h:2413
#define entity_initial(x)
Definition: ri.h:2796
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
Definition: sc_alloc.c:176
bool sc_minmax_of_variable(Psysteme ps, Variable var, Value *pmin, Value *pmax)
void sc_minmax_of_variable(Psysteme ps, Variable var, Value *pmin, *pmax): examine un systeme pour tr...
Definition: sc_eval.c:143
Psysteme sc_append(Psysteme s1, Psysteme s2)
Psysteme sc_append(Psysteme s1, Psysteme s2): calcul de l'intersection des polyedres definis par s1 e...
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
#define ifdebug(n)
Definition: sg.c:47
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
struct Svecteur * succ
Definition: vecteur-local.h:92
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
void print_text(FILE *fd, text t)
Definition: print.c:195
char * int2a(int)
util.c
Definition: util.c:42
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define vecteur_val(v)
#define vecteur_var(v)
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
#define VECTEUR_NUL_P(v)
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Definition: vecteur-local.h:60
Pvecteur vect_dup(Pvecteur v_in)
Pvecteur vect_dup(Pvecteur v_in): duplication du vecteur v_in; allocation de et copie dans v_out;.
Definition: alloc.c:51
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
Definition: alloc.c:110
Pvecteur vect_add(Pvecteur v1, Pvecteur v2)
package vecteur - operations binaires
Definition: binaires.c:53
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...
Definition: unaires.c:72