|
The Sparta Modeling Framework
|
Expression node for a reference to a double. Anything that cannot actually vary can be handled as a constant through Expression. If it can vary, however, it should be handled through this or SimVariable (for functions) More...
#include <ExpressionNodeVariables.hpp>


Public Member Functions | |
| ReferenceVariable (const ReferenceVariable &rhp) | |
| template<typename T > | |
| ReferenceVariable (const std::string &which, const T &ref) | |
| Construct with a value reference. | |
| ReferenceVariable | operator= (const ReferenceVariable &)=delete |
| Copy-assignment Disallowed. | |
| virtual ReferenceVariable * | clone_ () const override |
| Deep copy of the content of this item. | |
| virtual double | evaluate_ () const override |
| Compute value of this item in simulation. | |
| virtual bool | supportsCompression () const override |
| virtual void | start () override |
| virtual void | end () override |
| virtual void | dump (std::ostream &o, bool show_range=true, bool resolve_subexprs=true) const override |
| Dump the content of this expression item. | |
| virtual void | getClocks (std::vector< const Clock * > &clocks) const override |
| Populates a vector with the clocks found in this subexpression node. | |
Public Member Functions inherited from sparta::statistics::expression::ExpressionNode | |
| 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. | |
Public Attributes | |
| std::string | which_ |
| Name of this variable. | |
| const double & | ref_ |
| Reference to actual variable. | |
Expression node for a reference to a double. Anything that cannot actually vary can be handled as a constant through Expression. If it can vary, however, it should be handled through this or SimVariable (for functions)
Definition at line 215 of file ExpressionNodeVariables.hpp.
|
inline |
Definition at line 229 of file ExpressionNodeVariables.hpp.
|
inline |
Construct with a value reference.
| which | Name of the variable |
| ref | Reference to value |
Definition at line 241 of file ExpressionNodeVariables.hpp.
|
inlineoverridevirtual |
Deep copy of the content of this item.
To be overridden by subclasses
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 259 of file ExpressionNodeVariables.hpp.
|
inlineoverridevirtual |
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. |
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 283 of file ExpressionNodeVariables.hpp.
|
inlineoverridevirtual |
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 279 of file ExpressionNodeVariables.hpp.
|
inlineoverridevirtual |
Compute value of this item in simulation.
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 263 of file ExpressionNodeVariables.hpp.
|
inlineoverridevirtual |
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. |
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 291 of file ExpressionNodeVariables.hpp.
|
inlineoverridevirtual |
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 275 of file ExpressionNodeVariables.hpp.
|
inlineoverridevirtual |
We currently are not attempting compression for ReferenceVariable's. These are not used with nearly as much frequency as counters, constants, and parameters.
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 271 of file ExpressionNodeVariables.hpp.
| const double& sparta::statistics::expression::ReferenceVariable::ref_ |
Reference to actual variable.
Definition at line 225 of file ExpressionNodeVariables.hpp.
| std::string sparta::statistics::expression::ReferenceVariable::which_ |
Name of this variable.
Definition at line 220 of file ExpressionNodeVariables.hpp.