diff --git a/simgear/math/simd.hxx b/simgear/math/simd.hxx index 64cf59bc..cbbc9306 100644 --- a/simgear/math/simd.hxx +++ b/simgear/math/simd.hxx @@ -42,6 +42,14 @@ public: vec[3] = v[3]; } + float (&ptr(void))[4] { + return vec; + } + + inline const float (&ptr(void) const)[4] { + return vec; + } + inline simd4_t& operator=(float f) { vec[0] = vec[1] = vec[2] = vec[3] = f; @@ -57,6 +65,15 @@ public: return *this; } + inline simd4_t& operator=(const simd4_t& v) + { + vec[0] = v[0]; + vec[1] = v[1]; + vec[2] = v[2]; + vec[3] = v[3]; + return *this; + } + inline simd4_t operator-() { simd4_t r(0.0f); @@ -222,6 +239,14 @@ public: vec[3] = v[3]; } + inline double (&ptr(void))[4] { + return vec; + } + + inline const double (&ptr(void) const)[4] { + return vec; + } + inline simd4_t& operator=(double f) { vec[0] = vec[1] = vec[2] = vec[3] = f; @@ -237,6 +262,16 @@ public: return *this; } + inline simd4_t& operator=(const simd4_t& v) + { + simd4_t(r); + vec[0] = v[0]; + vec[1] = v[1]; + vec[2] = v[2]; + vec[3] = v[3]; + return *this; + } + inline simd4_t operator-() { simd4_t r(0.0f);