From 01e7ea7695f679215f122b644252a62a5d6e7173 Mon Sep 17 00:00:00 2001 From: qnqinan Date: Fri, 11 Jan 2019 11:30:00 +0800 Subject: [PATCH] fix a bug in FPGA track --- src/fpga/common/fpga_common.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fpga/common/fpga_common.cpp b/src/fpga/common/fpga_common.cpp index 95f478e987..0a1787aa3f 100644 --- a/src/fpga/common/fpga_common.cpp +++ b/src/fpga/common/fpga_common.cpp @@ -22,7 +22,7 @@ namespace paddle_mobile { namespace fpga { int16_t fp32_2_fp16(float fp32_num) { - int32_t tmp = *(reinterpret_cast)(&fp32_num); + int32_t tmp = *(reinterpret_cast(&fp32_num)); int16_t se_fp32 = (tmp >> 23) & 0x1ff; int32_t m_fp32 = tmp & 0x007fffff; int16_t se_fp16 = 0; @@ -112,7 +112,7 @@ float fp16_2_fp32(int16_t fp16_num) { } int32_t tmp = e_fp32 + m_fp32; - float fp32_num = *(reinterpret_cast)&tmp; + float fp32_num = *(reinterpret_cast(&tmp)); return fp32_num; } -- GitLab