Remove FMT_ALWAYS_INLINE

This commit is contained in:
Victor Zverovich 2021-06-04 20:29:54 -07:00
parent cfde93afe0
commit 5223f552c8
2 changed files with 5 additions and 14 deletions

View File

@ -637,8 +637,8 @@ inline uint64_t power_of_10_64(int exp) {
// error: the size of the region (lower, upper) outside of which numbers // error: the size of the region (lower, upper) outside of which numbers
// definitely do not round to value (Delta in Grisu3). // definitely do not round to value (Delta in Grisu3).
template <typename Handler> template <typename Handler>
FMT_ALWAYS_INLINE digits::result grisu_gen_digits(fp value, uint64_t error, FMT_INLINE digits::result grisu_gen_digits(fp value, uint64_t error, int& exp,
int& exp, Handler& handler) { Handler& handler) {
const fp one(1ULL << -value.e, value.e); const fp one(1ULL << -value.e, value.e);
// The integral part of scaled value (p1 in Grisu) = value / one. It cannot be // The integral part of scaled value (p1 in Grisu) = value / one. It cannot be
// zero because it contains a product of two 64-bit numbers with MSB set (due // zero because it contains a product of two 64-bit numbers with MSB set (due
@ -1916,7 +1916,7 @@ bool is_center_integer(typename float_info<T>::carrier_uint two_f, int exponent,
} }
// Remove trailing zeros from n and return the number of zeros removed (float) // Remove trailing zeros from n and return the number of zeros removed (float)
FMT_ALWAYS_INLINE int remove_trailing_zeros(uint32_t& n) FMT_NOEXCEPT { FMT_INLINE int remove_trailing_zeros(uint32_t& n) FMT_NOEXCEPT {
#ifdef FMT_BUILTIN_CTZ #ifdef FMT_BUILTIN_CTZ
int t = FMT_BUILTIN_CTZ(n); int t = FMT_BUILTIN_CTZ(n);
#else #else
@ -1944,7 +1944,7 @@ FMT_ALWAYS_INLINE int remove_trailing_zeros(uint32_t& n) FMT_NOEXCEPT {
} }
// Removes trailing zeros and returns the number of zeros removed (double) // Removes trailing zeros and returns the number of zeros removed (double)
FMT_ALWAYS_INLINE int remove_trailing_zeros(uint64_t& n) FMT_NOEXCEPT { FMT_INLINE int remove_trailing_zeros(uint64_t& n) FMT_NOEXCEPT {
#ifdef FMT_BUILTIN_CTZLL #ifdef FMT_BUILTIN_CTZLL
int t = FMT_BUILTIN_CTZLL(n); int t = FMT_BUILTIN_CTZLL(n);
#else #else
@ -2030,8 +2030,7 @@ FMT_ALWAYS_INLINE int remove_trailing_zeros(uint64_t& n) FMT_NOEXCEPT {
// The main algorithm for shorter interval case // The main algorithm for shorter interval case
template <class T> template <class T>
FMT_ALWAYS_INLINE decimal_fp<T> shorter_interval_case(int exponent) FMT_INLINE decimal_fp<T> shorter_interval_case(int exponent) FMT_NOEXCEPT {
FMT_NOEXCEPT {
decimal_fp<T> ret_value; decimal_fp<T> ret_value;
// Compute k and beta // Compute k and beta
const int minus_k = floor_log10_pow2_minus_log10_4_over_3(exponent); const int minus_k = floor_log10_pow2_minus_log10_4_over_3(exponent);

View File

@ -991,14 +991,6 @@ FMT_CONSTEXPR auto count_digits(UInt n) -> int {
template <> auto count_digits<4>(detail::fallback_uintptr n) -> int; template <> auto count_digits<4>(detail::fallback_uintptr n) -> int;
#if FMT_GCC_VERSION || FMT_CLANG_VERSION
# define FMT_ALWAYS_INLINE inline __attribute__((always_inline))
#elif FMT_MSC_VER
# define FMT_ALWAYS_INLINE __forceinline
#else
# define FMT_ALWAYS_INLINE inline
#endif
#ifdef FMT_BUILTIN_CLZ #ifdef FMT_BUILTIN_CLZ
// Optional version of count_digits for better performance on 32-bit platforms. // Optional version of count_digits for better performance on 32-bit platforms.
FMT_CONSTEXPR20 inline auto count_digits(uint32_t n) -> int { FMT_CONSTEXPR20 inline auto count_digits(uint32_t n) -> int {