|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
Base class, specialization for no storage (zero-length bitset). More...
#include <ubb.h>
Public Member Functions | |
| constexpr | BaseBitset () noexcept |
| constexpr | BaseBitset (unsigned long long) noexcept |
| WordT & | M_getword (size_t) noexcept |
| constexpr WordT | M_getword (size_t) const noexcept |
| constexpr WordT | M_hiword () const noexcept |
| void | M_do_and (const BaseBitset< 0 > &) noexcept |
| void | M_do_or (const BaseBitset< 0 > &) noexcept |
| void | M_do_xor (const BaseBitset< 0 > &) noexcept |
| void | M_do_left_shift (size_t) noexcept |
| void | M_do_right_shift (size_t) noexcept |
| void | M_do_flip () noexcept |
| void | M_do_set () noexcept |
| void | M_do_reset () noexcept |
| bool | M_is_equal (const BaseBitset< 0 > &) const noexcept |
| bool | M_is_less_than (const BaseBitset< 0 > &) const noexcept |
| bool | M_is_greater_than (const BaseBitset< 0 > &) const noexcept |
| int | M_getMSB () const noexcept |
| bool | M_increment () const noexcept |
| bool | M_decrement () const noexcept |
| template<size_t Nb> | |
| bool | M_are_all () const noexcept |
| bool | M_is_any () const noexcept |
| size_t | M_do_count () const noexcept |
| unsigned long | M_do_to_ulong () const noexcept |
| unsigned long long | M_do_to_ullong () const noexcept |
| size_t | M_do_find_first (size_t) const noexcept |
| size_t | M_do_find_next (size_t, size_t) const noexcept |
| constexpr bool | M_testBit (size_t pos) const noexcept |
| const WordT * | M_getdata () const noexcept |
| bool | M_do_add (const BaseBitset< UBB_WORDS(Nb)> &a, const BaseBitset< UBB_WORDS(Nb)> &b) noexcept |
| Slotwise addtion to this value. | |
| bool | M_do_sub (const BaseBitset< UBB_WORDS(Nb)> &a, const BaseBitset< UBB_WORDS(Nb)> &b) noexcept |
| Slotwise subtraction into this value. | |
Static Public Member Functions | |
| static constexpr size_t | S_whichword (size_t pos) noexcept |
| static constexpr size_t | S_whichbyte (size_t pos) noexcept |
| static constexpr size_t | S_whichbit (size_t pos) noexcept |
| static constexpr WordT | S_maskbit (size_t pos) noexcept |
| static int | S_getMSB (const WordT &val) |
| Finds leading bit of value passed. | |
| static bool | S_increment (WordT &val) |
| increments the value passed. | |
| static bool | S_decrement (WordT &val) |
| decrements the value passed. | |
| static bool | S_add (WordT &accum, const WordT &a, const WordT &b, bool carry) |
| Performs a two-operand addition on a single slot. | |
| static bool | S_sub (WordT &accum, const WordT &a, const WordT &b, const bool borrow) |
| Performs a two-operand subtraction on a single slot. | |
Public Attributes | |
| WordT | M_w [Nw] |
| 0 is the least significant word. | |
Base class, specialization for no storage (zero-length bitset).
See documentation for bitset.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Slotwise addtion to this value.
| a | is an addend. |
| b | is an addend. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Slotwise subtraction into this value.
| a | is the minuend. |
| b | is the subtrahend. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlinestatic |
Performs a two-operand addition on a single slot.
| [in,out] | accum | accumulates the sum. |
| a | is an addend. | |
| b | is an addend. | |
| carry | is true iff a carry was generated by the previous slot. |
|
inlinestatic |
decrements the value passed.
| [in,out] | val | the value to be decremented. |
|
inlinestatic |
Finds leading bit of value passed.
| val | is said value. |
|
inlinestatic |
increments the value passed.
| [in,out] | val | the value to be incremented. |
|
inlinestaticconstexprnoexcept |
|
inlinestatic |
Performs a two-operand subtraction on a single slot.
| [in,out] | accum | accumulates the sum. |
| a | is the minuend. | |
| b | is the (pre-borrow) subtrahend. | |
| borrow | inidcates whether a borrow applies from the previous slot. |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
| WordT universal_bitset::BaseBitset< Nw >::M_w[Nw] |
0 is the least significant word.