Boost logo

Boost :

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

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


Boost list run by bdawes at, gregod at, cpdaniel at, john at