aboutsummaryrefslogtreecommitdiff
path: root/tests/InferenceTest.inl
diff options
context:
space:
mode:
authorJames Ward <james.ward@arm.com>2020-09-28 11:56:35 +0100
committerJames Ward <james.ward@arm.com>2020-09-30 17:13:58 +0000
commit6d9f5c57fe80b3b3c08294ddd52062e107151a15 (patch)
treea5aeca515a6f81545d82939ca4031df8677aed12 /tests/InferenceTest.inl
parent156113cee2b869810092b42579c31c3b1fd910c5 (diff)
downloadarmnn-6d9f5c57fe80b3b3c08294ddd52062e107151a15.tar.gz
IVGCVSW-4519 Remove Boost Variant and apply_visitor variant
* replace boost::variant with mapbox::util::variant * replace boost::apply_visitor with mapbox::util::apply_visitor * replace boost::get with mapbox::util::get Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I38460cabbcd5e56d4d61151bfe3dcb5681ce696e
Diffstat (limited to 'tests/InferenceTest.inl')
-rw-r--r--tests/InferenceTest.inl8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/InferenceTest.inl b/tests/InferenceTest.inl
index 88ce3526e2..e10bb38cb0 100644
--- a/tests/InferenceTest.inl
+++ b/tests/InferenceTest.inl
@@ -26,7 +26,7 @@ namespace armnn
namespace test
{
-using TContainer = boost::variant<std::vector<float>, std::vector<int>, std::vector<unsigned char>>;
+using TContainer = mapbox::util::variant<std::vector<float>, std::vector<int>, std::vector<unsigned char>>;
template <typename TTestCaseDatabase, typename TModel>
ClassifierTestCase<TTestCaseDatabase, TModel>::ClassifierTestCase(
@@ -49,7 +49,7 @@ ClassifierTestCase<TTestCaseDatabase, TModel>::ClassifierTestCase(
{
}
-struct ClassifierResultProcessor : public boost::static_visitor<>
+struct ClassifierResultProcessor
{
using ResultMap = std::map<float,int>;
@@ -118,7 +118,7 @@ TestCaseResult ClassifierTestCase<TTestCaseDatabase, TModel>::ProcessResult(cons
const auto testCaseId = this->GetTestCaseId();
ClassifierResultProcessor resultProcessor(m_QuantizationParams.first, m_QuantizationParams.second);
- boost::apply_visitor(resultProcessor, output);
+ mapbox::util::apply_visitor(resultProcessor, output);
ARMNN_LOG(info) << "= Prediction values for test #" << testCaseId;
auto it = resultProcessor.GetResultMap().rbegin();
@@ -130,7 +130,7 @@ TestCaseResult ClassifierTestCase<TTestCaseDatabase, TModel>::ProcessResult(cons
}
unsigned int prediction = 0;
- boost::apply_visitor([&](auto&& value)
+ mapbox::util::apply_visitor([&](auto&& value)
{
prediction = armnn::numeric_cast<unsigned int>(
std::distance(value.begin(), std::max_element(value.begin(), value.end())));