mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
arrm, neon: impove hadd performance
This commit is contained in:
@@ -47,8 +47,13 @@ glmm_abs(float32x4_t v) {
|
|||||||
static inline
|
static inline
|
||||||
float32x4_t
|
float32x4_t
|
||||||
glmm_vhadd(float32x4_t v) {
|
glmm_vhadd(float32x4_t v) {
|
||||||
v = vaddq_f32(v, vrev64q_f32(v));
|
return vaddq_f32(vaddq_f32(glmm_splat_x(v), glmm_splat_y(v)),
|
||||||
return vaddq_f32(v, vcombine_f32(vget_high_f32(v), vget_low_f32(v)));
|
vaddq_f32(glmm_splat_z(v), glmm_splat_w(v)));
|
||||||
|
/*
|
||||||
|
this seems slower:
|
||||||
|
v = vaddq_f32(v, vrev64q_f32(v));
|
||||||
|
return vaddq_f32(v, vcombine_f32(vget_high_f32(v), vget_low_f32(v)));
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
|
|||||||
Reference in New Issue
Block a user