|
The Sparta Modeling Framework
|
Represents a Binary function node. More...
#include <ExpressionNodeTypes.hpp>


Public Types | |
| using | fxn_t |
| Function evaluation handler type. | |
Public Member Functions | |
| BinaryFunction ()=delete | |
| No default construction. | |
| BinaryFunction (const BinaryFunction &rhp) | |
| BinaryFunction (const std::string &name, fxn_t fxn, ExpressionNode *op1, ExpressionNode *op2) | |
| BinaryFunction & | operator= (const BinaryFunction &)=delete |
| Non-assignable. | |
| virtual BinaryFunction * | 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 | |
| const std::string | name_ |
| Name of this binary function. | |
| const fxn_t | fxn_ |
| Binary function to invoke. | |
| std::unique_ptr< ExpressionNode > | operand_1_ |
| Operand 1 of the unary function fxn_. | |
| std::unique_ptr< ExpressionNode > | operand_2_ |
| Operand 2 of the unary function fxn_. | |
Represents a Binary function node.
| RetT | Return type of function pointer. Must be convertable to double |
| ArgT | Argument type of function pointer. Must be convertable from a lvalue double |
Definition at line 391 of file ExpressionNodeTypes.hpp.
| using sparta::statistics::expression::BinaryFunction< RetT, ArgT >::fxn_t |
Function evaluation handler type.
Definition at line 396 of file ExpressionNodeTypes.hpp.
|
inline |
Definition at line 427 of file ExpressionNodeTypes.hpp.
|
inline |
brief Construct a new binary function
| Name | of function |
| unary | double function pointer |
| op1 | Operand 1. Must not be nullptr. Takes ownership |
| op2 | Operand 1. Must not be nullptr. Takes ownership |
Definition at line 445 of file ExpressionNodeTypes.hpp.
|
inlineoverridevirtual |
Deep copy of the content of this item.
To be overridden by subclasses
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 465 of file ExpressionNodeTypes.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 493 of file ExpressionNodeTypes.hpp.
|
inlineoverridevirtual |
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 488 of file ExpressionNodeTypes.hpp.
|
inlineoverridevirtual |
Compute value of this item in simulation.
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 469 of file ExpressionNodeTypes.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 503 of file ExpressionNodeTypes.hpp.
|
inlineoverridevirtual |
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 483 of file ExpressionNodeTypes.hpp.
|
inlineoverridevirtual |
We currently are not attempting compression for UnaryFunction, BinaryFunction, and TernaryFunction SI's. These are not used with nearly as much frequency as counters, constants, and parameters.
Implements sparta::statistics::expression::ExpressionNode.
Definition at line 479 of file ExpressionNodeTypes.hpp.
| const fxn_t sparta::statistics::expression::BinaryFunction< RetT, ArgT >::fxn_ |
Binary function to invoke.
Definition at line 409 of file ExpressionNodeTypes.hpp.
| const std::string sparta::statistics::expression::BinaryFunction< RetT, ArgT >::name_ |
Name of this binary function.
Definition at line 404 of file ExpressionNodeTypes.hpp.
| std::unique_ptr<ExpressionNode> sparta::statistics::expression::BinaryFunction< RetT, ArgT >::operand_1_ |
Operand 1 of the unary function fxn_.
Definition at line 414 of file ExpressionNodeTypes.hpp.
| std::unique_ptr<ExpressionNode> sparta::statistics::expression::BinaryFunction< RetT, ArgT >::operand_2_ |
Operand 2 of the unary function fxn_.
Definition at line 419 of file ExpressionNodeTypes.hpp.