COMPMID-676: Rework TensorInfo building

Change-Id: Ic98f64ffe30739437a1fe31ef98d83ee900741e3
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95512
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/arm_compute/core/Helpers.inl b/arm_compute/core/Helpers.inl
index 656956d..1e56534 100644
--- a/arm_compute/core/Helpers.inl
+++ b/arm_compute/core/Helpers.inl
@@ -217,6 +217,21 @@
     return false;
 }
 
+inline bool auto_init_if_empty(ITensorInfo &info_sink, ITensorInfo &info_source)
+{
+    if(info_sink.tensor_shape().total_size() == 0)
+    {
+        info_sink.set_data_type(info_source.data_type());
+        info_sink.set_num_channels(info_source.num_channels());
+        info_sink.set_tensor_shape(info_source.tensor_shape());
+        info_sink.set_fixed_point_position(info_source.fixed_point_position());
+        info_sink.set_quantization_info(info_source.quantization_info());
+        return true;
+    }
+
+    return false;
+}
+
 inline bool set_shape_if_empty(ITensorInfo &info, const TensorShape &shape)
 {
     if(info.tensor_shape().total_size() == 0)