File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
math/generic/builtins/basic Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 12
12
13
13
// ReSharper disable once CppUnusedIncludeDirective
14
14
#include " ccmath/internal/math/generic/builtins/builtin_helpers.hpp"
15
+ #include " ccmath/internal/predef/has_builtin.hpp"
15
16
#include " ccmath/internal/support/always_false.hpp"
16
17
17
18
// Checks if the cpu supports FMA instructions.
@@ -51,7 +52,7 @@ namespace ccm::builtin
51
52
*/
52
53
template <typename T>
53
54
inline constexpr bool has_fma =
54
- #if defined (__builtin_fma) || defined (__builtin_fmaf) || defined (__builtin_fmal)
55
+ #if CCM_HAS_BUILTIN (__builtin_fma) || CCM_HAS_BUILTIN (__builtin_fmaf) || CCM_HAS_BUILTIN (__builtin_fmal)
55
56
is_valid_builtin_type<T>;
56
57
#else
57
58
false ;
Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ namespace ccm::support
309
309
if (x < 2 ) { return 1 ; }
310
310
311
311
// Assume we got a good input
312
- const unsigned n = std::numeric_limits<T>::digits - countl_zero (static_cast <T>(x - 1U ));
312
+ const unsigned n = static_cast < unsigned >( std::numeric_limits<T>::digits - countl_zero (static_cast <T>(x - 1U ) ));
313
313
314
314
if constexpr (sizeof (T) >= sizeof (unsigned )) { return T{1 } << n; }
315
315
else
You can’t perform that action at this time.
0 commit comments