diff --git a/parser/common/parser_fp16_t.h b/parser/common/parser_fp16_t.h index 191ef2a..c36e4ae 100644 --- a/parser/common/parser_fp16_t.h +++ b/parser/common/parser_fp16_t.h @@ -211,7 +211,7 @@ constexpr uint32_t kFp32MaxExp = 0xFFU; constexpr uint32_t kFp32MaxMan = 0x7FFFFFU; /// @ingroup fp32 special value judgment /// @brief whether a fp32 is NaN -inline bool FP32_IS_NAN(cons uint16_t x) { +inline bool FP32_IS_NAN(const uint16_t x) { return ((((x) & kFp32ExpMask) == kFp32ExpMask) && ((x) & kFp32ManMask)); } /// @ingroup fp32 special value judgment @@ -637,7 +637,7 @@ T GetManSum(int16_t e_a, const T &m_a, int16_t e_b, const T &m_b) { T sum = 0; if (e_a != e_b) { T m_tmp = 0; - int16_t e_tmp = static_caststd::abs(e_a - e_b); + int16_t e_tmp = static_cast(std::abs(e_a - e_b)); if (e_a > e_b) { m_tmp = m_b; m_tmp = RightShift(m_tmp, e_tmp);