https://godbolt.org/z/PGb9e45P1
Right now we have:
BOOST_INT128_EXPORT template <BOOST_INT128_DEFAULTED_SIGNED_INTEGER_CONCEPT>
BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const int128_t lhs, const SignedInteger rhs) noexcept
{
return rhs < 0 ? -detail::default_mul(lhs, -static_cast<std::uint64_t>(rhs)) :
detail::default_mul(lhs, static_cast<std::uint64_t>(rhs));
}
BOOST_INT128_EXPORT template <BOOST_INT128_DEFAULTED_SIGNED_INTEGER_CONCEPT>
BOOST_INT128_HOST_DEVICE constexpr int128_t operator*(const SignedInteger lhs, const int128_t rhs) noexcept
{
return lhs < 0 ? -detail::default_mul(rhs, -static_cast<std::uint64_t>(lhs)) :
detail::default_mul(rhs, static_cast<std::uint64_t>(lhs));
}
In the case where we have a __int128 this could be simplified to the normal memcpy(int128_t to __int128) -> op -> memcpy(__int128 to int128_t)
https://godbolt.org/z/PGb9e45P1
Right now we have:
In the case where we have a
__int128this could be simplified to the normal memcpy(int128_t to __int128) -> op -> memcpy(__int128 to int128_t)