OpenASIP
2.0
|
#include <FUCollisionMatrixIndex.hh>
Public Member Functions | |
FUCollisionMatrixIndex (const TTAMachine::FunctionUnit &functionUnit) | |
virtual | ~FUCollisionMatrixIndex () |
CollisionMatrix & | at (int index) |
int | size () const |
Private Attributes | |
std::vector< CollisionMatrix * > | matrices_ |
Stores all collision matrices, including one for the pseudo NOP. More... | |
Represents an index of collision matrices required for modeling collision behavior of operations in an FU.
Definition at line 47 of file FUCollisionMatrixIndex.hh.
FUCollisionMatrixIndex::FUCollisionMatrixIndex | ( | const TTAMachine::FunctionUnit & | functionUnit | ) |
Builds collision matrices for all operations in the FU and an empty collision matrix for the pseudo no-operation.
Matrices are stored in the order returned by FunctionUnit::operation(), the NOP matrix is at index FunctionUnit::operationCount().
functionUnit | The FU to build the matrices for. |
Definition at line 48 of file FUCollisionMatrixIndex.cc.
References assert, BitMatrix::columnCount(), matrices_, TTAMachine::FunctionUnit::operationCount(), and BitMatrix::rowCount().
|
virtual |
Destructor.
Definition at line 79 of file FUCollisionMatrixIndex.cc.
References SequenceTools::deleteAllItems(), and matrices_.
CollisionMatrix & FUCollisionMatrixIndex::at | ( | int | index | ) |
Returns the collision matrix at the given index.
operation | The index of the operat |
Definition at line 89 of file FUCollisionMatrixIndex.cc.
References matrices_.
Referenced by FUFiniteStateAutomaton::FUFiniteStateAutomaton(), FUFiniteStateAutomaton::operationCollisionMatrix(), and FUFiniteStateAutomaton::resolveState().
int FUCollisionMatrixIndex::size | ( | ) | const |
Returns the count of collision matrices in the index.
Definition at line 99 of file FUCollisionMatrixIndex.cc.
References matrices_.
Referenced by FUFiniteStateAutomaton::buildStateMachine().
|
private |
Stores all collision matrices, including one for the pseudo NOP.
Definition at line 56 of file FUCollisionMatrixIndex.hh.
Referenced by at(), FUCollisionMatrixIndex(), size(), and ~FUCollisionMatrixIndex().