クラス Onikiri::Dispatcher

#include <Dispatcher.h>

Onikiri::Dispatcherに対する継承グラフ

Inheritance graph
[凡例]
Onikiri::Dispatcherのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public 型

typedef fixed_sized_buffer<
int, MAX_SCHEDULER_NUM, Dispatcher
DispatchingOpNums

Public メソッド

 BEGIN_PARAM_PATH (GetResultPath()) RESULT_ENTRY("@Total"
 BEGIN_PARAM_PATH (GetParamPath()) PARAM_ENTRY("@DispatchLatency"
SetUpperPipelineNode Dispatcher ()
virtual void Evaluate ()
virtual void ExitLowerPipeline (OpIterator op)
virtual void Finalize ()
virtual void Flush (OpIterator op)
int GetDispatchLatency () const
 GetStalledCycles ()) RESOURCE_SETTER_ENTRY(PipelineNodeIF
virtual void Initialize (InitPhase phase)
virtual void Retire (OpIterator op)
virtual void Update ()
virtual ~Dispatcher ()

Public 変数

 m_dispatchLatency
 upperPipelineNode

Static Public 変数

static const int MAX_SCHEDULER_NUM = 8
static HookPoint< Dispatcher,
DispatchHookParam
s_dispatchEvaluateHook
static HookPoint< Dispatcher,
DispatchHookParam
s_dispatchUpdateHook

Protected 型

typedef PipelineNodeBase BaseType

Protected メソッド

void Delete (OpIterator op, bool flush)
void Dispatch (OpIterator op)
SchedulerInfoGetSchedulerInfo (OpIterator op)

Protected 変数

int m_dispatchLatency
std::vector< s64m_numDispatchedOps
int m_numScheduler
std::vector< SchedulerInfom_schedInfo
std::vector< std::string > m_schedulerName
std::vector< s64m_stallCylcles

構成

struct  DispatchHookParam
struct  SchedulerInfo

説明

Dispatcher.h48 行で定義されています。


型定義

typedef PipelineNodeBase Onikiri::Dispatcher::BaseType [protected]

Dispatcher.h131 行で定義されています。

typedef fixed_sized_buffer< int, MAX_SCHEDULER_NUM, Dispatcher > Onikiri::Dispatcher::DispatchingOpNums

Dispatcher.h58 行で定義されています。


コンストラクタとデストラクタ

Dispatcher::Dispatcher (  ) 

Dispatcher.cpp61 行で定義されています。

00061                        :
00062     m_dispatchLatency(0)
00063 {
00064 }

Dispatcher::~Dispatcher (  )  [virtual]

Dispatcher.cpp66 行で定義されています。

00067 {
00068 }


関数

Onikiri::Dispatcher::BEGIN_PARAM_PATH ( GetResultPath()   ) 

Onikiri::Dispatcher::BEGIN_PARAM_PATH ( GetParamPath()   ) 

void Dispatcher::Delete ( OpIterator  op,
bool  flush 
) [protected]

Dispatcher.cpp228 行で定義されています。

参照先 Onikiri::Dispatcher::SchedulerInfo::dispatchingOpsOnikiri::OpList::find_and_erase()GetSchedulerInfo()Onikiri::OpStatus::OS_DISPATCHEDOnikiri::OpStatus::OS_DISPATCHING.

参照元 Flush()Retire().

00229 {
00230 
00231     if( op->GetStatus() < OpStatus::OS_DISPATCHING ||
00232         op->GetStatus() > OpStatus::OS_DISPATCHED
00233     ){
00234         return;
00235     }
00236 
00237     SchedulerInfo* schd = GetSchedulerInfo( op );
00238     schd->dispatchingOps.find_and_erase( op );
00239 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void Dispatcher::Dispatch ( OpIterator  op  )  [protected]

Dispatcher.cpp170 行で定義されています。

参照先 Onikiri::Dispatcher::SchedulerInfo::dispatchingOpsOnikiri::DS_DISPATCHOnikiri::Dumper::Dump()Onikiri::Pipeline::EnterPipeline()Onikiri::g_dumperOnikiri::PipelineNodeBase::GetLowerPipeline()GetSchedulerInfo()m_dispatchLatencyOnikiri::Dispatcher::SchedulerInfo::numDispatchedOpsOnikiri::OpStatus::OS_DISPATCHINGOnikiri::OpList::push_back().

参照元 Update().

00171 {   
00172     SchedulerInfo* schd = GetSchedulerInfo(op);
00173     op->SetStatus( OpStatus::OS_DISPATCHING );
00174     schd->dispatchingOps.push_back( op );
00175     //schd->pipeline->EnterPipeline( 
00176     GetLowerPipeline()->EnterPipeline(
00177         op, m_dispatchLatency - 1, op->GetScheduler() 
00178     );  
00179     schd->numDispatchedOps++;   
00180     g_dumper.Dump( DS_DISPATCH, op );
00181 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void Dispatcher::Evaluate (  )  [virtual]

Onikiri::ClockedResourceBaseを再定義しています。

Dispatcher.cpp130 行で定義されています。

参照先 Onikiri::PipelineLatch::begin()Onikiri::Dispatcher::DispatchHookParam::dispatchOnikiri::Dispatcher::DispatchHookParam::dispatchingOpsOnikiri::PipelineLatch::end()Onikiri::ClockedResourceBase::Evaluate()HOOK_SECTION_OP_PARAMOnikiri::PipelineNodeBase::m_latchm_numSchedulerm_schedInfoOnikiri::fixed_sized_buffer< T, SIZE, Tag >::push_back()s_dispatchEvaluateHookOnikiri::PipelineNodeBase::StallThisNodeAndUpperThisCycle().

00131 {
00132     BaseType::Evaluate();
00133 
00134 
00135     // Count the number of all dispatching ops.
00136     DispatchingOpNums dispatchingOps;
00137     for( int i = 0; i < m_numScheduler; i++ ){
00138         dispatchingOps.push_back( (int)m_schedInfo[i].dispatchingOps.size() );
00139     }
00140 
00141     DispatchHookParam hookParam;
00142     hookParam.dispatchingOps = &dispatchingOps;
00143     for( PipelineLatch::iterator i = m_latch.begin(); i != m_latch.end(); ++i ){
00144         // Count the number of dispatching ops.
00145         hookParam.dispatch = true;
00146         HOOK_SECTION_OP_PARAM( s_dispatchEvaluateHook, *i, hookParam ){
00147             if( hookParam.dispatch ){
00148                 dispatchingOps[ (*i)->GetScheduler()->GetIndex() ]++;
00149             }
00150         }
00151     }
00152 
00153     // Can allocate enough entries in schedulers?
00154     bool stall = false;
00155     for( int i = 0; i < m_numScheduler; i++ ){
00156         if( !m_schedInfo[i].scheduler->CanAllocate( dispatchingOps[i] ) ){
00157             stall = true;
00158             m_schedInfo[i].saturateCount++;
00159         }
00160     }
00161 
00162     if( stall ){
00163         // Stall this node and upper pipelines.
00164         // Do not stall ops where dispatching is already 
00165         // started before this cycle.
00166         StallThisNodeAndUpperThisCycle();
00167     }
00168 }

関数の呼び出しグラフ:

void Dispatcher::ExitLowerPipeline ( OpIterator  op  )  [virtual]

Onikiri::PipelineNodeBaseを再定義しています。

Dispatcher.cpp210 行で定義されています。

参照先 Onikiri::Dispatcher::SchedulerInfo::dispatchingOpsOnikiri::OpList::find_and_erase()GetSchedulerInfo().

00211 {
00212     SchedulerInfo* schd = GetSchedulerInfo( op );
00213     schd->dispatchingOps.find_and_erase( op );
00214 }

関数の呼び出しグラフ:

void Dispatcher::Finalize (  )  [virtual]

Onikiri::PhysicalResourceNodeを再定義しています。

Dispatcher.cpp111 行で定義されています。

参照先 m_numDispatchedOpsm_schedInfom_schedulerNamem_stallCylclesOnikiri::PhysicalResourceNode::ReleaseParam().

00112 {
00113     m_stallCylcles.clear();
00114     for( vector< SchedulerInfo >::iterator i = m_schedInfo.begin(); i != m_schedInfo.end(); ++i ){
00115         m_stallCylcles.push_back( i->saturateCount );
00116         m_schedulerName.push_back( i->scheduler->GetName() );
00117         m_numDispatchedOps.push_back( i->numDispatchedOps );
00118     }
00119 
00120     ReleaseParam();
00121 }

関数の呼び出しグラフ:

void Dispatcher::Flush ( OpIterator  op  )  [virtual]

Onikiri::PipelineNodeBaseを再定義しています。

Dispatcher.cpp222 行で定義されています。

参照先 Delete()Onikiri::PipelineNodeBase::Flush().

参照元 Onikiri::InorderList::NotifyFlush().

00223 {
00224     PipelineNodeBase::Flush( op );
00225     Delete( op, true );
00226 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

int Onikiri::Dispatcher::GetDispatchLatency (  )  const [inline]

Dispatcher.h103 行で定義されています。

00103 { return m_dispatchLatency; }

Dispatcher::SchedulerInfo * Dispatcher::GetSchedulerInfo ( OpIterator  op  )  [protected]

Dispatcher.cpp123 行で定義されています。

参照先 Onikiri::Scheduler::GetIndex()m_schedInfo.

参照元 Delete()Dispatch()ExitLowerPipeline().

00124 {
00125     Scheduler* sched = op->GetScheduler();
00126     int index = sched->GetIndex();
00127     return &m_schedInfo[index];
00128 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

Onikiri::Dispatcher::GetStalledCycles (  ) 

void Dispatcher::Initialize ( InitPhase  phase  )  [virtual]

Onikiri::PipelineNodeBaseを再定義しています。

Dispatcher.cpp70 行で定義されています。

参照先 ASSERTOnikiri::PipelineNodeBase::GetCore()Onikiri::Core::GetNumScheduler()Onikiri::PhysicalResourceNode::INIT_POST_CONNECTIONOnikiri::PhysicalResourceNode::INIT_PRE_CONNECTIONOnikiri::PipelineNodeBase::Initialize()Onikiri::ParamExchange::LoadParam()m_dispatchLatencym_numSchedulerm_schedInfoMAX_SCHEDULER_NUMTHROW_RUNTIME_ERROR.

00071 {
00072     PipelineNodeBase::Initialize( phase );
00073 
00074     if( phase == INIT_PRE_CONNECTION ){
00075         LoadParam();
00076     }
00077     else if( phase == INIT_POST_CONNECTION ){
00078 
00079         // INIT_POST_CONNECTION
00080         m_numScheduler = GetCore()->GetNumScheduler();
00081         if( MAX_SCHEDULER_NUM < m_numScheduler ){
00082             THROW_RUNTIME_ERROR( 
00083                 "The number of schedulers is greater than MAX_SCHEDULER_NUM." 
00084             );
00085         }
00086 
00087         ASSERT( m_schedInfo.size() == 0 );
00088         m_schedInfo.resize( m_numScheduler );
00089 
00090         for( int i = 0; i < m_numScheduler; ++i ){
00091             Scheduler* sched = GetCore()->GetScheduler(i);
00092             int index = sched->GetIndex();
00093             ASSERT( i == index, "Mismatched scheduler's indeces." );
00094 
00095             m_schedInfo[i].index = index;
00096             m_schedInfo[i].scheduler = sched;
00097             m_schedInfo[i].dispatchingOps.resize( *GetCore()->GetOpArray() );
00098         }
00099     
00100         // VCX^XiresizejSchedulerSaturateCount
00101         // ParamDBo^x
00102         LoadParam();
00103 
00104         // member `FbN
00105         if ( m_dispatchLatency == 0 ) {
00106             THROW_RUNTIME_ERROR( "A dispatch latency must be more than 0." );
00107         }
00108     }
00109 }

関数の呼び出しグラフ:

void Dispatcher::Retire ( OpIterator  op  )  [virtual]

Onikiri::PipelineNodeBaseを再定義しています。

Dispatcher.cpp216 行で定義されています。

参照先 Delete()Onikiri::PipelineNodeBase::Retire().

参照元 Onikiri::InorderList::NotifyRetire().

00217 {
00218     PipelineNodeBase::Retire( op );
00219     Delete( op, false );
00220 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void Dispatcher::Update (  )  [virtual]

Onikiri::ClockedResourceBaseを再定義しています。

Dispatcher.cpp184 行で定義されています。

参照先 Onikiri::PipelineLatch::begin()Dispatch()Onikiri::Dispatcher::DispatchHookParam::dispatchOnikiri::Dispatcher::DispatchHookParam::dispatchingOpsOnikiri::PipelineLatch::end()Onikiri::PipelineLatch::erase()HOOK_SECTION_OP_PARAMOnikiri::PipelineNodeBase::m_latchm_numSchedulerm_schedInfoOnikiri::fixed_sized_buffer< T, SIZE, Tag >::push_back()s_dispatchUpdateHook.

00185 {
00186     // Count the number of all dispatching ops.
00187     DispatchingOpNums dispatchingOps;
00188     for( int i = 0; i < m_numScheduler; i++ ){
00189         dispatchingOps.push_back( (int)m_schedInfo[i].dispatchingOps.size() );
00190     }
00191     DispatchHookParam hookParam;
00192     hookParam.dispatchingOps = &dispatchingOps;
00193 
00194     for( PipelineLatch::iterator i = m_latch.begin(); 
00195          i != m_latch.end(); 
00196          /*nothing*/ 
00197     ){
00198         OpIterator op = *i;
00199         hookParam.dispatch = true;
00200         HOOK_SECTION_OP_PARAM( s_dispatchUpdateHook, op, hookParam ){
00201             if( hookParam.dispatch ){
00202                 Dispatch( op );
00203             }
00204         }
00205         i = m_latch.erase( i );
00206     }
00207 }

関数の呼び出しグラフ:


変数

int Onikiri::Dispatcher::m_dispatchLatency [protected]

Dispatcher.h148 行で定義されています。

Onikiri::Dispatcher::m_dispatchLatency

Dispatcher.h63 行で定義されています。

参照元 Dispatch()Initialize().

std::vector< s64 > Onikiri::Dispatcher::m_numDispatchedOps [protected]

Dispatcher.h152 行で定義されています。

参照元 Finalize().

int Onikiri::Dispatcher::m_numScheduler [protected]

Dispatcher.h147 行で定義されています。

参照元 Evaluate()Initialize()Update().

std::vector< SchedulerInfo > Onikiri::Dispatcher::m_schedInfo [protected]

Dispatcher.h150 行で定義されています。

参照元 Evaluate()Finalize()GetSchedulerInfo()Initialize()Update().

std::vector< std::string > Onikiri::Dispatcher::m_schedulerName [protected]

Dispatcher.h153 行で定義されています。

参照元 Finalize().

std::vector< s64 > Onikiri::Dispatcher::m_stallCylcles [protected]

Dispatcher.h151 行で定義されています。

参照元 Finalize().

const int Onikiri::Dispatcher::MAX_SCHEDULER_NUM = 8 [static]

Dispatcher.h55 行で定義されています。

参照元 Initialize().

HookPoint< Dispatcher, Dispatcher::DispatchHookParam > Onikiri::Dispatcher::s_dispatchEvaluateHook [static]

Dispatcher.h122 行で定義されています。

参照元 Evaluate().

HookPoint< Dispatcher, Dispatcher::DispatchHookParam > Onikiri::Dispatcher::s_dispatchUpdateHook [static]

Dispatcher.h126 行で定義されています。

参照元 Onikiri::SampleHookModule::Initialize()Update().

Onikiri::Dispatcher::upperPipelineNode

Dispatcher.h84 行で定義されています。


このクラスの説明は次のファイルから生成されました:
Onikiri2に対してTue Jun 18 14:56:30 2013に生成されました。  doxygen 1.4.7