diff options
author | David Monahan <David.Monahan@arm.com> | 2021-10-22 12:57:28 +0100 |
---|---|---|
committer | David Monahan <david.monahan@arm.com> | 2021-10-22 13:53:18 +0000 |
commit | 6bb47a720ad33d0a330228b52e320a1022e4dfe2 (patch) | |
tree | 606434ca03951a79c828fb6371deb4e62fdcd858 /tests/NetworkExecutionUtils | |
parent | 81ec994a3ebc8ad02c4a622846cf64b70e1182bd (diff) | |
download | armnn-6bb47a720ad33d0a330228b52e320a1022e4dfe2.tar.gz |
IVGCVSW-6359 Create a single definition of TContainer
* Added a single definition of TContainer to include/armnn/Utils.hpp
* Change all files which contained their own identical definitions of TContainer to use the new one
Signed-off-by: David Monahan <David.Monahan@arm.com>
Change-Id: I63e633693a430bbbd6a29001cafa19742ef8309a
Diffstat (limited to 'tests/NetworkExecutionUtils')
-rw-r--r-- | tests/NetworkExecutionUtils/NetworkExecutionUtils.cpp | 6 | ||||
-rw-r--r-- | tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp | 7 |
2 files changed, 3 insertions, 10 deletions
diff --git a/tests/NetworkExecutionUtils/NetworkExecutionUtils.cpp b/tests/NetworkExecutionUtils/NetworkExecutionUtils.cpp index 95f23c991d..323e9fb812 100644 --- a/tests/NetworkExecutionUtils/NetworkExecutionUtils.cpp +++ b/tests/NetworkExecutionUtils/NetworkExecutionUtils.cpp @@ -228,11 +228,7 @@ void TensorPrinter::WriteToFile(const std::vector<T>& values) } } -using TContainer = - mapbox::util::variant<std::vector<float>, std::vector<int>, std::vector<unsigned char>, std::vector<int8_t>>; -using QuantizationParams = std::pair<float, int32_t>; - -void PopulateTensorWithData(TContainer& tensorData, +void PopulateTensorWithData(armnn::TContainer& tensorData, unsigned int numElements, const std::string& dataTypeStr, const armnn::Optional<QuantizationParams>& qParams, diff --git a/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp b/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp index 0abda4f8ee..d9e2459703 100644 --- a/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp +++ b/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp @@ -9,8 +9,7 @@ #include <armnn/Types.hpp> #include <armnn/Logging.hpp> #include <armnn/utility/StringUtils.hpp> - -#include <mapbox/variant.hpp> +#include <armnn/Utils.hpp> #include <iostream> #include <fstream> @@ -52,11 +51,9 @@ private: bool m_PrintToConsole; }; -using TContainer = - mapbox::util::variant<std::vector<float>, std::vector<int>, std::vector<unsigned char>, std::vector<int8_t>>; using QuantizationParams = std::pair<float, int32_t>; -void PopulateTensorWithData(TContainer& tensorData, +void PopulateTensorWithData(armnn::TContainer& tensorData, unsigned int numElements, const std::string& dataTypeStr, const armnn::Optional<QuantizationParams>& qParams, |