CGRA-ME
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
OpScheduler Class Reference

#include <OpScheduler.h>

Public Types

using opPair = std::pair< OpGraphOp *, OpGraphOp * >
 

Public Member Functions

 OpScheduler (const OpGraph &opgraph, const MRRG &mrrg, std::string arch_name, std::string supported_ops_file_name="")
 
 ~OpScheduler ()
 
int addOpConstr (GRBmodel *model, unsigned II, int max_step, bool ignore_backedge, int exit_id)
 
int calcEdgeDist (OpGraphVal *val, OpGraphOp *sink_op, unsigned II, bool ignore_backedge)
 
int calcNodePrio (OpGraphOp *, int)
 
void parseNetworkSchedule (std::string netwrok_latency_filename)
 
bool isBackEdge (OpGraphOp *)
 
int schedASLAP (unsigned II, unsigned max_cycles, SchedType algo)
 
int schedSDCMod (unsigned II, SchedType algo)
 
void buildLastUseTable (int &ext_node_count, int exit_id, std::map< OpGraphOp *, int > &last_use)
 
int addLastUseConstr (GRBmodel *model, std::map< OpGraphOp *, int > last_use)
 
int getLowerBoundEdge (OpGraphOpCode op1, OpGraphOpCode op2)
 
std::unordered_map< const OpGraphOp *, int > getSchedule (SchedType type)
 
int calcLowerBound (OpGraphOp *op)
 

Public Attributes

std::unordered_map< opPair, int, pair_hashextended_sched_const
 

Private Attributes

const OpGraphop_graph
 
const MRRGmrrg
 
std::unordered_map< const OpGraphOp *, int > asap_schedule
 
std::unordered_map< const OpGraphOp *, int > alap_schedule
 
std::unordered_map< const OpGraphOp *, int > sdc_mod_schedule
 
std::unordered_map< const OpGraphOp *, int > sdc_lro_schedule
 
std::vector< const MRRGNode * > function_nodes
 
std::unordered_map< const OpGraphOp *, int > schedule
 
std::unordered_map< OpGraphOpCode, int > op_latency
 
std::unordered_map< OpCodeEdge, int, pair_hashlower_bound_op_code_edge
 
std::unordered_map< OpCodeEdge, int, pair_hashupper_bound_op_code_edge
 

Detailed Description

Definition at line 39 of file OpScheduler.h.

Member Typedef Documentation

◆ opPair

using OpScheduler::opPair = std::pair<OpGraphOp*, OpGraphOp*>

Definition at line 88 of file OpScheduler.h.

Constructor & Destructor Documentation

◆ OpScheduler()

OpScheduler::OpScheduler ( const OpGraph opgraph,
const MRRG mrrg,
std::string  arch_name,
std::string  supported_ops_file_name = "" 
)

Definition at line 30 of file OpScheduler.cpp.

◆ ~OpScheduler()

OpScheduler::~OpScheduler ( )
inline

Definition at line 46 of file OpScheduler.h.

Member Function Documentation

◆ addLastUseConstr()

int OpScheduler::addLastUseConstr ( GRBmodel *  model,
std::map< OpGraphOp *, int >  last_use 
)

Definition at line 403 of file OpScheduler.cpp.

◆ addOpConstr()

int OpScheduler::addOpConstr ( GRBmodel *  model,
unsigned  II,
int  max_step,
bool  ignore_backedge,
int  exit_id 
)

Definition at line 161 of file OpScheduler.cpp.

◆ buildLastUseTable()

void OpScheduler::buildLastUseTable ( int &  ext_node_count,
int  exit_id,
std::map< OpGraphOp *, int > &  last_use 
)

Definition at line 381 of file OpScheduler.cpp.

◆ calcEdgeDist()

int OpScheduler::calcEdgeDist ( OpGraphVal val,
OpGraphOp sink_op,
unsigned  II,
bool  ignore_backedge 
)

Definition at line 117 of file OpScheduler.cpp.

◆ calcLowerBound()

int OpScheduler::calcLowerBound ( OpGraphOp op)

Definition at line 99 of file OpScheduler.cpp.

◆ calcNodePrio()

int OpScheduler::calcNodePrio ( OpGraphOp op,
int  step 
)

Definition at line 376 of file OpScheduler.cpp.

◆ getLowerBoundEdge()

int OpScheduler::getLowerBoundEdge ( OpGraphOpCode  op1,
OpGraphOpCode  op2 
)
inline

Definition at line 74 of file OpScheduler.h.

◆ getSchedule()

std::unordered_map< const OpGraphOp *, int > OpScheduler::getSchedule ( SchedType  type)

Definition at line 643 of file OpScheduler.cpp.

◆ isBackEdge()

bool OpScheduler::isBackEdge ( OpGraphOp op)

Definition at line 81 of file OpScheduler.cpp.

◆ parseNetworkSchedule()

void OpScheduler::parseNetworkSchedule ( std::string  netwrok_latency_filename)

Definition at line 54 of file OpScheduler.cpp.

◆ schedASLAP()

int OpScheduler::schedASLAP ( unsigned  II,
unsigned  max_cycles,
SchedType  algo 
)

Definition at line 252 of file OpScheduler.cpp.

◆ schedSDCMod()

int OpScheduler::schedSDCMod ( unsigned  II,
SchedType  algo 
)

Definition at line 430 of file OpScheduler.cpp.

Member Data Documentation

◆ alap_schedule

std::unordered_map<const OpGraphOp*, int> OpScheduler::alap_schedule
private

Definition at line 95 of file OpScheduler.h.

◆ asap_schedule

std::unordered_map<const OpGraphOp*, int> OpScheduler::asap_schedule
private

Definition at line 94 of file OpScheduler.h.

◆ extended_sched_const

std::unordered_map<opPair , int, pair_hash> OpScheduler::extended_sched_const

Definition at line 89 of file OpScheduler.h.

◆ function_nodes

std::vector<const MRRGNode*> OpScheduler::function_nodes
private

Definition at line 98 of file OpScheduler.h.

◆ lower_bound_op_code_edge

std::unordered_map<OpCodeEdge, int, pair_hash> OpScheduler::lower_bound_op_code_edge
private

Definition at line 101 of file OpScheduler.h.

◆ mrrg

const MRRG& OpScheduler::mrrg
private

Definition at line 93 of file OpScheduler.h.

◆ op_graph

const OpGraph& OpScheduler::op_graph
private

Definition at line 92 of file OpScheduler.h.

◆ op_latency

std::unordered_map<OpGraphOpCode, int> OpScheduler::op_latency
private

Definition at line 100 of file OpScheduler.h.

◆ schedule

std::unordered_map<const OpGraphOp*, int> OpScheduler::schedule
private

Definition at line 99 of file OpScheduler.h.

◆ sdc_lro_schedule

std::unordered_map<const OpGraphOp*, int> OpScheduler::sdc_lro_schedule
private

Definition at line 97 of file OpScheduler.h.

◆ sdc_mod_schedule

std::unordered_map<const OpGraphOp*, int> OpScheduler::sdc_mod_schedule
private

Definition at line 96 of file OpScheduler.h.

◆ upper_bound_op_code_edge

std::unordered_map<OpCodeEdge, int, pair_hash> OpScheduler::upper_bound_op_code_edge
private

Definition at line 102 of file OpScheduler.h.


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