From e62ad2bf13aa05cb19c2bd72e0d9f59117a6ec84 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 15 Dec 2011 19:26:03 -0500 Subject: SH-2789 WIP - tests for alignment --- indra/llmath/tests/alignment_test.cpp | 127 ++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100755 indra/llmath/tests/alignment_test.cpp (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp new file mode 100755 index 0000000000..6b4a454fd2 --- /dev/null +++ b/indra/llmath/tests/alignment_test.cpp @@ -0,0 +1,127 @@ +/** + * @file v3dmath_test.cpp + * @author Vir + * @date 2011-12 + * @brief v3dmath test cases. + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +// Tests related to allocating objects with alignment constraints, particularly for SSE support. + +#include "linden_common.h" +#include "../test/lltut.h" +#include "../llmath.h" +#include "../llsimdmath.h" +#include "../llvector4a.h" + +namespace tut +{ + +#define is_aligned(ptr,alignment) ((reinterpret_cast(ptr))%(alignment)==0) + +struct alignment_test {}; + +typedef test_group alignment_test_t; +typedef alignment_test_t::object alignment_test_object_t; +tut::alignment_test_t tut_alignment_test("LLAlignment"); + +LL_ALIGN_PREFIX(16) +class MyVector4a +{ + LLQuad mQ; +} LL_ALIGN_POSTFIX(16); + +LL_ALIGN_PREFIX(64) +class MyBigBlob +{ +public: + ~MyBigBlob() {} +private: + LLQuad mQ[4]; +} LL_ALIGN_POSTFIX(64); + +// In-place allocation of objects and arrays. +template<> template<> +void alignment_test_object_t::test<1>() +{ + ensure("LLAlignment reality is broken: ", (1==1)); + + MyVector4a vec1; + ensure("LLAlignment vec1 unaligned", is_aligned(&vec1,16)); + + MyBigBlob bb1; + ensure("LLAlignment bb1 unaligned", is_aligned(&bb1,64)); + + + MyVector4a veca[12]; + ensure("LLAlignment veca unaligned", is_aligned(veca,16)); + + MyBigBlob bba[12]; + ensure("LLAlignment bba unaligned", is_aligned(bba,64)); +} + +// Heap allocation of objects and arrays. +template<> template<> +void alignment_test_object_t::test<2>() +{ + const int ARR_SIZE = 7; + for(int i=0; i~MyBigBlob(); + _aligned_free(aligned_addr); + } + + ensure("LLAlignment big blob size",sizeof(MyBigBlob)==64); + void *aligned_addr = _aligned_malloc(ARR_SIZE*sizeof(MyBigBlob),64); + MyBigBlob *bba = new(aligned_addr) MyBigBlob[ARR_SIZE]; + std::cout << "aligned_addr " << aligned_addr << std::endl; + std::cout << "bba " << bba << std::endl; + for(int i=0; i Date: Mon, 19 Dec 2011 18:17:18 -0500 Subject: SH-2789 WIP - various fixes to force 16-byte alignment --- indra/llmath/tests/alignment_test.cpp | 74 +++++++++++++++-------------------- 1 file changed, 32 insertions(+), 42 deletions(-) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index 6b4a454fd2..51a7051e69 100755 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -34,10 +34,21 @@ #include "../llsimdmath.h" #include "../llvector4a.h" +void* operator new(size_t size) +{ + return ll_aligned_malloc_16(size); +} + +void operator delete(void *p) +{ + ll_aligned_free_16(p); +} + namespace tut { #define is_aligned(ptr,alignment) ((reinterpret_cast(ptr))%(alignment)==0) +#define is_aligned_relative(ptr,base_ptr,alignment) ((reinterpret_cast(ptr)-reinterpret_cast(base_ptr))%(alignment)==0) struct alignment_test {}; @@ -51,38 +62,40 @@ class MyVector4a LLQuad mQ; } LL_ALIGN_POSTFIX(16); -LL_ALIGN_PREFIX(64) -class MyBigBlob +// Verify that aligned allocators perform as advertised. +template<> template<> +void alignment_test_object_t::test<1>() { -public: - ~MyBigBlob() {} -private: - LLQuad mQ[4]; -} LL_ALIGN_POSTFIX(64); + const int num_tests = 7; + void *align_ptr; + for (int i=0; i template<> -void alignment_test_object_t::test<1>() +void alignment_test_object_t::test<2>() { ensure("LLAlignment reality is broken: ", (1==1)); MyVector4a vec1; ensure("LLAlignment vec1 unaligned", is_aligned(&vec1,16)); - MyBigBlob bb1; - ensure("LLAlignment bb1 unaligned", is_aligned(&bb1,64)); - - MyVector4a veca[12]; ensure("LLAlignment veca unaligned", is_aligned(veca,16)); - - MyBigBlob bba[12]; - ensure("LLAlignment bba unaligned", is_aligned(bba,64)); } // Heap allocation of objects and arrays. template<> template<> -void alignment_test_object_t::test<2>() +void alignment_test_object_t::test<3>() { const int ARR_SIZE = 7; for(int i=0; i() } MyVector4a *veca = new MyVector4a[ARR_SIZE]; + ensure("LLAligment veca base", is_aligned(veca,16)); for(int i=0; i~MyBigBlob(); - _aligned_free(aligned_addr); - } - - ensure("LLAlignment big blob size",sizeof(MyBigBlob)==64); - void *aligned_addr = _aligned_malloc(ARR_SIZE*sizeof(MyBigBlob),64); - MyBigBlob *bba = new(aligned_addr) MyBigBlob[ARR_SIZE]; - std::cout << "aligned_addr " << aligned_addr << std::endl; - std::cout << "bba " << bba << std::endl; - for(int i=0; i Date: Wed, 4 Jan 2012 15:21:23 -0500 Subject: SH-2789 WIP - stricter calling of memcpyNonAliased16 --- indra/llmath/tests/alignment_test.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index 51a7051e69..dc9b41957d 100755 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -72,6 +72,10 @@ void alignment_test_object_t::test<1>() { align_ptr = ll_aligned_malloc_16(sizeof(MyVector4a)); ensure("ll_aligned_malloc_16 failed", is_aligned(align_ptr,16)); + + align_ptr = ll_aligned_realloc_16(2*sizeof(MyVector4a)); + ensure("ll_aligned_realloc_16 failed", is_aligned(align_ptr,16)); + ll_aligned_free_16(align_ptr); align_ptr = ll_aligned_malloc_32(sizeof(MyVector4a)); @@ -84,8 +88,6 @@ void alignment_test_object_t::test<1>() template<> template<> void alignment_test_object_t::test<2>() { - ensure("LLAlignment reality is broken: ", (1==1)); - MyVector4a vec1; ensure("LLAlignment vec1 unaligned", is_aligned(&vec1,16)); -- cgit v1.2.3 From 80c884f77d377034852643fadae119342e0b25be Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 4 Jan 2012 17:30:11 -0500 Subject: Fix for build failure --- indra/llmath/tests/alignment_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index dc9b41957d..044e05e961 100755 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -73,7 +73,7 @@ void alignment_test_object_t::test<1>() align_ptr = ll_aligned_malloc_16(sizeof(MyVector4a)); ensure("ll_aligned_malloc_16 failed", is_aligned(align_ptr,16)); - align_ptr = ll_aligned_realloc_16(2*sizeof(MyVector4a)); + align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a)); ensure("ll_aligned_realloc_16 failed", is_aligned(align_ptr,16)); ll_aligned_free_16(align_ptr); -- cgit v1.2.3 From 0b16411d302c940ff98ae5529821d9b5a4dbfbd7 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 26 Jan 2012 14:07:37 -0500 Subject: assert fix for mempyNonAliased16 call --- indra/llmath/tests/alignment_test.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index 044e05e961..8961b9d6d5 100755 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -62,6 +62,7 @@ class MyVector4a LLQuad mQ; } LL_ALIGN_POSTFIX(16); + // Verify that aligned allocators perform as advertised. template<> template<> void alignment_test_object_t::test<1>() -- cgit v1.2.3 From 89ee86c86c188708234e1bc9c519945ec85ff8ed Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 22 Jun 2012 15:54:53 -0400 Subject: line endings fix --- indra/llmath/tests/alignment_test.cpp | 240 +++++++++++++++++----------------- 1 file changed, 120 insertions(+), 120 deletions(-) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index 8961b9d6d5..dbb42c4a3d 100755 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -1,120 +1,120 @@ -/** - * @file v3dmath_test.cpp - * @author Vir - * @date 2011-12 - * @brief v3dmath test cases. - * - * $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -// Tests related to allocating objects with alignment constraints, particularly for SSE support. - -#include "linden_common.h" -#include "../test/lltut.h" -#include "../llmath.h" -#include "../llsimdmath.h" -#include "../llvector4a.h" - -void* operator new(size_t size) -{ - return ll_aligned_malloc_16(size); -} - -void operator delete(void *p) -{ - ll_aligned_free_16(p); -} - -namespace tut -{ - -#define is_aligned(ptr,alignment) ((reinterpret_cast(ptr))%(alignment)==0) -#define is_aligned_relative(ptr,base_ptr,alignment) ((reinterpret_cast(ptr)-reinterpret_cast(base_ptr))%(alignment)==0) - -struct alignment_test {}; - -typedef test_group alignment_test_t; -typedef alignment_test_t::object alignment_test_object_t; -tut::alignment_test_t tut_alignment_test("LLAlignment"); - -LL_ALIGN_PREFIX(16) -class MyVector4a -{ - LLQuad mQ; -} LL_ALIGN_POSTFIX(16); - - -// Verify that aligned allocators perform as advertised. -template<> template<> -void alignment_test_object_t::test<1>() -{ - const int num_tests = 7; - void *align_ptr; - for (int i=0; i template<> -void alignment_test_object_t::test<2>() -{ - MyVector4a vec1; - ensure("LLAlignment vec1 unaligned", is_aligned(&vec1,16)); - - MyVector4a veca[12]; - ensure("LLAlignment veca unaligned", is_aligned(veca,16)); -} - -// Heap allocation of objects and arrays. -template<> template<> -void alignment_test_object_t::test<3>() -{ - const int ARR_SIZE = 7; - for(int i=0; i(ptr))%(alignment)==0) +#define is_aligned_relative(ptr,base_ptr,alignment) ((reinterpret_cast(ptr)-reinterpret_cast(base_ptr))%(alignment)==0) + +struct alignment_test {}; + +typedef test_group alignment_test_t; +typedef alignment_test_t::object alignment_test_object_t; +tut::alignment_test_t tut_alignment_test("LLAlignment"); + +LL_ALIGN_PREFIX(16) +class MyVector4a +{ + LLQuad mQ; +} LL_ALIGN_POSTFIX(16); + + +// Verify that aligned allocators perform as advertised. +template<> template<> +void alignment_test_object_t::test<1>() +{ + const int num_tests = 7; + void *align_ptr; + for (int i=0; i template<> +void alignment_test_object_t::test<2>() +{ + MyVector4a vec1; + ensure("LLAlignment vec1 unaligned", is_aligned(&vec1,16)); + + MyVector4a veca[12]; + ensure("LLAlignment veca unaligned", is_aligned(veca,16)); +} + +// Heap allocation of objects and arrays. +template<> template<> +void alignment_test_object_t::test<3>() +{ + const int ARR_SIZE = 7; + for(int i=0; i Date: Mon, 2 Jul 2012 10:18:38 -0400 Subject: disable alignment tests in debug builds (where they fail) --- indra/llmath/tests/alignment_test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index dbb42c4a3d..ac0c45ae6f 100755 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -67,6 +67,10 @@ class MyVector4a template<> template<> void alignment_test_object_t::test<1>() { +# ifdef LL_DEBUG + skip("This test fails on Windows when compiled in debug mode."); +# endif + const int num_tests = 7; void *align_ptr; for (int i=0; i() template<> template<> void alignment_test_object_t::test<3>() { +# ifdef LL_DEBUG + skip("This test fails on Windows when compiled in debug mode."); +# endif + const int ARR_SIZE = 7; for(int i=0; i Date: Mon, 10 Sep 2012 13:16:10 -0500 Subject: Fix for alignment_test.cpp compilation errors. --- indra/llmath/tests/alignment_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index ac0c45ae6f..5c426c57c3 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -78,7 +78,7 @@ void alignment_test_object_t::test<1>() align_ptr = ll_aligned_malloc_16(sizeof(MyVector4a)); ensure("ll_aligned_malloc_16 failed", is_aligned(align_ptr,16)); - align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a)); + align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a), sizeof(MyVector4a)); ensure("ll_aligned_realloc_16 failed", is_aligned(align_ptr,16)); ll_aligned_free_16(align_ptr); -- cgit v1.2.3 From 8b4d91e2f32062684b64d6dd9eb86dd89ad078f0 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 11 Sep 2012 16:58:36 -0500 Subject: Another stab at fixing alignment_test.cpp --- indra/llmath/tests/alignment_test.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index 5c426c57c3..b28b2cee6e 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -34,16 +34,6 @@ #include "../llsimdmath.h" #include "../llvector4a.h" -void* operator new(size_t size) -{ - return ll_aligned_malloc_16(size); -} - -void operator delete(void *p) -{ - ll_aligned_free_16(p); -} - namespace tut { @@ -59,6 +49,17 @@ tut::alignment_test_t tut_alignment_test("LLAlignment"); LL_ALIGN_PREFIX(16) class MyVector4a { +public: + void* operator new(size_t size) + { + return ll_aligned_malloc_16(size); + } + + void operator delete(void *p) + { + ll_aligned_free_16(p); + } + LLQuad mQ; } LL_ALIGN_POSTFIX(16); @@ -68,7 +69,7 @@ template<> template<> void alignment_test_object_t::test<1>() { # ifdef LL_DEBUG - skip("This test fails on Windows when compiled in debug mode."); +// skip("This test fails on Windows when compiled in debug mode."); # endif const int num_tests = 7; @@ -105,7 +106,7 @@ template<> template<> void alignment_test_object_t::test<3>() { # ifdef LL_DEBUG - skip("This test fails on Windows when compiled in debug mode."); +// skip("This test fails on Windows when compiled in debug mode."); # endif const int ARR_SIZE = 7; -- cgit v1.2.3 From 094a5bc89ea62110898c775643517173073f9add Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 12 Sep 2012 16:13:01 -0500 Subject: Attempt to unblock build. --- indra/llmath/tests/alignment_test.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index b28b2cee6e..2f8c50fd5b 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -68,6 +68,7 @@ public: template<> template<> void alignment_test_object_t::test<1>() { + skip("Skipping known failure."); # ifdef LL_DEBUG // skip("This test fails on Windows when compiled in debug mode."); # endif @@ -94,6 +95,7 @@ void alignment_test_object_t::test<1>() template<> template<> void alignment_test_object_t::test<2>() { + skip("Skipping known failure."); MyVector4a vec1; ensure("LLAlignment vec1 unaligned", is_aligned(&vec1,16)); @@ -105,6 +107,7 @@ void alignment_test_object_t::test<2>() template<> template<> void alignment_test_object_t::test<3>() { + skip("Skipping known failure."); # ifdef LL_DEBUG // skip("This test fails on Windows when compiled in debug mode."); # endif -- cgit v1.2.3 From 8a359ddaea5ff24233b758ee2697234d9e6d0d9c Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 12 Sep 2012 16:55:19 -0500 Subject: Another attempt at unsticking build. --- indra/llmath/tests/alignment_test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index 2f8c50fd5b..289d25a63c 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -73,7 +73,7 @@ void alignment_test_object_t::test<1>() // skip("This test fails on Windows when compiled in debug mode."); # endif - const int num_tests = 7; + /*const int num_tests = 7; void *align_ptr; for (int i=0; i() align_ptr = ll_aligned_malloc_32(sizeof(MyVector4a)); ensure("ll_aligned_malloc_32 failed", is_aligned(align_ptr,32)); ll_aligned_free_32(align_ptr); - } + }*/ } // In-place allocation of objects and arrays. @@ -96,11 +96,11 @@ template<> template<> void alignment_test_object_t::test<2>() { skip("Skipping known failure."); - MyVector4a vec1; + /*MyVector4a vec1; ensure("LLAlignment vec1 unaligned", is_aligned(&vec1,16)); MyVector4a veca[12]; - ensure("LLAlignment veca unaligned", is_aligned(veca,16)); + ensure("LLAlignment veca unaligned", is_aligned(veca,16));*/ } // Heap allocation of objects and arrays. @@ -112,7 +112,7 @@ void alignment_test_object_t::test<3>() // skip("This test fails on Windows when compiled in debug mode."); # endif - const int ARR_SIZE = 7; + /*const int ARR_SIZE = 7; for(int i=0; i() { std::cout << "veca[" << i << "]" << std::endl; ensure("LLAlignment veca member unaligned", is_aligned(&veca[i],16)); - } + }*/ } } -- cgit v1.2.3 From cd315c0ecdf0dbcc6a5fb18d60cbb31ee06e9acd Mon Sep 17 00:00:00 2001 From: "simon@Simon-PC.lindenlab.com" Date: Wed, 12 Sep 2012 16:00:12 -0700 Subject: Fix alignment_test for array allocations. Reviewed by Runitai --- indra/llmath/tests/alignment_test.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index 289d25a63c..bbc68fc498 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -60,6 +60,16 @@ public: ll_aligned_free_16(p); } + void* operator new[](size_t count) + { // try to allocate count bytes for an array + return ll_aligned_malloc_16(count); + } + + void operator delete[](void *p) + { + ll_aligned_free_16(p); + } + LLQuad mQ; } LL_ALIGN_POSTFIX(16); @@ -112,7 +122,7 @@ void alignment_test_object_t::test<3>() // skip("This test fails on Windows when compiled in debug mode."); # endif - /*const int ARR_SIZE = 7; + const int ARR_SIZE = 7; for(int i=0; i() } MyVector4a *veca = new MyVector4a[ARR_SIZE]; + //std::cout << "veca base is " << (S32) veca << std::endl; ensure("LLAligment veca base", is_aligned(veca,16)); for(int i=0; i Date: Wed, 12 Sep 2012 18:08:35 -0700 Subject: Restore alignment tests that were removed earlier --- indra/llmath/tests/alignment_test.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index bbc68fc498..ced039b2c6 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -78,12 +78,11 @@ public: template<> template<> void alignment_test_object_t::test<1>() { - skip("Skipping known failure."); # ifdef LL_DEBUG // skip("This test fails on Windows when compiled in debug mode."); # endif - /*const int num_tests = 7; + const int num_tests = 7; void *align_ptr; for (int i=0; i() align_ptr = ll_aligned_malloc_32(sizeof(MyVector4a)); ensure("ll_aligned_malloc_32 failed", is_aligned(align_ptr,32)); ll_aligned_free_32(align_ptr); - }*/ + } } // In-place allocation of objects and arrays. template<> template<> void alignment_test_object_t::test<2>() { - skip("Skipping known failure."); - /*MyVector4a vec1; + MyVector4a vec1; ensure("LLAlignment vec1 unaligned", is_aligned(&vec1,16)); MyVector4a veca[12]; - ensure("LLAlignment veca unaligned", is_aligned(veca,16));*/ + ensure("LLAlignment veca unaligned", is_aligned(veca,16)); } // Heap allocation of objects and arrays. template<> template<> void alignment_test_object_t::test<3>() { - skip("Skipping known failure."); # ifdef LL_DEBUG // skip("This test fails on Windows when compiled in debug mode."); # endif -- cgit v1.2.3 From d5dbd2e9c1b82e475bd5650a39b3c40fd4c5b51d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 27 Sep 2012 13:02:07 -0400 Subject: fix dos line endings --- indra/llmath/tests/alignment_test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index ced039b2c6..5ee3c45502 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -60,11 +60,11 @@ public: ll_aligned_free_16(p); } - void* operator new[](size_t count) - { // try to allocate count bytes for an array - return ll_aligned_malloc_16(count); - } - + void* operator new[](size_t count) + { // try to allocate count bytes for an array + return ll_aligned_malloc_16(count); + } + void operator delete[](void *p) { ll_aligned_free_16(p); -- cgit v1.2.3 From bf6182daa8b4d7cea79310547f71d7a3155e17b0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 07:50:08 -0700 Subject: Update Mac and Windows breakpad builds to latest --- indra/llmath/tests/alignment_test.cpp | 0 indra/llmath/tests/llbbox_test.cpp | 0 indra/llmath/tests/llbboxlocal_test.cpp | 0 indra/llmath/tests/llmodularmath_test.cpp | 0 indra/llmath/tests/llquaternion_test.cpp | 0 indra/llmath/tests/llrect_test.cpp | 0 indra/llmath/tests/m3math_test.cpp | 0 indra/llmath/tests/mathmisc_test.cpp | 0 indra/llmath/tests/v2math_test.cpp | 0 indra/llmath/tests/v3color_test.cpp | 0 indra/llmath/tests/v3dmath_test.cpp | 0 indra/llmath/tests/v3math_test.cpp | 0 indra/llmath/tests/v4color_test.cpp | 0 indra/llmath/tests/v4coloru_test.cpp | 0 indra/llmath/tests/v4math_test.cpp | 0 indra/llmath/tests/xform_test.cpp | 0 16 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/llmath/tests/alignment_test.cpp mode change 100644 => 100755 indra/llmath/tests/llbbox_test.cpp mode change 100644 => 100755 indra/llmath/tests/llbboxlocal_test.cpp mode change 100644 => 100755 indra/llmath/tests/llmodularmath_test.cpp mode change 100644 => 100755 indra/llmath/tests/llquaternion_test.cpp mode change 100644 => 100755 indra/llmath/tests/llrect_test.cpp mode change 100644 => 100755 indra/llmath/tests/m3math_test.cpp mode change 100644 => 100755 indra/llmath/tests/mathmisc_test.cpp mode change 100644 => 100755 indra/llmath/tests/v2math_test.cpp mode change 100644 => 100755 indra/llmath/tests/v3color_test.cpp mode change 100644 => 100755 indra/llmath/tests/v3dmath_test.cpp mode change 100644 => 100755 indra/llmath/tests/v3math_test.cpp mode change 100644 => 100755 indra/llmath/tests/v4color_test.cpp mode change 100644 => 100755 indra/llmath/tests/v4coloru_test.cpp mode change 100644 => 100755 indra/llmath/tests/v4math_test.cpp mode change 100644 => 100755 indra/llmath/tests/xform_test.cpp (limited to 'indra/llmath/tests') diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/llbbox_test.cpp b/indra/llmath/tests/llbbox_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/llbboxlocal_test.cpp b/indra/llmath/tests/llbboxlocal_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/llmodularmath_test.cpp b/indra/llmath/tests/llmodularmath_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/llquaternion_test.cpp b/indra/llmath/tests/llquaternion_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/llrect_test.cpp b/indra/llmath/tests/llrect_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/m3math_test.cpp b/indra/llmath/tests/m3math_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/mathmisc_test.cpp b/indra/llmath/tests/mathmisc_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/v2math_test.cpp b/indra/llmath/tests/v2math_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/v3color_test.cpp b/indra/llmath/tests/v3color_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/v3dmath_test.cpp b/indra/llmath/tests/v3dmath_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/v3math_test.cpp b/indra/llmath/tests/v3math_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/v4color_test.cpp b/indra/llmath/tests/v4color_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/v4coloru_test.cpp b/indra/llmath/tests/v4coloru_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/v4math_test.cpp b/indra/llmath/tests/v4math_test.cpp old mode 100644 new mode 100755 diff --git a/indra/llmath/tests/xform_test.cpp b/indra/llmath/tests/xform_test.cpp old mode 100644 new mode 100755 -- cgit v1.2.3