Commit 5d755e7f authored by Marc Marí's avatar Marc Marí
Browse files

Simplify reduceAdd for ARM64

parent 83be63ce
...@@ -340,7 +340,11 @@ static inline float dot4(fvec4 v1, fvec4 v2) { ...@@ -340,7 +340,11 @@ static inline float dot4(fvec4 v1, fvec4 v2) {
} }
static inline float reduceAdd(fvec4 v) { static inline float reduceAdd(fvec4 v) {
#ifdef __ARM64__
return vaddvq_f32(v);
#else
return dot4(v, fvec4(1.0f)); return dot4(v, fvec4(1.0f));
#endif
} }
static inline fvec4 cross(fvec4 v1, fvec4 v2) { static inline fvec4 cross(fvec4 v1, fvec4 v2) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment