Browse Source

cleancode

pull/636/head
songmingyang 2 years ago
parent
commit
a0f23fe0e5
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      parser/common/parser_fp16_t.h

+ 2
- 2
parser/common/parser_fp16_t.h View File

@@ -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_cast<int16_t>std::abs(e_a - e_b);
int16_t e_tmp = static_cast<int16_t>(std::abs(e_a - e_b));
if (e_a > e_b) {
m_tmp = m_b;
m_tmp = RightShift(m_tmp, e_tmp);


Loading…
Cancel
Save