PandA-2024.02
Public Member Functions | Friends
OpGraph Struct Reference

Class used to describe a particular graph with operations as nodes. More...

#include <op_graph.hpp>

Inheritance diagram for OpGraph:
Inheritance graph
[legend]
Collaboration diagram for OpGraph:
Collaboration graph
[legend]

Public Member Functions

 OpGraph (const OpGraphsCollectionRef _op_graphs_collection, int selector)
 Standard constructor. More...
 
 OpGraph (const OpGraphsCollectionRef _op_graphs_collection, int selector, const CustomUnorderedSet< boost::graph_traits< OpGraphsCollection >::vertex_descriptor > &sub)
 Sub-graph constructor. More...
 
 ~OpGraph () override
 Destructor. More...
 
void WriteDot (const std::string &file_name, const int detail_level=0) const
 Writes this graph in dot format. More...
 
OpNodeInfoRef GetOpNodeInfo (const vertex node)
 Returns the info associated with a node. More...
 
const OpNodeInfoConstRef CGetOpNodeInfo (const vertex node) const
 Returns the info associated with a node. More...
 
const OpEdgeInfoConstRef CGetOpEdgeInfo (const EdgeDescriptor edge) const
 Returns the info associated with an edge. More...
 
OpGraphInfoRef GetOpGraphInfo ()
 Returns the property associated with the graph. More...
 
const OpGraphInfoConstRef CGetOpGraphInfo () const
 Returns the property associated with the graph. More...
 
OpGraphInfoRef CGetOpGraphInfo ()
 Returns the property associated with the graph. More...
 
CustomUnorderedMap< vertex, OpVertexSetGetSrcVertices (const OpVertexSet &toCheck, int edgeType) const
 Given a set of vertices, this function computes the edges which have the target in the set and the source outside: these edges are returned in the form vertex,vertex. More...
 
const OpVertexSet CGetOperations () const
 Return the vertices belonging to the graph. More...
 
OpEdgeSet CGetInEdges (const vertex v) const
 Return the edge ingoing in a vertex. More...
 
OpEdgeSet CGetOutEdges (const vertex v) const
 Return the edge outgoing from a vertex. More...
 
- Public Member Functions inherited from graph
virtual ~graph ()=default
 Destructor. More...
 
bool is_in_subset (const boost::graph_traits< graph >::vertex_descriptor v) const
 return true in case the vertex is a vertex of the subgraph. More...
 
int GetSelector () const
 Return the selector of this graph. More...
 
int GetSelector (const edge_descriptor e) const
 Return the selectors associated with an edge. More...
 
int GetSelector (const boost::graph_traits< graphs_collection >::vertex_descriptor source, const boost::graph_traits< graphs_collection >::vertex_descriptor target) const
 Return the selectors associated with an edge. More...
 
void GetStronglyConnectedComponents (std::map< size_t, UnorderedSetStdStable< boost::graph_traits< graphs_collection >::vertex_descriptor >> &strongly_connected_components) const
 Compute the strongly connected components of the graph. More...
 
void BreadthFirstSearch (const boost::graph_traits< graphs_collection >::vertex_descriptor node, boost::bfs_visitor<> *vis) const
 Compute the breadth first search. More...
 
void ReverseTopologicalSort (std::deque< boost::graph_traits< graphs_collection >::vertex_descriptor > &sorted_vertices) const
 Compute the reverse topological order of the graph. More...
 
void TopologicalSort (std::list< boost::graph_traits< graphs_collection >::vertex_descriptor > &sorted_vertices) const
 Compute the topological order of the graph. More...
 
bool IsReachable (const boost::graph_traits< graphs_collection >::vertex_descriptor x, const boost::graph_traits< graphs_collection >::vertex_descriptor y) const
 Compute if vertex y is reachable from x. More...
 
NodeInfoRef GetNodeInfo (typename boost::graph_traits< graphs_collection >::vertex_descriptor node)
 FIXME: this method should become protected and called by equivalent method in subclasses Get the node property. More...
 
GraphInfoRef GetGraphInfo ()
 FIXME: this method should become protected and called by equivalent method in subclasses Get the graph property. More...
 
const GraphInfoConstRef CGetGraphInfo () const
 FIXME: this method should become protected and called by equivalent method in subclasses Get the graph property. More...
 
template<typename VertexWriterTemplate , typename EdgeWriterTemplate >
void InternalWriteDot (const std::string &file_name, const VertexWriterConstRef vertex_writer, const EdgeWriterConstRef edge_writer) const
 Print the graph in dot format FIXME: this method should become protected and called by WriteDot. More...
 
bool ExistsEdge (const boost::graph_traits< graphs_collection >::vertex_descriptor source, const boost::graph_traits< graphs_collection >::vertex_descriptor target) const
 Check if an edge exists. More...
 
boost::graph_traits< graphs_collection >::edge_descriptor CGetEdge (const boost::graph_traits< graphs_collection >::vertex_descriptor source, const boost::graph_traits< graphs_collection >::vertex_descriptor target) const
 Returns the edge connecting two vertices; throw error if it does not exist. More...
 
 graph (graphs_collection *g, const int _selector)
 Standard constructor. More...
 
 graph (graphs_collection *g, const int _selector, const CustomUnorderedSet< boost::graph_traits< graphs_collection >::vertex_descriptor > &vertices)
 Sub-graph constructor. More...
 

Friends

class Schedule
 Friend declaration of schedule to allow dot writing. More...
 

Additional Inherited Members

- Protected Member Functions inherited from graph
const NodeInfoConstRef CGetNodeInfo (typename boost::graph_traits< graphs_collection >::vertex_descriptor node) const
 Get the node property. More...
 
EdgeInfoRef GetEdgeInfo (typename boost::graph_traits< graphs_collection >::vertex_descriptor source, typename boost::graph_traits< graphs_collection >::vertex_descriptor target)
 Get the edge property. More...
 
const EdgeInfoConstRef CGetEdgeInfo (typename boost::graph_traits< graphs_collection >::vertex_descriptor source, typename boost::graph_traits< graphs_collection >::vertex_descriptor target) const
 Get the edge property. More...
 
EdgeInfoRef GetEdgeInfo (typename boost::graph_traits< graphs_collection >::edge_descriptor edge) const
 Get the edge property. More...
 
EdgeInfoConstRef CGetEdgeInfo (typename boost::graph_traits< graphs_collection >::edge_descriptor edge) const
 Get the edge property. More...
 
template<typename VertexWriterTemplate , typename EdgeWriterTemplate , typename GraphWriterTemplate >
void InternalWriteDot (const std::string &file_name, const VertexWriterConstRef vertex_writer, const EdgeWriterConstRef edge_writer, const GraphWriterConstRef graph_writer) const
 Print the graph in dot format. More...
 
- Protected Attributes inherited from graph
graphs_collectioncollection
 The graph collection. More...
 
const int selector
 selector More...
 

Detailed Description

Class used to describe a particular graph with operations as nodes.

Definition at line 783 of file op_graph.hpp.

Constructor & Destructor Documentation

◆ OpGraph() [1/2]

OpGraph::OpGraph ( const OpGraphsCollectionRef  _op_graphs_collection,
int  selector 
)

Standard constructor.

Parameters
gis the bulk graph.
selectoris the selector used to filter the bulk graph.

Definition at line 322 of file op_graph.cpp.

◆ OpGraph() [2/2]

OpGraph::OpGraph ( const OpGraphsCollectionRef  _op_graphs_collection,
int  selector,
const CustomUnorderedSet< boost::graph_traits< OpGraphsCollection >::vertex_descriptor > &  sub 
)

Sub-graph constructor.

Parameters
gis the bulk graph.
selectoris the selector used to filter the bulk graph.
subis the set of vertices on which the graph is filtered.

Definition at line 327 of file op_graph.cpp.

References ~OpGraph().

Here is the call graph for this function:

◆ ~OpGraph()

OpGraph::~OpGraph ( )
overridedefault

Destructor.

Referenced by OpGraph().

Here is the caller graph for this function:

Member Function Documentation

◆ CGetInEdges()

OpEdgeSet OpGraph::CGetInEdges ( const vertex  v) const

Return the edge ingoing in a vertex.

Parameters
vis the vertex

Definition at line 388 of file op_graph.cpp.

References CGetOutEdges().

Referenced by CGetOperations(), VcdSignalSelection::DetectInvalidReturns(), and cdfc_module_binding::update_slack_starting_time().

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

◆ CGetOpEdgeInfo()

const OpEdgeInfoConstRef OpGraph::CGetOpEdgeInfo ( const EdgeDescriptor  edge) const
inline

Returns the info associated with an edge.

Parameters
edgeis the edge to be analyzed
Returns
the associated property

Definition at line 853 of file op_graph.hpp.

References graph::CGetEdgeInfo().

Here is the call graph for this function:

◆ CGetOperations()

const OpVertexSet OpGraph::CGetOperations ( ) const

Return the vertices belonging to the graph.

Definition at line 376 of file op_graph.cpp.

References CGetInEdges(), and graph::collection.

Referenced by cdfc_module_binding::InternalExec().

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

◆ CGetOpGraphInfo() [1/2]

const OpGraphInfoConstRef OpGraph::CGetOpGraphInfo ( ) const
inline

◆ CGetOpGraphInfo() [2/2]

OpGraphInfoRef OpGraph::CGetOpGraphInfo ( )
inline

Returns the property associated with the graph.

Returns
the graph property

Definition at line 880 of file op_graph.hpp.

◆ CGetOpNodeInfo()

const OpNodeInfoConstRef OpGraph::CGetOpNodeInfo ( const vertex  node) const
inline

Returns the info associated with a node.

Parameters
nodeis the operation to be considered
Returns
the associated property

Definition at line 843 of file op_graph.hpp.

References graph::CGetNodeInfo().

Referenced by conn_binding::add_command_ports(), ASLAP::add_constraints_to_ALAP(), ASLAP::add_constraints_to_ASAP(), fu_binding::add_to_SM(), SDCScheduling::AddDelayConstraints(), mux_connection_binding::address_precision(), fu_binding::bind(), cdfc_module_binding::can_be_clustered(), AllocationInformation::can_implement_set(), Schedule::CanBeMoved(), parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::compute_exec_stage_time(), CWriter::compute_phi_nodes(), parametric_list_based::compute_starting_ending_time_asap(), BB_based_stg::compute_use_def(), CBackend::compute_variables(), Schedule::ComputeCriticalPath(), mux_connection_binding::connect_to_registers(), mux_connection_binding::create_single_conn(), VcdSignalSelection::CrossPropagateAddrSsa(), VcdSignalSelection::DetectInvalidReturns(), mux_connection_binding::determine_connection(), p_update_check::discover_vertex(), parametric_list_based::exec(), fu_binding::get(), fu_binding::get_assign(), AllocationInformation::get_attribute_of_fu_per_op(), CallGraphManager::get_called_by(), StorageValueInformation::get_compatibility_weight(), Schedule::get_cstep(), Schedule::get_cstep_end(), AllocationInformation::get_cycles(), AllocationInformation::get_execution_time(), fsm_controller::get_guard_value(), fu_binding::get_index(), AllocationInformation::get_initiation_time(), prettyPrintVertex::get_internal_vars(), HLS_manager::get_required_values(), AllocationInformation::get_stage_period(), AllocationInformation::GetNodeTypePrec(), application_manager::GetProducedValue(), StorageValueInformation::Initialize(), cdfc_module_binding::initialize_connection_relation(), OmpAllocation::IntegrateTechnologyLibraries(), pipeline_controller::InternalExec(), FSM_NI_SSA_liveness::InternalExec(), AddArtificialCallFlowEdges::InternalExec(), AddOpPhiFlowEdges::InternalExec(), AddOpExitFlowEdges::InternalExec(), VarComputation::InternalExec(), port_swapping::InternalExec(), SDCScheduling::InternalExec(), cdfc_module_binding::InternalExec(), fu_binding::is_assigned(), AllocationInformation::is_operation_bounded(), AllocationInformation::is_operation_PI_registered(), Schedule::is_scheduled(), AllocationInformation::is_vertex_bounded_with(), AllocationInformation::max_number_of_resources(), AllocationInformation::min_number_of_resources(), OpWriter::operator()(), fu_binding::operator[](), Schedule::print(), BehavioralHelper::print_vertex(), VcdSignalSelection::PropagateAddrParamToSsa(), VcdSignalSelection::SelectInitialSsa(), Schedule::set_execution(), Schedule::set_execution_end(), parametric_list_based::store_in_chaining_with_load_in(), parametric_list_based::store_in_chaining_with_load_out(), cdfc_module_binding::weight_computation(), DiscrepancyAnalysisCWriter::writePostInstructionInfo(), DiscrepancyAnalysisCWriter::writePreInstructionInfo(), EdgeCWriter::writeRoutineInstructions_rec(), and CWriter::writeRoutineInstructions_rec().

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

◆ CGetOutEdges()

OpEdgeSet OpGraph::CGetOutEdges ( const vertex  v) const

Return the edge outgoing from a vertex.

Parameters
vis the vertex

Definition at line 407 of file op_graph.cpp.

References CGetOpGraphInfo(), graph::collection, test_panda::full_name, BehavioralHelper::get_function_name(), graphs_collection::parameters, and WriteDot().

Referenced by CGetInEdges(), and cdfc_module_binding::update_slack_starting_time().

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

◆ GetOpGraphInfo()

OpGraphInfoRef OpGraph::GetOpGraphInfo ( )
inline

Returns the property associated with the graph.

Returns
the property associated with the graph

Definition at line 862 of file op_graph.hpp.

◆ GetOpNodeInfo()

OpNodeInfoRef OpGraph::GetOpNodeInfo ( const vertex  node)
inline

Returns the info associated with a node.

Parameters
nodeis the operation to be considered
Returns
the associated property

Definition at line 833 of file op_graph.hpp.

References graph::GetNodeInfo().

Here is the call graph for this function:

◆ GetSrcVertices()

CustomUnorderedMap< vertex, OpVertexSet > OpGraph::GetSrcVertices ( const OpVertexSet toCheck,
int  edgeType 
) const

Given a set of vertices, this function computes the edges which have the target in the set and the source outside: these edges are returned in the form vertex,vertex.

Actually the map returned is indexed by the source vertex and contains the set of vertices, inside toCheck, which are targets of the edges starting from the vertex key of the map.

Parameters
toCheckis the set of vertices to be considered as taarget
edgeTypeis the type of edges to be considered

Definition at line 350 of file op_graph.cpp.

References graph::GetSelector().

Here is the call graph for this function:

◆ WriteDot()

void OpGraph::WriteDot ( const std::string &  file_name,
const int  detail_level = 0 
) const

Writes this graph in dot format.

Parameters
file_nameis the file where the graph has to be printed
detail_levelis the detail level of the printed graph

Definition at line 335 of file op_graph.cpp.

References CGetOpGraphInfo(), graph::collection, test_panda::full_name, BehavioralHelper::get_function_name(), and graphs_collection::parameters.

Referenced by CGetOutEdges(), and SDCScheduling::InternalExec().

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

Friends And Related Function Documentation

◆ Schedule

friend class Schedule
friend

Friend declaration of schedule to allow dot writing.

Definition at line 786 of file op_graph.hpp.


The documentation for this struct was generated from the following files:

Generated on Mon Feb 12 2024 13:03:59 for PandA-2024.02 by doxygen 1.8.13