IVGCVSW-1951 Remove type templating from NeonPermuteWorkload
authorNattapat Chaimanowong <nattapat.chaimanowong@arm.com>
Fri, 12 Oct 2018 13:14:44 +0000 (14:14 +0100)
committerMatthew Bentham <matthew.bentham@arm.com>
Mon, 22 Oct 2018 15:57:53 +0000 (16:57 +0100)
Change-Id: I4b3247fc7c5eb1c0cec5cf22c56d4c7a3f36d51a

src/backends/neon/NeonWorkloadFactory.cpp
src/backends/neon/workloads/NeonPermuteWorkload.cpp
src/backends/neon/workloads/NeonPermuteWorkload.hpp

index f133f2b..4742ae9 100644 (file)
@@ -123,7 +123,7 @@ std::unique_ptr<armnn::IWorkload> NeonWorkloadFactory::CreateFullyConnected(
 std::unique_ptr<armnn::IWorkload> NeonWorkloadFactory::CreatePermute(const PermuteQueueDescriptor& descriptor,
                                                                      const WorkloadInfo&           info) const
 {
-    return MakeWorkload<NeonPermuteFloatWorkload, NeonPermuteUint8Workload>(descriptor, info);
+    return std::make_unique<NeonPermuteWorkload>(descriptor, info);
 }
 
 std::unique_ptr<armnn::IWorkload> NeonWorkloadFactory::CreatePooling2d(const Pooling2dQueueDescriptor& descriptor,
index 0bf4aa1..cf4e791 100644 (file)
@@ -24,10 +24,9 @@ arm_compute::Status NeonPermuteWorkloadValidate(const TensorInfo& input,
                                       armcomputetensorutils::BuildArmComputePermutationVector(mappings));
 }
 
-template <armnn::DataType... DataTypes>
-NeonPermuteWorkload<DataTypes...>::NeonPermuteWorkload(const PermuteQueueDescriptor& descriptor,
-                                               const WorkloadInfo& info)
-        : TypedWorkload<PermuteQueueDescriptor, DataTypes...>(descriptor, info)
+NeonPermuteWorkload::NeonPermuteWorkload(const PermuteQueueDescriptor& descriptor,
+                                         const WorkloadInfo& info)
+        : BaseWorkload<PermuteQueueDescriptor>(descriptor, info)
 {
     using armcomputetensorutils::BuildArmComputePermutationVector;
 
@@ -41,14 +40,10 @@ NeonPermuteWorkload<DataTypes...>::NeonPermuteWorkload(const PermuteQueueDescrip
     m_PermuteFunction.configure(&input, &output, BuildArmComputePermutationVector(mappings));
 }
 
-template <armnn::DataType... DataTypes>
-void NeonPermuteWorkload<DataTypes...>::Execute() const
+void NeonPermuteWorkload::Execute() const
 {
     ARMNN_SCOPED_PROFILING_EVENT_NEON(GetName() + "_Execute");
     m_PermuteFunction.run();
 }
 
-template class NeonPermuteWorkload<DataType::Float16, DataType::Float32>;
-template class NeonPermuteWorkload<DataType::QuantisedAsymm8>;
-
 } // namespace armnn
index a85816b..299df80 100644 (file)
@@ -19,8 +19,7 @@ namespace armnn
 arm_compute::Status NeonPermuteWorkloadValidate(const TensorInfo& input, const TensorInfo& output,
                                                 const PermuteDescriptor& descriptor);
 
-template <armnn::DataType... DataTypes>
-class NeonPermuteWorkload : public TypedWorkload<PermuteQueueDescriptor, DataTypes...>
+class NeonPermuteWorkload : public BaseWorkload<PermuteQueueDescriptor>
 {
 public:
     static const std::string& GetName()
@@ -33,11 +32,8 @@ public:
     void Execute() const override;
 
 private:
-    using TypedWorkload<PermuteQueueDescriptor, DataTypes...>::m_Data;
+    using BaseWorkload<PermuteQueueDescriptor>::m_Data;
     mutable arm_compute::NEPermute m_PermuteFunction;
 };
 
-using NeonPermuteFloatWorkload = NeonPermuteWorkload<DataType::Float16, DataType::Float32>;
-using NeonPermuteUint8Workload = NeonPermuteWorkload<DataType::QuantisedAsymm8>;
-
 } // namespace armnn