gem5 v24.0.0.0
|
A proxy class to access the stat at a given index in a VectorBase stat. More...
#include <statistics.hh>
Public Member Functions | |
Counter | value () const |
Return the current value of this stat as its base type. | |
Result | result () const |
Return the current value of this statas a result type. | |
ScalarProxy (Stat &s, off_type i) | |
Create and initialize this proxy, do not register it with the database. | |
ScalarProxy (const ScalarProxy &sp) | |
Create a copy of the provided ScalarProxy. | |
const ScalarProxy & | operator= (const ScalarProxy &sp) |
Set this proxy equal to the provided one. | |
void | operator++ () |
Increment the stat by 1. | |
void | operator-- () |
Decrement the stat by 1. | |
void | operator++ (int) |
Increment the stat by 1. | |
void | operator-- (int) |
Decrement the stat by 1. | |
template<typename U > | |
void | operator= (const U &v) |
Set the data value to the given value. | |
template<typename U > | |
void | operator+= (const U &v) |
Increment the stat by the given value. | |
template<typename U > | |
void | operator-= (const U &v) |
Decrement the stat by the given value. | |
size_type | size () const |
Return the number of elements, always 1 for a scalar. | |
std::string | str () const |
Private Attributes | |
Stat & | stat |
Pointer to the parent Vector. | |
off_type | index |
The index to access in the parent VectorBase. | |
A proxy class to access the stat at a given index in a VectorBase stat.
Behaves like a ScalarBase.
Definition at line 795 of file statistics.hh.
|
inline |
Create and initialize this proxy, do not register it with the database.
i | The index to access. |
Definition at line 822 of file statistics.hh.
|
inline |
Create a copy of the provided ScalarProxy.
sp | The proxy to copy. |
Definition at line 831 of file statistics.hh.
|
inline |
Increment the stat by 1.
This calls the associated storage object inc function.
Definition at line 854 of file statistics.hh.
References gem5::statistics::ScalarProxy< Stat >::index, and gem5::statistics::ScalarProxy< Stat >::stat.
|
inline |
Increment the stat by 1.
Definition at line 862 of file statistics.hh.
|
inline |
Increment the stat by the given value.
This calls the associated storage object inc function.
v | The value to add. |
Definition at line 885 of file statistics.hh.
References gem5::statistics::ScalarProxy< Stat >::index, gem5::statistics::ScalarProxy< Stat >::stat, and gem5::ArmISA::v.
|
inline |
Decrement the stat by 1.
This calls the associated storage object dec function.
Definition at line 859 of file statistics.hh.
References gem5::statistics::ScalarProxy< Stat >::index, and gem5::statistics::ScalarProxy< Stat >::stat.
|
inline |
Decrement the stat by 1.
Definition at line 864 of file statistics.hh.
|
inline |
Decrement the stat by the given value.
This calls the associated storage object dec function.
v | The value to substract. |
Definition at line 897 of file statistics.hh.
References gem5::statistics::ScalarProxy< Stat >::index, gem5::statistics::ScalarProxy< Stat >::stat, and gem5::ArmISA::v.
|
inline |
Set this proxy equal to the provided one.
sp | The proxy to copy. |
Definition at line 841 of file statistics.hh.
References gem5::statistics::ScalarProxy< Stat >::index, gem5::ArmISA::sp, and gem5::statistics::ScalarProxy< Stat >::stat.
|
inline |
Set the data value to the given value.
This calls the associated storage object set function.
v | The new value. |
Definition at line 873 of file statistics.hh.
References gem5::statistics::ScalarProxy< Stat >::index, gem5::statistics::ScalarProxy< Stat >::stat, and gem5::ArmISA::v.
|
inline |
Return the current value of this statas a result type.
Definition at line 815 of file statistics.hh.
References gem5::statistics::ScalarProxy< Stat >::index, and gem5::statistics::ScalarProxy< Stat >::stat.
|
inline |
Return the number of elements, always 1 for a scalar.
Definition at line 906 of file statistics.hh.
|
inline |
Definition at line 910 of file statistics.hh.
References gem5::csprintf(), gem5::statistics::ScalarProxy< Stat >::index, and gem5::statistics::ScalarProxy< Stat >::stat.
|
inline |
Return the current value of this stat as its base type.
Definition at line 809 of file statistics.hh.
References gem5::statistics::ScalarProxy< Stat >::index, and gem5::statistics::ScalarProxy< Stat >::stat.
|
private |
The index to access in the parent VectorBase.
Definition at line 802 of file statistics.hh.
Referenced by gem5::statistics::ScalarProxy< Stat >::operator++(), gem5::statistics::ScalarProxy< Stat >::operator+=(), gem5::statistics::ScalarProxy< Stat >::operator--(), gem5::statistics::ScalarProxy< Stat >::operator-=(), gem5::statistics::ScalarProxy< Stat >::operator=(), gem5::statistics::ScalarProxy< Stat >::operator=(), gem5::statistics::ScalarProxy< Stat >::result(), gem5::statistics::ScalarProxy< Stat >::str(), and gem5::statistics::ScalarProxy< Stat >::value().
|
private |
Pointer to the parent Vector.
Definition at line 799 of file statistics.hh.
Referenced by gem5::statistics::ScalarProxy< Stat >::operator++(), gem5::statistics::ScalarProxy< Stat >::operator+=(), gem5::statistics::ScalarProxy< Stat >::operator--(), gem5::statistics::ScalarProxy< Stat >::operator-=(), gem5::statistics::ScalarProxy< Stat >::operator=(), gem5::statistics::ScalarProxy< Stat >::operator=(), gem5::statistics::ScalarProxy< Stat >::result(), gem5::statistics::ScalarProxy< Stat >::str(), and gem5::statistics::ScalarProxy< Stat >::value().