Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jzmaddock committed Jul 4, 2022
2 parents 6752d07 + 17137b8 commit 3b333b1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions include/boost/multiprecision/cpp_int/intel_intrinsics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@
#undef BOOST_MP_HAS_IMMINTRIN_H
#endif

#if defined(BOOST_MSVC) && !defined(_M_IX86) && !defined(_M_X64) && !defined(_M_AMD64)
#if defined(_WIN32) && (defined(_M_ARM64) || defined(_M_ARM))
//
// When targeting platforms such as ARM, msvc still has the Intel headers in it's include path
// even though they're not usable. See https://github.com/boostorg/multiprecision/issues/321
// When targeting platforms such as ARM, msvc (and also clang when emulating msvc) still has the
// Intel headers in its include path even though they're not usable.
// See https://github.com/boostorg/multiprecision/issues/321
// Also https://github.com/boostorg/multiprecision/issues/475
//
#undef BOOST_MP_HAS_IMMINTRIN_H
#endif
Expand Down
3 changes: 2 additions & 1 deletion include/boost/multiprecision/integer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,12 @@ BOOST_MP_CXX14_CONSTEXPR Integer bitwise_sqrt(const Integer& x, Integer& r)
template <class Integer>
BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<boost::multiprecision::detail::is_integral<Integer>::value, Integer>::type sqrt(const Integer& x, Integer& r)
{
return detail::bitwise_sqrt(x, r);
#ifndef BOOST_MP_NO_CONSTEXPR_DETECTION
// recursive Karatsuba sqrt can cause issues in constexpr context:
if (BOOST_MP_IS_CONST_EVALUATED(x))
{
return detail::bitwise_sqrt(x, r);
}
#endif
if (x == 0u) {
r = 0u;
Expand Down
2 changes: 1 addition & 1 deletion test/test_eigen_interop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ void example10()
cout << "a.abs().sqrt() =" << endl
<< a.abs().sqrt() << endl;
cout << "a.min(a.abs().sqrt()) =" << endl
<< a.std::min)(a.abs().sqrt()) << endl;
<< (a.min)(a.abs().sqrt()) << endl;
}

template <class Num>
Expand Down

0 comments on commit 3b333b1

Please sign in to comment.