Fix a header path

This commit is contained in:
Erik Hofman
2017-01-19 16:41:01 +01:00
parent 2db412a923
commit ef2eb635af
2 changed files with 8 additions and 29 deletions

View File

@@ -1085,7 +1085,7 @@ inline simd4_t<int,N> max(simd4_t<int,N> v1, const simd4_t<int,N>& v2) {
# endif
# ifdef __ARM_NEON__
# include "simd_neon.hxx"
# include <simgear/math/simd_neon.hxx>
# endif
#endif /* __SIMD_H__ */

View File

@@ -48,20 +48,15 @@ private:
public:
simd4_t(void) {}
simd4_t(float f) {
simd4 = vdupq_n_f32(f);
for (int i=N; i<4; ++i) _v4[i] = 0.0f;
}
simd4_t(float f) {}
simd4_t(float x, float y) : simd4_t(x,y,0,0) {}
simd4_t(float x, float y, float z) : simd4_t(x,y,z,0) {}
simd4_t(float x, float y, float z, float w) {
_v4[0] = x; _v4[1] = y; _v4[2] = z; _v4[3] = w;
}
simd4_t(const __vec4f_t v) {
simd4 = vld1q_f32(v);
for (int i=N; i<4; ++i) _v4[i] = 0.0f;
}
simd4_t(const simd4_t<float,N>& v) {
simd4_t(const __vec4f_t v) {}
template<int M>
simd4_t(const simd4_t<float,M>& v) {
simd4 = v.v4();
}
simd4_t(const float32x4_t& v) {
@@ -89,25 +84,6 @@ public:
return vec;
}
inline simd4_t<float,N>& operator=(float f) {
simd4 = vdupq_n_f32(f);
for (int i=N; i<4; ++i) _v4[i] = 0.0f;
return *this;
}
inline simd4_t<float,N>& operator=(const __vec4f_t v) {
simd4 = vld1q_f32(v);
for (int i=N; i<4; ++i) _v4[i] = 0.0f;
return *this;
}
inline simd4_t<float,N>& operator=(const simd4_t<float,N>& v) {
simd4 = v.v4();
return *this;
}
inline simd4_t<float,N>& operator=(const float32x4_t& v) {
simd4 = v;
return *this;
}
inline simd4_t<float,N>& operator+=(float f) {
return operator+=(simd4_t<float,N>(f));
}
@@ -149,6 +125,9 @@ public:
}
};
simd4 = vdupq_n_f32(f);
simd4 = vld1q_f32(v);
namespace simd4
{
// http://stackoverflow.com/questions/6931217/sum-all-elements-in-a-quadword-vector-in-arm-assembly-with-neon