summaryrefslogtreecommitdiff
path: root/indra/llmath/llvector4a.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-09-12 18:44:30 -0400
committerOz Linden <oz@lindenlab.com>2012-09-12 18:44:30 -0400
commit3f71d3b41c938fd5d433da6ca1b404586c49c401 (patch)
tree0ec16a8f4a8fed65834a0776097f074073cf0fa4 /indra/llmath/llvector4a.cpp
parenta11cc73736b6824e4dc6d0a693bcfb26514b16eb (diff)
parent3a36e3c6a82462b8d01e47707391be168e739b66 (diff)
re-merge changes to disable tcmalloc
Diffstat (limited to 'indra/llmath/llvector4a.cpp')
-rw-r--r--indra/llmath/llvector4a.cpp8
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