COMPMID-424 Implemented reference implementation and validation tests (NEON and CL) for Warp Perspective

Changed the behaviour in NEWarpKernel for border mode replicate and constant to stick with the VX specs.
When the new coords are out of the valid region, the output will be computed using the values from the border.
In the validation tests the validate will be called with tolerance_value 1 and tolerance_number 0.2%, due to some float arithmetic related mismatches.

Change-Id: Id4f9d0ef87178f8f8fd38ee17fee0e6f4beb85cd
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80283
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Reviewed-by: Steven Niu <steven.niu@arm.com>
diff --git a/tests/validation/Helpers.h b/tests/validation/Helpers.h
index 8d70de6..09ffda8 100644
--- a/tests/validation/Helpers.h
+++ b/tests/validation/Helpers.h
@@ -225,6 +225,31 @@
     return out_shape;
 }
 
+/** Fill matrix random.
+ *
+ * @param[in,out] matrix Matrix
+ * @param[in]     cols   Columns (width) of matrix
+ * @param[in]     rows   Rows (height) of matrix
+ */
+template <std::size_t SIZE>
+inline void fill_warp_matrix(std::array<float, SIZE> &matrix, int cols, int rows)
+{
+    std::mt19937                          gen(user_config.seed.get());
+    std::uniform_real_distribution<float> dist(-1, 1);
+
+    for(int v = 0, r = 0; r < rows; ++r)
+    {
+        for(int c = 0; c < cols; ++c, ++v)
+        {
+            matrix[v] = dist(gen);
+        }
+    }
+    if(SIZE == 9)
+    {
+        matrix[(cols * rows) - 1] = 1;
+    }
+}
+
 /** Create a vector of random ROIs.
  *
  * @param[in] shape     The shape of the input tensor.