/** * (C) 2025 Jack Lloyd * (C) 2025 polarnis * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_CPUID_FEATURES_H_ #define BOTAN_CPUID_FEATURES_H_ #include #include #include #include #include namespace Botan { class BOTAN_TEST_API CPUFeature { public: enum Bit : uint32_t /* NOLINT(*-use-enum-class) */ { SIMD128 = (1U << 0), SIMD_4X32 = SIMD128, SIMD_2X64 = SIMD128, }; CPUFeature(Bit b) : m_bit(b) {} // NOLINT(*-explicit-conversions) uint32_t as_u32() const { return static_cast(m_bit); } std::string to_string() const; static std::optional from_string(std::string_view s); private: Bit m_bit; }; } // namespace Botan #endif