IVGCVSW-3992 Add serialization support for ComparisonLayer

* Added serialization support and serialization-deserialization test
  for Comparison
* Added backward compatibility tests for Equal and Greater, to make
  sure they are serialized and deserialized as Comparison
* Refactored serialization tests and reduced code duplication by
  taking advantage of operator==() recently added for Descriptors

Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Change-Id: Id0fd94ef4b17e4e51c8005e585ea3c47f9c1bd8d
diff --git a/src/armnnSerializer/ArmnnSchema.fbs b/src/armnnSerializer/ArmnnSchema.fbs
index 187a091..0756784 100644
--- a/src/armnnSerializer/ArmnnSchema.fbs
+++ b/src/armnnSerializer/ArmnnSchema.fbs
@@ -143,7 +143,8 @@
     Slice = 48,
     DepthToSpace = 49,
     InstanceNormalization = 50,
-    LogSoftmax = 51
+    LogSoftmax = 51,
+    Comparison = 52
 }
 
 // Base layer table to be used as part of other layers
@@ -191,6 +192,24 @@
     axis:int;
 }
 
+enum ComparisonOperation : byte {
+    Equal = 0,
+    Greater = 1,
+    GreaterOrEqual = 2,
+    Less = 3,
+    LessOrEqual = 4,
+    NotEqual = 5
+}
+
+table ComparisonDescriptor {
+    operation:ComparisonOperation;
+}
+
+table ComparisonLayer {
+    base:LayerBase;
+    descriptor:ComparisonDescriptor;
+}
+
 table ConstantLayer {
     base:LayerBase;
     input:ConstTensor;
@@ -230,6 +249,7 @@
     base:LayerBase;
 }
 
+/// @deprecated Use ComparisonLayer instead
 table EqualLayer {
     base:LayerBase;
 }
@@ -254,6 +274,7 @@
     base:LayerBase;
 }
 
+/// @deprecated Use ComparisonLayer instead
 table GreaterLayer {
     base:LayerBase;
 }
@@ -496,6 +517,7 @@
     dataLayout:DataLayout;
 }
 
+/// @deprecated Use ResizeLayer instead
 table ResizeBilinearLayer {
     base:LayerBase;
     descriptor:ResizeBilinearDescriptor;
@@ -539,6 +561,7 @@
     descriptor:OriginsDescriptor;
 }
 
+/// @deprecated Use ConcatLayer instead
 table MergerLayer {
     base:LayerBase;
     descriptor:OriginsDescriptor;
@@ -760,7 +783,8 @@
     SliceLayer,
     DepthToSpaceLayer,
     InstanceNormalizationLayer,
-    LogSoftmaxLayer
+    LogSoftmaxLayer,
+    ComparisonLayer
 }
 
 table AnyLayer {