Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
5223f552
Commit
5223f552
authored
Jun 04, 2021
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove FMT_ALWAYS_INLINE
parent
cfde93af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
14 deletions
+5
-14
include/fmt/format-inl.h
include/fmt/format-inl.h
+5
-6
include/fmt/format.h
include/fmt/format.h
+0
-8
No files found.
include/fmt/format-inl.h
View file @
5223f552
...
@@ -637,8 +637,8 @@ inline uint64_t power_of_10_64(int exp) {
...
@@ -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,
...
@@ -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 {
...
@@ -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 {
...
@@ -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
);
...
...
include/fmt/format.h
View file @
5223f552
...
@@ -991,14 +991,6 @@ FMT_CONSTEXPR auto count_digits(UInt n) -> int {
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment