Better CMake dependency handling

This commit is contained in:
Jack Andersen
2019-06-11 16:04:52 -10:00
parent 6c13d089fe
commit c81eb93b6d
6 changed files with 16 additions and 17 deletions

View File

@@ -101,9 +101,11 @@ public:
CQuaternion normalized() const { return *this / magnitude(); }
void invert();
static constexpr simd<float> InvertQuat = {1.f, -1.f, -1.f, -1.f};
CQuaternion inverse() const;
void invert() { mSimd *= InvertQuat; }
CQuaternion inverse() const { return mSimd * InvertQuat; }
/**
* @brief Set the rotation using axis angle notation

View File

@@ -221,12 +221,14 @@ public:
sse_data[__index % 2] = __val;
__storage_[__index / 2] = _mm_load_pd(sse_data.data());
}
constexpr __simd_storage(double a, double b, double c, double d) : __storage_{__m128d{a, b}, __m128d{c, d}} {}
static constexpr storage_type __make_array(__m128d a, __m128d b) { return {a, b}; }
constexpr __simd_storage(double a, double b, double c, double d)
: __storage_(__make_array(__m128d{a, b}, __m128d{c, d})) {}
void __set4(double a, double b, double c, double d) noexcept {
__storage_[0] = _mm_set_pd(b, a);
__storage_[1] = _mm_set_pd(d, c);
}
constexpr __simd_storage(double rv) : __storage_{__m128d{rv, rv}, __m128d{rv, rv}} {}
constexpr __simd_storage(double rv) : __storage_(__make_array(__m128d{rv, rv}, __m128d{rv, rv})) {}
void __broadcast(double __val) noexcept {
for (int i = 0; i < 2; ++i)
__storage_[i] = _mm_set1_pd(__val);