.. index:: pair: namespace; rgpot::simd::detail .. _doxid-namespacergpot_1_1simd_1_1detail: namespace rgpot::simd::detail ============================= .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace detail { // global variables double :target:`kFmaSplit` = 134217729.0; double :target:`kExpInvLn2` = 0x1.71547652b82fep0; double :target:`kExpLn2Hi` = 0x1.62e42feep-1; double :target:`kExpLn2Lo` = 0x1.a39ef35793c76p-33; double :target:`kExpShift` = 0x1.8p52; double :target:`kExpMax` = 710.0; double :target:`kExpMin` = -746.0; double :target:`kExpC2` = 0x1.000000000000ap-1; double :target:`kExpC3` = 0x1.55555555554fep-3; double :target:`kExpC4` = 0x1.55555555506bcp-5; double :target:`kExpC5` = 0x1.1111111126b36p-7; double :target:`kExpC6` = 0x1.6c16c18477083p-10; double :target:`kExpC7` = 0x1.a01a012fee99cp-13; double :target:`kExpC8` = 0x1.a019995efb00fp-16; double :target:`kExpC9` = 0x1.71df18ef76144p-19; double :target:`kExpC10` = 0x1.28adfccb26cd8p-22; double :target:`kExpC11` = 0x1.ad92e899366cbp-26; // global functions void :target:`two_sum`(double a, double b, double& s, double& e); void :target:`two_prod`(double a, double b, double& p, double& e); bool :ref:`fma_hw_active`(); std::uint64_t :target:`bits_of`(double x); double :target:`from_bits`(std::uint64_t u); bool :target:`exp_in_band`(std::uint64_t u, unsigned lo, unsigned hi); bool :target:`fma_ro_domain`(double a, double b, double c); double :target:`fma_ro`(double a, double b, double c, bool& exact_ok); std::uint64_t :target:`exp_bits`(double x); double :target:`exp_from_bits`(std::uint64_t u); double :ref:`exp_pow2`(double m); double :ref:`exp_fixed_lane`(double x); } // namespace detail .. _details-namespacergpot_1_1simd_1_1detail: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; fma_hw_active .. _doxid-exact__fma_8hpp_1ae1626b918b0040fead63049028827091: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool fma_hw_active() True when the hardware fused multiply-add may run: the CPU has FMA3 and the OS saves its registers (CPUID), glibc 2.33 or newer does not mask it, and RGPOT_FMA is not ``software``. Read once per process. The hardware instruction and the software path return the same bits, so this decides speed only. .. index:: pair: function; exp_pow2 .. _doxid-exp_8hpp_1a59657a2b90be37f7535edb25baffa676: .. ref-code-block:: cpp :class: doxyrest-title-code-block double exp_pow2(double m) 2^m for an integer-valued m in [-1022, 1023], built in the exponent field. m + 1023 lands in the low bits of the shifted sum. .. index:: pair: function; exp_fixed_lane .. _doxid-exp_8hpp_1a0a7fba2c8a94dbcdd4e54fe8f1f4499a: .. ref-code-block:: cpp :class: doxyrest-title-code-block double exp_fixed_lane(double x) The body every exp in rgpot runs, scalar or as a vector lane. Branch free: GCC and clang vectorise a loop over it. NaN propagates, +inf gives +inf and -inf gives +0.