Boost logo

Boost :

From: Gero Peterhoff (g.peterhoff_at_[hidden])
Date: 2022-08-13 00:48:35


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





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk