diff options
author | Derek Lamberti <derek.lamberti@arm.com> | 2019-12-10 22:00:43 +0000 |
---|---|---|
committer | Derek Lamberti <derek.lamberti@arm.com> | 2020-01-03 15:12:19 +0000 |
commit | baa177f0d465fe1d4f9e1979e1611ff6b1f128e0 (patch) | |
tree | 8eff0469fcff76cbad0d8e24b78859dec0e72822 /src/armnnUtils/test | |
parent | f143fba6e617267ed33acc8b3e1eb2130de0ffe0 (diff) | |
download | armnn-baa177f0d465fe1d4f9e1979e1611ff6b1f128e0.tar.gz |
IVGCVSW-4246 Clean build of parsers with -Wextra
Change-Id: Ib00f185b431ab74fd9425d8f478bd2ddb182f74b
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'src/armnnUtils/test')
-rw-r--r-- | src/armnnUtils/test/ParserHelperTest.cpp | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/armnnUtils/test/ParserHelperTest.cpp b/src/armnnUtils/test/ParserHelperTest.cpp index 122ad7649e..636e2bd3f9 100644 --- a/src/armnnUtils/test/ParserHelperTest.cpp +++ b/src/armnnUtils/test/ParserHelperTest.cpp @@ -22,54 +22,39 @@ BOOST_AUTO_TEST_CASE(CalculateReducedOutputTensoInfoTest) TensorInfo inputTensorInfo(3, &inputShape[0], DataType::Float32); // Reducing all dimensions results in one single output value (one dimension) - unsigned int axisShape1[] = { 3 }; std::set<unsigned int> axisData1 = { 0, 1, 2 }; - TensorInfo axisTensorInfo1(1, &axisShape1[0], DataType::Signed32); - TensorInfo outputTensorInfo1; - CalculateReducedOutputTensoInfo(inputTensorInfo, axisTensorInfo1, axisData1, - keepDims, outputTensorInfo1); + CalculateReducedOutputTensoInfo(inputTensorInfo, axisData1, keepDims, outputTensorInfo1); BOOST_ASSERT(outputTensorInfo1.GetNumDimensions() == 1); BOOST_ASSERT(outputTensorInfo1.GetShape()[0] == 1); // Reducing dimension 0 results in a 3x4 size tensor (one dimension) - unsigned int axisShape2[] = { 1 }; std::set<unsigned int> axisData2 = { 0 }; - TensorInfo axisTensorInfo2(1, &axisShape2[0], DataType::Signed32); - TensorInfo outputTensorInfo2; - CalculateReducedOutputTensoInfo(inputTensorInfo, axisTensorInfo2, axisData2, - keepDims, outputTensorInfo2); + CalculateReducedOutputTensoInfo(inputTensorInfo, axisData2, keepDims, outputTensorInfo2); BOOST_ASSERT(outputTensorInfo2.GetNumDimensions() == 1); BOOST_ASSERT(outputTensorInfo2.GetShape()[0] == 12); // Reducing dimensions 0,1 results in a 4 size tensor (one dimension) - unsigned int axisShape3[] = { 2 }; std::set<unsigned int> axisData3 = { 0, 1 }; - TensorInfo axisTensorInfo3(1, &axisShape3[0], DataType::Signed32); - TensorInfo outputTensorInfo3; - CalculateReducedOutputTensoInfo(inputTensorInfo, axisTensorInfo3, axisData3, - keepDims, outputTensorInfo3); + CalculateReducedOutputTensoInfo(inputTensorInfo, axisData3, keepDims, outputTensorInfo3); BOOST_ASSERT(outputTensorInfo3.GetNumDimensions() == 1); BOOST_ASSERT(outputTensorInfo3.GetShape()[0] == 4); // Reducing dimension 0 results in a { 1, 3, 4 } dimension tensor keepDims = true; - unsigned int axisShape4[] = { 1 }; std::set<unsigned int> axisData4 = { 0 }; - TensorInfo axisTensorInfo4(1, &axisShape4[0], DataType::Signed32); TensorInfo outputTensorInfo4; - CalculateReducedOutputTensoInfo(inputTensorInfo, axisTensorInfo4, axisData4, - keepDims, outputTensorInfo4); + CalculateReducedOutputTensoInfo(inputTensorInfo, axisData4, keepDims, outputTensorInfo4); BOOST_ASSERT(outputTensorInfo4.GetNumDimensions() == 3); BOOST_ASSERT(outputTensorInfo4.GetShape()[0] == 1); @@ -78,14 +63,11 @@ BOOST_AUTO_TEST_CASE(CalculateReducedOutputTensoInfoTest) // Reducing dimension 1, 2 results in a { 2, 1, 1 } dimension tensor keepDims = true; - unsigned int axisShape5[] = { 2 }; std::set<unsigned int> axisData5 = { 1, 2 }; - TensorInfo axisTensorInfo5(1, &axisShape5[0], DataType::Signed32); TensorInfo outputTensorInfo5; - CalculateReducedOutputTensoInfo(inputTensorInfo, axisTensorInfo5, axisData5, - keepDims, outputTensorInfo5); + CalculateReducedOutputTensoInfo(inputTensorInfo, axisData5, keepDims, outputTensorInfo5); BOOST_ASSERT(outputTensorInfo5.GetNumDimensions() == 3); BOOST_ASSERT(outputTensorInfo5.GetShape()[0] == 2); |