mirror of
https://github.com/recp/cglm.git
synced 2025-10-04 09:08:53 +00:00
arm: fma msub and nmsub
This commit is contained in:
@@ -99,5 +99,21 @@ glmm_fnmadd(float32x4_t a, float32x4_t b, float32x4_t c) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
float32x4_t
|
||||||
|
glmm_fmsub(float32x4_t a, float32x4_t b, float32x4_t c) {
|
||||||
|
#if defined(__aarch64__)
|
||||||
|
return vfmsq_f32(c, a, b);
|
||||||
|
#else
|
||||||
|
return vmlsq_f32(c, a, b);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
float32x4_t
|
||||||
|
glmm_fnmsub(float32x4_t a, float32x4_t b, float32x4_t c) {
|
||||||
|
return vsubq_f32(vdupq_n_f32(0.0f), glmm_fmadd(a, b, c));
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif /* cglm_simd_arm_h */
|
#endif /* cglm_simd_arm_h */
|
||||||
|
Reference in New Issue
Block a user