IVGCVSW-3740 Add Reference Workload support for ABS

 * Implemented RefAbsWorkload and unit tests

Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Ibfcdb2b37fd8d240c181f96856e2c997a4b88914
diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp
index 22d7914..5c53f12 100644
--- a/src/backends/reference/RefLayerSupport.cpp
+++ b/src/backends/reference/RefLayerSupport.cpp
@@ -66,6 +66,32 @@
 
 } // anonymous namespace
 
+bool RefLayerSupport::IsAbsSupported(const TensorInfo& input, const TensorInfo& output,
+                                     Optional<std::string&> reasonIfUnsupported) const
+{
+    bool supported = true;
+    std::array<DataType,3> supportedTypes =
+        {
+            DataType::Float32,
+            DataType::QuantisedAsymm8,
+            DataType::QuantisedSymm16
+        };
+
+    supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported,
+                                  "Reference abs: input type not supported");
+
+    supported &= CheckSupportRule(TypeAnyOf(output, supportedTypes), reasonIfUnsupported,
+                                  "Reference abs: output type not supported");
+
+    supported &= CheckSupportRule(TypesAreEqual(input, output), reasonIfUnsupported,
+                                  "Reference abs: input and output types not matching");
+
+    supported &= CheckSupportRule(ShapesAreSameTotalSize(input, output), reasonIfUnsupported,
+                                  "Reference abs: input and output shapes have different number of total elements");
+
+    return supported;
+}
+
 bool RefLayerSupport::IsActivationSupported(const TensorInfo& input,
                                             const TensorInfo& output,
                                             const ActivationDescriptor& descriptor,