[Boost-users] [multiprecision] 128 bit integer support on Windows

2020-09-15 Thread Neill Clift via Boost-users
Hi, I managed to get boost multi-precision to work with 128 bit integers on Windows using clang. I had to change this in clang.hpp: #if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER) <--- remove this last thing # define BOOST_HAS_INT128 #endif Clang-cl defines _

[Boost-users] Boost uses unoptimized subtraction because of typo in intel_intrinsics.hpp

2021-08-18 Thread Neill Clift via Boost-users
Hi, In my program I am seeing my code use the slower (I assume) subtract_unsigned_constexpr rather than subtract_unsigned with he borrow chain handled intrinsics. This seems to be happening because of these lines in intel_intrinsics.hpp: #if defined(__clang__) && (__clang__ < 9) // We appear to

[Boost-users] [multiprecission] some thoughts on add_unsigned.hpp

2021-08-18 Thread Neill Clift via Boost-users
Hi, In my program I see a lot of time taken up by add/subtract_unsigned. I have a couple of thoughts on the code: Carry propagation outside the range of the smallest number can be improved: for (; i < x && carry; ++i) carry = ::boost::multiprecision::detail::addcarry_limb(carry, pa

[Boost-users] [multiprecission] Large divides layered on 128 bit divides

2021-08-19 Thread Neill Clift via Boost-users
Hi, The architecture of cpp_int being build on 64 bit arithmetic using 128 bit double_limb_type is interesting. I have a question on the large divide (divide_unsigned_helper). It uses the upper portions of the large integers to get an estimation of the quotient. Subtracts out a multiple of that

Re: [Boost-users] [multiprecission] Large divides layered on 128 bit divides

2021-08-21 Thread Neill Clift via Boost-users
given what you tell me I think my way forward is to try and get a better version of the divide routines working. Neill. -Original Message- From: Boost-users On Behalf Of John Maddock via Boost-users Sent: Friday, August 20, 2021 9:43 AM To: Neill Clift via Boost-users Cc: John Maddock

[Boost-users] Comment on divide_unsigned_helper

2021-09-03 Thread Neill Clift via Boost-users
Hi, I was trying to understand the algorithm inside the main divide routine. I struggled with this bit of code: if ((prem[r_order] <= py[y_order]) && (r_order > 0)) { double_limb_type a = (static_cast(prem[r_order]) << CppInt1::limb_bits) | prem[r_order - 1]; double