10 #ifndef BOOST_BEAST_DETAIL_CPU_INFO_HPP 11 #define BOOST_BEAST_DETAIL_CPU_INFO_HPP 13 #include <boost/config.hpp> 15 #ifndef BOOST_BEAST_NO_INTRINSICS 16 # if defined(BOOST_MSVC) || ((defined(BOOST_GCC) || defined(BOOST_CLANG)) && defined(__SSE4_2__)) 17 # define BOOST_BEAST_NO_INTRINSICS 0 19 # define BOOST_BEAST_NO_INTRINSICS 1 23 #if ! BOOST_BEAST_NO_INTRINSICS 38 template<
class =
void>
55 __get_cpuid(
id, &eax, &ebx, &ecx, &edx);
70 constexpr std::uint32_t SSE42 = 1 << 20;
72 std::uint32_t eax = 0;
73 std::uint32_t ebx = 0;
74 std::uint32_t ecx = 0;
75 std::uint32_t edx = 0;
77 cpuid(0, eax, ebx, ecx, edx);
80 cpuid(1, eax, ebx, ecx, edx);
81 sse42 = (ecx & SSE42) != 0;
85 template<
class =
void>
89 static cpu_info
const ci;
Definition: async_result.hpp:20