Merge remote-tracking branch 'upstream/development' into nvsickle/DomPrefixTree

This commit is contained in:
Nicholas Van Sickle
2022-02-15 09:49:00 -08:00
534 changed files with 17754 additions and 7570 deletions
@@ -8,6 +8,7 @@
#include <AzCore/UnitTest/TestTypes.h>
#include <AzCore/std/concepts/concepts.h>
#include <AzCore/std/ranges/ranges_functional.h>
namespace UnitTest
{
@@ -199,4 +200,122 @@ namespace UnitTest
static_assert(!AZStd::strict_weak_order<RelationPredicate, int, Base>);
static_assert(!AZStd::strict_weak_order<RelationPredicate, Base, int>);
}
TEST_F(ConceptsTestFixture, IteratorInvocableConcepts)
{
// concept indirectly unary invocable
// i.e Is deferencing an iterator like type and invoking
// a unary callable a well formed expression
auto CharUnaryCallable = [](const char) -> int { return {}; };
auto IntUnaryCallable = [](int) -> int { return {}; };
auto IntRefUnaryCallable = [](int&) -> int { return {}; };
static_assert(AZStd::indirectly_unary_invocable<decltype(CharUnaryCallable), AZStd::string_view::iterator>);
static_assert(AZStd::indirectly_unary_invocable<decltype(IntUnaryCallable), AZStd::string_view::iterator>);
static_assert(!AZStd::indirectly_unary_invocable<decltype(IntRefUnaryCallable), AZStd::string_view::iterator>);
// concept indirectly regular unary invocable
// i.e Is deferencing an iterator like type and invoking with a unary callable
// which will not modify the input arguments(hence the term "regular") a well formed expression
static_assert(AZStd::indirectly_regular_unary_invocable<decltype(CharUnaryCallable), AZStd::string_view::iterator>);
static_assert(AZStd::indirectly_regular_unary_invocable<decltype(IntUnaryCallable), AZStd::string_view::iterator>);
static_assert(!AZStd::indirectly_regular_unary_invocable<decltype(IntRefUnaryCallable), AZStd::string_view::iterator>);
// concept indirect unary predicate
// i.e Is deferencing an iterator like type and invoking with a unary predicate
// i.e which is a callable that accepts one argument and returns value testable in a boolean context
auto CharUnaryPredicate = [](const char) -> bool { return {}; };
auto IntUnaryPredicate = [](int) -> int { return {}; };// Return value is an int which is convertible to bool
auto IntRefUnaryPredicate = [](int&) -> int { return {}; }; // string_view iterator value type(char) can't bind to an int&
auto CharUnaryNonPredicate = [](const char) -> AZStd::string_view { return {}; }; // string_view is not convertible to bool
static_assert(AZStd::indirect_unary_predicate<decltype(CharUnaryPredicate), AZStd::string_view::iterator>);
static_assert(AZStd::indirect_unary_predicate<decltype(IntUnaryPredicate), AZStd::string_view::iterator>);
static_assert(!AZStd::indirect_unary_predicate<decltype(IntRefUnaryPredicate), AZStd::string_view::iterator>);
static_assert(!AZStd::indirect_unary_predicate<decltype(CharUnaryNonPredicate), AZStd::string_view::iterator>);
// concept indirect binary predicate
// i.e Is deferencing two iterator like types and invoking a binary predicate with those values
// well formed and returns value testable in a boolean context.
auto CharIntBinaryPredicate = [](const char, int) -> bool { return{}; };
auto CharCharRefBinaryPredicate = [](const char, const char&) -> uint32_t { return{}; };
auto UIntRefCharBinaryPredicate = [](uint32_t&, char) -> bool { return{}; };
auto CharCharBinaryNonPredicate = [](const char, const char) -> AZStd::string_view { return {}; };
static_assert(AZStd::indirect_binary_predicate<decltype(CharIntBinaryPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
static_assert(AZStd::indirect_binary_predicate<decltype(CharCharRefBinaryPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
// string_view iterator value type(char) cannot bind to int&
static_assert(!AZStd::indirect_binary_predicate<decltype(UIntRefCharBinaryPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
// string_view is not convertible to bool
static_assert(!AZStd::indirect_binary_predicate<decltype(CharCharBinaryNonPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
// Ok - iter_reference_t<uint32_t*> = uint32_t&
static_assert(AZStd::indirect_binary_predicate<decltype(UIntRefCharBinaryPredicate),
uint32_t*, AZStd::string_view::iterator>);
// concept indirect equivalence relation
// i.e Is deferencing two iterator like types and invoking a binary predicate with those values
// well formed and returns value testable in a boolean context.
// The dereferenced iterator types should be model an equivalence relationship
// (a == b) && (b == c) == (a ==c)
static_assert(AZStd::indirect_equivalence_relation<decltype(CharIntBinaryPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
static_assert(AZStd::indirect_equivalence_relation<decltype(CharCharRefBinaryPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
static_assert(!AZStd::indirect_equivalence_relation<decltype(UIntRefCharBinaryPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
static_assert(!AZStd::indirect_equivalence_relation<decltype(CharCharBinaryNonPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
// The "relation" concept requires that both both arguments can be bind to
// either of the two binary parameters
static_assert(!AZStd::indirect_equivalence_relation<decltype(UIntRefCharBinaryPredicate),
uint32_t*, AZStd::string_view::iterator>);
// concept indirect strict weak order
// i.e Is deferencing two iterator like types and invoking a binary predicate with those values
// well formed and returns value testable in a boolean context.
// The dereferenced iterator types should be model a strict weak order relation
// (a < b) && (b < c) == (a < c)
static_assert(AZStd::indirect_strict_weak_order<decltype(CharIntBinaryPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
static_assert(AZStd::indirect_strict_weak_order<decltype(CharCharRefBinaryPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
static_assert(!AZStd::indirect_strict_weak_order<decltype(UIntRefCharBinaryPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
static_assert(!AZStd::indirect_strict_weak_order<decltype(CharCharBinaryNonPredicate),
AZStd::string_view::iterator, AZStd::string_view::iterator>);
// The "relation" concept requires that both both arguments can be bind to
// either of the two binary parameters
static_assert(!AZStd::indirect_strict_weak_order<decltype(UIntRefCharBinaryPredicate),
uint32_t*, AZStd::string_view::iterator>);
// indirect_result_t type alias
static_assert(AZStd::same_as<AZStd::indirect_result_t<decltype(CharCharRefBinaryPredicate),
AZStd::string_view::iterator, const char*>, uint32_t>);
// projected operator* returns indirect result of the projection function
static_assert(AZStd::same_as<AZStd::iter_reference_t<AZStd::projected<int*, AZStd::identity>>, int&>);
}
TEST_F(ConceptsTestFixture, IteratorAlgorithmConcepts)
{
static_assert(AZStd::indirectly_swappable<int*, int*>);
static_assert(!AZStd::indirectly_swappable<int*, const int*>);
auto CharIntIndirectlyComparable = [](const char lhs, int rhs) -> bool { return lhs == rhs; };
static_assert(AZStd::indirectly_comparable<const char*, int*, decltype(CharIntIndirectlyComparable)>);
static_assert(!AZStd::indirectly_comparable<AZStd::string_view, int*, decltype(CharIntIndirectlyComparable)>);
static_assert(AZStd::permutable<typename AZStd::vector<int>::iterator>);
// const iterator isn't indirectlly swappable or indirectly movable
static_assert(!AZStd::permutable<typename AZStd::vector<int>::const_iterator>);
static_assert(AZStd::mergeable<AZStd::vector<int>::iterator, AZStd::string_view::iterator, AZStd::vector<int>::iterator>);
static_assert(!AZStd::mergeable<AZStd::vector<int>::iterator, AZStd::string_view::iterator, AZStd::string_view::iterator>);
static_assert(AZStd::sortable<int*>);
// Not sortable becaue the iter_reference_t<const int*> = const int& which isn't swappable
static_assert(!AZStd::sortable<const int*>);
}
}
@@ -443,7 +443,7 @@ namespace UnitTest
: m_data(data) { /* expensive operations */ }
private:
int m_data;
[[maybe_unused]] int m_data;
};
//////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,250 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzCore/UnitTest/TestTypes.h>
#include <AzCore/std/string/string_view.h>
#include <AzCore/std/ranges/ranges_algorithm.h>
namespace UnitTest
{
class RangesAlgorithmTestFixture
: public ScopedAllocatorSetupFixture
{};
// range algorithm min and max
TEST_F(RangesAlgorithmTestFixture, RangesMin_ReturnsSmallestElement)
{
// Simple Elements
EXPECT_EQ(-1, AZStd::ranges::min(5, -1));
EXPECT_EQ(78235, AZStd::ranges::min(78235, 124785));
EXPECT_EQ(7, AZStd::ranges::min(7, 7));
// Initializer list
AZStd::initializer_list<int> testIList{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
EXPECT_EQ(-8, AZStd::ranges::min(testIList));
// Range
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
EXPECT_EQ(-8, AZStd::ranges::min(testVector));
}
TEST_F(RangesAlgorithmTestFixture, RangesMax_ReturnsLargestElement)
{
// Simple Elements
EXPECT_EQ(5, AZStd::ranges::max(5, -1));
EXPECT_EQ(124785, AZStd::ranges::max(78235, 124785));
EXPECT_EQ(7, AZStd::ranges::max(7, 7));
// Initializer list
AZStd::initializer_list<int> testIList{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
EXPECT_EQ(1000, AZStd::ranges::max(testIList));
// Range
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
EXPECT_EQ(1000, AZStd::ranges::max(testVector));
}
TEST_F(RangesAlgorithmTestFixture, RangesMinMax_ReturnsSmallestAndLargestValue)
{
// Simple Elements
AZStd::ranges::minmax_result<int> expectedMinMax{ -1, 5 };
AZStd::ranges::minmax_result<int> testMinMax = AZStd::ranges::minmax(5, -1);
EXPECT_EQ(expectedMinMax.min, testMinMax.min);
EXPECT_EQ(expectedMinMax.max, testMinMax.max);
expectedMinMax = { 78235, 124785 };
testMinMax = AZStd::ranges::minmax(78235, 124785);
EXPECT_EQ(expectedMinMax.min, testMinMax.min);
EXPECT_EQ(expectedMinMax.max, testMinMax.max);
expectedMinMax = { 7, 7 };
testMinMax = AZStd::ranges::minmax(7, 7);
EXPECT_EQ(expectedMinMax.min, testMinMax.min);
EXPECT_EQ(expectedMinMax.max, testMinMax.max);
// Initializer list
AZStd::initializer_list<int> testIList{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
expectedMinMax = { -8, 1000 };
testMinMax = AZStd::ranges::minmax(testIList);
EXPECT_EQ(expectedMinMax.min, testMinMax.min);
EXPECT_EQ(expectedMinMax.max, testMinMax.max);
// Range
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
expectedMinMax = { -8, 1000 };
testMinMax = AZStd::ranges::minmax(testVector);
EXPECT_EQ(expectedMinMax.min, testMinMax.min);
EXPECT_EQ(expectedMinMax.max, testMinMax.max);
}
TEST_F(RangesAlgorithmTestFixture, RangesMinElement_ReturnsIteratorToLeftmostSmallestElement)
{
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
// iterator
auto leftmostSmallestIt = AZStd::ranges::min_element(testVector.begin(), testVector.end());
ASSERT_EQ(testVector.begin() + 4, leftmostSmallestIt);
EXPECT_EQ(-8, *leftmostSmallestIt);
// Range
leftmostSmallestIt = AZStd::ranges::min_element(testVector);
ASSERT_EQ(testVector.begin() + 4, leftmostSmallestIt);
EXPECT_EQ(-8, *leftmostSmallestIt);
}
TEST_F(RangesAlgorithmTestFixture, RangesMaxElement_ReturnsIteratorToLeftmostLargestElement)
{
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
// iterator
auto leftmostLargestIt = AZStd::ranges::max_element(testVector.begin(), testVector.end());
ASSERT_EQ(testVector.begin() + 6, leftmostLargestIt);
EXPECT_EQ(1000, *leftmostLargestIt);
// Range
leftmostLargestIt = AZStd::ranges::max_element(testVector);
ASSERT_EQ(testVector.begin() + 6, leftmostLargestIt);
EXPECT_EQ(1000, *leftmostLargestIt);
}
TEST_F(RangesAlgorithmTestFixture, RangesMinMaxElement_ReturnsIteratorToLeftmostSmallestElement_IteratorToRightmostLargestElement)
{
// The behavior of minmax_element is explicitly different from max_element
// as it relates to the max element being returned
// mixmax_element returns the rightmost largest element(assuming comparison function object is ranges::less)
// https://eel.is/c++draft/algorithms#footnoteref-225
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
// iterator
{
auto [leftmostSmallestIt, rightmostLargestIt] = AZStd::ranges::minmax_element(testVector.begin(), testVector.end());
ASSERT_EQ(testVector.begin() + 4, leftmostSmallestIt);
ASSERT_EQ(testVector.begin() + 10, rightmostLargestIt);
EXPECT_EQ(-8, *leftmostSmallestIt);
EXPECT_EQ(1000, *rightmostLargestIt);
}
// Range
auto [leftmostSmallestIt, rightmostLargestIt] = AZStd::ranges::minmax_element(testVector);
ASSERT_EQ(testVector.begin() + 4, leftmostSmallestIt);
ASSERT_EQ(testVector.begin() + 10, rightmostLargestIt);
EXPECT_EQ(-8, *leftmostSmallestIt);
EXPECT_EQ(1000, *rightmostLargestIt);
}
TEST_F(RangesAlgorithmTestFixture, RangesFind_LocatesElementInContainer_Succeeds)
{
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
auto foundIt = AZStd::ranges::find(testVector, 22);
ASSERT_NE(testVector.end(), foundIt);
EXPECT_EQ(22, *foundIt);
foundIt = AZStd::ranges::find_if(testVector, [](int value) { return value < 0; });
ASSERT_NE(testVector.end(), foundIt);
EXPECT_EQ(-8, *foundIt);
foundIt = AZStd::ranges::find_if_not(testVector, [](int value) { return value < 1000; });
ASSERT_NE(testVector.end(), foundIt);
EXPECT_EQ(1000, *foundIt);
}
TEST_F(RangesAlgorithmTestFixture, RangesFindFirstOf_LocatesElementInContainer_Succeeds)
{
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, 1000, 45 };
AZStd::array testArray{ -8, 47 };
auto foundIt = AZStd::ranges::find_first_of(testVector, testArray);
ASSERT_NE(testVector.end(), foundIt);
EXPECT_EQ(47, *foundIt);
AZStd::array<int, 0> emptyArray{};
foundIt = AZStd::ranges::find_first_of(testVector, emptyArray);
EXPECT_EQ(testVector.end(), foundIt);
}
TEST_F(RangesAlgorithmTestFixture, RangesSearch_LocatesElementInContainer_Succeeds)
{
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, -8, 1000, 45 };
AZStd::array testArray{ 1000 };
auto testSubrange = AZStd::ranges::search(testVector, testArray);
ASSERT_FALSE(testSubrange.empty());
EXPECT_EQ(1000, testSubrange.front());
AZStd::array testArray2{ 1000, 45 };
testSubrange = AZStd::ranges::search(testVector, testArray2);
ASSERT_EQ(2, testSubrange.size());
EXPECT_EQ(1000, testSubrange[0]);
EXPECT_EQ(45, testSubrange[1]);
testSubrange = AZStd::ranges::search_n(testVector, 1, 22);
ASSERT_FALSE(testSubrange.empty());
EXPECT_EQ(22, testSubrange.front());
// 2 Consecutive values of 22 does not exist in vector
testSubrange = AZStd::ranges::search_n(testVector, 2, 22);
EXPECT_TRUE(testSubrange.empty());
// 2 Consecutive values of -8 does exist in vector
testSubrange = AZStd::ranges::search_n(testVector, 2,- 8);
ASSERT_EQ(2, testSubrange.size());
EXPECT_EQ(-8, testSubrange[0]);
EXPECT_EQ(-8, testSubrange[1]);
}
TEST_F(RangesAlgorithmTestFixture, RangesFindEnd_LocatesElementLastElement_Succeeds)
{
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, -8, 1000, 45 };
AZStd::array testArray{ -8 };
auto testSubrange = AZStd::ranges::find_end(testVector, testArray);
ASSERT_FALSE(testSubrange.empty());
EXPECT_EQ(-8, testSubrange.front());
EXPECT_EQ(testVector.end() - 3, testSubrange.begin());
}
TEST_F(RangesAlgorithmTestFixture, RangesEqual_IsAbleToCompareTwoRanges_Succeeds)
{
AZStd::vector testVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, -8, 1000, 45 };
AZStd::vector longerVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, -8, 1000, 45, 929 };
AZStd::vector shorterVector{ 5, 1, 22, 47, -8, -5, 1000, 687, 22, -8, -8, 1000 };
AZStd::vector unequalVector{ 5, 1, 22, 47, -8, -5, 1000, 14, 22, -8, -8, 1000, 25 };
EXPECT_TRUE(AZStd::ranges::equal(testVector, testVector));
EXPECT_FALSE(AZStd::ranges::equal(testVector, longerVector));
EXPECT_FALSE(AZStd::ranges::equal(longerVector, testVector));
EXPECT_FALSE(AZStd::ranges::equal(testVector, shorterVector));
EXPECT_FALSE(AZStd::ranges::equal(shorterVector, testVector));
EXPECT_FALSE(AZStd::ranges::equal(testVector, unequalVector));
}
TEST_F(RangesAlgorithmTestFixture, RangesMismatch_Returns_IteratorsToMismatchElements)
{
AZStd::vector testVector{ 1, 2, 3, 4, 5 ,6 };
AZStd::vector secondVector{ 1, 2, 3, 14, 5, 6 };
AZStd::vector<int> emptyVector;
AZStd::vector<int> longerVector{ 1, 2, 3, 4, 5, 6, 7 };
{
auto [mismatchIt1, mismatchIt2] = AZStd::ranges::mismatch(testVector, secondVector);
ASSERT_NE(testVector.end(), mismatchIt1);
EXPECT_EQ(4, *mismatchIt1);
ASSERT_NE(secondVector.end(), mismatchIt2);
EXPECT_EQ(14, *mismatchIt2);
}
{
auto [mismatchIt1, mismatchIt2] = AZStd::ranges::mismatch(testVector, emptyVector);
ASSERT_NE(testVector.end(), mismatchIt1);
EXPECT_EQ(1, *mismatchIt1);
EXPECT_EQ(emptyVector.end(), mismatchIt2);
}
{
auto [mismatchIt1, mismatchIt2] = AZStd::ranges::mismatch(testVector, longerVector);
EXPECT_EQ(testVector.end(), mismatchIt1);
ASSERT_NE(longerVector.end(), mismatchIt2);
EXPECT_EQ(7, *mismatchIt2);
}
}
}
@@ -0,0 +1,483 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzCore/UnitTest/TestTypes.h>
#include <AzCore/std/containers/list.h>
#include <AzCore/std/containers/map.h>
#include <AzCore/std/containers/vector.h>
#include <AzCore/std/ranges/all_view.h>
#include <AzCore/std/ranges/elements_view.h>
#include <AzCore/std/ranges/empty_view.h>
#include <AzCore/std/ranges/join_view.h>
#include <AzCore/std/ranges/ranges_adaptor.h>
#include <AzCore/std/ranges/single_view.h>
#include <AzCore/std/ranges/split_view.h>
#include <AzCore/std/ranges/subrange.h>
#include <AzCore/std/ranges/zip_view.h>
#include <AzCore/std/string/string_view.h>
namespace UnitTest
{
class RangesViewTestFixture
: public ScopedAllocatorSetupFixture
{};
TEST_F(RangesViewTestFixture, AllRangeAdaptor_Succeeds)
{
AZStd::string_view testString{ "Hello World" };
auto testAllView = AZStd::ranges::views::all(testString);
EXPECT_EQ(testString.size(), testAllView.size());
EXPECT_EQ(testString.data(), testAllView.data());
EXPECT_EQ(testString.begin(), testAllView.begin());
EXPECT_EQ(testString.end(), testAllView.end());
EXPECT_EQ(testString.empty(), testAllView.empty());
EXPECT_EQ(testString.front(), testAllView.front());
EXPECT_EQ(testString.back(), testAllView.back());
EXPECT_EQ(testString[5], testAllView[5]);
auto testAllViewChain = testString | AZStd::ranges::views::all;
EXPECT_EQ(testString.size(), testAllViewChain.size());
EXPECT_EQ(testString.data(), testAllViewChain.data());
EXPECT_EQ(testString.begin(), testAllViewChain.begin());
EXPECT_EQ(testString.end(), testAllViewChain.end());
EXPECT_EQ(testString.empty(), testAllViewChain.empty());
EXPECT_EQ(testString.front(), testAllViewChain.front());
EXPECT_EQ(testString.back(), testAllViewChain.back());
EXPECT_EQ(testString[5], testAllViewChain[5]);
}
TEST_F(RangesViewTestFixture, Subrange_DeductionGuides_Compile)
{
AZStd::string_view testString{ "Hello World" };
AZStd::ranges::subrange rangeDeduction(testString);
AZStd::ranges::subrange rangeDeductionWithSize(testString, testString.size());
AZStd::ranges::subrange iteratorDeduction(testString.begin(), testString.end());
AZStd::ranges::subrange iteratorDeductionWithSize(testString.begin(), testString.end(),
testString.size());
EXPECT_TRUE(rangeDeduction);
EXPECT_TRUE(rangeDeductionWithSize);
EXPECT_TRUE(iteratorDeduction);
EXPECT_TRUE(iteratorDeductionWithSize);
}
TEST_F(RangesViewTestFixture, Subrange_CanTakeSubsetOfContainer_Succeeds)
{
AZStd::vector<int> testVector{ 1, 3, 5, 6, 7, 6, 89, -178 };
AZStd::ranges::subrange subVector(testVector);
EXPECT_TRUE(subVector);
ASSERT_FALSE(subVector.empty());
EXPECT_EQ(testVector.data(), subVector.data());
EXPECT_EQ(testVector.begin(), subVector.begin());
EXPECT_EQ(testVector.end(), subVector.end());
EXPECT_EQ(testVector.size(), subVector.size());
EXPECT_EQ(testVector[0], subVector[0]);
EXPECT_EQ(testVector.front(), subVector.front());
EXPECT_EQ(testVector.back(), subVector.back());
// Now validate the iterator operations
subVector.advance(2);
subVector = subVector.prev();
subVector.advance(2);
subVector = subVector.next();
subVector.advance(-4);
EXPECT_EQ(testVector.begin(), subVector.begin());
// Obtain a copy of the subrange with the first and last elements removed
AZStd::ranges::subrange subVectorSplice(subVector.begin() + 1, subVector.end() - 1);
EXPECT_TRUE(subVectorSplice);
ASSERT_FALSE(subVector.empty());
EXPECT_LT(testVector.data(), subVectorSplice.data());
EXPECT_EQ(testVector.begin() + 1, subVectorSplice.begin());
EXPECT_EQ(testVector.end() - 1, subVectorSplice.end());
ASSERT_EQ(testVector.size() - 2, subVectorSplice.size());
EXPECT_EQ(testVector[1], subVectorSplice.front());
EXPECT_EQ(testVector[testVector.size() - 2], subVectorSplice.back());
EXPECT_NE(testVector.front(), subVectorSplice.front());
EXPECT_NE(testVector.back(), subVectorSplice.back());
}
TEST_F(RangesViewTestFixture, EmptyView_ReturnsEmptyViewRange_Succeeds)
{
AZStd::ranges::empty_view<int> emptyView;
EXPECT_EQ(nullptr, emptyView.data());
EXPECT_EQ(0, emptyView.size());
EXPECT_TRUE(emptyView.empty());
EXPECT_EQ(emptyView.end(), emptyView.begin());
EXPECT_EQ(nullptr, AZStd::ranges::views::empty<AZStd::string_view>.data());
EXPECT_EQ(0, AZStd::ranges::views::empty<AZStd::string_view>.size());
EXPECT_TRUE(AZStd::ranges::views::empty<AZStd::string_view>.empty());
EXPECT_EQ(AZStd::ranges::views::empty<AZStd::string_view>.end(), AZStd::ranges::views::empty<AZStd::string_view>.begin());
}
TEST_F(RangesViewTestFixture, SingleView_ReturnsViewOverSingleElement_Succeeds)
{
AZStd::string_view testString{ "Hello World" };
AZStd::ranges::single_view singleView{ AZStd::move(testString) };
EXPECT_NE(nullptr, singleView.data());
EXPECT_EQ(1, singleView.size());
EXPECT_FALSE(singleView.empty());
ASSERT_NE(singleView.end(), singleView.begin());
auto singleViewStringIt = singleView.begin();
EXPECT_EQ("Hello World", *singleViewStringIt);
}
TEST_F(RangesViewTestFixture, RefView_CanWrapStringView_Succeeds)
{
AZStd::string_view testString{ "Hello World" };
AZStd::ranges::ref_view refView(testString);
EXPECT_EQ(testString.size(), refView.size());
EXPECT_EQ(testString.data(), refView.data());
EXPECT_EQ(testString.begin(), refView.begin());
EXPECT_EQ(testString.end(), refView.end());
EXPECT_EQ(testString.empty(), refView.empty());
EXPECT_EQ(testString.front(), refView.front());
EXPECT_EQ(testString.back(), refView.back());
EXPECT_EQ(testString[5], refView[5]);
}
TEST_F(RangesViewTestFixture, OwningView_CanWrapStringView_Succeeds)
{
AZStd::string_view sourceView{ "Hello World" };
AZStd::string_view testString{ sourceView };
AZStd::ranges::owning_view owningView(AZStd::move(testString));
EXPECT_TRUE(testString.empty());
EXPECT_FALSE(owningView.empty());
EXPECT_EQ(sourceView.size(), owningView.size());
EXPECT_EQ(sourceView.data(), owningView.data());
EXPECT_EQ(sourceView.begin(), owningView.begin());
EXPECT_EQ(sourceView.end(), owningView.end());
EXPECT_EQ(sourceView.empty(), owningView.empty());
EXPECT_EQ(sourceView.front(), owningView.front());
EXPECT_EQ(sourceView.back(), owningView.back());
EXPECT_EQ(sourceView[5], owningView[5]);
}
MATCHER_P(ZipViewAtSentinel, sentinel, "") {
*result_listener << "zip view has iterated to sentinel";
return !(arg == sentinel);
}
TEST_F(RangesViewTestFixture, ZipView_CompilesWithRange_Succeeds)
{
AZStd::string_view sourceView{ "Hello World" };
AZStd::ranges::zip_view zipView(AZStd::move(sourceView));
auto zipItTuple = zipView.begin();
auto zipSentinelTuple = zipView.end();
ASSERT_THAT(zipItTuple, ZipViewAtSentinel(zipSentinelTuple));
EXPECT_EQ('H', AZStd::get<0>(*zipItTuple));
ptrdiff_t zipDistance = zipSentinelTuple - zipItTuple;
EXPECT_EQ(11, zipDistance);
AZStd::list<int> sourceList{ 1, 2, 3, 4, 5 };
AZStd::ranges::zip_view zipView2(AZStd::move(sourceList));
auto zipListTupleIt = zipView2.begin();
auto zipListTupleEnd = zipView2.end();
ASSERT_THAT(zipListTupleIt, ZipViewAtSentinel(zipListTupleEnd));
}
TEST_F(RangesViewTestFixture, ZipView_CanIteratOverMultipleContainers_Succeeds)
{
AZStd::string_view sourceView{ "abcdef" };
AZStd::vector intVector{ 1, 2, 3, 4, 5 };
AZStd::list<uint32_t> uintList{ 2, 4, 6, 8, 10 };
constexpr int expectedIterations = 5;
int iterationCount{};
for (auto [charX, intY, uintZ] : (AZStd::ranges::views::zip(sourceView, AZStd::move(intVector), AZStd::move(uintList))))
{
++iterationCount;
switch (charX)
{
case 'a':
EXPECT_EQ(1, intY);
EXPECT_EQ(2, uintZ);
break;
case 'b':
EXPECT_EQ(2, intY);
EXPECT_EQ(4, uintZ);
break;
case 'c':
EXPECT_EQ(3, intY);
EXPECT_EQ(6, uintZ);
break;
case 'd':
EXPECT_EQ(4, intY);
EXPECT_EQ(8, uintZ);
break;
case 'e':
EXPECT_EQ(5, intY);
EXPECT_EQ(10, uintZ);
break;
default:
ADD_FAILURE() << "Unexpected character value " << charX << " found when iterating zip view";
}
}
EXPECT_EQ(expectedIterations, iterationCount);
}
TEST_F(RangesViewTestFixture, SplitView_CanSplitPatterns_Succeeds)
{
AZStd::string_view emptyView{ "" };
auto splitView = AZStd::ranges::views::split(emptyView, " ");
auto splitIt = splitView.begin();
EXPECT_EQ(splitView.end(), splitIt);
AZStd::string_view testView1{ "Hello" };
auto splitViewCharPattern = AZStd::ranges::views::split(testView1, ' ');
auto splitCharIt = splitViewCharPattern.begin();
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("Hello", AZStd::string_view(*splitCharIt));
++splitCharIt;
EXPECT_EQ(splitViewCharPattern.end(), splitCharIt);
AZStd::string_view testView2{ "Hello World" };
splitViewCharPattern = AZStd::ranges::views::split(testView2, ' ');
splitCharIt = splitViewCharPattern.begin();
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("Hello", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("World", AZStd::string_view(*splitCharIt));
++splitCharIt;
EXPECT_EQ(splitViewCharPattern.end(), splitCharIt);
AZStd::string_view testView3{ "Hello World Moon" };
splitViewCharPattern = AZStd::ranges::views::split(testView3, ' ');
splitCharIt = splitViewCharPattern.begin();
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("Hello", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("World", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("Moon", AZStd::string_view(*splitCharIt));
++splitCharIt;
EXPECT_EQ(splitViewCharPattern.end(), splitCharIt);
AZStd::string_view testView4{ "Hello World Moon " };
splitViewCharPattern = AZStd::ranges::views::split(testView4, ' ');
splitCharIt = splitViewCharPattern.begin();
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("Hello", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("World", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("Moon", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("", AZStd::string_view(*splitCharIt));
++splitCharIt;
EXPECT_EQ(splitViewCharPattern.end(), splitCharIt);
AZStd::string_view testView5{ "Hello World Moon " };
splitViewCharPattern = AZStd::ranges::views::split(testView5, ' ');
splitCharIt = splitViewCharPattern.begin();
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("Hello", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("World", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("Moon", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("", AZStd::string_view(*splitCharIt));
++splitCharIt;
EXPECT_EQ(splitViewCharPattern.end(), splitCharIt);
AZStd::string_view testView6{ "Hello World Moon" };
splitViewCharPattern = AZStd::ranges::views::split(testView6, ' ');
splitCharIt = splitViewCharPattern.begin();
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("Hello", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("World", AZStd::string_view(*splitCharIt));
++splitCharIt;
ASSERT_NE(splitViewCharPattern.end(), splitCharIt);
EXPECT_EQ("Moon", AZStd::string_view(*splitCharIt));
++splitCharIt;
EXPECT_EQ(splitViewCharPattern.end(), splitCharIt);
}
TEST_F(RangesViewTestFixture, SplitView_SplitsFromNonString_Succeeds)
{
const AZStd::vector<int> testVector{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
// Split the vector on 3
auto splitView = AZStd::ranges::views::split(testVector, 3);
auto splitIt = splitView.begin();
ASSERT_NE(splitView.end(), splitIt);
auto splitSubrange = *splitIt;
{
AZStd::array expectedValue{ 1, 2 };
EXPECT_TRUE(AZStd::ranges::equal(expectedValue, splitSubrange));
}
++splitIt;
ASSERT_NE(splitView.end(), splitIt);
splitSubrange = *splitIt;
{
AZStd::array expectedValue{ 4, 5, 6, 7, 8, 9, 10 };
EXPECT_TRUE(AZStd::ranges::equal(expectedValue, splitSubrange));
}
}
TEST_F(RangesViewTestFixture, JoinView_IteratesOverInnerViews_Succeeds)
{
constexpr AZStd::string_view expectedString = "HelloWorldMoonSun";
using Rope = AZStd::fixed_vector<AZStd::string_view, 32>;
Rope rope{ "Hello", "World", "Moon", "Sun" };
AZStd::fixed_string<128> accumString;
for (auto&& charElement : AZStd::ranges::join_view(rope))
{
accumString.push_back(charElement);
}
EXPECT_EQ(expectedString, accumString);
}
TEST_F(RangesViewTestFixture, JoinView_IteratesCanIterateOverSplitView_Succeeds)
{
constexpr AZStd::string_view expectedString = "HelloWorldMoonSun";
constexpr AZStd::string_view splitExpression = "Hello,World,Moon,Sun";
AZStd::fixed_string<128> accumString;
for (auto&& charElement : AZStd::ranges::views::join(AZStd::ranges::views::split(splitExpression, ',')))
{
accumString.push_back(charElement);
}
EXPECT_EQ(expectedString, accumString);
}
TEST_F(RangesViewTestFixture, JoinView_IterSwapCustomization_Succeeds)
{
AZStd::fixed_vector<AZStd::string, 8> testVector1{ "World", "Hello" };
AZStd::fixed_vector<AZStd::string, 8> testVector2{ "Value", "First" };
auto joinView1 = AZStd::ranges::views::join(testVector1);
auto joinView2 = AZStd::ranges::views::join(testVector2);
auto joinViewIter1 = joinView1.begin();
auto joinViewIter2 = joinView2.begin();
// swaps the 'W' and 'V'
AZStd::ranges::iter_swap(joinViewIter1, joinViewIter2);
AZStd::ranges::advance(joinViewIter1, 5, joinView1.end());
AZStd::ranges::advance(joinViewIter2, 5, joinView2.end());
// swaps the 'H' and 'F' of the second string of each vector
AZStd::ranges::iter_swap(joinViewIter1, joinViewIter2);
EXPECT_EQ("Vorld", testVector1[0]);
EXPECT_EQ("Fello", testVector1[1]);
EXPECT_EQ("Walue", testVector2[0]);
EXPECT_EQ("Hirst", testVector2[1]);
}
TEST_F(RangesViewTestFixture, JoinView_IterMoveCustomization_Succeeds)
{
using StringWrapper = AZStd::ranges::single_view<AZStd::string>;
AZStd::fixed_vector<StringWrapper, 8> testVector1{ StringWrapper{"5"}, StringWrapper{"10"} };
AZStd::fixed_vector<StringWrapper, 8> testVector2{ StringWrapper{"15"}, StringWrapper{"20"} };
auto joinView1 = AZStd::ranges::views::join(testVector1);
auto joinView2 = AZStd::ranges::views::join(testVector2);
auto joinViewIter1 = joinView1.begin();
auto joinViewIter2 = joinView2.begin();
AZStd::string value = AZStd::ranges::iter_move(joinViewIter1);
EXPECT_EQ("5", value);
EXPECT_TRUE((*joinViewIter1).empty());
++joinViewIter2;
value = AZStd::ranges::iter_move(joinViewIter2);
EXPECT_EQ("20", value);
EXPECT_TRUE((*joinViewIter2).empty());
}
TEST_F(RangesViewTestFixture, ElementsView_CanIterateVectorOfTuple_Succeeds)
{
using TestTuple = AZStd::tuple<int, AZStd::string, bool>;
AZStd::vector testVector{ TestTuple{1, "hello", false}, TestTuple{2, "world", true},
TestTuple{3, "Moon", false} };
auto firstElementView = AZStd::ranges::views::elements<0>(testVector);
auto firstElementBegin = AZStd::ranges::begin(firstElementView);
auto firstElementEnd = AZStd::ranges::end(firstElementView);
EXPECT_NE(firstElementEnd, firstElementBegin);
ASSERT_EQ(3, firstElementView.size());
EXPECT_EQ(1, firstElementView[0]);
EXPECT_EQ(2, firstElementView[1]);
EXPECT_EQ(3, firstElementView[2]);
auto secondElementView = AZStd::ranges::views::elements<1>(testVector);
ASSERT_EQ(3, secondElementView.size());
EXPECT_EQ("hello", secondElementView[0]);
EXPECT_EQ("world", secondElementView[1]);
EXPECT_EQ("Moon", secondElementView[2]);
auto thirdElementView = AZStd::ranges::views::elements<2>(testVector);
ASSERT_EQ(3, thirdElementView.size());
EXPECT_FALSE(thirdElementView[0]);
EXPECT_TRUE(thirdElementView[1]);
EXPECT_FALSE(thirdElementView[2]);
using TestPair = AZStd::pair<AZStd::string, int>;
AZStd::vector testPairVector{ TestPair{"hello", 5}, TestPair{"world", 10}, TestPair{"Sun", 15} };
using ElementsViewBase = AZStd::ranges::views::all_t<decltype((testPairVector))>;
using ElementsViewType = AZStd::ranges::elements_view<ElementsViewBase, 0>;
constexpr AZStd::string_view expectedString = "helloworldSun";
AZStd::string accumString;
for (auto&& stringValue : ElementsViewType(testPairVector))
{
accumString += stringValue;
}
EXPECT_EQ(expectedString, accumString);
}
TEST_F(RangesViewTestFixture, ElementsView_KeysAlias_CanIterateAssociativeContainerKeyType)
{
using PairType = AZStd::pair<int, const char*>;
AZStd::map testMap{ PairType{1, "Hello"}, PairType{2, "World"}, PairType{3, "Sun"}, PairType{45, "RandomText"} };
int accumResult{};
for (int key : AZStd::ranges::views::keys(testMap))
{
accumResult += key;
}
EXPECT_EQ(51, accumResult);
}
TEST_F(RangesViewTestFixture, ElementsView_ValuesAlias_CanIterateAssociativeContainerMappedType)
{
using PairType = AZStd::pair<int, const char*>;
AZStd::map testMap{ PairType{1, "Hello"}, PairType{2, "World"}, PairType{3, "Sun"}, PairType{45, "RandomText"} };
AZStd::string accumResult{};
for (const char* value : AZStd::ranges::views::values(testMap))
{
accumResult += value;
}
EXPECT_EQ("HelloWorldSunRandomText", accumResult);
}
}
+18 -18
View File
@@ -2537,7 +2537,7 @@ namespace Benchmark
{
AZStd::string test1{ "foo bar"};
AZStd::string test2{ "bar foo" };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
SwapStringViaPointerSizedSwaps(test1, test2);
}
@@ -2547,7 +2547,7 @@ namespace Benchmark
{
AZStd::string test1{ "The brown quick wolf jumped over the hyperactive cat" };
AZStd::string test2{ "The quick brown fox jumped over the lazy dog" };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
SwapStringViaPointerSizedSwaps(test1, test2);
}
@@ -2557,7 +2557,7 @@ namespace Benchmark
{
AZStd::string test1{ "foo bar" };
AZStd::string test2{ "bar foo" };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
SwapStringViaMemcpy(test1, test2);
}
@@ -2567,7 +2567,7 @@ namespace Benchmark
{
AZStd::string test1{ "The brown quick wolf jumped over the hyperactive cat" };
AZStd::string test2{ "The quick brown fox jumped over the lazy dog" };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
SwapStringViaMemcpy(test1, test2);
}
@@ -2584,7 +2584,7 @@ namespace Benchmark
AZStd::string sourceString(state.range(0), 'a');
const char* sourceAddress = sourceString.c_str();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(sourceAddress);
@@ -2600,7 +2600,7 @@ namespace Benchmark
const char* sourceAddress = sourceString.c_str();
const size_t sourceSize = sourceString.size();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(sourceAddress, sourceSize);
@@ -2616,7 +2616,7 @@ namespace Benchmark
auto sourceBegin = sourceString.begin();
auto sourceEnd = sourceString.end();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(sourceBegin, sourceEnd);
@@ -2631,7 +2631,7 @@ namespace Benchmark
AZStd::string sourceString(state.range(0), 'a');
AZStd::string_view sourceView(sourceString);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(sourceView);
@@ -2645,7 +2645,7 @@ namespace Benchmark
{
AZStd::string sourceString(state.range(0), 'a');
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(sourceString);
@@ -2659,7 +2659,7 @@ namespace Benchmark
{
AZStd::string sourceString(state.range(0), 'a');
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(AZStd::move(sourceString));
@@ -2671,7 +2671,7 @@ namespace Benchmark
BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_StringAssignFromSingleCharacter, AZStd::string)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::string assignString;
assignString.assign(state.range(0), 'a');
@@ -2689,7 +2689,7 @@ namespace Benchmark
AZStd::fixed_string<1024> sourceString(state.range(0), 'a');
const char* sourceAddress = sourceString.c_str();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(sourceAddress);
@@ -2705,7 +2705,7 @@ namespace Benchmark
const char* sourceAddress = sourceString.c_str();
const size_t sourceSize = sourceString.size();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(sourceAddress, sourceSize);
@@ -2721,7 +2721,7 @@ namespace Benchmark
auto sourceBegin = sourceString.begin();
auto sourceEnd = sourceString.end();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(sourceBegin, sourceEnd);
@@ -2736,7 +2736,7 @@ namespace Benchmark
AZStd::fixed_string<1024> sourceString(state.range(0), 'a');
AZStd::string_view sourceView(sourceString);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(sourceView);
@@ -2750,7 +2750,7 @@ namespace Benchmark
{
AZStd::fixed_string<1024> sourceString(state.range(0), 'a');
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(sourceString);
@@ -2764,7 +2764,7 @@ namespace Benchmark
{
AZStd::fixed_string<1024> sourceString(state.range(0), 'a');
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(AZStd::move(sourceString));
@@ -2776,7 +2776,7 @@ namespace Benchmark
BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromSingleCharacter, AZStd::fixed_string<1024>)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::fixed_string<1024> assignString;
assignString.assign(state.range(0), 'a');
@@ -29,7 +29,7 @@ namespace AZ::Dom::Benchmark
AZ::Dom::JsonBackend backend;
AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
AZStd::string payloadCopy = serializedPayload;
@@ -53,7 +53,7 @@ namespace AZ::Dom::Benchmark
AZ::Dom::JsonBackend backend;
AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
AZStd::string payloadCopy = serializedPayload;
@@ -77,7 +77,7 @@ namespace AZ::Dom::Benchmark
AZ::Dom::JsonBackend backend;
AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto result = AZ::Dom::Json::WriteToRapidJsonDocument(
[&](AZ::Dom::Visitor& visitor)
@@ -97,7 +97,7 @@ namespace AZ::Dom::Benchmark
AZ::Dom::JsonBackend backend;
AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto result = AZ::Dom::Utils::WriteToValue(
[&](AZ::Dom::Visitor& visitor)
@@ -117,7 +117,7 @@ namespace AZ::Dom::Benchmark
AZ::Dom::JsonBackend backend;
AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto result = AZ::JsonSerializationUtils::ReadJsonString(serializedPayload);
@@ -130,7 +130,7 @@ namespace AZ::Dom::Benchmark
BENCHMARK_DEFINE_F(DomJsonBenchmark, RapidjsonMakeComplexObject)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
TakeAndDiscardWithoutTimingDtor(GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)), state);
}
@@ -152,7 +152,7 @@ namespace AZ::Dom::Benchmark
document.GetAllocator());
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const AZStd::string& key : keys)
{
@@ -168,7 +168,7 @@ namespace AZ::Dom::Benchmark
{
rapidjson::Document original = GenerateDomJsonBenchmarkDocument(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
rapidjson::Document copy;
copy.CopyFrom(original, copy.GetAllocator(), true);
@@ -184,7 +184,7 @@ namespace AZ::Dom::Benchmark
{
rapidjson::Document original = GenerateDomJsonBenchmarkDocument(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
rapidjson::Document copy;
copy.CopyFrom(original, copy.GetAllocator(), true);
@@ -78,7 +78,7 @@ namespace AZ::Dom::Benchmark
if (apply)
{
auto patchInfo = GenerateHierarchicalDeltaPatch(m_before, m_after);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto patchResult = patchInfo.m_forwardPatches.Apply(m_before);
benchmark::DoNotOptimize(patchResult);
@@ -86,7 +86,7 @@ namespace AZ::Dom::Benchmark
}
else
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto patchInfo = GenerateHierarchicalDeltaPatch(m_before, m_after);
benchmark::DoNotOptimize(patchInfo);
@@ -20,7 +20,7 @@ namespace AZ::Dom::Benchmark
PathEntry end;
end.SetEndOfArray();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Path p;
p /= entry1;
@@ -40,7 +40,7 @@ namespace AZ::Dom::Benchmark
PathEntry end;
end.SetEndOfArray();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Path p = Path() / entry1 / entry2 / 0 / end;
}
@@ -55,7 +55,7 @@ namespace AZ::Dom::Benchmark
AZStd::string s;
s.resize_no_construct(p.GetStringLength());
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
p.GetStringLength();
p.FormatString(s.data(), s.size());
@@ -69,7 +69,7 @@ namespace AZ::Dom::Benchmark
{
AZStd::string pathString = "/path/with/multiple/0/different/components/including-long-strings-like-this/65536/999/-";
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Path p(pathString);
benchmark::DoNotOptimize(p);
@@ -86,7 +86,7 @@ namespace AZ::Dom::Benchmark
PathEntry endOfArray;
endOfArray.SetEndOfArray();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
name.IsEndOfArray();
index.IsEndOfArray();
@@ -104,7 +104,7 @@ namespace AZ::Dom::Benchmark
PathEntry endOfArray;
endOfArray.SetEndOfArray();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(name == name);
benchmark::DoNotOptimize(name == index);
@@ -29,7 +29,7 @@ namespace AZ::Dom::Benchmark
Value doubleValue(4.0);
Value stringValue("foo", true);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
(intValue.GetType());
(boolValue.GetType());
@@ -118,7 +118,7 @@ namespace AZ::Dom::Benchmark
value.GetInternalValue());
};
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
(getTypeViaVisit(intValue));
(getTypeViaVisit(boolValue));
@@ -136,7 +136,7 @@ namespace AZ::Dom::Benchmark
BENCHMARK_DEFINE_F(DomValueBenchmark, AzDomValueMakeComplexObject)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
TakeAndDiscardWithoutTimingDtor(GenerateDomBenchmarkPayload(state.range(0), state.range(1)), state);
}
@@ -149,7 +149,7 @@ namespace AZ::Dom::Benchmark
{
Value original = GenerateDomBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Value copy = original;
benchmark::DoNotOptimize(copy);
@@ -163,7 +163,7 @@ namespace AZ::Dom::Benchmark
{
Value original = GenerateDomBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Value copy = original;
copy["entries"]["Key0"].ArrayPushBack(Value(42));
@@ -178,7 +178,7 @@ namespace AZ::Dom::Benchmark
{
Value original = GenerateDomBenchmarkPayload(state.range(0), state.range(1));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
Value copy = Utils::DeepCopy(original);
TakeAndDiscardWithoutTimingDtor(AZStd::move(copy), state);
@@ -199,7 +199,7 @@ namespace AZ::Dom::Benchmark
value[key] = i;
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const AZ::Name& key : keys)
{
@@ -222,7 +222,7 @@ namespace AZ::Dom::Benchmark
value[key] = i;
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const AZStd::string& key : keys)
{
@@ -245,7 +245,7 @@ namespace AZ::Dom::Benchmark
value[key] = i;
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const AZStd::string& key : keys)
{
@@ -966,7 +966,7 @@ namespace Benchmark
BENCHMARK_F(PathBenchmarkFixture, BM_PathAppendFixedPath)(benchmark::State& state)
{
AZ::IO::FixedMaxPath m_testPath{ "." };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const auto& appendPath : m_appendPaths)
{
@@ -977,7 +977,7 @@ namespace Benchmark
BENCHMARK_F(PathBenchmarkFixture, BM_PathAppendAllocatingPath)(benchmark::State& state)
{
AZ::IO::Path m_testPath{ "." };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const auto& appendPath : m_appendPaths)
{
@@ -989,7 +989,7 @@ namespace Benchmark
BENCHMARK_F(PathBenchmarkFixture, BM_StringFuncPathJoinFixedString)(benchmark::State& state)
{
AZStd::string m_testPath{ "." };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const auto& appendPath : m_appendPaths)
{
@@ -1000,7 +1000,7 @@ namespace Benchmark
BENCHMARK_F(PathBenchmarkFixture, BM_StringFuncPathJoinAZStdString)(benchmark::State& state)
{
AZStd::string m_testPath{ "." };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (const auto& appendPath : m_appendPaths)
{
+24 -24
View File
@@ -1741,7 +1741,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfLightWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(SMALL_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1749,7 +1749,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfLightWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(MEDIUM_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1757,7 +1757,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfLightWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(LARGE_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1765,7 +1765,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfMediumWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(SMALL_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1773,7 +1773,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfMediumWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(MEDIUM_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1781,7 +1781,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfMediumWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(LARGE_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1789,7 +1789,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfHeavyWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(SMALL_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1797,7 +1797,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfHeavyWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(MEDIUM_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1805,7 +1805,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfHeavyWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithDefaultPriority(LARGE_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1813,7 +1813,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfRandomWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndDefaultPriority(SMALL_NUMBER_OF_JOBS);
}
@@ -1821,7 +1821,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfRandomWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndDefaultPriority(MEDIUM_NUMBER_OF_JOBS);
}
@@ -1829,7 +1829,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfRandomWeightJobsWithDefaultPriority)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndDefaultPriority(LARGE_NUMBER_OF_JOBS);
}
@@ -1837,7 +1837,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfLightWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(SMALL_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1845,7 +1845,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfLightWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(MEDIUM_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1853,7 +1853,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfLightWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(LARGE_NUMBER_OF_JOBS, LIGHT_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1861,7 +1861,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfMediumWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(SMALL_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1869,7 +1869,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfMediumWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(MEDIUM_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1877,7 +1877,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfMediumWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(LARGE_NUMBER_OF_JOBS, MEDIUM_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1885,7 +1885,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfHeavyWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(SMALL_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1893,7 +1893,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfHeavyWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(MEDIUM_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1901,7 +1901,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfHeavyWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomPriority(LARGE_NUMBER_OF_JOBS, HEAVY_WEIGHT_JOB_CALCULATE_PI_DEPTH);
}
@@ -1909,7 +1909,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunSmallNumberOfRandomWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndRandomPriority(SMALL_NUMBER_OF_JOBS);
}
@@ -1917,7 +1917,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunMediumNumberOfRandomWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndRandomPriority(MEDIUM_NUMBER_OF_JOBS);
}
@@ -1925,7 +1925,7 @@ namespace Benchmark
BENCHMARK_F(JobBenchmarkFixture, RunLargeNumberOfRandomWeightJobsWithRandomPriorities)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
RunMultipleCalculatePiJobsWithRandomDepthAndRandomPriority(LARGE_NUMBER_OF_JOBS);
}
+2 -17
View File
@@ -7,28 +7,13 @@
*/
#include <AzCore/UnitTest/UnitTest.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzTest/AzTest.h>
#if defined(HAVE_BENCHMARK)
namespace AzCore
{
class AzCoreBenchmarkEnvironment
: public AZ::Test::BenchmarkEnvironmentBase
{
void SetUpBenchmark() override
{
AZ::AllocatorInstance<AZ::SystemAllocator>::Create();
}
void TearDownBenchmark() override
{
AZ::AllocatorInstance<AZ::SystemAllocator>::Destroy();
}
};
}
AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV, AzCore::AzCoreBenchmarkEnvironment)
AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV, UnitTest::ScopedAllocatorBenchmarkEnvironment)
#else
@@ -54,7 +54,7 @@ namespace Benchmark
{
// Runtime performance is not actually being measured by this test.
// This function only exist to calculate AZ::Crc32 values at compile time
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
[[maybe_unused]] constexpr auto resultArray = Crc32Internal::GenerateTestCrc32Values();
}
@@ -63,7 +63,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathFrustum, SphereIntersect)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& data : m_dataArray)
{
@@ -75,7 +75,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathFrustum, AabbIntersect)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& data : m_dataArray)
{
@@ -68,7 +68,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -80,7 +80,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateZero)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -92,7 +92,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetRowX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -108,7 +108,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetColumnX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -124,7 +124,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromValue)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -136,7 +136,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromRowMajorFloat9)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -148,7 +148,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromColumnMajorFloat9)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -162,7 +162,7 @@ namespace Benchmark
{
float storeValues[9];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -176,7 +176,7 @@ namespace Benchmark
{
float storeValues[9];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -188,7 +188,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateRotationX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -200,7 +200,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateRotationY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -212,7 +212,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateRotationZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -224,7 +224,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromTransform)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -236,7 +236,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromMatrix4x4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -248,7 +248,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -260,7 +260,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -272,7 +272,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateDiagonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -284,7 +284,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, CreateCrossProduct)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -296,7 +296,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -308,7 +308,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, SetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -321,7 +321,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, SetRowX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -336,7 +336,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, SetColumnX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -351,7 +351,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetBasisX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -363,7 +363,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetBasisY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -375,7 +375,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetBasisZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -387,7 +387,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorAssign)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -399,7 +399,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorMultiply)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -411,7 +411,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, TransposedMultiply)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -423,7 +423,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, MultiplyVector)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -435,7 +435,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorSum)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -447,7 +447,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorDifference)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -459,7 +459,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorMultiplyScalar)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -471,7 +471,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, OperatorDivideScalar)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -483,7 +483,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, Transpose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -494,7 +494,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetTranspose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -506,7 +506,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, RetrieveScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -518,7 +518,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, ExtractScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -530,7 +530,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, MultiplyByScaleX2)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -542,7 +542,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetPolarDecomposition)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -557,7 +557,7 @@ namespace Benchmark
AZ::Matrix3x3 orthogonalOut;
AZ::Matrix3x3 symmetricOut;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -568,7 +568,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetInverseFast)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -580,7 +580,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetInverseFull)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -592,7 +592,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, Orthogonalize)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -603,7 +603,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetOrthogonalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -615,7 +615,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, IsOrthogonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -627,7 +627,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetDiagonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -639,7 +639,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetDeterminant)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -651,7 +651,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x3, GetAdjugate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -86,7 +86,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -98,7 +98,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateZero)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -110,7 +110,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromValue)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -122,7 +122,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromRowMajorFloat12)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -134,7 +134,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromRows)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -146,7 +146,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromColumnMajorFloat12)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -158,7 +158,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromColumns)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -170,7 +170,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromColumnMajorFloat16)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -182,7 +182,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateRotationX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -194,7 +194,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateRotationY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -206,7 +206,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateRotationZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -218,7 +218,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -230,7 +230,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromQuaternionAndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -242,7 +242,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromMatrix3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -254,7 +254,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromMatrix3x3AndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -266,7 +266,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromTransform)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -278,7 +278,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -290,7 +290,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateFromTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -302,7 +302,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, CreateLookAt)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -316,7 +316,7 @@ namespace Benchmark
{
float testFloats[12];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -330,7 +330,7 @@ namespace Benchmark
{
float testFloats[12];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -344,7 +344,7 @@ namespace Benchmark
{
float testFloats[16];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -356,7 +356,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -368,7 +368,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -381,7 +381,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetRow)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -393,7 +393,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetRowAsVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -405,7 +405,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetRowWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -418,7 +418,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetRowWithVector3AndFloat)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -431,7 +431,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetRowWithVector4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -444,7 +444,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetRows)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -459,7 +459,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetRows)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -472,7 +472,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetColumn)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -484,7 +484,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetColumnWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -497,7 +497,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetColumnWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -510,7 +510,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetColumns)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -526,7 +526,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetColumns)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -539,7 +539,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetBasisX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -551,7 +551,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisXWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -564,7 +564,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisXWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -577,7 +577,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetBasisY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -589,7 +589,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisYWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -602,7 +602,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisYWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -615,7 +615,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetBasisZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -627,7 +627,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisZWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -640,7 +640,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisZWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -653,7 +653,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -665,7 +665,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetTranslationWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -678,7 +678,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetTranslationWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -691,7 +691,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetBasisAndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -707,7 +707,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetBasisAndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -720,7 +720,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, OperatorMultiplyMatrix3x4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -732,7 +732,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, OperatorMultiplyEqualsMatrix3x4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -745,7 +745,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, TransformPointVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -757,7 +757,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, TransformVectorVector4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -769,7 +769,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, Multiply3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -781,7 +781,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetTranspose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -793,7 +793,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, Transpose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -806,7 +806,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetTranspose3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -818,7 +818,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, Transpose3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -831,7 +831,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetInverseFull)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -843,7 +843,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, InvertFull)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -856,7 +856,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetInverseFast)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -868,7 +868,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, InvertFast)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -881,7 +881,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, RetrieveScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -893,7 +893,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, ExtractScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -906,7 +906,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, MultiplyByScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -919,7 +919,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, IsOrthogonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -931,7 +931,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetOrthogonalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -943,7 +943,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, Orthogonalize)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -956,7 +956,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, IsCloseExactAndDifferent)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -971,7 +971,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, OperatorEqualEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -983,7 +983,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, OperatorNotEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -995,7 +995,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -1007,7 +1007,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -1019,7 +1019,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetFromEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -1032,7 +1032,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetFromEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -1045,7 +1045,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, SetRotationPartFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -1058,7 +1058,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, GetDeterminant3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -1070,7 +1070,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix3x4, IsFinite)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -64,7 +64,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -76,7 +76,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateZero)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -88,7 +88,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetRowX4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -106,7 +106,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetColumnX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -124,7 +124,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateFromValue)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -136,7 +136,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateFromRowMajorFloat16)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -148,7 +148,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateFromColumnMajorFloat9)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -160,7 +160,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateProjection)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -172,7 +172,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateProjectionFov)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -184,7 +184,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateInterpolated)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -198,7 +198,7 @@ namespace Benchmark
{
float storeValues[16];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -212,7 +212,7 @@ namespace Benchmark
{
float storeValues[16];
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -224,7 +224,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateRotationX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -236,7 +236,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateRotationY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -248,7 +248,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateRotationZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -260,7 +260,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -272,7 +272,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -284,7 +284,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateDiagonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -296,7 +296,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -308,7 +308,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, SetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -321,7 +321,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, SetRowX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -337,7 +337,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, SetColumnX3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -353,7 +353,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetBasisX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -365,7 +365,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetBasisY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -377,7 +377,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetBasisZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -389,7 +389,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, CreateTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -401,7 +401,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, SetTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -414,7 +414,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -426,7 +426,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, OperatorAssign)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -438,7 +438,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiply)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -450,7 +450,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiplyAssign)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -463,7 +463,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiplyVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -475,7 +475,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, OperatorMultiplyVector4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -487,7 +487,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, TransposedMultiply3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -499,7 +499,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, Multiply3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -511,7 +511,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, Transpose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -524,7 +524,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetTranspose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -536,7 +536,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetInverseFast)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -552,7 +552,7 @@ namespace Benchmark
AZ::Matrix4x4 mat = AZ::Matrix4x4::CreateRotationX(1.0f);
mat.SetElement(0, 1, 23.1234f);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -564,7 +564,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, GetInverseFull)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -576,7 +576,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathMatrix4x4, SetRotationPartFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -47,7 +47,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, CreateFromPositionRotationAndHalfLengths)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -60,7 +60,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, SetPosition)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -72,7 +72,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetPosition)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -84,7 +84,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetAxisX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -96,7 +96,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetAxisY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -108,7 +108,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetAxisZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -120,7 +120,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetAxisIndex3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -136,7 +136,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, SetHalfLengthX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -148,7 +148,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetHalfLengthX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -160,7 +160,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, SetHalfLengthY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -172,7 +172,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetHalfLengthY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -184,7 +184,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, SetHalfLengthZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -196,7 +196,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetHalfLengthZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -208,7 +208,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, SetHalfLengthIndex3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -222,7 +222,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, GetHalfLengthIndex3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -242,7 +242,7 @@ namespace Benchmark
AZ::Vector3 max(120.0f, 300.0f, 50.0f);
AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(min, max);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -256,7 +256,7 @@ namespace Benchmark
{
AZ::Transform transform = AZ::Transform::CreateRotationY(AZ::DegToRad(90.0f));
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -268,7 +268,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, Equal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -280,7 +280,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathObb, IsFinite)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < numIters; ++i)
{
@@ -73,7 +73,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, CreateFromNormalAndDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -85,7 +85,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, GetDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -97,7 +97,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, GetNormal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -109,7 +109,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, CreateFromNormalAndPoint)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -128,7 +128,7 @@ namespace Benchmark
coeff.push_back(unif(rng));
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -148,7 +148,7 @@ namespace Benchmark
coeff.push_back(unif(rng));
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -160,7 +160,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, SetVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -179,7 +179,7 @@ namespace Benchmark
vecs.push_back(AZ::Vector4(unif(rng), unif(rng), unif(rng), unif(rng)));
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -192,7 +192,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, SetNormal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -205,7 +205,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, SetDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -218,7 +218,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, GetPlaneEquationCoefficients)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -236,7 +236,7 @@ namespace Benchmark
trans.push_back(AZ::Transform::CreateRotationY(AZ::DegToRad(unif(rng))));
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -254,7 +254,7 @@ namespace Benchmark
trans.push_back(AZ::Transform::CreateRotationY(AZ::DegToRad(unif(rng))));
}
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -265,7 +265,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, GetPointDist)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -277,7 +277,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, GetProjected)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -291,7 +291,7 @@ namespace Benchmark
{
AZ::Vector3 rayResult;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -305,7 +305,7 @@ namespace Benchmark
{
float rayResult;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -319,7 +319,7 @@ namespace Benchmark
{
AZ::Vector3 rayResult;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters - 1; ++i)
{
@@ -333,7 +333,7 @@ namespace Benchmark
{
float rayResult;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters - 1; ++i)
{
@@ -345,7 +345,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathPlane, IsFinite)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (int i = 0; i < m_numIters; ++i)
{
@@ -68,7 +68,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SplatFloatConstruction)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -80,7 +80,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, NonNormalized4FloatsConstruction)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -92,7 +92,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, CreateFromIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@@ -104,7 +104,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, CreateZero)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@@ -116,7 +116,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, CreateRotationX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -128,7 +128,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, CreateRotationY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -140,7 +140,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, CreateRotationZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -155,7 +155,7 @@ namespace Benchmark
const AZ::Vector3 vec1 = AZ::Vector3(1.0f, 2.0f, 3.0f).GetNormalized();
const AZ::Vector3 vec2 = AZ::Vector3(-2.0f, 7.0f, -1.0f).GetNormalized();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@@ -170,7 +170,7 @@ namespace Benchmark
const AZ::Vector3 vec1 = AZ::Vector3(1.0f, 2.0f, 3.0f).GetNormalized();
const AZ::Vector3 vec2 = AZ::Vector3(-1.0f, -2.0f, -3.0f).GetNormalized();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@@ -182,7 +182,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -194,7 +194,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -206,7 +206,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -218,7 +218,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetW)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -230,7 +230,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -243,7 +243,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -256,7 +256,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -269,7 +269,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetW)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -282,7 +282,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetSplat)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -295,7 +295,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetAll)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -310,7 +310,7 @@ namespace Benchmark
{
AZ::Vector3 vec(5.0f, 6.0f, 7.0f);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@@ -324,7 +324,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetArray)(benchmark::State& state)
{
const float quatArray[4] = { 5.0f, 6.0f, 7.0f, 8.0f };
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& quatData : m_quatDataArray)
{
@@ -337,7 +337,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetElements)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -353,7 +353,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetElement)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -374,7 +374,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetConjugate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -386,7 +386,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetInverseFast)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -398,7 +398,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetInverseFull)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -410,7 +410,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, Dot)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -422,7 +422,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetLength)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -434,7 +434,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetLengthEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -446,7 +446,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetLengthReciprocal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -458,7 +458,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetLengthReciprocalEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -470,7 +470,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetNormalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -482,7 +482,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetNormalizedEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -494,7 +494,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, NormalizeWithLength)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -506,7 +506,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, NormalizeWithLengthEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -518,7 +518,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, Lerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -530,7 +530,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, NLerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -542,7 +542,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, Slerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -554,7 +554,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorEquality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -566,7 +566,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorInequality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -578,7 +578,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorNegate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -590,7 +590,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorSum)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -602,7 +602,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorSub)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -614,7 +614,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorMultiply)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -626,7 +626,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, OperatorMultiplyScalar)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -638,7 +638,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, TransformVector)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -653,7 +653,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, IsClose)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -665,7 +665,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, IsIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -677,7 +677,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -689,7 +689,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, GetEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -701,7 +701,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetFromEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -715,7 +715,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, SetFromEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -729,7 +729,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, ConvertToAxisAngle)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& quatData : m_quatDataArray)
{
@@ -744,7 +744,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathQuaternion, AggregateMultiply)(::benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector3 position = AZ::Vector3::CreateZero();
for (auto& quatData : m_quatDataArray)
@@ -80,7 +80,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathShapeIntersection, ContainsFrustumPoint)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -103,7 +103,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathShapeIntersection, OverlapsFrustumSphere)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -120,7 +120,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathShapeIntersection, ContainsFrustumSphere)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -137,7 +137,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathShapeIntersection, OverlapsFrustumAabb)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -154,7 +154,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathShapeIntersection, ContainsFrustumAabb)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -78,7 +78,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateIdentity)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for ([[maybe_unused]] auto& testData : m_testDataArray)
{
@@ -90,7 +90,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateRotationX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -102,7 +102,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateRotationY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -114,7 +114,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateRotationZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -126,7 +126,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromQuaternion)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -138,7 +138,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromQuaternionAndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -150,7 +150,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromMatrix3x3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -162,7 +162,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromMatrix3x3AndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -174,7 +174,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromMatrix3x4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -186,7 +186,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateUniformScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -198,7 +198,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateFromTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -210,7 +210,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, CreateLookAt)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -223,7 +223,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetBasis)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -235,7 +235,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetBasisX)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -247,7 +247,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetBasisY)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -259,7 +259,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetBasisZ)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -271,7 +271,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetBasisAndTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -287,7 +287,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetTranslation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -299,7 +299,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetTranslationWithFloats)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -312,7 +312,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetTranslationWithVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -325,7 +325,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetRotation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -337,7 +337,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetRotation)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -350,7 +350,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetUniformScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -362,7 +362,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetUniformScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -375,7 +375,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, ExtractUniformScale)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -388,7 +388,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, OperatorMultiplyTransform)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -400,7 +400,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, OperatorMultiplyEqualsTransform)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -413,7 +413,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, TransformPointVector3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -425,7 +425,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, TransformPointVector4)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -437,7 +437,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, TransformVector)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -449,7 +449,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetInverse)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -461,7 +461,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, Invert)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -474,7 +474,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, IsOrthogonal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -486,7 +486,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetOrthogonalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -498,7 +498,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, Orthogonalize)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -511,7 +511,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, IsCloseExactAndDifferent)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -526,7 +526,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, OperatorEqualEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -538,7 +538,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, OperatorNotEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -550,7 +550,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -562,7 +562,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, GetEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -574,7 +574,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetFromEulerDegrees)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -587,7 +587,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, SetFromEulerRadians)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -600,7 +600,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathTransform, IsFinite)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& testData : m_testDataArray)
{
@@ -58,7 +58,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetSet)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector2 v1, v2;
float x = 0.0f, y = 0.0f;
@@ -84,7 +84,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, ElementAccess)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector2 v1, v2;
float x = 0.0f, y = 0.0f;
@@ -111,7 +111,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, CreateSelectCmpEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -123,7 +123,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, CreateSelectCmpGreaterEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -135,7 +135,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, CreateSelectCmpGreater)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -147,7 +147,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetNormalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -159,7 +159,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetNormalizedEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -171,7 +171,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, NormalizeWithLength)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -183,7 +183,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, NormalizeWithLengthEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -195,7 +195,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetNormalizedSafe)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -207,7 +207,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetNormalizedSafeEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -219,7 +219,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -231,7 +231,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetDistanceEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -243,7 +243,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Lerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -267,7 +267,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Slerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -291,7 +291,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Nlerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -315,7 +315,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Dot)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -327,7 +327,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Equality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -339,7 +339,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Inequality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -351,7 +351,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, IsLessThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -363,7 +363,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, IsLessEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -375,7 +375,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, IsGreaterThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -387,7 +387,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, IsGreaterEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -399,7 +399,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetMin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -411,7 +411,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetMax)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -423,7 +423,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetClamp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -435,7 +435,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Sub)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -447,7 +447,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Sum)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -459,7 +459,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Mul)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -471,7 +471,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Div)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -483,7 +483,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetSin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -495,7 +495,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -507,7 +507,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetSinCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -521,7 +521,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetAcos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -533,7 +533,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetAtan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -545,7 +545,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetAtan2)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -557,7 +557,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetAngleMod)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -569,7 +569,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, Angle)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -581,7 +581,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, AngleDeg)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -593,7 +593,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetAbs)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -605,7 +605,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetReciprocal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -617,7 +617,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetReciprocalEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -629,7 +629,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector2, GetProjected)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -58,7 +58,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetSet)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector3 v1, v2, v3;
float x = 0.0f, y = 0.0f, z = 0.0f;
@@ -98,7 +98,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, ElementAccess)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector3 v1, v2, v3;
float x = 0.0f, y = 0.0f, z = 0.0f;
@@ -138,7 +138,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, CreateSelectCmpEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -150,7 +150,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, CreateSelectCmpGreaterEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -162,7 +162,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, CreateSelectCmpGreater)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -174,7 +174,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetNormalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -186,7 +186,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetNormalizedEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -198,7 +198,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, NormalizeWithLength)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -210,7 +210,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, NormalizeWithLengthEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -222,7 +222,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetNormalizedSafe)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -234,7 +234,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetNormalizedSafeEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -246,7 +246,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -258,7 +258,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetDistanceEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -270,7 +270,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Lerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -294,7 +294,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Slerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -318,7 +318,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Nlerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -342,7 +342,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Dot)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -354,7 +354,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Cross)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -366,7 +366,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Equality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -378,7 +378,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Inequality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -390,7 +390,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, IsLessThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -402,7 +402,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, IsLessEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -414,7 +414,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, IsGreaterThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -426,7 +426,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, IsGreaterEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -438,7 +438,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetMin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -450,7 +450,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetMax)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -462,7 +462,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetClamp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -474,7 +474,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Sub)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -486,7 +486,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Sum)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -498,7 +498,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Mul)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -510,7 +510,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Div)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -522,7 +522,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetSin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -534,7 +534,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -546,7 +546,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetSinCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -560,7 +560,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetAcos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -572,7 +572,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetAtan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -584,7 +584,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetAngleMod)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -596,7 +596,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, Angle)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -608,7 +608,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, AngleDeg)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -620,7 +620,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetAbs)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -632,7 +632,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetReciprocal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -644,7 +644,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetReciprocalEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -656,7 +656,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, IsPerpendicular)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -668,7 +668,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetOrthogonalVector)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -680,7 +680,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector3, GetProjected)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -60,7 +60,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetSet)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector4 v1, v2, v3, v4;
float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f;
@@ -117,7 +117,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, ElementAccess)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZ::Vector4 v1, v2, v3, v4;
float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f;
@@ -174,7 +174,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, CreateSelectCmpEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -186,7 +186,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, CreateSelectCmpGreaterEqual)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -198,7 +198,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, CreateSelectCmpGreater)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -210,7 +210,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetNormalized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -222,7 +222,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetNormalizedEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -234,7 +234,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, NormalizeWithLength)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -246,7 +246,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, NormalizeWithLengthEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -258,7 +258,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetNormalizedSafe)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -270,7 +270,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetNormalizedSafeEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -282,7 +282,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetDistance)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -294,7 +294,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetDistanceEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -306,7 +306,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Lerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -330,7 +330,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Slerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -354,7 +354,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Nlerp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -378,7 +378,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Dot)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -390,7 +390,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Dot3)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -402,7 +402,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetHomogenized)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -414,7 +414,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Equality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -426,7 +426,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Inequality)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -438,7 +438,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, IsLessThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -450,7 +450,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, IsLessEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -462,7 +462,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, IsGreaterThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -474,7 +474,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, IsGreaterEqualThan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -486,7 +486,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetMin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -498,7 +498,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetMax)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -510,7 +510,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetClamp)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -522,7 +522,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Sub)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -534,7 +534,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Sum)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -546,7 +546,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Mul)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -558,7 +558,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Div)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -570,7 +570,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetSin)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -582,7 +582,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -594,7 +594,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetSinCos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -608,7 +608,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetAcos)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -620,7 +620,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetAtan)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -632,7 +632,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetAngleMod)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -644,7 +644,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, Angle)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -656,7 +656,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, AngleDeg)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -668,7 +668,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetAbs)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -680,7 +680,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetReciprocal)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
@@ -692,7 +692,7 @@ namespace Benchmark
BENCHMARK_F(BM_MathVector4, GetReciprocalEstimate)(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
for (auto& vecData : m_vecDataArray)
{
-3
View File
@@ -141,7 +141,6 @@ namespace UnitTest
////////////////////////////////////////////////////////////////////////
// Create some threads and simulate concurrent allocation and deallocation
AZStd::chrono::system_clock::time_point startTime = AZStd::chrono::system_clock::now();
{
AZStd::thread m_threads[m_maxNumThreads];
for (unsigned int i = 0; i < m_maxNumThreads; ++i)
@@ -156,8 +155,6 @@ namespace UnitTest
m_threads[i].join();
}
}
//AZStd::chrono::microseconds exTime = AZStd::chrono::system_clock::now() - startTime;
//AZ_Printf("UnitTest::SystemAllocatorTest::deafult","Time: %d Ms\n",exTime.count());
//////////////////////////////////////////////////////////////////////////
AllocatorInstance<SystemAllocator>::Destroy();
@@ -288,10 +288,10 @@ namespace Benchmark
public:
void Benchmark(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
AZStd::vector<void*>& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index);
const size_t numberOfAllocations = perThreadAllocations.size();
size_t totalAllocationSize = 0;
@@ -300,7 +300,7 @@ namespace Benchmark
const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize];
const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()];
totalAllocationSize += allocationSize;
state.ResumeTiming();
perThreadAllocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0);
state.PauseTiming();
@@ -319,6 +319,8 @@ namespace Benchmark
TestAllocatorType::GarbageCollect();
state.SetItemsProcessed(numberOfAllocations);
state.ResumeTiming();
}
}
};
@@ -333,7 +335,7 @@ namespace Benchmark
public:
void Benchmark(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
AZStd::vector<void*>& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index);
@@ -364,6 +366,8 @@ namespace Benchmark
state.SetItemsProcessed(numberOfAllocations);
TestAllocatorType::GarbageCollect();
state.ResumeTiming();
}
}
};
@@ -420,7 +424,7 @@ namespace Benchmark
void Benchmark(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
state.PauseTiming();
@@ -519,6 +523,8 @@ namespace Benchmark
state.SetItemsProcessed(itemsProcessed);
TestAllocatorType::GarbageCollect();
state.ResumeTiming();
}
}
};
@@ -981,7 +981,7 @@ namespace AZ::IO
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the
// capture. Newer versions issue unused warning
auto callback = [numChunks, &numCallbacks, &waitForReads](FileRequestHandle request)
auto callback = [&numCallbacks, &waitForReads](FileRequestHandle request)
AZ_POP_DISABLE_WARNING
{
IStreamer* streamer = Interface<IStreamer>::Get();
@@ -1052,7 +1052,7 @@ namespace AZ::IO
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the
// capture. Newer versions issue unused warning
auto callback = [numChunks, &waitForReads, &waitForSingleRead, &numReadCallbacks]([[maybe_unused]] FileRequestHandle request)
auto callback = [&waitForReads, &waitForSingleRead, &numReadCallbacks]([[maybe_unused]] FileRequestHandle request)
AZ_POP_DISABLE_WARNING
{
numReadCallbacks++;
@@ -1076,7 +1076,7 @@ namespace AZ::IO
cancels.push_back(m_streamer->Cancel(requests[numChunks - i - 1]));
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the
// capture. Newer versions issue unused warning
auto callback = [&numCancelCallbacks, &waitForCancels, numChunks](FileRequestHandle request)
auto callback = [&numCancelCallbacks, &waitForCancels](FileRequestHandle request)
AZ_POP_DISABLE_WARNING
{
auto result = Interface<IStreamer>::Get()->GetRequestStatus(request);
@@ -1248,7 +1248,7 @@ namespace Benchmark
AZStd::unique_ptr<char[]> buffer(new char[FileSize]);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
AZStd::binary_semaphore waitForReads;
AZStd::atomic<system_clock::time_point> end;
+3 -3
View File
@@ -677,7 +677,7 @@ namespace Benchmark
[]
{
});
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
TaskGraphEvent ev;
graph->SubmitOnExecutor(*executor, &ev);
@@ -699,7 +699,7 @@ namespace Benchmark
});
a.Precedes(b);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
TaskGraphEvent ev;
graph->SubmitOnExecutor(*executor, &ev);
@@ -729,7 +729,7 @@ namespace Benchmark
e.Follows(a, b, c, d);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
TaskGraphEvent ev;
graph->SubmitOnExecutor(*executor, &ev);
@@ -206,7 +206,9 @@ set(FILES
AZStd/Optional.cpp
AZStd/Pair.cpp
AZStd/Parallel.cpp
AZStd/RangesAlgorithmTests.cpp
AZStd/RangesTests.cpp
AZStd/RangesViewTests.cpp
AZStd/ScopedLockTests.cpp
AZStd/SetsIntrusive.cpp
AZStd/SmartPtr.cpp