PIPS
constraint.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "linear.h"
#include "genC.h"
#include "properties.h"
#include "misc.h"
#include "ri.h"
#include "ri-util.h"
+ Include dependency graph for constraint.c:

Go to the source code of this file.

Functions

void vect_debug (Pvecteur v)
 constraint.c More...
 
int compare_Pvecteur (Pvecteur *pv1, Pvecteur *pv2)
 comparison function for Pvecteur in pips, to be used by qsort. More...
 
bool vecteur_nul_p (Pvecteur v)
 

Function Documentation

◆ compare_Pvecteur()

int compare_Pvecteur ( Pvecteur pv1,
Pvecteur pv2 
)

comparison function for Pvecteur in pips, to be used by qsort.

Parameters
pv1v1
pv2v2

Definition at line 50 of file constraint.c.

51 {
52  return compare_entities((const entity*)&var_of(*pv1),
53  (const entity*)&var_of(*pv2));
54 }
int compare_entities(const entity *pe1, const entity *pe2)
Comparison function for qsort.
Definition: entity.c:1328
#define var_of(varval)

References compare_entities(), and var_of.

Referenced by constraints_to_loop_bound(), generate_io_collect_or_update(), generate_io_system(), and make_vecteur_expression().

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

◆ vect_debug()

void vect_debug ( Pvecteur  v)

constraint.c

Definition at line 43 of file constraint.c.

44 {
46 }
void vect_fprint(FILE *f, Pvecteur v, get_variable_name_t variable_name)
void vect_fprint(FILE * f, Pvecteur v, char * (*variable_name)()): impression d'un vecteur creux v su...
Definition: io.c:124
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
char *(* get_variable_name_t)(Variable)
Definition: vecteur-local.h:62

References entity_local_name(), and vect_fprint().

Referenced by print_normalized(), PrintLinExpr(), sc_proj_optim_on_di_ofl(), simple_indices_p(), and TestDependence().

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

◆ vecteur_nul_p()

bool vecteur_nul_p ( Pvecteur  v)

Definition at line 56 of file constraint.c.

57 {
58  return VECTEUR_NUL_P(v) ||
59  // is this possible?
60  (!v->succ && var_of(v)==TCST && val_of(v)==0);
61 }
struct Svecteur * succ
Definition: vecteur-local.h:92
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define val_of(varval)
#define VECTEUR_NUL_P(v)

References Svecteur::succ, TCST, val_of, var_of, and VECTEUR_NUL_P.

Referenced by generate_subarray_shift(), and subarray_shift_assignment_p().

+ Here is the caller graph for this function: