From 9c830e67b29e2ab47a6496f2a11b5e1090e41716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=8A=9D=E4=BC=9F?= Date: Fri, 7 Oct 2022 16:08:21 +0000 Subject: [PATCH] =?UTF-8?q?!697=20codecheck=20=E5=91=8A=E8=AD=A6=E6=B8=85?= =?UTF-8?q?=E7=90=86=20Merge=20pull=20request=20!697=20from=20=E7=8E=8B?= =?UTF-8?q?=E8=8A=9D=E4=BC=9F/ge=5Fdev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parser/common/parser_fp16_t.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/common/parser_fp16_t.cc b/parser/common/parser_fp16_t.cc index d02704b..1ed1f48 100644 --- a/parser/common/parser_fp16_t.cc +++ b/parser/common/parser_fp16_t.cc @@ -380,7 +380,7 @@ static uint16_t Fp16ToUInt16(const uint16_t &fp_val) { } } bool need_round = IsRoundOne(long_int_m, shift_out + kFp16ManLen); - m_ret = static_cast((long_int_m >> static_cast(kFp16ManLen + shift_out)) & kBitLen16Max); + m_ret = static_cast((long_int_m >> static_cast(kFp16ManLen + shift_out)) & kBitLen16Max); if (need_round && m_ret != kBitLen16Max) { m_ret++; } @@ -1020,7 +1020,7 @@ fp16_t &fp16_t::operator=(const uint16_t &ui_val) { for (int i = 1; i < e_tmp; i++) { trunc_mask = (trunc_mask << 1) + 1; } - m_trunc = (m_ret & trunc_mask) << static_cast(static_cast(kBitShift32) - e_tmp); + m_trunc = (m_ret & trunc_mask) << static_cast(static_cast(kBitShift32) - e_tmp); for (int i = 0; i < e_tmp; i++) { m_ret = (m_ret >> 1); e_ret = e_ret + 1;