Permalink
Browse files

Math3D: Something wrong with hand simd optimization in vec2<float>, s…

…o it causes very slow down.

However, compiler optimization is faster enough, so removed it.
  • Loading branch information...
xebra committed Jul 23, 2018
1 parent c4a8d80 commit 62aaf6336a928dddb932c231abc4f7d645a8918f
Showing with 0 additions and 25 deletions.
  1. +0 −25 GPU/Math3D.h
View
@@ -1087,31 +1087,6 @@ __forceinline void Vec4<T>::ToRGBA(u8 *rgba) const
#if defined(_M_SSE)
// Specialized for SIMD optimization
// Vec2<float> operation
template<>
inline void Vec2<float>::operator += (const Vec2<float> &other)
{
vec = _mm_add_ps(vec, other.vec);
}
template<>
inline Vec2<float> Vec2<float>::operator + (const Vec2 &other) const
{
return Vec2<float>(_mm_add_ps(vec, other.vec));
}
template<>
inline Vec2<float> Vec2<float>::operator * (const Vec2 &other) const
{
return Vec2<float>(_mm_mul_ps(vec, other.vec));
}
template<> template<>
inline Vec2<float> Vec2<float>::operator * (const float &other) const
{
return Vec2<float>(_mm_mul_ps(vec, _mm_set_ps1(other)));
}
// Vec3<float> operation
template<>
inline void Vec3<float>::operator += (const Vec3<float> &other)

0 comments on commit 62aaf63

Please sign in to comment.