Drake's trivially copyable optimop
This commit is contained in:
@@ -96,12 +96,12 @@ public:
|
||||
{ //DO NOT INITIALIZE -- The overhead is completely unnecessary
|
||||
ll_assert_aligned(this,16);
|
||||
}
|
||||
|
||||
|
||||
LLVector4a(F32 x, F32 y, F32 z, F32 w = 0.f)
|
||||
{
|
||||
set(x,y,z,w);
|
||||
set(x, y, z, w);
|
||||
}
|
||||
|
||||
|
||||
LLVector4a(F32 x)
|
||||
{
|
||||
splat(x);
|
||||
@@ -320,9 +320,13 @@ public:
|
||||
////////////////////////////////////
|
||||
|
||||
// Do NOT add aditional operators without consulting someone with SSE experience
|
||||
inline const LLVector4a& operator= ( const LLVector4a& rhs );
|
||||
//inline const LLVector4a& operator= ( const LLVector4a& rhs );
|
||||
//{
|
||||
// mQ = rhs.mQ;
|
||||
// return *this;
|
||||
//}
|
||||
|
||||
inline const LLVector4a& operator= ( const LLQuad& rhs );
|
||||
inline const LLVector4a& operator= (const LLQuad& rhs);
|
||||
|
||||
inline operator LLQuad() const;
|
||||
|
||||
@@ -341,4 +345,6 @@ inline std::ostream& operator<<(std::ostream& s, const LLVector4a& v)
|
||||
s << "(" << v[0] << ", " << v[1] << ", " << v[2] << ", " << v[3] << ")";
|
||||
return s;
|
||||
}
|
||||
|
||||
static_assert(std::is_trivially_copyable<LLVector4a>{}, "LLVector4a must be a trivially copyable type");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user