From 483c811ea6fd0e7801aac1afd979ed02a649064b Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Tue, 1 Jun 2021 09:24:52 +0100 Subject: IVGCVSW-5962 Remove boost::multi_array * Replaced all instances of boost::multi_array with flat vectors. * Updated LayerTestResult struct with new member variables. * Updated CompareTensor function to compare flat vectors and the shape. * Removed MakeTensor function from TensorHelpers.hpp. * Removed GetTensorShapeAsArray function from LayerTestResult.hpp. * Removed boost::array usage. * Removed boost::extents usages. * Removed boost::random usages. Signed-off-by: Matthew Sloyan Signed-off-by: Sadik Armagan Change-Id: Iccde9d6640b534940292ff048fb80c00b38c4743 --- .../backendsCommon/test/layerTests/QuantizeTestImpl.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/backends/backendsCommon/test/layerTests/QuantizeTestImpl.cpp') diff --git a/src/backends/backendsCommon/test/layerTests/QuantizeTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/QuantizeTestImpl.cpp index 5a36856e54..029d50e718 100644 --- a/src/backends/backendsCommon/test/layerTests/QuantizeTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/QuantizeTestImpl.cpp @@ -31,10 +31,7 @@ LayerTestResult QuantizeTestImpl( armnn::QuantizeQueueDescriptor descriptor) { IgnoreUnused(memoryManager); - boost::multi_array input = MakeTensor(inputTensorInfo, inputData); - - LayerTestResult ret(outputTensorInfo); - ret.outputExpected = MakeTensor(outputTensorInfo, expectedOutputData); + std::vector actualOutput(outputTensorInfo.GetNumElements()); std::unique_ptr inputHandle = tensorHandleFactory.CreateTensorHandle(inputTensorInfo); std::unique_ptr outputHandle = tensorHandleFactory.CreateTensorHandle(outputTensorInfo); @@ -48,13 +45,16 @@ LayerTestResult QuantizeTestImpl( inputHandle->Allocate(); outputHandle->Allocate(); - CopyDataToITensorHandle(inputHandle.get(), input.data()); + CopyDataToITensorHandle(inputHandle.get(), inputData.data()); ExecuteWorkload(*workload, memoryManager); - CopyDataFromITensorHandle(ret.output.data(), outputHandle.get()); + CopyDataFromITensorHandle(actualOutput.data(), outputHandle.get()); - return ret; + return LayerTestResult(actualOutput, + expectedOutputData, + outputHandle->GetShape(), + outputTensorInfo.GetShape()); } template > -- cgit v1.2.1