arm: fix type castings for ARM Neon

This commit is contained in:
Recep Aslantas
2020-01-15 09:56:19 +03:00
parent d6c34d3330
commit c3b5bb869a

View File

@@ -34,17 +34,19 @@ glmm_hadd(float32x4_t v) {
static inline static inline
float float
glmm_hmin(float32x4_t v) { glmm_hmin(float32x4_t v) {
v = vpmin_f32(vget_low_f32(v), vget_high_f32(v)); float32x2_t t;
v = vpmin_f32(v, v); t = vpmin_f32(vget_low_f32(v), vget_high_f32(v));
return vget_lane_f32(v, 0); t = vpmin_f32(t, t);
return vget_lane_f32(t, 0);
} }
static inline static inline
float float
glmm_hmax(float32x4_t v) { glmm_hmax(float32x4_t v) {
v = vpmax_f32(vget_low_f32(v), vget_high_f32(v)); float32x2_t t;
v = vpmax_f32(v, v); t = vpmax_f32(vget_low_f32(v), vget_high_f32(v));
return vget_lane_f32(v, 0); t = vpmax_f32(t, t);
return vget_lane_f32(t, 0);
} }
static inline static inline