INFO_EDGE Class Reference


Detailed Description

This class represents the attributes (information) attached to an edge in a DDG.

Author:
Sid Touati
Each edge $ e $ (data dependence or serial edge) has basically three attributes :
Examples:

loop_example.cpp.

Definition at line 84 of file info_edge.h.


Public Member Functions

Creation


 INFO_EDGE ()
 Constructor by default.
 INFO_EDGE (edge_type et)
 Constructor with edge type.
 INFO_EDGE (int dur, int dis, edge_type et)
 Constructor with latency, distance and edge type.
 INFO_EDGE (int dur, edge_type et)
 Constructor with latency and edge type.
 INFO_EDGE (const INFO_EDGE &ie)
Access Operations


bool is_flow () const
 Returns true if the edge is a flow dependence (throug registers or memory).
edge_type etype () const
 Returns the type of the edge (flow, serial, antidep, ...).
int delta () const
 Returns the latency of the edge.
int lambda () const
 Returns the distance of the edge in terms of iterations.
bool check ()
 A simple check method that returns true if the object seems ok.
int get_register_type_id () const
 Returns the register type id of the flowdep_reg edge.
bool is_flow_reg (int regtypeid) const
 Returns true if the edge is a flowdep_reg on the given register type.
bool is_flow_reg () const
 Returns true if the edge is a flowdep_reg.
bool is_dep_reg () const
 Returns true if the edge is a dependence on a register (all type of dependences on registers).
Update Operations


void set_etype (const edge_type &et)
 Sets the edge type.
bool set_register_type_id (int regtypeid)
 set a register type for the edge if it is a dependence through registers.
void set_delta (int val)
 Sets the edge latency.
void set_lambda (int lambda)
 Sets the edge distance.

Friends

Input/Output stream operations


ostream & operator<< (ostream &os, INFO_EDGE x)
istream & operator>> (istream &is, INFO_EDGE &x)

Related Functions

(Note that these are not member functions.)

bool operator== (const INFO_EDGE, const INFO_EDGE)

Constructor & Destructor Documentation

INFO_EDGE (  ) 

Constructor by default.

It sets the latency and the distance to 0 and the edge type to serial

INFO_EDGE ( edge_type  et  ) 

Constructor with edge type.

The latency and the distance are set to 0.

INFO_EDGE ( int  dur,
edge_type  et 
)

Constructor with latency and edge type.

The distance is set to 0.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
INFO_EDGE  x 
) [friend]

Output stream of the edge attribute. Prints $ \delta(e) \lambda(e) $ and its edge_type as a string ("flow", "serial, ...).

istream& operator>> ( istream &  is,
INFO_EDGE x 
) [friend]

Input stream of the edge attribute. Reads $ \delta(e) \lambda(e) $ and its edge_type as a string ("flow", "serial, ...).

bool operator== ( const   INFO_EDGE,
const   INFO_EDGE 
) [related]

Returns True if two edge attributes are assumed equal : they should have the same latency ($ \delta $)) and the same distance ($ \lambda $).


January 2009, by Sid Touati (Copyright INRIA and University of Versailles)