Polaris: DDgraph.h File Reference

DDgraph.h File Reference

Go to the source code of this file.

Enumerations

enum  DDtests_Seq {
  _None,
  _GCD_Only,
  _Banerjee_Only,
  _Omega_Only,
  _GCD_Banerjee,
  _Banerjee_Omega,
  _GCD_Omega,
  _All
}
enum  DDI_INIT_TYPE {
  _STMTS,
  _EXPR
}
enum  In_Out_refs {
  _IN_REFS,
  _OUT_REFS
}
enum  First_Last {
  _FIRST,
  _LAST
}

Functions

void merge_DVs (List< DVfield > &dvfs)
 _dispose_capsules() recursively deletes all the DVcapsules hanging to the corresponding Slots
void _dispose_capsules (DVcapsule *&dvc)
 With (<=, *) and (=, <>), the second is the proper subdirection.
void _remove_all_subdirections (DVcapsule **Slots, int levels)
 Find the parent node, if any, for 'dvc' and some DVcapsule in 'list', and create the new DVcapsule for that and add the the parent slot, 'Slot'.
DVcapsule_create_parent (DVcapsule *&Slot, DVcapsule *dvc, DVcapsule *list)
 _is_parent_for() _is_subdirecion() and _is_same() are used in merge_DVs() only
Binary_flag _is_parent_for (Iterator< ElementDV > &citer, Iterator< ElementDV > &piter)
Binary_flag _is_same (Iterator< ElementDV > &iter1, Iterator< ElementDV > &iter2)
Binary_flag _is_subdirecion (Iterator< ElementDV > &iter1, Iterator< ElementDV > &iter2)
 ///////////////////// Implementation
void ddtests_main (Program &, DDtests_Seq, Binary_flag)

Variables

class class class typedef
signed char 
Binary_flag
 Used for flags with on/off as its values.


Enumeration Type Documentation

enum DDtests_Seq
 

Enumeration values:
_None  Specify the sequence of the dd-tests to be used Currently the sequence is fixed, and the only option uesr might choose is what tests are included and omitted in this fixed sequence.
_GCD_Only  Constant_test included here.
_Banerjee_Only 
_Omega_Only 
_GCD_Banerjee 
_Banerjee_Omega 
_GCD_Omega 
_All 

Definition at line 64 of file DDgraph.h.

enum DDI_INIT_TYPE
 

Enumeration values:
_STMTS  DDiterator object is initialized tells how 'from/to'-statement of.
_EXPR 

Definition at line 79 of file DDgraph.h.

enum In_Out_refs
 

Enumeration values:
_IN_REFS  Used only in DDiterator.
_OUT_REFS 

Definition at line 86 of file DDgraph.h.

enum First_Last
 

Enumeration values:
_FIRST  Used in compute_dvf_n_arc().
_LAST 

Definition at line 92 of file DDgraph.h.


Function Documentation

void merge_DVs List< DVfield > &  dvfs  ) 
 

_dispose_capsules() recursively deletes all the DVcapsules hanging to the corresponding Slots

single direction is '<', '>' & '='. And star is '*'... This _SLOT is used in 'merge_DVs' only..

Iterator<DVfield> copy_iter(&dvfs);

Now, 'dvfs' is empty and the original list is stored in 'original_dvfs'

... The DV fields with the same dimension of their direction vectors ... are now collected in 'work_dvfs' grabbed from 'original_dvfs'

... One more slot allocated for Top level direction (*,*,...,*)

... Initialized to be empty

... Encapsulate each DVfield node in a DVcapsule and ... store it in the appropriatte slot.

... Top level is not empty

... Now back to the loop control: Skip

... Now, do top-to-bottom search to eliminate all the subdirections.

... Now, do bottom-to-top search to find the minimal merged directions set ... Create parents with the DVfields in my slot

... dead

... Create parents with the DVfields in the child slot

... Remove all the DVcapsules marked dead in this slot

... dead

... Now, do top-to-bottom search to eliminate all the subdirections.

... Store all DVfields in the capsules alive

... Clean up

Definition at line 48 of file DDgraph.cc.

References _create_parent(), _dispose_capsules(), _GE, _LE, _NEQ, _remove_all_subdirections(), _STAR, Iterator< T >::current(), DVfield::dep_decided(), DVfield::dep_type(), ElementDV::direction(), DVfield::dv(), DVcapsule::dvf, List< T >::entries(), DVfield::from_expr(), Mutator< T >::grab(), List< T >::ins_first(), List< T >::ins_last(), DVcapsule::is_alive(), DVcapsule::mark_dead(), DVcapsule::next, Iterator< T >::reset(), DVfield::to_expr(), and Iterator< T >::valid().

Referenced by DDgraphTester::merge_DVF().

void _dispose_capsules DVcapsule *&  dvc  ) 
 

With (<=, *) and (=, <>), the second is the proper subdirection.

Nonproper subdirection will also be removed; that means the same directions are to be removed such as (<, >=) & (<, >=).

Definition at line 241 of file DDgraph.cc.

References _dispose_capsules(), and DVcapsule::dvf.

Referenced by _dispose_capsules(), and merge_DVs().

void _remove_all_subdirections DVcapsule **  Slots,
int  levels
 

Find the parent node, if any, for 'dvc' and some DVcapsule in 'list', and create the new DVcapsule for that and add the the parent slot, 'Slot'.

... Delete nonproper subexpressions, if any

Definition at line 476 of file DDgraph.cc.

References _is_same(), _is_subdirecion(), DVfield::dv(), DVcapsule::dvf, and DVcapsule::next.

Referenced by merge_DVs().

DVcapsule* _create_parent DVcapsule *&  Slot,
DVcapsule dvc,
DVcapsule list
 

_is_parent_for() _is_subdirecion() and _is_same() are used in merge_DVs() only

... Only one different direction allowed

... Now, create new parent capsule node and add it to Slot

Definition at line 253 of file DDgraph.cc.

References _EQ, _GE, _GT, _LE, _LT, _NEQ, _STAR, Binary_flag, Iterator< T >::current(), ElementDV::direction(), DVfield::dv(), DVcapsule::dvf, Iterator< T >::end(), List< T >::ins_last(), ElementDV::listable_clone(), DVcapsule::next, Iterator< T >::next(), Iterator< T >::reset(), and Iterator< T >::valid().

Referenced by merge_DVs().

Binary_flag _is_parent_for Iterator< ElementDV > &  citer,
Iterator< ElementDV > &  piter
 

... == _STAR

... Every direction is the same but only one covered by parent

Definition at line 424 of file DDgraph.cc.

References _EQ, _GE, _GT, _LE, _LT, _NEQ, and _STAR.

Binary_flag _is_same Iterator< ElementDV > &  iter1,
Iterator< ElementDV > &  iter2
[inline]
 

Definition at line 1387 of file DDgraph.h.

References Binary_flag.

Referenced by _remove_all_subdirections().

Binary_flag _is_subdirecion Iterator< ElementDV > &  iter1,
Iterator< ElementDV > &  iter2
 

///////////////////// Implementation

Definition at line 377 of file DDgraph.cc.

References _EQ, _GE, _GT, _LE, _LT, and _NEQ.

Referenced by _remove_all_subdirections().

void ddtests_main Program ,
DDtests_Seq  ,
Binary_flag 
 

Referenced by main().


Variable Documentation

class class class class typedef signed char Binary_flag
 

Used for flags with on/off as its values.

Definition at line 58 of file DDgraph.h.

Referenced by _create_parent(), _is_same(), DDgraph::DDgraph(), and DVcapsule::is_alive().

 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:06:19 2005