CGRA-ME
Classes | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
PathFinder Class Reference

Implementation of the. More...

#include <ClusteredMapper.h>

Inheritance diagram for PathFinder:
ClusteredMapperDriver

Classes

struct  UnmappableException
 

Public Member Functions

 PathFinder (ClusteredMapperDriver driver, const OpGraph &opgraph, const MRRG &mrrg, bool isElastic=false, const std::string placement_filename="")
 
Mapping routeOpGraph (Mapping placement)
 

Static Public Attributes

static constexpr Latency kUndefLatency = -1
 

Private Member Functions

void parsePlacementFile ()
 
void printNumberOfResourcesUsed ()
 
bool routeVal (OpGraphValDesc)
 
std::vector< const MRRGNode * > dijkstraVisit (const MRRGNode *, const MRRGNode *, OperandTag, OpGraphValDesc, std::set< const MRRGNode * >, int, int)
 
void mapMRRGNode (OpGraphValDesc, const MRRGNode *)
 
bool isOpgraphCovered ()
 
bool checkOveruse ()
 
double getCost (const MRRGNode *)
 
void ripUpOpVal (OpGraphValDesc)
 
void setMappingInto (Mapping &m) const
 
- Private Member Functions inherited from ClusteredMapperDriver
 ClusteredMapperDriver (std::shared_ptr< CGRA > cgra, int timelimit, const ConfigStore &args)
 
Mapping mapOpGraph (std::shared_ptr< OpGraph > opgraph, const int II, const MRRG &mrrg, std::unordered_map< std::string, std::string > fix_port) override
 main function to map the OpGraph to the device description More...
 
Mapping mapStatic (std::shared_ptr< OpGraph > opgraph, const int II, const MRRG &mrrg, std::unordered_map< std::string, std::string > fix_port, PrintOnDestructionChronoSequence &timing_seq)
 
Mapping mapElastic (std::shared_ptr< OpGraph > opgraph, const int II, const MRRG &mrrg, std::unordered_map< std::string, std::string > fix_port, PrintOnDestructionChronoSequence timing_seq)
 
const Latency getCyclesToSink (OpGraphOpDesc source, OpGraphOpDesc sink)
 
bool isAllOpsSupported (const OpGraph &opgraph, const MRRG &mrrg)
 
void printPlacementNeato (int i, const OpGraph &opgraph, Mapping placed, std::unordered_map< OpGraphOpDesc, int > sched)
 
- Private Member Functions inherited from Mapper
virtual ~Mapper ()
 
 Mapper (std::shared_ptr< CGRA > cgra, int timelimit)
 

Private Attributes

bool l_isElastic
 
double l_p_factor
 
double l_h_factor
 
const MRRGl_mrrg
 
const OpGraphl_opgraph
 
std::string l_placement_filename
 
std::vector< MRRGNodeDescl_critical_path
 
std::set< MRRGNodeDescl_used_rounting_function_nodes
 
std::map< const OpGraphNode *, const MRRGNode * > l_placement
 
std::unordered_map< const MRRGNode *, NodeAttributesl_routing_nodes
 
std::map< OpGraphValDesc, std::vector< const MRRGNode * > > l_mapping = {}
 
- Private Attributes inherited from ClusteredMapperDriver
const int l_print
 
const int l_rand_seed
 
const double l_p_factor_factor
 
const double l_initial_pfactor
 
const double l_initial_hfactor
 
const double l_h_factor_factor
 
const int l_swap_factor
 
const int l_fanout_threshold
 
const int l_ram_ports
 
const int l_verbosity
 
const bool l_cluster
 
bool l_isElastic
 
int l_iteration_interval
 
const std::string l_arch_name
 
const ConfigStore l_mapper_args
 
const int l_cost_func
 
OpSchedulerl_op_sched
 
std::vector< std::vector< OpGraphOpDesc > > l_clusters
 
std::map< OpGraphOpDesc, int > l_op_cluster_index
 
std::unordered_map< OpGraphOpDesc, std::vector< std::string > > l_ops_to_node_names
 
std::unordered_map< OpGraphOpDesc, int > l_schedule
 
Mapping l_empty_mapping_result
 
- Private Attributes inherited from Mapper
std::shared_ptr< CGRAcgra
 
int timelimit
 

Additional Inherited Members

- Static Private Attributes inherited from ClusteredMapperDriver
static constexpr Latency kUndefLatency = -1
 

Detailed Description

Implementation of the.

Instatiated for every mapping call. Inherits from the driver to get easy access to configuration members.

Definition at line 119 of file ClusteredMapper.h.

Constructor & Destructor Documentation

◆ PathFinder()

PathFinder::PathFinder ( ClusteredMapperDriver  driver,
const OpGraph opgraph,
const MRRG mrrg,
bool  isElastic = false,
const std::string  placement_filename = "" 
)

Definition at line 29 of file Pathfinder.cpp.

Member Function Documentation

◆ checkOveruse()

bool PathFinder::checkOveruse ( )
private

Definition at line 176 of file Pathfinder.cpp.

◆ dijkstraVisit()

std::vector< const MRRGNode * > PathFinder::dijkstraVisit ( const MRRGNode ,
const MRRGNode ,
OperandTag  ,
OpGraphValDesc  ,
std::set< const MRRGNode * >  ,
int  ,
int   
)
private

A single-threaded visit in dijkstra's algorithm-order over graph, starting at the vertices in initial_list.

Definition at line 317 of file Pathfinder.cpp.

◆ getCost()

double PathFinder::getCost ( const MRRGNode n)
private

Definition at line 225 of file Pathfinder.cpp.

◆ isOpgraphCovered()

bool PathFinder::isOpgraphCovered ( )
private

Definition at line 152 of file Pathfinder.cpp.

◆ mapMRRGNode()

void PathFinder::mapMRRGNode ( OpGraphValDesc  ,
const MRRGNode  
)
private

Definition at line 236 of file Pathfinder.cpp.

◆ parsePlacementFile()

void PathFinder::parsePlacementFile ( )
private

Definition at line 474 of file Pathfinder.cpp.

◆ printNumberOfResourcesUsed()

void PathFinder::printNumberOfResourcesUsed ( )
private

Definition at line 163 of file Pathfinder.cpp.

◆ ripUpOpVal()

void PathFinder::ripUpOpVal ( OpGraphValDesc  )
private

Definition at line 199 of file Pathfinder.cpp.

◆ routeOpGraph()

Mapping PathFinder::routeOpGraph ( Mapping  placement)

Definition at line 51 of file Pathfinder.cpp.

◆ routeVal()

bool PathFinder::routeVal ( OpGraphValDesc  )
private

Definition at line 242 of file Pathfinder.cpp.

◆ setMappingInto()

void PathFinder::setMappingInto ( Mapping m) const
inlineprivate

Definition at line 149 of file ClusteredMapper.h.

Member Data Documentation

◆ kUndefLatency

constexpr Latency PathFinder::kUndefLatency = -1
staticconstexpr

Definition at line 121 of file ClusteredMapper.h.

◆ l_critical_path

std::vector<MRRGNodeDesc> PathFinder::l_critical_path
private

Definition at line 163 of file ClusteredMapper.h.

◆ l_h_factor

double PathFinder::l_h_factor
private

Definition at line 159 of file ClusteredMapper.h.

◆ l_isElastic

bool PathFinder::l_isElastic
private

Definition at line 157 of file ClusteredMapper.h.

◆ l_mapping

std::map<OpGraphValDesc, std::vector<const MRRGNode*> > PathFinder::l_mapping = {}
private

Definition at line 167 of file ClusteredMapper.h.

◆ l_mrrg

const MRRG& PathFinder::l_mrrg
private

Definition at line 160 of file ClusteredMapper.h.

◆ l_opgraph

const OpGraph& PathFinder::l_opgraph
private

Definition at line 161 of file ClusteredMapper.h.

◆ l_p_factor

double PathFinder::l_p_factor
private

Definition at line 158 of file ClusteredMapper.h.

◆ l_placement

std::map<const OpGraphNode*, const MRRGNode*> PathFinder::l_placement
private

Definition at line 165 of file ClusteredMapper.h.

◆ l_placement_filename

std::string PathFinder::l_placement_filename
private

Definition at line 162 of file ClusteredMapper.h.

◆ l_routing_nodes

std::unordered_map<const MRRGNode*, NodeAttributes> PathFinder::l_routing_nodes
private

Definition at line 166 of file ClusteredMapper.h.

◆ l_used_rounting_function_nodes

std::set<MRRGNodeDesc> PathFinder::l_used_rounting_function_nodes
private

Definition at line 164 of file ClusteredMapper.h.


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