mirror of
https://github.com/boostorg/charconv.git
synced 2026-02-09 11:02:30 +00:00
Add intrinsics headers
This commit is contained in:
@@ -64,6 +64,24 @@
|
||||
|
||||
#endif // Determine endianness
|
||||
|
||||
// Inclue intrinsics if available
|
||||
#if defined(_MSC_VER)
|
||||
# include <intrin.h>
|
||||
# if defined(_WIN64)
|
||||
# define BOOST_CHARCONV_HAS_MSVC_64BIT_INTRINSICS
|
||||
# else
|
||||
# define BOOST_CHARCONV_HAS_MSVC_32BIT_INTRINSICS
|
||||
# endif
|
||||
#elif (defined(__x86_64__) || defined(__i386__))
|
||||
# include <x86intrin.h>
|
||||
# define BOOST_CHARCONV_HAS_X86_INTRINSICS
|
||||
#elif defined(__ARM_NEON__)
|
||||
# include <arm_neon.h>
|
||||
# define BOOST_CHARCONV_HAS_ARM_INTRINSICS
|
||||
#else
|
||||
# define BOOST_CHARCONV_HAS_NO_INTRINSICS
|
||||
#endif
|
||||
|
||||
static_assert((BOOST_CHARCONV_ENDIAN_BIG_BYTE || BOOST_CHARCONV_ENDIAN_LITTLE_BYTE) &&
|
||||
!(BOOST_CHARCONV_ENDIAN_BIG_BYTE && BOOST_CHARCONV_ENDIAN_LITTLE_BYTE),
|
||||
"Inconsistent endianness detected. Please file an issue at https://github.com/cppalliance/charconv with your architecture");
|
||||
|
||||
Reference in New Issue
Block a user