Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions src/layer/arm/neon_mathfun_fp16s.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,7 @@ static inline float16x4_t exp_ps_f16(float16x4_t x)
#endif

/* perform a floorf */
tmp = vcvt_f16_s16(vcvt_s16_f16(fx));

/* if greater, substract 1 */
uint16x4_t mask = vcgt_f16(tmp, fx);
mask = vand_u16(mask, (uint16x4_t)(one));

fx = vsub_f16(tmp, (float16x4_t)(mask));
fx = vrndm_f16(fx);

#if defined(_MSC_VER) && !defined(__clang__)
tmp = vmul_f16(fx, vcvt_f16_f32(vdupq_n_f32(c_cephes_exp_C1)));
Expand Down Expand Up @@ -255,13 +249,7 @@ static inline float16x8_t exp_ps_f16(float16x8_t x)
#endif

/* perform a floorf */
tmp = vcvtq_f16_s16(vcvtq_s16_f16(fx));

/* if greater, substract 1 */
uint16x8_t mask = vcgtq_f16(tmp, fx);
mask = vandq_u16(mask, vreinterpretq_u16_f16(one));

fx = vsubq_f16(tmp, vreinterpretq_f16_u16(mask));
fx = vrndmq_f16(fx);

#if defined(_MSC_VER) && !defined(__clang__)
float16x4_t _c_cephes_exp_C1 = vcvt_f16_f32(vdupq_n_f32(c_cephes_exp_C1));
Expand Down
Loading