Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
sw::universal::TrackedAreal< ArealType > Class Template Reference

TrackedAreal exposes areal's native ubit uncertainty tracking with a consistent interface matching other tracked types. More...

#include <tracked.hpp>

Public Types

using value_type = ArealType

Public Member Functions

constexpr TrackedAreal () noexcept
template<typename U>
constexpr TrackedAreal (U v) noexcept
constexpr TrackedAreal (ArealType v, uint64_t ops) noexcept
constexpr TrackedAreal (const TrackedAreal &) noexcept=default
constexpr TrackedAreal (TrackedAreal &&) noexcept=default
constexpr TrackedAreal & operator= (const TrackedAreal &) noexcept=default
constexpr TrackedAreal & operator= (TrackedAreal &&) noexcept=default
template<typename U>
constexpr TrackedAreal & operator= (U v) noexcept
constexpr ArealType value () const noexcept
constexpr uint64_t operations () const noexcept
constexpr operator ArealType () const noexcept
bool is_exact () const noexcept
 Check if value is exact (ubit = 0).
double error () const noexcept
 Error bound based on ubit When ubit=1, true value is in (value, next(value)).
double relative_error () const noexcept
double valid_bits () const noexcept
TrackedAreal operator+ (const TrackedAreal &rhs) const
TrackedAreal operator- (const TrackedAreal &rhs) const
TrackedAreal operator- () const
TrackedAreal operator* (const TrackedAreal &rhs) const
TrackedAreal operator/ (const TrackedAreal &rhs) const
TrackedAreal & operator+= (const TrackedAreal &rhs)
TrackedAreal & operator-= (const TrackedAreal &rhs)
TrackedAreal & operator*= (const TrackedAreal &rhs)
TrackedAreal & operator/= (const TrackedAreal &rhs)
bool operator== (const TrackedAreal &rhs) const noexcept
bool operator!= (const TrackedAreal &rhs) const noexcept
bool operator< (const TrackedAreal &rhs) const noexcept
bool operator<= (const TrackedAreal &rhs) const noexcept
bool operator> (const TrackedAreal &rhs) const noexcept
bool operator>= (const TrackedAreal &rhs) const noexcept
void report (std::ostream &os) const

Detailed Description

template<typename ArealType>
class sw::universal::TrackedAreal< ArealType >

TrackedAreal exposes areal's native ubit uncertainty tracking with a consistent interface matching other tracked types.

Member Typedef Documentation

◆ value_type

template<typename ArealType>
using sw::universal::TrackedAreal< ArealType >::value_type = ArealType

Constructor & Destructor Documentation

◆ TrackedAreal() [1/5]

template<typename ArealType>
sw::universal::TrackedAreal< ArealType >::TrackedAreal ( )
inlineconstexprnoexcept

◆ TrackedAreal() [2/5]

template<typename ArealType>
template<typename U>
sw::universal::TrackedAreal< ArealType >::TrackedAreal ( U v)
inlineconstexprnoexcept

◆ TrackedAreal() [3/5]

template<typename ArealType>
sw::universal::TrackedAreal< ArealType >::TrackedAreal ( ArealType v,
uint64_t ops )
inlineconstexprnoexcept

◆ TrackedAreal() [4/5]

template<typename ArealType>
sw::universal::TrackedAreal< ArealType >::TrackedAreal ( const TrackedAreal< ArealType > & )
constexprdefaultnoexcept

◆ TrackedAreal() [5/5]

template<typename ArealType>
sw::universal::TrackedAreal< ArealType >::TrackedAreal ( TrackedAreal< ArealType > && )
constexprdefaultnoexcept

Member Function Documentation

◆ error()

template<typename ArealType>
double sw::universal::TrackedAreal< ArealType >::error ( ) const
inlinenoexcept

Error bound based on ubit When ubit=1, true value is in (value, next(value)).

◆ is_exact()

template<typename ArealType>
bool sw::universal::TrackedAreal< ArealType >::is_exact ( ) const
inlinenoexcept

Check if value is exact (ubit = 0).

◆ operations()

template<typename ArealType>
uint64_t sw::universal::TrackedAreal< ArealType >::operations ( ) const
inlineconstexprnoexcept

◆ operator ArealType()

template<typename ArealType>
sw::universal::TrackedAreal< ArealType >::operator ArealType ( ) const
inlineconstexprnoexcept

◆ operator!=()

template<typename ArealType>
bool sw::universal::TrackedAreal< ArealType >::operator!= ( const TrackedAreal< ArealType > & rhs) const
inlinenoexcept

◆ operator*()

template<typename ArealType>
TrackedAreal sw::universal::TrackedAreal< ArealType >::operator* ( const TrackedAreal< ArealType > & rhs) const
inline

◆ operator*=()

template<typename ArealType>
TrackedAreal & sw::universal::TrackedAreal< ArealType >::operator*= ( const TrackedAreal< ArealType > & rhs)
inline

◆ operator+()

template<typename ArealType>
TrackedAreal sw::universal::TrackedAreal< ArealType >::operator+ ( const TrackedAreal< ArealType > & rhs) const
inline

◆ operator+=()

template<typename ArealType>
TrackedAreal & sw::universal::TrackedAreal< ArealType >::operator+= ( const TrackedAreal< ArealType > & rhs)
inline

◆ operator-() [1/2]

template<typename ArealType>
TrackedAreal sw::universal::TrackedAreal< ArealType >::operator- ( ) const
inline

◆ operator-() [2/2]

template<typename ArealType>
TrackedAreal sw::universal::TrackedAreal< ArealType >::operator- ( const TrackedAreal< ArealType > & rhs) const
inline

◆ operator-=()

template<typename ArealType>
TrackedAreal & sw::universal::TrackedAreal< ArealType >::operator-= ( const TrackedAreal< ArealType > & rhs)
inline

◆ operator/()

template<typename ArealType>
TrackedAreal sw::universal::TrackedAreal< ArealType >::operator/ ( const TrackedAreal< ArealType > & rhs) const
inline

◆ operator/=()

template<typename ArealType>
TrackedAreal & sw::universal::TrackedAreal< ArealType >::operator/= ( const TrackedAreal< ArealType > & rhs)
inline

◆ operator<()

template<typename ArealType>
bool sw::universal::TrackedAreal< ArealType >::operator< ( const TrackedAreal< ArealType > & rhs) const
inlinenoexcept

◆ operator<=()

template<typename ArealType>
bool sw::universal::TrackedAreal< ArealType >::operator<= ( const TrackedAreal< ArealType > & rhs) const
inlinenoexcept

◆ operator=() [1/3]

template<typename ArealType>
TrackedAreal & sw::universal::TrackedAreal< ArealType >::operator= ( const TrackedAreal< ArealType > & )
constexprdefaultnoexcept

◆ operator=() [2/3]

template<typename ArealType>
TrackedAreal & sw::universal::TrackedAreal< ArealType >::operator= ( TrackedAreal< ArealType > && )
constexprdefaultnoexcept

◆ operator=() [3/3]

template<typename ArealType>
template<typename U>
TrackedAreal & sw::universal::TrackedAreal< ArealType >::operator= ( U v)
inlineconstexprnoexcept

◆ operator==()

template<typename ArealType>
bool sw::universal::TrackedAreal< ArealType >::operator== ( const TrackedAreal< ArealType > & rhs) const
inlinenoexcept

◆ operator>()

template<typename ArealType>
bool sw::universal::TrackedAreal< ArealType >::operator> ( const TrackedAreal< ArealType > & rhs) const
inlinenoexcept

◆ operator>=()

template<typename ArealType>
bool sw::universal::TrackedAreal< ArealType >::operator>= ( const TrackedAreal< ArealType > & rhs) const
inlinenoexcept

◆ relative_error()

template<typename ArealType>
double sw::universal::TrackedAreal< ArealType >::relative_error ( ) const
inlinenoexcept

◆ report()

template<typename ArealType>
void sw::universal::TrackedAreal< ArealType >::report ( std::ostream & os) const
inline

◆ valid_bits()

template<typename ArealType>
double sw::universal::TrackedAreal< ArealType >::valid_bits ( ) const
inlinenoexcept

◆ value()

template<typename ArealType>
ArealType sw::universal::TrackedAreal< ArealType >::value ( ) const
inlineconstexprnoexcept

The documentation for this class was generated from the following file:
  • /home/runner/work/universal/universal/include/sw/universal/utility/tracked.hpp