MLCE-13: Sanitizing matrix argument in the Warp.
This changes help to prevent errors like passing a matrix
with less elements than required into the warp functions.
Change-Id: I863f933a5e0568258717cffed3a20788d3d03083
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/143044
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/tests/validation/CL/WarpAffine.cpp b/tests/validation/CL/WarpAffine.cpp
index 7f3001c..29f24cc 100644
--- a/tests/validation/CL/WarpAffine.cpp
+++ b/tests/validation/CL/WarpAffine.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -65,8 +65,8 @@
uint8_t constant_border_value = distribution_u8(gen);
// Create the matrix
- std::array<float, 6> matrix{ {} };
- fill_warp_matrix<6>(matrix);
+ std::array<float, 9> matrix{ {} };
+ fill_warp_matrix<9>(matrix);
// Create tensors
CLTensor src = create_tensor<CLTensor>(shape, data_type);
@@ -77,7 +77,7 @@
// Create and configure function
CLWarpAffine warp_affine;
- warp_affine.configure(&src, &dst, matrix.data(), policy, border_mode, constant_border_value);
+ warp_affine.configure(&src, &dst, matrix, policy, border_mode, constant_border_value);
// Validate valid region
const ValidRegion valid_region = shape_to_valid_region(shape);