|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
Instrumented wrapper for any arithmetic type. More...
#include <instrumented.hpp>
Public Types | |
| using | value_type = T |
Public Member Functions | |
| instrumented () | |
| instrumented (const T &v) | |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> | |
| instrumented (U v) | |
| instrumented (const instrumented &other) | |
| instrumented (instrumented &&other) noexcept | |
| instrumented & | operator= (const instrumented &other) |
| instrumented & | operator= (instrumented &&other) noexcept |
| instrumented & | operator= (const T &v) |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> | |
| instrumented & | operator= (U v) |
| const T & | value () const |
| T & | value () |
| operator T () const | |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> | |
| operator U () const | |
| instrumented | operator+ () const |
| instrumented | operator- () const |
| instrumented & | operator+= (const instrumented &rhs) |
| instrumented & | operator-= (const instrumented &rhs) |
| instrumented & | operator*= (const instrumented &rhs) |
| instrumented & | operator/= (const instrumented &rhs) |
| instrumented & | operator+= (const T &rhs) |
| instrumented & | operator-= (const T &rhs) |
| instrumented & | operator*= (const T &rhs) |
| instrumented & | operator/= (const T &rhs) |
| instrumented & | operator++ () |
| instrumented & | operator-- () |
| instrumented | operator++ (int) |
| instrumented | operator-- (int) |
Friends | |
| template<typename U> | |
| class | instrumented |
| template<typename U> | |
| instrumented< U > | operator+ (const instrumented< U > &, const instrumented< U > &) |
| template<typename U> | |
| instrumented< U > | operator- (const instrumented< U > &, const instrumented< U > &) |
| template<typename U> | |
| instrumented< U > | operator* (const instrumented< U > &, const instrumented< U > &) |
| template<typename U> | |
| instrumented< U > | operator/ (const instrumented< U > &, const instrumented< U > &) |
| template<typename U> | |
| bool | operator== (const instrumented< U > &, const instrumented< U > &) |
| template<typename U> | |
| bool | operator!= (const instrumented< U > &, const instrumented< U > &) |
| template<typename U> | |
| bool | operator< (const instrumented< U > &, const instrumented< U > &) |
| template<typename U> | |
| bool | operator> (const instrumented< U > &, const instrumented< U > &) |
| template<typename U> | |
| bool | operator<= (const instrumented< U > &, const instrumented< U > &) |
| template<typename U> | |
| bool | operator>= (const instrumented< U > &, const instrumented< U > &) |
| template<typename U> | |
| instrumented< U > | sqrt (const instrumented< U > &) |
| template<typename U> | |
| instrumented< U > | abs (const instrumented< U > &) |
| template<typename U> | |
| instrumented< U > | fabs (const instrumented< U > &) |
| template<typename U> | |
| std::ostream & | operator<< (std::ostream &, const instrumented< U > &) |
| template<typename U> | |
| std::istream & | operator>> (std::istream &, instrumented< U > &) |
Instrumented wrapper for any arithmetic type.
This wrapper intercepts all arithmetic operations and records them in the global instrumented_stats counters. The underlying type T must support standard arithmetic operators.
| T | The underlying number type (e.g., cfloat<32,8>, posit<32,2>, float) |
| using sw::universal::instrumented< T >::value_type = T |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |