The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::statistics::expression::Constant Struct Reference
Inheritance diagram for sparta::statistics::expression::Constant:
Collaboration diagram for sparta::statistics::expression::Constant:

Public Member Functions

 Constant (const Constant &rhp)
 
 Constant (double val)
 
virtual Constantclone_ () 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
 Constants are always good candidates for compression.
 
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.
 
ExpressionNodeclone () 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

double value_
 

Detailed Description

Definition at line 226 of file ExpressionNodeTypes.hpp.

Constructor & Destructor Documentation

◆ Constant() [1/2]

sparta::statistics::expression::Constant::Constant ( const Constant rhp)
inline

Definition at line 230 of file ExpressionNodeTypes.hpp.

◆ Constant() [2/2]

sparta::statistics::expression::Constant::Constant ( double  val)
inline

Definition at line 235 of file ExpressionNodeTypes.hpp.

Member Function Documentation

◆ clone_()

virtual Constant * sparta::statistics::expression::Constant::clone_ ( ) const
inlineoverridevirtual

Deep copy of the content of this item.

To be overridden by subclasses

Implements sparta::statistics::expression::ExpressionNode.

Definition at line 241 of file ExpressionNodeTypes.hpp.

◆ dump()

virtual void sparta::statistics::expression::Constant::dump ( std::ostream &  o,
bool  show_range = true,
bool  resolve_subexprs = true 
) const
inlineoverridevirtual

Dump the content of this expression item.

Note
Must not evaluate the expression
Parameters
oOstream to write to
show_rangeShould the range be shown in any subexpression nodes.
resolve_subexprsShould 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 260 of file ExpressionNodeTypes.hpp.

◆ end()

virtual void sparta::statistics::expression::Constant::end ( )
inlineoverridevirtual

◆ evaluate_()

virtual double sparta::statistics::expression::Constant::evaluate_ ( ) const
inlineoverridevirtual

Compute value of this item in simulation.

Implements sparta::statistics::expression::ExpressionNode.

Definition at line 245 of file ExpressionNodeTypes.hpp.

◆ getClocks()

virtual void sparta::statistics::expression::Constant::getClocks ( std::vector< const Clock * > &  clocks) const
inlineoverridevirtual

Populates a vector with the clocks found in this subexpression node.

Parameters
clocksVector of clocks to which any found clocks will be appended. This vector is not cleared.

Implements sparta::statistics::expression::ExpressionNode.

Definition at line 268 of file ExpressionNodeTypes.hpp.

◆ start()

virtual void sparta::statistics::expression::Constant::start ( )
inlineoverridevirtual

◆ supportsCompression()

virtual bool sparta::statistics::expression::Constant::supportsCompression ( ) const
inlineoverridevirtual

Constants are always good candidates for compression.

Implements sparta::statistics::expression::ExpressionNode.

Definition at line 250 of file ExpressionNodeTypes.hpp.

Member Data Documentation

◆ value_

double sparta::statistics::expression::Constant::value_

Definition at line 228 of file ExpressionNodeTypes.hpp.


The documentation for this struct was generated from the following file: