diff options
| author | Graham Linden <graham@lindenlab.com> | 2013-09-26 11:44:40 -0700 |
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2013-09-26 11:44:40 -0700 |
| commit | 0103cac1ddda96fd470238d2c8b73c2cf55b6c12 (patch) | |
| tree | a485d28fd9861c41bf9b7117c085bd84617f43de /indra/llmath/llvector4a.cpp | |
| parent | dd4beb695a9c800b37b7c9a19d3ac3f4456012f5 (diff) | |
| parent | badb8a945d31aed6f396e7efb521e76083870069 (diff) | |
Merge viewer-bear maint RC changes to get this build closer to the RC it will follow
Diffstat (limited to 'indra/llmath/llvector4a.cpp')
| -rwxr-xr-x | indra/llmath/llvector4a.cpp | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/indra/llmath/llvector4a.cpp b/indra/llmath/llvector4a.cpp index 6edeb0fefe..570fa41a43 100755 --- a/indra/llmath/llvector4a.cpp +++ b/indra/llmath/llvector4a.cpp @@ -41,55 +41,7 @@ extern const LLVector4a LL_V4A_EPSILON = reinterpret_cast<const LLVector4a&> ( F /*static */void LLVector4a::memcpyNonAliased16(F32* __restrict dst, const F32* __restrict src, size_t bytes) { - assert(src != NULL); - 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) - { - F32* begin_64 = LL_NEXT_ALIGNED_ADDRESS_64(dst); - - //at least 64 (16*4) bytes before the end of the destination, switch to 16 byte copies - F32* end_64 = end-16; - - _mm_prefetch((char*)begin_64, _MM_HINT_NTA); - _mm_prefetch((char*)begin_64 + 64, _MM_HINT_NTA); - _mm_prefetch((char*)begin_64 + 128, _MM_HINT_NTA); - _mm_prefetch((char*)begin_64 + 192, _MM_HINT_NTA); - - while (dst < begin_64) - { - copy4a(dst, src); - dst += 4; - src += 4; - } - - while (dst < end_64) - { - _mm_prefetch((char*)src + 512, _MM_HINT_NTA); - _mm_prefetch((char*)dst + 512, _MM_HINT_NTA); - copy4a(dst, src); - copy4a(dst+4, src+4); - copy4a(dst+8, src+8); - copy4a(dst+12, src+12); - - dst += 16; - src += 16; - } - } - - while (dst < end) - { - copy4a(dst, src); - dst += 4; - src += 4; - } + ll_memcpy_nonaliased_aligned_16((char*)dst, (char*)src, bytes); } void LLVector4a::setRotated( const LLRotation& rot, const LLVector4a& vec ) |
