Havok: Add hkSimdFloat32 load/store

This commit is contained in:
Léo Lam 2022-02-02 11:02:28 +01:00
parent 17ccca46dd
commit b87f406cfa
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 18 additions and 0 deletions

View File

@ -99,6 +99,8 @@ public:
HK_FORCE_INLINE hkVector4fComparison notEqualZero() const;
HK_FORCE_INLINE m128 toQuad() const;
HK_FORCE_INLINE void load(const float* out);
HK_FORCE_INLINE void store(float* out) const;
Storage m_real;
@ -390,3 +392,19 @@ inline m128 hkSimdFloat32::toQuad() const {
return m_real;
#endif
}
inline void hkSimdFloat32::load(const float* out) {
#ifdef HK_SIMD_FLOAT32_AARCH64_NEON
m_real = vld1_dup_f32(out);
#else
*this = *out;
#endif
}
inline void hkSimdFloat32::store(float* out) const {
#ifdef HK_SIMD_FLOAT32_AARCH64_NEON
vst1_lane_f32(out, m_real, 0);
#else
*out = val();
#endif
}