クラス Onikiri::RAS

#include <RAS.h>

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

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

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

Public メソッド

 BEGIN_PARAM_MAP (GetParamPath()) RAS()
int GetStackSize ()
void Initialize (InitPhase phase)
int PointStackPos (int basePos, int stackSize, int offset)
SimPC Pop ()
void Push (const SimPC &pc)
virtual ~RAS ()

説明

RAS.h47 行で定義されています。


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

RAS::~RAS (  )  [virtual]

RAS.cpp45 行で定義されています。

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

00046 {
00047     ReleaseParam();
00048 }

関数の呼び出しグラフ:


関数

Onikiri::RAS::BEGIN_PARAM_MAP ( GetParamPath()   ) 

int Onikiri::RAS::GetStackSize (  )  [inline]

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

参照元 Pop()Push().

00084 { return m_stackSize; }

Here is the caller graph for this function:

void RAS::Initialize ( InitPhase  phase  ) 

RAS.cpp50 行で定義されています。

参照先 ASSERTOnikiri::PhysicalResourceNode::CheckNodeInitialized()Onikiri::PhysicalResourceNode::INIT_POST_CONNECTIONOnikiri::PhysicalResourceNode::INIT_PRE_CONNECTIONOnikiri::CheckpointedData< DataType >::Initialize()Onikiri::ParamExchange::LoadParam()Onikiri::CheckpointMaster::SLOT_FETCH.

00051 {
00052     if(phase == INIT_PRE_CONNECTION){
00053         LoadParam();
00054 
00055         ASSERT(m_stackSize >= MAX_BACKUP_SIZE,
00056             "The size of backup of RAS must be the same or smaller than that of RAS itself.");
00057 
00058         ASSERT(MAX_BACKUP_SIZE > 0,
00059             "MAX_BACKUP_SIZE must be larger than 0.");
00060 
00061         // pcStack
00062         m_stack.resize( m_stackSize, PC() );
00063     }
00064     else if(phase == INIT_POST_CONNECTION){
00065 
00066         // checkpointMaster Zbg`FbN
00067         CheckNodeInitialized( "checkpointMaster", m_checkpointMaster );
00068 
00069         m_stackTop.Initialize(
00070             m_checkpointMaster,
00071             CheckpointMaster::SLOT_FETCH
00072         );
00073         *m_stackTop = 0;
00074 
00075         m_backupStackTop.Initialize(
00076             m_checkpointMaster,
00077             CheckpointMaster::SLOT_FETCH
00078             );
00079         *m_backupStackTop = 0;
00080         m_backupStack.Initialize(
00081             m_checkpointMaster,
00082             CheckpointMaster::SLOT_FETCH
00083             );
00084 
00085     }
00086     
00087 }

関数の呼び出しグラフ:

int Onikiri::RAS::PointStackPos ( int  basePos,
int  stackSize,
int  offset 
) [inline]

RAS.h86 行で定義されています。

参照元 Pop()Push().

00087         { return (basePos + stackSize + offset) % stackSize; }

Here is the caller graph for this function:

SimPC RAS::Pop (  ) 

RAS.cpp109 行で定義されています。

参照先 GetStackSize()PointStackPos().

00110 {
00111     // Pop the latest PC.
00112     *m_stackTop = PointStackPos(*m_stackTop, GetStackSize(), -1);
00113     PC popPC = m_stack[*m_stackTop];
00114 
00115     if ( m_enableBackup )
00116     {
00117         // Pop the latest PC.
00118         *m_backupStackTop = PointStackPos(*m_backupStackTop, MAX_BACKUP_SIZE, -1);
00119         popPC = (*m_backupStack)[*m_backupStackTop];
00120 
00121         // Set the latest PC that the checkpointed does not have.
00122         int setBackupStackPos = PointStackPos(*m_stackTop, GetStackSize(), -MAX_BACKUP_SIZE);
00123         (*m_backupStack)[*m_backupStackTop] = m_stack[setBackupStackPos];
00124     }
00125 
00126     return popPC;
00127 }

関数の呼び出しグラフ:

void RAS::Push ( const SimPC pc  ) 

RAS.cpp90 行で定義されています。

参照先 GetStackSize()Onikiri::SimPC::Next()PointStackPos().

00091 {
00092     if (m_enableBackup)
00093     {
00094         // Set the oldest PC in the checkpointed stack to the actual RAS.
00095         int setRasStackPos = PointStackPos(*m_stackTop, GetStackSize(), -MAX_BACKUP_SIZE);
00096         m_stack[setRasStackPos] = (*m_backupStack)[*m_backupStackTop];
00097 
00098         // Push a new PC.
00099         (*m_backupStack)[*m_backupStackTop] = pc.Next();
00100         *m_backupStackTop = PointStackPos(*m_backupStackTop, MAX_BACKUP_SIZE, 1);
00101     }
00102 
00103     // Push a new PC.
00104     m_stack[*m_stackTop] = pc.Next();
00105     *m_stackTop = PointStackPos(*m_stackTop, GetStackSize(), 1);
00106 }

関数の呼び出しグラフ:


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