networks/onchipcommunication/ChannelDependencyGraph.h

Go to the documentation of this file.
00001 //============================================================================
00002 // Author      : Alessandro Pinto <apinto@eecs.berkeley.edu>
00003 //               University of California, Berkeley
00004 //               545 Cory Hall, Berkeley, CA 94720
00005 // Copyright   : See COPYING file that comes with this distribution
00006 //============================================================================
00007 
00008 
00009 #include <iostream>
00010 #include <vector>
00011 #include <map>
00012 #include <string>
00013 #include <queue>
00014 #include "core/IdGraph.h"
00015 
00016 #ifndef CHANNELDEPENDENCYGRAPH_H_
00017 #define CHANNELDEPENDENCYGRAPH_H_
00018 
00019 namespace cosi {
00020 
00021 namespace commstruct {
00022 
00023 namespace onchipcommunication {
00024 
00025 using namespace std ;
00026 
00041 class ChannelDependencyGraph : public IdGraph
00042 {
00043 public:
00044 
00046   ChannelDependencyGraph( string Name ) ;
00048   ~ChannelDependencyGraph ( ) ;
00049 
00051   void Union( ChannelDependencyGraph G ) ;
00052 
00054   void AddChannel( pair<int,int> pChannel );
00055 
00057   bool InC( pair<int,int> pChannel ) ;
00058 
00060   bool InD( pair<int,int> pChannel1 , pair<int,int> pChannel2 )  ;
00061 
00063   void AddDependency( pair<int,int> pChannel1 , pair<int,int> pChannel2 ) ;
00064 
00065   void RemoveDependency( pair<int,int> pChannel1 , pair<int,int> pChannel2 ) ;
00066 
00067   vector< pair< int , int > > GetChannels( )   ;
00068 
00069   //list_iterator in_begin( pair<int,int> pChannel ) ;
00070   //list_iterator in_end( pair<int,int> pChannel ) ;
00071   //list_iterator out_begin( pair<int,int> pChannel ) ;
00072   //list_iterator out_end( pair<int,int> pChannel ) ;
00073 
00074   bool Reachable( pair<int, int > pChannel1 , pair<int,int> pChannel2 ) ;
00075 
00076   bool Cyclic( ) ;
00077 
00078  private:
00079 
00080   map< pair< int , int > , int > mChannelToVertex ;
00081 
00082 } ;
00083 }
00084 }
00085 }
00086 
00087 
00088 #endif /*CHANNELDEPENDENCYGRAPH_H_*/

Generated on Sun Sep 7 18:37:42 2008 for COSI by  doxygen 1.5.4
Contact 
©2002-2018 U.C. Regents