aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2019-04-17 10:16:58 +0100
committerDavid Monahan <david.monahan@arm.com>2019-04-17 13:36:49 +0000
commitc2ebc63baf19ab6c3da6ae7a982c9eba0c0d85be (patch)
tree0dd7d2418ab0a185594782aaa0a1c9c948ab0ca3 /tests
parent4818d465973d72979a7f6e783e1b55b320781710 (diff)
downloadarmnn-c2ebc63baf19ab6c3da6ae7a982c9eba0c0d85be.tar.gz
IVGCVSW-2855 Update Command Line Processing of commonOptions
Change-Id: I79f483b9854bd57cd712bc29b83983342cf8191f Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/DeepSpeechV1Database.hpp8
-rwxr-xr-xtests/DeepSpeechV1InferenceTest.hpp7
2 files changed, 9 insertions, 6 deletions
diff --git a/tests/DeepSpeechV1Database.hpp b/tests/DeepSpeechV1Database.hpp
index 4d2d591bed..274bf6e22f 100644
--- a/tests/DeepSpeechV1Database.hpp
+++ b/tests/DeepSpeechV1Database.hpp
@@ -70,20 +70,22 @@ auto ParseDataArray(std::istream& stream,
const float& quantizationScale,
const int32_t& quantizationOffset);
+// NOTE: declaring the template specialisations inline to prevent them
+// being flagged as unused functions when -Werror=unused-function is in effect
template<>
-auto ParseDataArray<armnn::DataType::Float32>(std::istream & stream)
+inline auto ParseDataArray<armnn::DataType::Float32>(std::istream & stream)
{
return ParseArrayImpl<float>(stream, [](const std::string& s) { return std::stof(s); });
}
template<>
-auto ParseDataArray<armnn::DataType::Signed32>(std::istream & stream)
+inline auto ParseDataArray<armnn::DataType::Signed32>(std::istream & stream)
{
return ParseArrayImpl<int>(stream, [](const std::string & s) { return std::stoi(s); });
}
template<>
-auto ParseDataArray<armnn::DataType::QuantisedAsymm8>(std::istream& stream,
+inline auto ParseDataArray<armnn::DataType::QuantisedAsymm8>(std::istream& stream,
const float& quantizationScale,
const int32_t& quantizationOffset)
{
diff --git a/tests/DeepSpeechV1InferenceTest.hpp b/tests/DeepSpeechV1InferenceTest.hpp
index 24e7dac567..633176219c 100755
--- a/tests/DeepSpeechV1InferenceTest.hpp
+++ b/tests/DeepSpeechV1InferenceTest.hpp
@@ -124,7 +124,7 @@ public:
Model::AddCommandLineOptions(options, m_ModelCommandLineOptions);
}
- virtual bool ProcessCommandLineOptions() override
+ virtual bool ProcessCommandLineOptions(const InferenceTestOptions &commonOptions) override
{
if (!ValidateDirectory(m_InputSeqDir))
{
@@ -156,7 +156,7 @@ public:
return false;
}
- m_Model = m_ConstructModel(m_ModelCommandLineOptions);
+ m_Model = m_ConstructModel(commonOptions, m_ModelCommandLineOptions);
if (!m_Model)
{
return false;
@@ -185,7 +185,8 @@ public:
private:
typename Model::CommandLineOptions m_ModelCommandLineOptions;
- std::function<std::unique_ptr<Model>(typename Model::CommandLineOptions)> m_ConstructModel;
+ std::function<std::unique_ptr<Model>(const InferenceTestOptions&,
+ typename Model::CommandLineOptions)> m_ConstructModel;
std::unique_ptr<Model> m_Model;
std::string m_InputSeqDir;