|
| constexpr | TrackedLNS () noexcept |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> |
| constexpr | TrackedLNS (U v) noexcept |
| constexpr | TrackedLNS (LNSType v) noexcept |
| constexpr | TrackedLNS (LNSType v, ShadowType s, double err, uint64_t a, uint64_t m, uint64_t d, uint64_t c, uint64_t ab=0) noexcept |
| constexpr | TrackedLNS (const TrackedLNS &) noexcept=default |
| constexpr | TrackedLNS (TrackedLNS &&) noexcept=default |
| constexpr TrackedLNS & | operator= (const TrackedLNS &) noexcept=default |
| constexpr TrackedLNS & | operator= (TrackedLNS &&) noexcept=default |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> |
| constexpr TrackedLNS & | operator= (U v) noexcept |
| constexpr LNSType | value () const noexcept |
| constexpr ShadowType | shadow () const noexcept |
| constexpr | operator LNSType () const noexcept |
| constexpr uint64_t | additions () const noexcept |
| | Number of additions (the only error source in LNS).
|
| constexpr uint64_t | multiplications () const noexcept |
| | Number of multiplications (exact in LNS!).
|
| constexpr uint64_t | divisions () const noexcept |
| | Number of divisions (exact in LNS!).
|
| constexpr uint64_t | cancellations () const noexcept |
| | Number of near-cancellation events (a ~= -b).
|
| constexpr uint64_t | absorptions () const noexcept |
| | Number of absorption events (small operand swallowed).
|
| constexpr bool | had_absorption () const noexcept |
| | Did any absorption occur?
|
| constexpr uint64_t | operations () const noexcept |
| | Total operations.
|
| constexpr uint64_t | exact_operations () const noexcept |
| | Exact operations (mult + div in LNS).
|
| double | error () const noexcept |
| | Total error (difference from shadow).
|
| double | addition_error () const noexcept |
| | Error accumulated only from additions.
|
| double | relative_error () const noexcept |
| | Relative error.
|
| double | valid_bits () const noexcept |
| | Valid bits remaining, capped at type precision.
|
| bool | is_exact () const noexcept |
| | Is the result exact? (Only possible if no additions were performed).
|
| bool | had_cancellation () const noexcept |
| | Was there catastrophic cancellation?
|
| TrackedLNS | operator+ (const TrackedLNS &rhs) const |
| | Addition: THE ONLY SOURCE OF ERROR in LNS Also detects near-cancellation when a ~= -b and absorption when |a| >> |b|.
|
| TrackedLNS | operator- (const TrackedLNS &rhs) const |
| | Subtraction: Also introduces error (like addition) Detects cancellation when a ~= b and absorption when |a| >> |b|.
|
| TrackedLNS | operator- () const |
| | Unary minus: No error (just sign flip, preserves absorptions).
|
| TrackedLNS | operator* (const TrackedLNS &rhs) const |
| | Multiplication: EXACT in LNS!
|
| TrackedLNS | operator/ (const TrackedLNS &rhs) const |
| | Division: EXACT in LNS! No error introduced.
|
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> |
| TrackedLNS | operator+ (U rhs) const |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> |
| TrackedLNS | operator- (U rhs) const |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> |
| TrackedLNS | operator* (U rhs) const |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> |
| TrackedLNS | operator/ (U rhs) const |
| TrackedLNS & | operator+= (const TrackedLNS &rhs) |
| TrackedLNS & | operator-= (const TrackedLNS &rhs) |
| TrackedLNS & | operator*= (const TrackedLNS &rhs) |
| TrackedLNS & | operator/= (const TrackedLNS &rhs) |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> |
| TrackedLNS & | operator+= (U rhs) |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> |
| TrackedLNS & | operator-= (U rhs) |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> |
| TrackedLNS & | operator*= (U rhs) |
| template<typename U, typename = std::enable_if_t<std::is_arithmetic_v<U>>> |
| TrackedLNS & | operator/= (U rhs) |
| bool | operator== (const TrackedLNS &rhs) const noexcept |
| bool | operator!= (const TrackedLNS &rhs) const noexcept |
| bool | operator< (const TrackedLNS &rhs) const noexcept |
| bool | operator<= (const TrackedLNS &rhs) const noexcept |
| bool | operator> (const TrackedLNS &rhs) const noexcept |
| bool | operator>= (const TrackedLNS &rhs) const noexcept |
| void | report (std::ostream &os) const |
template<typename LNSType, typename ShadowType = double>
class sw::universal::TrackedLNS< LNSType, ShadowType >
TrackedLNS provides specialized error tracking for LNS types exploiting the fact that multiplication is exact in log representation.