Fix compilation error, use vreinterpreq instead.

PiperOrigin-RevId: 261619998
This commit is contained in:
Renjie Liu 2019-08-04 22:21:56 -07:00 committed by TensorFlower Gardener
parent e920181a6f
commit 864d2942fe

View File

@ -880,7 +880,7 @@ inline int32x4_t RoundToNearest(const float32x4_t input) {
static const float32x4_t zero_val_dup = vdupq_n_f32(0.0f); static const float32x4_t zero_val_dup = vdupq_n_f32(0.0f);
static const float32x4_t point5_val_dup = vdupq_n_f32(0.5f); static const float32x4_t point5_val_dup = vdupq_n_f32(0.5f);
const int32x4_t mask = static_cast<int32x4_t>(vcltq_f32(input, zero_val_dup)); const int32x4_t mask = vreinterpretq_s32_u32(vcltq_f32(input, zero_val_dup));
const float32x4_t casted_mask = vcvtq_f32_s32(mask); const float32x4_t casted_mask = vcvtq_f32_s32(mask);
const float32x4_t round = vaddq_f32(casted_mask, point5_val_dup); const float32x4_t round = vaddq_f32(casted_mask, point5_val_dup);
return vcvtq_s32_f32(vaddq_f32(input, round)); return vcvtq_s32_f32(vaddq_f32(input, round));