gem5  v20.1.0.0
Public Member Functions | Public Attributes | List of all members
Stats::BinaryNode< Op > Class Template Reference

#include <statistics.hh>

Inheritance diagram for Stats::BinaryNode< Op >:
Stats::Node

Public Member Functions

 BinaryNode (NodePtr &a, NodePtr &b)
 
const VResultresult () const override
 Return the result vector of this subtree. More...
 
Result total () const override
 Return the total of the result vector. More...
 
size_type size () const override
 Return the number of nodes in the subtree starting at this node. More...
 
std::string str () const override
 
- Public Member Functions inherited from Stats::Node
virtual ~Node ()
 

Public Attributes

NodePtr l
 
NodePtr r
 
VResult vresult
 

Detailed Description

template<class Op>
class Stats::BinaryNode< Op >

Definition at line 2370 of file statistics.hh.

Constructor & Destructor Documentation

◆ BinaryNode()

template<class Op >
Stats::BinaryNode< Op >::BinaryNode ( NodePtr a,
NodePtr b 
)
inline

Definition at line 2378 of file statistics.hh.

Member Function Documentation

◆ result()

template<class Op >
const VResult& Stats::BinaryNode< Op >::result ( ) const
inlineoverridevirtual

Return the result vector of this subtree.

Returns
The result vector of this subtree.

Implements Stats::Node.

Definition at line 2381 of file statistics.hh.

References ArmISA::i, Stats::BinaryNode< Op >::l, X86ISA::op, Stats::BinaryNode< Op >::r, Stats::BinaryNode< Op >::size(), and Stats::BinaryNode< Op >::vresult.

Referenced by Stats::BinaryNode< Op >::total().

◆ size()

template<class Op >
size_type Stats::BinaryNode< Op >::size ( ) const
inlineoverridevirtual

Return the number of nodes in the subtree starting at this node.

Returns
the number of nodes in this subtree.

Implements Stats::Node.

Definition at line 2445 of file statistics.hh.

References Stats::BinaryNode< Op >::l, Stats::BinaryNode< Op >::r, and ArmISA::rs.

Referenced by Stats::BinaryNode< Op >::result(), and Stats::BinaryNode< Op >::total().

◆ str()

template<class Op >
std::string Stats::BinaryNode< Op >::str ( ) const
inlineoverridevirtual

Implements Stats::Node.

Definition at line 2460 of file statistics.hh.

References csprintf(), Stats::BinaryNode< Op >::l, and Stats::BinaryNode< Op >::r.

◆ total()

template<class Op >
Result Stats::BinaryNode< Op >::total ( ) const
inlineoverridevirtual

Return the total of the result vector.

Returns
The total of the result vector.

If vectors are the same divide their sums (x0+x1)/(y0+y1)

Otherwise divide each item by the divisor

Implements Stats::Node.

Definition at line 2413 of file statistics.hh.

References ArmISA::i, Stats::BinaryNode< Op >::l, X86ISA::op, Stats::BinaryNode< Op >::r, Stats::BinaryNode< Op >::result(), and Stats::BinaryNode< Op >::size().

Member Data Documentation

◆ l

template<class Op >
NodePtr Stats::BinaryNode< Op >::l

◆ r

template<class Op >
NodePtr Stats::BinaryNode< Op >::r

◆ vresult

template<class Op >
VResult Stats::BinaryNode< Op >::vresult
mutable

Definition at line 2375 of file statistics.hh.

Referenced by Stats::BinaryNode< Op >::result().


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

Generated on Wed Sep 30 2020 14:03:12 for gem5 by doxygen 1.8.17