diff options
author | Pablo Tello <pablo.tello@arm.com> | 2018-08-07 11:23:54 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | d8b03dd029261091e34dd8831d546299c60ce094 (patch) | |
tree | ced5c96940aa018f0a5a5a3a5fb0769d8dadcd1e /tests/validation/NEON | |
parent | 7da6dcfc199580828dbedfed15afdcc7a789192c (diff) | |
download | ComputeLibrary-d8b03dd029261091e34dd8831d546299c60ce094.tar.gz |
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>
Diffstat (limited to 'tests/validation/NEON')
-rw-r--r-- | tests/validation/NEON/WarpAffine.cpp | 8 | ||||
-rw-r--r-- | tests/validation/NEON/WarpPerspective.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/validation/NEON/WarpAffine.cpp b/tests/validation/NEON/WarpAffine.cpp index 8c83507e95..6180d6941c 100644 --- a/tests/validation/NEON/WarpAffine.cpp +++ b/tests/validation/NEON/WarpAffine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -64,8 +64,8 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(combi 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 Tensor src = create_tensor<Tensor>(shape, data_type); @@ -76,7 +76,7 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(combi // Create and configure function NEWarpAffine 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); diff --git a/tests/validation/NEON/WarpPerspective.cpp b/tests/validation/NEON/WarpPerspective.cpp index 804c080890..6ec8bc296d 100644 --- a/tests/validation/NEON/WarpPerspective.cpp +++ b/tests/validation/NEON/WarpPerspective.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -78,7 +78,7 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(combi // Create and configure function NEWarpPerspective warp_perspective; - warp_perspective.configure(&src, &dst, matrix.data(), policy, border_mode, constant_border_value); + warp_perspective.configure(&src, &dst, matrix, policy, border_mode, constant_border_value); // Validate valid region const ValidRegion valid_region = shape_to_valid_region(shape); |