PIPS
newgen.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STATEMENT_ORDERING_UNDEFINED   (-1)
 Warning! Do not modify this file that is automatically generated! More...
 
#define STATEMENT_MAPPING_INCLUDED
 these macros are obsolete! newgen functions (->) should be used instead More...
 
#define MAKE_STATEMENT_MAPPING()    (statement_mapping) hash_table_make(hash_pointer, 0)
 
#define FREE_STATEMENT_MAPPING(map)    (hash_table_free((hash_table) (map)))
 
#define SET_STATEMENT_MAPPING(map, stat, val)    hash_put((hash_table) (map), (char *)(stat), (char *)(val))
 
#define GET_STATEMENT_MAPPING(map, stat)    hash_get((hash_table) (map), (char *) (stat))
 
#define STATEMENT_MAPPING_COUNT(map)    hash_table_entry_count((hash_table) map)
 
#define STATEMENT_MAPPING_MAP(s, v, code, h)    HASH_MAP(s, v, code, h)
 
#define DEFINE_CURRENT_MAPPING(name, type)    GENERIC_CURRENT_MAPPING(name, type, statement)
 
#define ENTITY_MAPPING_INCLUDED
 
#define MAKE_ENTITY_MAPPING()    ((entity_mapping) hash_table_make(hash_pointer, 0))
 
#define FREE_ENTITY_MAPPING(map)    (hash_table_free((hash_table) (map)))
 
#define SET_ENTITY_MAPPING(map, ent, val)    hash_put((hash_table) (map), (char *)(ent), (char *)(val))
 
#define GET_ENTITY_MAPPING(map, ent)    hash_get((hash_table) (map), (char *)(ent))
 
#define ENTITY_MAPPING_COUNT(map)    hash_table_entry_count((hash_table) map)
 
#define ENTITY_MAPPING_MAP(s, v, code, h)    HASH_MAP(s, v, code, h)
 
#define CONTROL_MAPPING_INCLUDED
 
#define MAKE_CONTROL_MAPPING()    ((control_mapping) hash_table_make(hash_pointer, 0))
 
#define FREE_CONTROL_MAPPING(map)    (hash_table_free((hash_table) (map)))
 
#define SET_CONTROL_MAPPING(map, cont, val)    hash_put((hash_table) (map), (char *)(cont), (char *)(val))
 
#define GET_CONTROL_MAPPING(map, cont)    hash_get((hash_table) (map), (char *)(cont))
 
#define CONTROL_MAPPING_COUNT(map)    hash_table_entry_count((hash_table) map)
 
#define CONTROL_MAPPING_MAP(s, v, code, h)    HASH_MAP(s, v, code, h)
 

Typedefs

typedef hash_table statement_mapping
 
typedef hash_table entity_mapping
 
typedef hash_table control_mapping
 

Functions

void initialize_newgen (void)
 cproto-generated files More...
 
void vect_gen_write (FILE *, Pvecteur)
 Pvecteur.c. More...
 
Pvecteur vect_gen_read (FILE *, int(*)(void))
 
void vect_gen_free (Pvecteur)
 
Pvecteur vect_gen_copy_tree (Pvecteur)
 
int vect_gen_allocated_memory (Pvecteur)
 
int contrainte_gen_allocated_memory (Pcontrainte)
 
void monome_gen_write (FILE *, Pmonome)
 Ppolynome.c. More...
 
Pmonome monome_gen_read (FILE *, int(*)(void))
 
void monome_gen_free (Pmonome)
 
Pmonome monome_gen_copy_tree (Pmonome)
 
void polynome_gen_write (FILE *, Ppolynome)
 
Ppolynome polynome_gen_read (FILE *, int(*)(void))
 
void polynome_gen_free (Ppolynome)
 
Ppolynome polynome_gen_copy_tree (Ppolynome)
 
int monome_gen_allocated_memory (Pmonome)
 
int polynome_gen_allocated_memory (Ppolynome)
 
void sc_gen_write (FILE *, Psysteme)
 Psc.c. More...
 
Psysteme sc_gen_read (FILE *, int(*)(void))
 
void sc_gen_free (Psysteme)
 
Psysteme sc_gen_copy_tree (Psysteme)
 
int sc_gen_allocated_memory (Psysteme)
 

Macro Definition Documentation

◆ CONTROL_MAPPING_COUNT

#define CONTROL_MAPPING_COUNT (   map)     hash_table_entry_count((hash_table) map)

Definition at line 98 of file newgen.h.

◆ CONTROL_MAPPING_INCLUDED

#define CONTROL_MAPPING_INCLUDED

Definition at line 88 of file newgen.h.

◆ CONTROL_MAPPING_MAP

#define CONTROL_MAPPING_MAP (   s,
  v,
  code,
 
)     HASH_MAP(s, v, code, h)

Definition at line 100 of file newgen.h.

◆ DEFINE_CURRENT_MAPPING

#define DEFINE_CURRENT_MAPPING (   name,
  type 
)     GENERIC_CURRENT_MAPPING(name, type, statement)

Definition at line 66 of file newgen.h.

◆ ENTITY_MAPPING_COUNT

#define ENTITY_MAPPING_COUNT (   map)     hash_table_entry_count((hash_table) map)

Definition at line 81 of file newgen.h.

◆ ENTITY_MAPPING_INCLUDED

#define ENTITY_MAPPING_INCLUDED

Definition at line 71 of file newgen.h.

◆ ENTITY_MAPPING_MAP

#define ENTITY_MAPPING_MAP (   s,
  v,
  code,
 
)     HASH_MAP(s, v, code, h)

Definition at line 83 of file newgen.h.

◆ FREE_CONTROL_MAPPING

#define FREE_CONTROL_MAPPING (   map)     (hash_table_free((hash_table) (map)))

Definition at line 92 of file newgen.h.

◆ FREE_ENTITY_MAPPING

#define FREE_ENTITY_MAPPING (   map)     (hash_table_free((hash_table) (map)))

Definition at line 75 of file newgen.h.

◆ FREE_STATEMENT_MAPPING

#define FREE_STATEMENT_MAPPING (   map)     (hash_table_free((hash_table) (map)))

Definition at line 53 of file newgen.h.

◆ GET_CONTROL_MAPPING

#define GET_CONTROL_MAPPING (   map,
  cont 
)     hash_get((hash_table) (map), (char *)(cont))

Definition at line 96 of file newgen.h.

◆ GET_ENTITY_MAPPING

#define GET_ENTITY_MAPPING (   map,
  ent 
)     hash_get((hash_table) (map), (char *)(ent))

Definition at line 79 of file newgen.h.

◆ GET_STATEMENT_MAPPING

#define GET_STATEMENT_MAPPING (   map,
  stat 
)     hash_get((hash_table) (map), (char *) (stat))

Definition at line 57 of file newgen.h.

◆ MAKE_CONTROL_MAPPING

#define MAKE_CONTROL_MAPPING ( )     ((control_mapping) hash_table_make(hash_pointer, 0))

Definition at line 90 of file newgen.h.

◆ MAKE_ENTITY_MAPPING

#define MAKE_ENTITY_MAPPING ( )     ((entity_mapping) hash_table_make(hash_pointer, 0))

Definition at line 73 of file newgen.h.

◆ MAKE_STATEMENT_MAPPING

#define MAKE_STATEMENT_MAPPING ( )     (statement_mapping) hash_table_make(hash_pointer, 0)

Definition at line 51 of file newgen.h.

◆ SET_CONTROL_MAPPING

#define SET_CONTROL_MAPPING (   map,
  cont,
  val 
)     hash_put((hash_table) (map), (char *)(cont), (char *)(val))

Definition at line 94 of file newgen.h.

◆ SET_ENTITY_MAPPING

#define SET_ENTITY_MAPPING (   map,
  ent,
  val 
)     hash_put((hash_table) (map), (char *)(ent), (char *)(val))

Definition at line 77 of file newgen.h.

◆ SET_STATEMENT_MAPPING

#define SET_STATEMENT_MAPPING (   map,
  stat,
  val 
)     hash_put((hash_table) (map), (char *)(stat), (char *)(val))

Definition at line 55 of file newgen.h.

◆ STATEMENT_MAPPING_COUNT

#define STATEMENT_MAPPING_COUNT (   map)     hash_table_entry_count((hash_table) map)

Definition at line 59 of file newgen.h.

◆ STATEMENT_MAPPING_INCLUDED

#define STATEMENT_MAPPING_INCLUDED

these macros are obsolete! newgen functions (->) should be used instead

Definition at line 49 of file newgen.h.

◆ STATEMENT_MAPPING_MAP

#define STATEMENT_MAPPING_MAP (   s,
  v,
  code,
 
)     HASH_MAP(s, v, code, h)

Definition at line 61 of file newgen.h.

◆ STATEMENT_ORDERING_UNDEFINED

#define STATEMENT_ORDERING_UNDEFINED   (-1)

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

Modify src/Libs/newgen/newgen-local.h instead, to add your own modifications. header file built by cproto newgen-local.h mapping.h inclusion

I do that because this file was previously included in genC.h, but the macros defined here use ri types (statement, entity...). three typedef are also included here. ri.h is a prerequisit for mapping.h.

FC, Feb 21, 1994

Definition at line 43 of file newgen.h.

Typedef Documentation

◆ control_mapping

Definition at line 89 of file newgen.h.

◆ entity_mapping

Definition at line 72 of file newgen.h.

◆ statement_mapping

Definition at line 50 of file newgen.h.

Function Documentation

◆ contrainte_gen_allocated_memory()

int contrainte_gen_allocated_memory ( Pcontrainte  pc)
Parameters
pcc

Definition at line 176 of file Pvecteur.c.

177 {
178  int result = 0;
179  for(; pc; pc=pc->succ)
180  result += sizeof(Scontrainte) +
182  return result;
183 }
int vect_gen_allocated_memory(Pvecteur v)
Definition: Pvecteur.c:168
Pvecteur vecteur
struct Scontrainte * succ

References Scontrainte::succ, vect_gen_allocated_memory(), and Scontrainte::vecteur.

Referenced by sc_gen_allocated_memory().

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

◆ initialize_newgen()

void initialize_newgen ( void  )

cproto-generated files

newgen.c

Read NewGen specification file

Initialise external functions... re-entry in newgen because of the graph stuff...

can't get the size... FC

can't get the size... FC

added because newgen lacks support for hash maps with integer keys

read

write

free

copy

size

do nothing!

read

write

free

copy

size

Definition at line 48 of file newgen.c.

49 {
50  /* Read NewGen specification file
51  */
53 
54  /* Initialise external functions...
55  * re-entry in newgen because of the graph stuff...
56  */
58  (void* (*)()) gen_read,
59  (void (*)(FILE*, void*)) gen_write,
60  (void (*)(void*)) gen_free,
61  (void* (*)(void*)) gen_copy_tree_with_sharing,
62  (int (*)(void*)) gen_allocated_memory);
63 
65  (void* (*)()) gen_read,
66  (void (*)(FILE*, void*)) gen_write,
67  (void (*)()) gen_free,
68  (void* (*)()) gen_copy_tree_with_sharing,
69  (int (*)()) gen_allocated_memory);
70 
72  (void* (*)()) polynome_gen_read,
73  (void (*)()) polynome_gen_write,
74  (void (*)()) polynome_gen_free,
75  (void* (*)()) polynome_gen_copy_tree,
76  (int (*)()) polynome_gen_allocated_memory);
77 
79  (void* (*)()) vect_gen_read,
80  (void (*)()) vect_gen_write,
81  (void (*)()) vect_gen_free,
82  (void* (*)()) vect_gen_copy_tree,
83  (int (*)()) vect_gen_allocated_memory);
84 
86  (void* (*)()) sc_gen_read,
87  (void (*)()) sc_gen_write,
88  (void (*)()) sc_gen_free,
89  (void* (*)()) sc_gen_copy_tree,
90  (int (*)()) sc_gen_allocated_memory);
91 
93  (void* (*)()) gen_core_NULL,
94  (void (*)()) gen_core,
95  (void (*)()) free,
96  (void* (*)()) gen_core_NULL,
97  (int (*)()) NULL); /* can't get the size... FC */
98 
100  (void* (*)()) gen_core_NULL,
101  (void (*)()) gen_core,
102  (void (*)()) sg_rm,
103  (void* (*)()) sg_dup,
104  (int (*)()) NULL); /* can't get the size... FC */
105 
107  (void* (*)()) gen_core_NULL,
108  (void (*)()) gen_core,
109  (void (*)()) gen_null,
110  (void* (*)()) gen_identity,
111  (int (*)()) gen_false);
112 
113  /* added because newgen lacks support for hash maps with integer keys */
115  (void* (*)()) gen_NULL, /* read */
116  (void (*)()) gen_null, /* write */
117  (void (*)()) gen_null, /* free */
118  (void* (*)()) gen_NULL, /* copy */
119  (int (*)()) gen_true); /* size */
120 
121  /* do nothing! */
123  (void* (*)()) gen_NULL, /* read */
124  (void (*)()) gen_null, /* write */
125  (void (*)()) gen_null, /* free */
126  (void* (*)()) gen_NULL, /* copy */
127  (int (*)()) gen_true); /* size */
128 }
#define PPOLYNOME_NEWGEN_EXTERNAL
Definition: complexity_ri.h:20
#define PVECTEUR_NEWGEN_EXTERNAL
Definition: compsec.h:27
#define PTSG_NEWGEN_EXTERNAL
Definition: dg.h:34
#define PSYSTEME_NEWGEN_EXTERNAL
Definition: effects.h:48
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992
gen_chunk * gen_copy_tree_with_sharing(gen_chunk *obj)
for re-entry only in gen_copy_tree...
Definition: genClib.c:1442
void gen_init_external(int which, void *(*read)(FILE *, int(*)(void)), void(*write)(FILE *, void *), void(*free)(void *), void *(*copy)(void *), int(*allocated_memory)(void *))
GEN_INIT_EXTERNAL defines entry points for free, read and write functions of external types.
Definition: genClib.c:2276
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
void gen_read_spec(char *spec,...)
Definition: genClib.c:2218
int gen_allocated_memory(gen_chunk *obj)
re-entry is automatic for this function.
Definition: genClib.c:2690
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745
void free(void *)
#define ARC_LABEL_NEWGEN_EXTERNAL
Definition: graph.h:21
#define VERTEX_LABEL_NEWGEN_EXTERNAL
Definition: graph.h:13
void * gen_NULL(__attribute__((unused)) void *unused)
idem with a void* return
Definition: genClib.c:2764
void * gen_core_NULL(__attribute__((unused)) void *p)
Definition: genClib.c:2827
bool gen_false(__attribute__((unused)) gen_chunk *unused)
Return false and ignore the argument.
Definition: genClib.c:2796
void gen_core(__attribute__((unused)) void *p)
Abort when called.
Definition: genClib.c:2822
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
Definition: genClib.c:2752
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
Definition: genClib.c:2780
void * gen_identity(const void *x)
Just return the argument.
Definition: genClib.c:2807
Pvecteur vect_gen_copy_tree(Pvecteur)
Definition: Pvecteur.c:163
void vect_gen_write(FILE *, Pvecteur)
Pvecteur.c.
Definition: Pvecteur.c:108
int sc_gen_allocated_memory(Psysteme)
Definition: Psc.c:208
int polynome_gen_allocated_memory(Ppolynome)
Definition: Ppolynome.c:168
Pvecteur vect_gen_read(FILE *, int(*)(void))
void sc_gen_free(Psysteme)
Definition: Psc.c:198
int vect_gen_allocated_memory(Pvecteur)
Definition: Pvecteur.c:168
void vect_gen_free(Pvecteur)
Definition: Pvecteur.c:158
void polynome_gen_free(Ppolynome)
Definition: Ppolynome.c:148
void polynome_gen_write(FILE *, Ppolynome)
Definition: Ppolynome.c:97
Ppolynome polynome_gen_read(FILE *, int(*)(void))
Ppolynome polynome_gen_copy_tree(Ppolynome)
Definition: Ppolynome.c:154
Psysteme sc_gen_copy_tree(Psysteme)
Definition: Psc.c:203
void sc_gen_write(FILE *, Psysteme)
Psc.c.
Definition: Psc.c:82
Psysteme sc_gen_read(FILE *, int(*)(void))
#define DB_VOID_NEWGEN_EXTERNAL
#define OPERATOR_ID_SONS_NEWGEN_EXTERNAL
Definition: sac_private.h:48
Ptsg sg_dup(Ptsg sg_in)
Ptsg sg_dup(Ptsg sg_in): allocation d'un systeme generateur sg_out et copie sans sharing des ensemble...
Definition: sg.c:84
void sg_rm(Ptsg sg)
void sg_rm(Ptsg sg): liberation de l'espace memoire occupe par un systeme generateur
Definition: sg.c:249
#define ALL_SPECS
Definition: specs.h:1
#define MATRICE_NEWGEN_EXTERNAL
Definition: tiling.h:21
#define VOID_STAR_NEWGEN_EXTERNAL

References ALL_SPECS, ARC_LABEL_NEWGEN_EXTERNAL, DB_VOID_NEWGEN_EXTERNAL, free(), gen_allocated_memory(), gen_copy_tree_with_sharing(), gen_core(), gen_core_NULL(), gen_false(), gen_free(), gen_identity(), gen_init_external(), gen_null(), gen_NULL(), gen_read(), gen_read_spec(), gen_true(), gen_write(), MATRICE_NEWGEN_EXTERNAL, OPERATOR_ID_SONS_NEWGEN_EXTERNAL, polynome_gen_allocated_memory(), polynome_gen_copy_tree(), polynome_gen_free(), polynome_gen_read(), polynome_gen_write(), PPOLYNOME_NEWGEN_EXTERNAL, PSYSTEME_NEWGEN_EXTERNAL, PTSG_NEWGEN_EXTERNAL, PVECTEUR_NEWGEN_EXTERNAL, sc_gen_allocated_memory(), sc_gen_copy_tree(), sc_gen_free(), sc_gen_read(), sc_gen_write(), sg_dup(), sg_rm(), vect_gen_allocated_memory(), vect_gen_copy_tree(), vect_gen_free(), vect_gen_read(), vect_gen_write(), VERTEX_LABEL_NEWGEN_EXTERNAL, and VOID_STAR_NEWGEN_EXTERNAL.

Referenced by atinit(), gpips_main(), pips_main(), tpips_init(), and wpips_main().

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

◆ monome_gen_allocated_memory()

int monome_gen_allocated_memory ( Pmonome  m)

Definition at line 161 of file Ppolynome.c.

163 {
164  return sizeof(Smonome) + vect_gen_allocated_memory(m->term);
165 }
struct Smonome Smonome
Pvecteur term

References Smonome::term, and vect_gen_allocated_memory().

Referenced by polynome_gen_allocated_memory().

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

◆ monome_gen_copy_tree()

Pmonome monome_gen_copy_tree ( Pmonome  pm)
Parameters
pmm

Definition at line 91 of file Ppolynome.c.

93 {
94  return(monome_dup(pm));
95 }
Pmonome monome_dup(Pmonome pm)
Pmonome monome_dup(Pmonome pm) PRIVATE creates and returns a copy of pm.
Definition: pnome-alloc.c:132

References monome_dup().

+ Here is the call graph for this function:

◆ monome_gen_free()

void monome_gen_free ( Pmonome  pm)
Parameters
pmm

Definition at line 85 of file Ppolynome.c.

87 {
88  monome_rm(&pm);
89 }
void monome_rm(Pmonome *ppm)
void monome_rm(Pmonome* ppm) PRIVATE frees space occupied by monomial *ppm returns *ppm pointing to M...
Definition: pnome-alloc.c:154

References monome_rm().

+ Here is the call graph for this function:

◆ monome_gen_read()

Pmonome monome_gen_read ( FILE *  ,
int(*)(void)   
)

◆ monome_gen_write()

void monome_gen_write ( FILE *  fd,
Pmonome  pm 
)

Ppolynome.c.

Parameters
fdd
pmm

Definition at line 40 of file Ppolynome.c.

41 {
42  pips_assert("monome_gen_write", !MONOME_UNDEFINED_P(pm));
43 
44  fprintf(fd, "{%f< ", monome_coeff(pm));
45  vect_gen_write(fd, monome_term(pm));
46  fprintf(fd, ">}");
47 }
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define monome_term(pm)
#define MONOME_UNDEFINED_P(pm)
#define monome_coeff(pm)
Macros definitions.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...

References fprintf(), monome_coeff, monome_term, MONOME_UNDEFINED_P, pips_assert, and vect_gen_write().

Referenced by polynome_gen_write().

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

◆ polynome_gen_allocated_memory()

int polynome_gen_allocated_memory ( Ppolynome  p)

Definition at line 168 of file Ppolynome.c.

170 {
171  int result = 0;
172  for(; p; p=p->succ)
173  result += monome_gen_allocated_memory(p->monome) + sizeof(Spolynome);
174  return result;
175 }
int monome_gen_allocated_memory(Pmonome m)
Definition: Ppolynome.c:161
struct Spolynome Spolynome
Pmonome monome
struct Spolynome * succ

References Spolynome::monome, monome_gen_allocated_memory(), and Spolynome::succ.

Referenced by initialize_newgen().

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

◆ polynome_gen_copy_tree()

Ppolynome polynome_gen_copy_tree ( Ppolynome  pp)
Parameters
ppp

Definition at line 154 of file Ppolynome.c.

156 {
157  return(polynome_dup(pp));
158 }
Ppolynome polynome_dup(Ppolynome pp)
Ppolynome polynome_dup(Ppolynome pp) creates and returns a copy of pp.
Definition: pnome-alloc.c:211

References polynome_dup().

Referenced by initialize_newgen(), and main().

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

◆ polynome_gen_free()

void polynome_gen_free ( Ppolynome  pp)
Parameters
ppp

Definition at line 148 of file Ppolynome.c.

150 {
151  polynome_rm(&pp);
152 }
void polynome_rm(Ppolynome *ppp)
void polynome_rm(Ppolynome* ppp) frees space occupied by polynomial *ppp returns *ppp pointing to POL...
Definition: pnome-alloc.c:170

References polynome_rm().

Referenced by initialize_newgen(), and main().

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

◆ polynome_gen_read()

Ppolynome polynome_gen_read ( FILE *  ,
int(*)(void)   
)

Referenced by initialize_newgen(), and main().

+ Here is the caller graph for this function:

◆ polynome_gen_write()

void polynome_gen_write ( FILE *  fd,
Ppolynome  pp 
)
Parameters
fdd
ppp

Definition at line 97 of file Ppolynome.c.

100 {
101  Ppolynome p;
102 
103  pips_assert("polynome_gen_write", !POLYNOME_UNDEFINED_P(pp));
104 
105  fprintf(fd, "\n[");
106 
107  for(p=pp; !POLYNOME_NUL_P(p); p=polynome_succ(p)) {
108  Pmonome pm = polynome_monome(p);
109 
110  fprintf(fd, " ");
111  monome_gen_write(fd, pm);
112  }
113 
114  fprintf(fd, "]\n");
115 }
void monome_gen_write(FILE *fd, Pmonome pm)
Ppolynome.c.
Definition: Ppolynome.c:40
#define POLYNOME_UNDEFINED_P(pp)
#define polynome_monome(pp)
#define POLYNOME_NUL_P(pp)
#define polynome_succ(pp)

References fprintf(), monome_gen_write(), pips_assert, polynome_monome, POLYNOME_NUL_P, polynome_succ, and POLYNOME_UNDEFINED_P.

Referenced by initialize_newgen(), and main().

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

◆ sc_gen_allocated_memory()

int sc_gen_allocated_memory ( Psysteme  s)

Definition at line 208 of file Psc.c.

209 {
210  return contrainte_gen_allocated_memory(sc_egalites(s))
211  + contrainte_gen_allocated_memory(sc_inegalites(s))
212  + vect_gen_allocated_memory(sc_base(s))
213  + sizeof(Ssysteme) ;
214 }
int contrainte_gen_allocated_memory(Pcontrainte)
Definition: Pvecteur.c:176
struct Ssysteme Ssysteme

References contrainte_gen_allocated_memory(), and vect_gen_allocated_memory().

Referenced by initialize_newgen().

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

◆ sc_gen_copy_tree()

Psysteme sc_gen_copy_tree ( Psysteme  s)

Definition at line 203 of file Psc.c.

204 {
205  return sc_copy(s);
206 }
Psysteme sc_copy(Psysteme ps)
Psysteme sc_copy(Psysteme ps): duplication d'un systeme (allocation et copie complete des champs sans...
Definition: sc_alloc.c:230

References sc_copy().

Referenced by initialize_newgen(), and main().

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

◆ sc_gen_free()

void sc_gen_free ( Psysteme  s)

Definition at line 198 of file Psc.c.

199 {
200  sc_rm(s);
201 }
void sc_rm(Psysteme ps)
void sc_rm(Psysteme ps): liberation de l'espace memoire occupe par le systeme de contraintes ps;
Definition: sc_alloc.c:277

References sc_rm().

Referenced by initialize_newgen(), and main().

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

◆ sc_gen_read()

Psysteme sc_gen_read ( FILE *  ,
int(*)(void)   
)

Referenced by initialize_newgen(), and main().

+ Here is the caller graph for this function:

◆ sc_gen_write()

void sc_gen_write ( FILE *  fd,
Psysteme  s 
)

Psc.c.

FI: we cannot not store SC_UNDEFINED as it is used in regions; we cannot store it like a system with an empty basis, no inequalities and no equalities because it is used to define transformer identity; conclusion: region library has to be changed and to use transformer_undefined as context

Current kludge: SC_UNDEFINED is stored but retrieved as a system with 0 equalities and 0 inequalities over a space of dimension 0

Parameters
fdd

Definition at line 82 of file Psc.c.

83 {
84  Pcontrainte c;
85  Psysteme stored_s;
86  static Psysteme undefined_s = SC_UNDEFINED;
87 
88  /* FI: we cannot not store SC_UNDEFINED as it is used in regions;
89  we cannot store it like a system with an empty basis, no inequalities
90  and no equalities because it is used to define transformer identity;
91  conclusion: region library has to be changed and to use
92  transformer_undefined as context
93 
94  Current kludge: SC_UNDEFINED is stored but retrieved as a system
95  with 0 equalities and 0 inequalities over a space of dimension 0
96  */
97  if(SC_UNDEFINED_P(s)) {
98  if(SC_UNDEFINED_P(undefined_s))
100  stored_s = undefined_s;
101  }
102  else
103  stored_s = s;
104 
105  pips_assert("sc_gen_write",!SC_UNDEFINED_P(stored_s));
106 
107  /*
108  ifdebug(10){
109  fprintf(stderr, "[sc_gen_write] sys 0x%x\n", (unsigned int) s);
110  syst_debug(s); }
111  */
112 
113  (void) fputc('(',fd);
114 
115  vect_gen_write(fd,stored_s->base);
116 
117  (void) fputc('(',fd);
118 
119  for (c = stored_s->egalites; c != NULL; c = c->succ) {
120  (void) fputc(' ', fd);
121  vect_gen_write(fd,c->vecteur);
122  }
123 
124  (void) fputc(')',fd);
125 
126  (void) fputc('(',fd);
127 
128  for (c = stored_s->inegalites; c != NULL; c = c->succ) {
129  (void) fputc(' ', fd);
130  vect_gen_write(fd, c->vecteur);
131  }
132 
133  (void) fputc(')',fd);
134 
135  (void) fputc(')',fd);
136 
137 }
#define CONTRAINTE_UNDEFINED
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg)
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg): allocation et initialisation d'un systeme d'equ...
Definition: sc.c:78
Pcontrainte inegalites
Definition: sc-local.h:71
Pcontrainte egalites
Definition: sc-local.h:70
Pbase base
Definition: sc-local.h:75

References Ssysteme::base, CONTRAINTE_UNDEFINED, Ssysteme::egalites, Ssysteme::inegalites, pips_assert, sc_make(), Scontrainte::succ, vect_gen_write(), and Scontrainte::vecteur.

Referenced by initialize_newgen(), and main().

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

◆ vect_gen_allocated_memory()

int vect_gen_allocated_memory ( Pvecteur  v)

Definition at line 168 of file Pvecteur.c.

169 {
170  int result = 0;
171  for (; v; v=v->succ)
172  result += sizeof(Svecteur);
173  return result;
174 }
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

References Svecteur::succ.

Referenced by contrainte_gen_allocated_memory(), initialize_newgen(), monome_gen_allocated_memory(), pips_init(), and sc_gen_allocated_memory().

+ Here is the caller graph for this function:

◆ vect_gen_copy_tree()

Pvecteur vect_gen_copy_tree ( Pvecteur  v)

Definition at line 163 of file Pvecteur.c.

164 {
165  return vect_copy(v);
166 }
Pbase vect_copy(Pvecteur b)
direct duplication.
Definition: alloc.c:240

References vect_copy().

Referenced by initialize_newgen(), main(), and pips_init().

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

◆ vect_gen_free()

void vect_gen_free ( Pvecteur  v)

Definition at line 158 of file Pvecteur.c.

159 {
160  vect_rm(v);
161 }
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;
Definition: alloc.c:78

References vect_rm().

Referenced by initialize_newgen(), main(), and pips_init().

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

◆ vect_gen_read()

Pvecteur vect_gen_read ( FILE *  ,
int(*)(void)   
)

Referenced by initialize_newgen(), main(), monome_gen_read(), pips_init(), and sc_gen_read().

+ Here is the caller graph for this function:

◆ vect_gen_write()

void vect_gen_write ( FILE *  fd,
Pvecteur  v 
)

Pvecteur.c.

Pvecteur.c.

Parameters
fdd

Definition at line 108 of file Pvecteur.c.

109 {
110  Pvecteur p;
111 
112  putc('(', fd);
113  for (p = v; p != NULL; p = p->succ)
114  {
115  fprint_Value(fd, val_of(p));
116  putc(' ', fd);
117  print_token(fd, (p->var == (Variable) 0) ? TCST_NAME :
118  entity_name((entity) p->var));
119  putc(' ', fd);
120  }
121  putc(')', fd);
122 }
static void print_token(FILE *fd, string s)
print token
Definition: Pvecteur.c:53
#define TCST_NAME
Definition: Pvecteur.c:50
void fprint_Value(FILE *, Value)
Definition: io.c:42
#define entity_name(x)
Definition: ri.h:2790
Variable var
Definition: vecteur-local.h:90
#define val_of(varval)
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

References entity_name, fprint_Value(), print_token(), Svecteur::succ, TCST_NAME, val_of, and Svecteur::var.

Referenced by initialize_newgen(), main(), monome_gen_write(), pips_init(), and sc_gen_write().

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