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::CORDICDatapathAddSub< Lns, Iterations, Guard > Struct Template Reference

#include <lns_addsub_cordic_datapath.hpp>

Public Types

using Narrow = fixpnt<ibits + narrow_rbits, narrow_rbits, Modulo, std::uint32_t>
using Wide = fixpnt<ibits + wide_rbits, wide_rbits, Modulo, std::uint32_t>

Static Public Member Functions

template<typename F>
static constexpr unsigned iterations () noexcept
template<typename F>
static F pow2 (const F &d)
template<typename F>
static F one_minus (const F &v)
template<typename F>
static F log2 (const F &w)
static double sb_add (double d)
static double sb_sub (double d)
static Lns & add_assign (Lns &lhs, const Lns &rhs)
static Lns & sub_assign (Lns &lhs, const Lns &rhs)

Static Public Attributes

static constexpr unsigned rbits = Lns::rbits
static constexpr unsigned guard = (Guard == cordic::auto_guard) ? cordic::detail::clog2(rbits + 8u) + 2u : Guard
static constexpr unsigned dmax = rbits + guard + 1u
static constexpr unsigned ibits = cordic::detail::clog2(dmax + 1u) + 2u
static constexpr unsigned narrow_rbits = rbits + guard
static constexpr unsigned wide_rbits = 2u * rbits + guard + 2u

Member Typedef Documentation

◆ Narrow

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
using sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::Narrow = fixpnt<ibits + narrow_rbits, narrow_rbits, Modulo, std::uint32_t>

◆ Wide

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
using sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::Wide = fixpnt<ibits + wide_rbits, wide_rbits, Modulo, std::uint32_t>

Member Function Documentation

◆ add_assign()

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
Lns & sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::add_assign ( Lns & lhs,
const Lns & rhs )
inlinestatic

◆ iterations()

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
template<typename F>
constexpr unsigned sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::iterations ( )
inlinestaticconstexprnoexcept

◆ log2()

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
template<typename F>
F sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::log2 ( const F & w)
inlinestatic

◆ one_minus()

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
template<typename F>
F sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::one_minus ( const F & v)
inlinestatic

◆ pow2()

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
template<typename F>
F sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::pow2 ( const F & d)
inlinestatic

◆ sb_add()

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
double sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::sb_add ( double d)
inlinestatic

◆ sb_sub()

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
double sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::sb_sub ( double d)
inlinestatic

◆ sub_assign()

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
Lns & sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::sub_assign ( Lns & lhs,
const Lns & rhs )
inlinestatic

Member Data Documentation

◆ dmax

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
unsigned sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::dmax = rbits + guard + 1u
staticconstexpr

◆ guard

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
unsigned sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::guard = (Guard == cordic::auto_guard) ? cordic::detail::clog2(rbits + 8u) + 2u : Guard
staticconstexpr

◆ ibits

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
unsigned sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::ibits = cordic::detail::clog2(dmax + 1u) + 2u
staticconstexpr

◆ narrow_rbits

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
unsigned sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::narrow_rbits = rbits + guard
staticconstexpr

◆ rbits

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
unsigned sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::rbits = Lns::rbits
staticconstexpr

◆ wide_rbits

template<typename Lns, unsigned Iterations = 0u, unsigned Guard = cordic::auto_guard>
unsigned sw::universal::CORDICDatapathAddSub< Lns, Iterations, Guard >::wide_rbits = 2u * rbits + guard + 2u
staticconstexpr

The documentation for this struct was generated from the following file: