The Sparta Modeling Framework
|
Abstract interface class for an item in an expression. Subclasses can contain other ExpressionNodes. More...
#include <ExpressionNode.hpp>
Public Member Functions | |
ExpressionNode (const ExpressionNode &)=delete | |
No copy-constructable. | |
ExpressionNode * | clone () const |
uint32_t | getStats (std::vector< const StatisticInstance * > &results) const |
Gets the statistics present in this expression. | |
double | evaluate () |
Compute value of this item in simulation. Must be implemented by subclass. | |
virtual void | start ()=0 |
virtual void | end ()=0 |
virtual bool | supportsCompression () const =0 |
virtual void | dump (std::ostream &o, bool show_range=true, bool resolve_subexprs=true) const =0 |
Dump the content of this expression item. | |
virtual void | getClocks (std::vector< const Clock * > &clocks) const =0 |
Populates a vector with the clocks found in this subexpression node. | |
Abstract interface class for an item in an expression. Subclasses can contain other ExpressionNodes.
Typically, these are created by the Expression class and there is no need for a client to directly access this interface or any subclasses
Definition at line 37 of file ExpressionNode.hpp.
|
inline |
Definition at line 46 of file ExpressionNode.hpp.
|
inlinevirtual |
Definition at line 50 of file ExpressionNode.hpp.
|
inline |
Definition at line 54 of file ExpressionNode.hpp.
|
pure virtual |
Dump the content of this expression item.
o | Ostream to write to |
show_range | Should the range be shown in any subexpression nodes. |
resolve_subexprs | Should any referenced statistic defs be expanded to their full expressions so that this becomes an expression containing only counters. |
Implemented in sparta::statistics::expression::Operation, sparta::statistics::expression::Constant, sparta::statistics::expression::UnaryFunction< RetT, ArgT, fxn_t >, sparta::statistics::expression::BinaryFunction< RetT, ArgT >, sparta::statistics::expression::TernaryFunction< RetT, ArgT >, sparta::statistics::expression::StatVariable, sparta::statistics::expression::SimVariable, and sparta::statistics::expression::ReferenceVariable.
|
inline |
Compute value of this item in simulation. Must be implemented by subclass.
Definition at line 76 of file ExpressionNode.hpp.
|
pure virtual |
Populates a vector with the clocks found in this subexpression node.
clocks | Vector of clocks to which any found clocks will be appended. This vector is not cleared. |
Implemented in sparta::statistics::expression::Operation, sparta::statistics::expression::Constant, sparta::statistics::expression::UnaryFunction< RetT, ArgT, fxn_t >, sparta::statistics::expression::BinaryFunction< RetT, ArgT >, sparta::statistics::expression::TernaryFunction< RetT, ArgT >, sparta::statistics::expression::StatVariable, sparta::statistics::expression::SimVariable, and sparta::statistics::expression::ReferenceVariable.
|
inline |
Gets the statistics present in this expression.
results | Vector of pointers to StatisticInstances. All statistics within this class will be appended to the results vector. These pointers are valid until this item or its children are modified or deleted |
Definition at line 68 of file ExpressionNode.hpp.
|
pure virtual |
Implemented in sparta::statistics::expression::Operation, sparta::statistics::expression::Constant, sparta::statistics::expression::UnaryFunction< RetT, ArgT, fxn_t >, sparta::statistics::expression::BinaryFunction< RetT, ArgT >, sparta::statistics::expression::TernaryFunction< RetT, ArgT >, sparta::statistics::expression::SimVariable, and sparta::statistics::expression::ReferenceVariable.