IVGCVSW-2946 RefElementwiseWorkload configures prior to first execute

+ Added PostAllocationConfigure() method to workload interface
+ Elementwise function now deduces types based on Functor
- Replaced RefComparisonWorkload with RefElementwiseWorkload specialization
+ Fixed up unit tests and minor formatting

Change-Id: I33d08797767bba01cf4efb2904920ce0f950a4fe
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
diff --git a/src/backends/reference/workloads/RefElementwiseWorkload.hpp b/src/backends/reference/workloads/RefElementwiseWorkload.hpp
index 81af196..651942e 100644
--- a/src/backends/reference/workloads/RefElementwiseWorkload.hpp
+++ b/src/backends/reference/workloads/RefElementwiseWorkload.hpp
@@ -8,6 +8,8 @@
 #include <armnn/Types.hpp>
 #include <backendsCommon/Workload.hpp>
 #include <backendsCommon/WorkloadData.hpp>
+#include "BaseIterator.hpp"
+#include "ElementwiseFunction.hpp"
 #include "Maximum.hpp"
 #include "Minimum.hpp"
 #include "StringMapping.hpp"
@@ -19,10 +21,18 @@
 class RefElementwiseWorkload : public BaseWorkload<ParentDescriptor>
 {
 public:
+    using InType = typename ElementwiseFunction<Functor>::InType;
+    using OutType = typename ElementwiseFunction<Functor>::OutType;
     using BaseWorkload<ParentDescriptor>::m_Data;
-    using BaseWorkload<ParentDescriptor>::BaseWorkload;
 
+    RefElementwiseWorkload(const ParentDescriptor& descriptor, const WorkloadInfo& info);
+    void PostAllocationConfigure() override;
     void Execute() const override;
+
+private:
+    std::unique_ptr<Decoder<InType>> m_Input0;
+    std::unique_ptr<Decoder<InType>> m_Input1;
+    std::unique_ptr<Encoder<OutType>> m_Output;
 };
 
 using RefAdditionWorkload =
@@ -54,4 +64,14 @@
     RefElementwiseWorkload<armnn::minimum<float>,
                           MinimumQueueDescriptor,
                           StringMapping::RefMinimumWorkload_Execute>;
+
+using RefEqualWorkload =
+    RefElementwiseWorkload<std::equal_to<float>,
+                           armnn::EqualQueueDescriptor,
+                           armnn::StringMapping::RefEqualWorkload_Execute>;
+
+using RefGreaterWorkload =
+    RefElementwiseWorkload<std::greater<float>,
+                           armnn::GreaterQueueDescriptor,
+                           armnn::StringMapping::RefGreaterWorkload_Execute>;
 } // armnn