diff options
| author | Todd Stinson <stinson@lindenlab.com> | 2012-08-09 12:06:09 -0700 |
|---|---|---|
| committer | Todd Stinson <stinson@lindenlab.com> | 2012-08-09 12:06:09 -0700 |
| commit | 9488baada3c0aec7cfa4256708fdda82861cd502 (patch) | |
| tree | 1f71293b54161733269a6f340574ec4960623d0f /indra/llmath/llvector4a.cpp | |
| parent | de08d74dc6da594c20aed3673114cbc0ef6d3305 (diff) | |
| parent | 1869a399beb2cb3fa52d21f9c288f4c3b6ab4deb (diff) | |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-beta.
Diffstat (limited to 'indra/llmath/llvector4a.cpp')
| -rw-r--r-- | indra/llmath/llvector4a.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llmath/llvector4a.cpp b/indra/llmath/llvector4a.cpp index b66b7a7076..6edeb0fefe 100644 --- a/indra/llmath/llvector4a.cpp +++ b/indra/llmath/llvector4a.cpp @@ -24,6 +24,7 @@ * $/LicenseInfo$ */ +#include "llmemory.h" #include "llmath.h" #include "llquantize.h" @@ -44,7 +45,10 @@ extern const LLVector4a LL_V4A_EPSILON = reinterpret_cast<const LLVector4a&> ( F assert(dst != NULL); assert(bytes > 0); assert((bytes % sizeof(F32))== 0); - + ll_assert_aligned(src,16); + ll_assert_aligned(dst,16); + assert(bytes%16==0); + F32* end = dst + (bytes / sizeof(F32) ); if (bytes > 64) @@ -189,6 +193,8 @@ void LLVector4a::quantize16( const LLVector4a& low, const LLVector4a& high ) LLVector4a oneOverDelta; { static LL_ALIGN_16( const F32 F_TWO_4A[4] ) = { 2.f, 2.f, 2.f, 2.f }; + ll_assert_aligned(F_TWO_4A,16); + LLVector4a two; two.load4a( F_TWO_4A ); // Here we use _mm_rcp_ps plus one round of newton-raphson |
