From 3537c2ca7ebf31c1673b9ec2bb0c17b0406bbae0 Mon Sep 17 00:00:00 2001 From: surmeh01 Date: Fri, 18 May 2018 16:31:43 +0100 Subject: Release 18.05 --- src/armnn/backends/MakeWorkloadHelper.hpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/armnn/backends/MakeWorkloadHelper.hpp') diff --git a/src/armnn/backends/MakeWorkloadHelper.hpp b/src/armnn/backends/MakeWorkloadHelper.hpp index a8729eb07c..a1f9b0b0eb 100644 --- a/src/armnn/backends/MakeWorkloadHelper.hpp +++ b/src/armnn/backends/MakeWorkloadHelper.hpp @@ -13,10 +13,12 @@ namespace template struct MakeWorkloadForType { - template - static std::unique_ptr Func(const QueueDescriptorType& descriptor, const WorkloadInfo& info) + template + static std::unique_ptr Func(const QueueDescriptorType& descriptor, + const WorkloadInfo& info, + Args&&... args) { - return std::make_unique(descriptor, info); + return std::make_unique(descriptor, info, std::forward(args)...); } }; @@ -24,8 +26,10 @@ struct MakeWorkloadForType template<> struct MakeWorkloadForType { - template - static std::unique_ptr Func(const QueueDescriptorType& descriptor, const WorkloadInfo& info) + template + static std::unique_ptr Func(const QueueDescriptorType& descriptor, + const WorkloadInfo& info, + Args&&... args) { return nullptr; } @@ -33,8 +37,8 @@ struct MakeWorkloadForType // Makes a workload for one the specified types based on the data type requirements of the tensorinfo. // Specify type void as the WorkloadType for unsupported DataType/WorkloadType combos. -template -std::unique_ptr MakeWorkload(const QueueDescriptorType& descriptor, const WorkloadInfo& info) +template +std::unique_ptr MakeWorkload(const QueueDescriptorType& descriptor, const WorkloadInfo& info, Args&&... args) { const DataType dataType = !info.m_InputTensorInfos.empty() ? info.m_InputTensorInfos[0].GetDataType() @@ -46,9 +50,9 @@ std::unique_ptr MakeWorkload(const QueueDescriptorType& descriptor, c switch (dataType) { case DataType::Float32: - return MakeWorkloadForType::Func(descriptor, info); + return MakeWorkloadForType::Func(descriptor, info, std::forward(args)...); case DataType::QuantisedAsymm8: - return MakeWorkloadForType::Func(descriptor, info); + return MakeWorkloadForType::Func(descriptor, info, std::forward(args)...); default: BOOST_ASSERT_MSG(false, "Unknown DataType."); return nullptr; @@ -56,4 +60,4 @@ std::unique_ptr MakeWorkload(const QueueDescriptorType& descriptor, c } } //namespace -} //namespace armnn \ No newline at end of file +} //namespace armnn -- cgit v1.2.1