3#include "native/config.h"
4#include "native/detail/constexpr_float.h"
8namespace native::detail::x86_f16c {
10 constexpr_float::rounding mode;
11 constexpr_float::policy environment;
13 [[nodiscard]] hint_inline control current_control() noexcept {
14 auto csr = _mm_getcsr();
15 constexpr_float::policy environment{};
16 environment.flush_inputs = (csr & 0x40u) != 0;
17 using r = constexpr_float::rounding;
18 constexpr r modes[]{r::nearest_even, r::downward, r::upward, r::toward_zero};
19 return {modes[(csr >> 13) & 3u], environment};