diff options
author | Mike Kelly <mike.kelly@arm.com> | 2019-06-14 12:35:24 +0100 |
---|---|---|
committer | mike.kelly <mike.kelly@arm.com> | 2019-06-14 14:27:23 +0000 |
commit | db48288f54ad441f34108cf270ed3089d3a465ea (patch) | |
tree | 08372fd4ef909dc161212f09c90a010adaf398a4 /src/backends/reference/test/RefCreateWorkloadTests.cpp | |
parent | 24d7321ad7897e8836d4a38039a73a0ec419cf43 (diff) | |
download | armnn-db48288f54ad441f34108cf270ed3089d3a465ea.tar.gz |
MLCE-121 Github: Build error on GCC 9
* Fixed an error encountered when building on GCC 9
error: moving a local object in a return statement prevents copy elision
* Fixed failures in unit tests due to std::initializer_list handling in GCC 9
Change-Id: I4bfdd2113dfedcecd29479ee556e4ae22278755d
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Diffstat (limited to 'src/backends/reference/test/RefCreateWorkloadTests.cpp')
-rw-r--r-- | src/backends/reference/test/RefCreateWorkloadTests.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/backends/reference/test/RefCreateWorkloadTests.cpp b/src/backends/reference/test/RefCreateWorkloadTests.cpp index a0fc7286a9..ef8ff9e6a0 100644 --- a/src/backends/reference/test/RefCreateWorkloadTests.cpp +++ b/src/backends/reference/test/RefCreateWorkloadTests.cpp @@ -270,10 +270,10 @@ static void RefCreateConvolution2dWorkloadTest(DataLayout dataLayout = DataLayou auto workload = CreateConvolution2dWorkloadTest<RefConvolution2dWorkload, DataType::Float32> (factory, graph, dataLayout); - std::initializer_list<unsigned int> inputShape = (dataLayout == DataLayout::NCHW) ? - std::initializer_list<unsigned int>({2, 3, 8, 16}) : std::initializer_list<unsigned int>({2, 8, 16, 3}); - std::initializer_list<unsigned int> outputShape = (dataLayout == DataLayout::NCHW) ? - std::initializer_list<unsigned int>({2, 2, 2, 10}) : std::initializer_list<unsigned int>({2, 2, 10, 2}); + TensorShape inputShape = (dataLayout == DataLayout::NCHW) ? std::initializer_list<unsigned int>({2, 3, 8, 16}) + : std::initializer_list<unsigned int>({2, 8, 16, 3}); + TensorShape outputShape = (dataLayout == DataLayout::NCHW) ? std::initializer_list<unsigned int>({2, 2, 2, 10}) + : std::initializer_list<unsigned int>({2, 2, 10, 2}); // Checks that outputs and inputs are as we expect them (see definition of CreateConvolution2dWorkloadTest). CheckInputOutput(std::move(workload), @@ -298,12 +298,11 @@ static void RefCreateDepthwiseConvolutionWorkloadTest(DataLayout dataLayout) auto workload = CreateDepthwiseConvolution2dWorkloadTest<RefDepthwiseConvolution2dWorkload, DataType::Float32> (factory, graph, dataLayout); - std::initializer_list<unsigned int> inputShape = (dataLayout == DataLayout::NCHW) - ? std::initializer_list<unsigned int>({ 2, 2, 5, 5 }) - : std::initializer_list<unsigned int>({ 2, 5, 5, 2 }); - std::initializer_list<unsigned int> outputShape = (dataLayout == DataLayout::NCHW) - ? std::initializer_list<unsigned int>({ 2, 2, 5, 5 }) - : std::initializer_list<unsigned int>({ 2, 5, 5, 2 }); + TensorShape inputShape = (dataLayout == DataLayout::NCHW) ? std::initializer_list<unsigned int>({ 2, 2, 5, 5 }) + : std::initializer_list<unsigned int>({ 2, 5, 5, 2 }); + TensorShape outputShape = (dataLayout == DataLayout::NCHW) ? std::initializer_list<unsigned int>({ 2, 2, 5, 5 }) + : std::initializer_list<unsigned int>({ 2, 5, 5, 2 }); + // Checks that inputs/outputs are as we expect them (see definition of CreateDepthwiseConvolution2dWorkloadTest). CheckInputOutput(std::move(workload), TensorInfo(inputShape, DataType::Float32), |