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::bposit< _nbits, _rs, _es, bt > Class Template Reference

#include <bposit_impl.hpp>

Classes

struct  fields

Public Types

using BlockType = bt
using BlockBinary = blockbinary<nbits, bt, BinaryNumberType::Signed>

Public Member Functions

 bposit ()=default
constexpr bposit (const bposit &)=default
constexpr bposit (bposit &&)=default
constexpr bposit & operator= (const bposit &)=default
constexpr bposit & operator= (bposit &&)=default
constexpr bposit (const SpecificValue code) noexcept
constexpr bposit (signed char v) noexcept
constexpr bposit (short v) noexcept
constexpr bposit (int v) noexcept
constexpr bposit (long v) noexcept
constexpr bposit (long long v) noexcept
constexpr bposit (char v) noexcept
constexpr bposit (unsigned char v) noexcept
constexpr bposit (unsigned short v) noexcept
constexpr bposit (unsigned int v) noexcept
constexpr bposit (unsigned long v) noexcept
constexpr bposit (unsigned long long v) noexcept
CONSTEXPRESSION bposit (float v) noexcept
CONSTEXPRESSION bposit (double v) noexcept
 bposit (long double v) noexcept
constexpr bposit & operator= (signed char rhs) noexcept
constexpr bposit & operator= (short rhs) noexcept
constexpr bposit & operator= (int rhs) noexcept
constexpr bposit & operator= (long rhs) noexcept
constexpr bposit & operator= (long long rhs) noexcept
constexpr bposit & operator= (char rhs) noexcept
constexpr bposit & operator= (unsigned char rhs) noexcept
constexpr bposit & operator= (unsigned short rhs) noexcept
constexpr bposit & operator= (unsigned int rhs) noexcept
constexpr bposit & operator= (unsigned long rhs) noexcept
constexpr bposit & operator= (unsigned long long rhs) noexcept
CONSTEXPRESSION bposit & operator= (float rhs) noexcept
CONSTEXPRESSION bposit & operator= (double rhs) noexcept
bposit & operator= (long double rhs) noexcept
 operator float () const noexcept
 operator double () const noexcept
 operator long double () const noexcept
constexpr operator int () const noexcept
constexpr operator long () const noexcept
constexpr operator long long () const noexcept
constexpr operator unsigned int () const noexcept
constexpr operator unsigned long () const noexcept
constexpr operator unsigned long long () const noexcept
template<typename Integer>
constexpr Integer to_integer () const noexcept
constexpr bposit operator- () const noexcept
constexpr bposit & operator+= (const bposit &rhs)
constexpr bposit & operator-= (const bposit &rhs)
constexpr bposit & operator*= (const bposit &rhs)
constexpr bposit & operator/= (const bposit &rhs)
constexpr bposit & operator++ () noexcept
constexpr bposit operator++ (int) noexcept
constexpr bposit & operator-- () noexcept
constexpr bposit operator-- (int) noexcept
constexpr bool sign () const noexcept
constexpr bool isneg () const noexcept
constexpr bool ispos () const noexcept
constexpr bool iszero () const noexcept
constexpr bool isnar () const noexcept
constexpr bool isone () const noexcept
constexpr bool isminusone () const noexcept
constexpr bool ispowerof2 () const noexcept
constexpr int regime () const noexcept
constexpr unsigned regime_size () const noexcept
constexpr int scale () const noexcept
constexpr void clear () noexcept
constexpr void setzero () noexcept
constexpr void setnar () noexcept
constexpr bposit & maxpos () noexcept
constexpr bposit & minpos () noexcept
constexpr bposit & zero () noexcept
constexpr bposit & minneg () noexcept
constexpr bposit & maxneg () noexcept
constexpr bposit & setbits (std::uint64_t value) noexcept
constexpr bposit & setbit (unsigned index, bool v=true) noexcept
constexpr BlockBinary bits () const noexcept
constexpr std::uint64_t raw () const noexcept
constexpr fields decode_fields () const noexcept
template<BlockTripleOperator op>
constexpr void normalize (blocktriple< fbits, op, bt > &tgt) const noexcept
template<BlockTripleOperator op>
constexpr bposit & assign (const blocktriple< fbits, op, bt > &v) noexcept

Static Public Member Functions

static constexpr bposit pow2 (int k) noexcept
static constexpr std::uint64_t encode (bool neg, int scale, std::uint64_t frac, unsigned q, bool sticky) noexcept
static constexpr fields decode (std::uint64_t pattern) noexcept
template<BlockTripleOperator op>
static constexpr std::uint64_t bit_window (const blocktriple< fbits, op, bt > &v, int lo, unsigned count) noexcept
static constexpr std::uint64_t negate_pattern (std::uint64_t p) noexcept

Static Public Attributes

static constexpr unsigned nbits = _nbits
static constexpr unsigned rs = _rs
static constexpr unsigned es = _es
static constexpr unsigned rbits = rs
static constexpr unsigned ebits = es
static constexpr unsigned fbits = nbits - 3 - es
static constexpr unsigned fbitsmin = nbits - 1 - rs - es
static constexpr int maxscale = static_cast<int>(static_cast<std::uint64_t>(rs) << es) - 1
static constexpr int minscale = -static_cast<int>(static_cast<std::uint64_t>(rs) << es)
static constexpr std::uint64_t pattern_mask = (nbits == 64) ? ~0ull : ((1ull << nbits) - 1ull)
static constexpr std::uint64_t nar_pattern = 1ull << (nbits - 1)
static constexpr std::uint64_t maxpos_pattern = nar_pattern - 1ull
static constexpr std::uint64_t one_pattern = 1ull << (nbits - 2)

Member Typedef Documentation

◆ BlockBinary

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
using sw::universal::bposit< _nbits, _rs, _es, bt >::BlockBinary = blockbinary<nbits, bt, BinaryNumberType::Signed>

◆ BlockType

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
using sw::universal::bposit< _nbits, _rs, _es, bt >::BlockType = bt

Constructor & Destructor Documentation

◆ bposit() [1/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( )
default

◆ bposit() [2/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( const bposit< _nbits, _rs, _es, bt > & )
constexprdefault

◆ bposit() [3/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( bposit< _nbits, _rs, _es, bt > && )
constexprdefault

◆ bposit() [4/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( const SpecificValue code)
inlineconstexprnoexcept

◆ bposit() [5/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( signed char v)
inlineconstexprnoexcept

◆ bposit() [6/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( short v)
inlineconstexprnoexcept

◆ bposit() [7/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( int v)
inlineconstexprnoexcept

◆ bposit() [8/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( long v)
inlineconstexprnoexcept

◆ bposit() [9/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( long long v)
inlineconstexprnoexcept

◆ bposit() [10/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( char v)
inlineconstexprnoexcept

◆ bposit() [11/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( unsigned char v)
inlineconstexprnoexcept

◆ bposit() [12/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( unsigned short v)
inlineconstexprnoexcept

◆ bposit() [13/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( unsigned int v)
inlineconstexprnoexcept

◆ bposit() [14/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( unsigned long v)
inlineconstexprnoexcept

◆ bposit() [15/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( unsigned long long v)
inlineconstexprnoexcept

◆ bposit() [16/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
CONSTEXPRESSION sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( float v)
inlinenoexcept

◆ bposit() [17/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
CONSTEXPRESSION sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( double v)
inlinenoexcept

◆ bposit() [18/18]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::bposit ( long double v)
inlinenoexcept

Member Function Documentation

◆ assign()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
template<BlockTripleOperator op>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::assign ( const blocktriple< fbits, op, bt > & v)
inlineconstexprnoexcept

◆ bit_window()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
template<BlockTripleOperator op>
constexpr std::uint64_t sw::universal::bposit< _nbits, _rs, _es, bt >::bit_window ( const blocktriple< fbits, op, bt > & v,
int lo,
unsigned count )
inlinestaticconstexprnoexcept

◆ bits()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
BlockBinary sw::universal::bposit< _nbits, _rs, _es, bt >::bits ( ) const
inlineconstexprnoexcept

◆ clear()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
void sw::universal::bposit< _nbits, _rs, _es, bt >::clear ( )
inlineconstexprnoexcept

◆ decode()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
constexpr fields sw::universal::bposit< _nbits, _rs, _es, bt >::decode ( std::uint64_t pattern)
inlinestaticconstexprnoexcept

◆ decode_fields()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
fields sw::universal::bposit< _nbits, _rs, _es, bt >::decode_fields ( ) const
inlineconstexprnoexcept

◆ encode()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
constexpr std::uint64_t sw::universal::bposit< _nbits, _rs, _es, bt >::encode ( bool neg,
int scale,
std::uint64_t frac,
unsigned q,
bool sticky )
inlinestaticconstexprnoexcept

◆ isminusone()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::bposit< _nbits, _rs, _es, bt >::isminusone ( ) const
inlineconstexprnoexcept

◆ isnar()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::bposit< _nbits, _rs, _es, bt >::isnar ( ) const
inlineconstexprnoexcept

◆ isneg()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::bposit< _nbits, _rs, _es, bt >::isneg ( ) const
inlineconstexprnoexcept

◆ isone()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::bposit< _nbits, _rs, _es, bt >::isone ( ) const
inlineconstexprnoexcept

◆ ispos()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::bposit< _nbits, _rs, _es, bt >::ispos ( ) const
inlineconstexprnoexcept

◆ ispowerof2()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::bposit< _nbits, _rs, _es, bt >::ispowerof2 ( ) const
inlineconstexprnoexcept

◆ iszero()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::bposit< _nbits, _rs, _es, bt >::iszero ( ) const
inlineconstexprnoexcept

◆ maxneg()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::maxneg ( )
inlineconstexprnoexcept

◆ maxpos()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::maxpos ( )
inlineconstexprnoexcept

◆ minneg()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::minneg ( )
inlineconstexprnoexcept

◆ minpos()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::minpos ( )
inlineconstexprnoexcept

◆ negate_pattern()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
constexpr std::uint64_t sw::universal::bposit< _nbits, _rs, _es, bt >::negate_pattern ( std::uint64_t p)
inlinestaticconstexprnoexcept

◆ normalize()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
template<BlockTripleOperator op>
void sw::universal::bposit< _nbits, _rs, _es, bt >::normalize ( blocktriple< fbits, op, bt > & tgt) const
inlineconstexprnoexcept

◆ operator double()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::operator double ( ) const
inlineexplicitnoexcept

◆ operator float()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::operator float ( ) const
inlineexplicitnoexcept

◆ operator int()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::operator int ( ) const
inlineexplicitconstexprnoexcept

◆ operator long()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::operator long ( ) const
inlineexplicitconstexprnoexcept

◆ operator long double()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::operator long double ( ) const
inlineexplicitnoexcept

◆ operator long long()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::operator long long ( ) const
inlineexplicitconstexprnoexcept

◆ operator unsigned int()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::operator unsigned int ( ) const
inlineexplicitconstexprnoexcept

◆ operator unsigned long()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::operator unsigned long ( ) const
inlineexplicitconstexprnoexcept

◆ operator unsigned long long()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
sw::universal::bposit< _nbits, _rs, _es, bt >::operator unsigned long long ( ) const
inlineexplicitconstexprnoexcept

◆ operator*=()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator*= ( const bposit< _nbits, _rs, _es, bt > & rhs)
inlineconstexpr

◆ operator++() [1/2]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator++ ( )
inlineconstexprnoexcept

◆ operator++() [2/2]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit sw::universal::bposit< _nbits, _rs, _es, bt >::operator++ ( int )
inlineconstexprnoexcept

◆ operator+=()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator+= ( const bposit< _nbits, _rs, _es, bt > & rhs)
inlineconstexpr

◆ operator-()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit sw::universal::bposit< _nbits, _rs, _es, bt >::operator- ( ) const
inlineconstexprnoexcept

◆ operator--() [1/2]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator-- ( )
inlineconstexprnoexcept

◆ operator--() [2/2]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit sw::universal::bposit< _nbits, _rs, _es, bt >::operator-- ( int )
inlineconstexprnoexcept

◆ operator-=()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator-= ( const bposit< _nbits, _rs, _es, bt > & rhs)
inlineconstexpr

◆ operator/=()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator/= ( const bposit< _nbits, _rs, _es, bt > & rhs)
inlineconstexpr

◆ operator=() [1/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( bposit< _nbits, _rs, _es, bt > && )
constexprdefault

◆ operator=() [2/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( char rhs)
inlineconstexprnoexcept

◆ operator=() [3/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( const bposit< _nbits, _rs, _es, bt > & )
constexprdefault

◆ operator=() [4/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
CONSTEXPRESSION bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( double rhs)
inlinenoexcept

◆ operator=() [5/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
CONSTEXPRESSION bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( float rhs)
inlinenoexcept

◆ operator=() [6/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( int rhs)
inlineconstexprnoexcept

◆ operator=() [7/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( long double rhs)
inlinenoexcept

◆ operator=() [8/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( long long rhs)
inlineconstexprnoexcept

◆ operator=() [9/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( long rhs)
inlineconstexprnoexcept

◆ operator=() [10/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( short rhs)
inlineconstexprnoexcept

◆ operator=() [11/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( signed char rhs)
inlineconstexprnoexcept

◆ operator=() [12/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( unsigned char rhs)
inlineconstexprnoexcept

◆ operator=() [13/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( unsigned int rhs)
inlineconstexprnoexcept

◆ operator=() [14/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( unsigned long long rhs)
inlineconstexprnoexcept

◆ operator=() [15/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( unsigned long rhs)
inlineconstexprnoexcept

◆ operator=() [16/16]

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::operator= ( unsigned short rhs)
inlineconstexprnoexcept

◆ pow2()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
constexpr bposit sw::universal::bposit< _nbits, _rs, _es, bt >::pow2 ( int k)
inlinestaticconstexprnoexcept

◆ raw()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
std::uint64_t sw::universal::bposit< _nbits, _rs, _es, bt >::raw ( ) const
inlineconstexprnoexcept

◆ regime()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
int sw::universal::bposit< _nbits, _rs, _es, bt >::regime ( ) const
inlineconstexprnoexcept

◆ regime_size()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::bposit< _nbits, _rs, _es, bt >::regime_size ( ) const
inlineconstexprnoexcept

◆ scale()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
int sw::universal::bposit< _nbits, _rs, _es, bt >::scale ( ) const
inlineconstexprnoexcept

◆ setbit()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::setbit ( unsigned index,
bool v = true )
inlineconstexprnoexcept

◆ setbits()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::setbits ( std::uint64_t value)
inlineconstexprnoexcept

◆ setnar()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
void sw::universal::bposit< _nbits, _rs, _es, bt >::setnar ( )
inlineconstexprnoexcept

◆ setzero()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
void sw::universal::bposit< _nbits, _rs, _es, bt >::setzero ( )
inlineconstexprnoexcept

◆ sign()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::bposit< _nbits, _rs, _es, bt >::sign ( ) const
inlineconstexprnoexcept

◆ to_integer()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
template<typename Integer>
Integer sw::universal::bposit< _nbits, _rs, _es, bt >::to_integer ( ) const
inlineconstexprnoexcept

◆ zero()

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
bposit & sw::universal::bposit< _nbits, _rs, _es, bt >::zero ( )
inlineconstexprnoexcept

Member Data Documentation

◆ ebits

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::bposit< _nbits, _rs, _es, bt >::ebits = es
staticconstexpr

◆ es

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::bposit< _nbits, _rs, _es, bt >::es = _es
staticconstexpr

◆ fbits

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::bposit< _nbits, _rs, _es, bt >::fbits = nbits - 3 - es
staticconstexpr

◆ fbitsmin

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::bposit< _nbits, _rs, _es, bt >::fbitsmin = nbits - 1 - rs - es
staticconstexpr

◆ maxpos_pattern

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
std::uint64_t sw::universal::bposit< _nbits, _rs, _es, bt >::maxpos_pattern = nar_pattern - 1ull
staticconstexpr

◆ maxscale

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
int sw::universal::bposit< _nbits, _rs, _es, bt >::maxscale = static_cast<int>(static_cast<std::uint64_t>(rs) << es) - 1
staticconstexpr

◆ minscale

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
int sw::universal::bposit< _nbits, _rs, _es, bt >::minscale = -static_cast<int>(static_cast<std::uint64_t>(rs) << es)
staticconstexpr

◆ nar_pattern

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
std::uint64_t sw::universal::bposit< _nbits, _rs, _es, bt >::nar_pattern = 1ull << (nbits - 1)
staticconstexpr

◆ nbits

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::bposit< _nbits, _rs, _es, bt >::nbits = _nbits
staticconstexpr

◆ one_pattern

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
std::uint64_t sw::universal::bposit< _nbits, _rs, _es, bt >::one_pattern = 1ull << (nbits - 2)
staticconstexpr

◆ pattern_mask

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
std::uint64_t sw::universal::bposit< _nbits, _rs, _es, bt >::pattern_mask = (nbits == 64) ? ~0ull : ((1ull << nbits) - 1ull)
staticconstexpr

◆ rbits

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::bposit< _nbits, _rs, _es, bt >::rbits = rs
staticconstexpr

◆ rs

template<unsigned _nbits, unsigned _rs, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::bposit< _nbits, _rs, _es, bt >::rs = _rs
staticconstexpr

The documentation for this class was generated from the following files:
  • /home/runner/work/universal/universal/include/sw/universal/number/bposit/bposit_fwd.hpp
  • /home/runner/work/universal/universal/include/sw/universal/number/bposit/bposit_impl.hpp