PIPS
change_of_Pbase.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include "linear.h"
#include "genC.h"
#include "ri.h"
#include "ri-util.h"
#include "boolean.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
#include "matrice.h"
#include "conversion.h"
+ Include dependency graph for change_of_Pbase.c:

Go to the source code of this file.

Functions

void derive_new_basis (Pbase base_oldindex, Pbase *base_newindex, entity(*new_entity)(entity))
 package conversion More...
 
void change_of_base_index (Pbase base_oldindex, Pbase *base_newindex)
 void change_of_base_index(Pbase base_oldindex, Pbase *base_newindex) change of variable index from base_oldindex to base_newindex More...
 
entity make_index_prime_entity (entity old_index)
 
entity make_index_entity (entity old_index)
 
Psysteme sc_change_baseindex (Psysteme sc, Pbase base_old, Pbase base_new)
 Psysteme sc_change_baseindex(Psysteme sc, Pbase base_old, Pbase base_new) le changement de base d'indice pour sc. More...
 

Function Documentation

◆ change_of_base_index()

void change_of_base_index ( Pbase  base_oldindex,
Pbase base_newindex 
)

void change_of_base_index(Pbase base_oldindex, Pbase *base_newindex) change of variable index from base_oldindex to base_newindex

Parameters
base_oldindexase_oldindex
base_newindexase_newindex

Definition at line 65 of file change_of_Pbase.c.

68 {
69  derive_new_basis(base_oldindex, base_newindex, make_index_prime_entity);
70 }
void derive_new_basis(Pbase base_oldindex, Pbase *base_newindex, entity(*new_entity)(entity))
package conversion
entity make_index_prime_entity(entity old_index)

References derive_new_basis(), and make_index_prime_entity().

Referenced by hyperplane(), and unimodular().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ derive_new_basis()

void derive_new_basis ( Pbase  base_oldindex,
Pbase base_newindex,
entity(*)(entity new_entity 
)

package conversion

Warning! Do not modify this file that is automatically generated!

Parameters
base_oldindexase_oldindex
base_newindexase_newindex

Definition at line 48 of file change_of_Pbase.c.

49 {
50  Pbase pb;
51  entity new_name;
52 
53  for (pb=base_oldindex; pb!=NULL; pb=pb->succ)
54  {
55  new_name = new_entity((entity) pb->var);
56  base_add_dimension(base_newindex, (Variable) new_name);
57  }
58  *base_newindex = base_reversal(*base_newindex);
59 }
Pbase base_reversal(Pbase b_in)
Pbase base_reversal(Pbase b_in): produces a basis b_out, having the same basis vectors as b_in,...
Definition: base.c:221
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
Variable var
Definition: vecteur-local.h:90
struct Svecteur * succ
Definition: vecteur-local.h:92
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
#define base_add_dimension(b, v)

References base_add_dimension, base_reversal(), Svecteur::succ, and Svecteur::var.

Referenced by change_of_base_index(), parallel_tiling(), and tiling_transformation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_index_entity()

entity make_index_entity ( entity  old_index)
Parameters
old_indexld_index

Definition at line 77 of file change_of_Pbase.c.

78 {
79  return make_index_prime_entity(old_index);
80 }

References make_index_prime_entity().

+ Here is the call graph for this function:

◆ make_index_prime_entity()

entity make_index_prime_entity ( entity  old_index)
Parameters
old_indexld_index

Definition at line 72 of file change_of_Pbase.c.

73 {
74  return make_new_index_entity(old_index, "p");
75 }
entity make_new_index_entity(entity, string)
Definition: variable.c:1851

References make_new_index_entity().

Referenced by change_of_base_index(), and make_index_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sc_change_baseindex()

Psysteme sc_change_baseindex ( Psysteme  sc,
Pbase  base_old,
Pbase  base_new 
)

Psysteme sc_change_baseindex(Psysteme sc, Pbase base_old, Pbase base_new) le changement de base d'indice pour sc.

Parameters
scc
base_oldase_old
base_newase_new

Definition at line 85 of file change_of_Pbase.c.

89 {
90  Pbase pb1, pb2;
91 
92  for(pb1=base_old,pb2=base_new;pb1!=NULL;pb1=pb1->succ,pb2=pb2->succ)
93  sc_variable_rename(sc,pb1->var,pb2->var);
94  return(sc);
95 }
Psysteme sc_variable_rename(Psysteme s, Variable v_old, Variable v_new)
Psysteme sc_variable_rename(Psysteme s, Variable v_old, Variable v_new): reecriture du systeme s remp...
Definition: sc.c:157

References sc_variable_rename(), Svecteur::succ, and Svecteur::var.

Referenced by hyperplane(), and unimodular().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: