[boost] numeric_cast

5 views
Skip to first unread message

Gero Peterhoff via Boost

unread,
Aug 12, 2022, 8:49:08 PM8/12/22
to bo...@lists.boost.org, Gero Peterhoff
Hallo,
can you improve numeric_cast
1) constexpr
2) vectorisable
The problem is that the compilers on x86 without hardware support (AVX512DQ) do not vectorize the conversions u/int64_t -> float64/32_t. This may also apply to other architectures. But that can be solved manually. My patch requires C++20 (std::bit_cast), but you can probably work around that. Modifications:
- add #include <boost/predef.h>
- improve raw_converter

For a better understanding see https://godbolt.org/z/j58rW411s

regards
Gero
converter_policies.hpp
OpenPGP_signature

Gavin Lambert via Boost

unread,
Aug 15, 2022, 2:54:25 AM8/15/22
to bo...@lists.boost.org, Gavin Lambert
On 13/08/2022 12:48, Gero Peterhoff wrote:
> can you improve numeric_cast

If you want to submit a patch, that's best done by making a PR on
github. You don't need to post about it here unless it's been sitting
for a long time without any attention.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply all
Reply to author
Forward
0 new messages