diff options
Diffstat (limited to 'tests/validation/CL/WarpAffine.cpp')
-rw-r--r-- | tests/validation/CL/WarpAffine.cpp | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/tests/validation/CL/WarpAffine.cpp b/tests/validation/CL/WarpAffine.cpp index 7779761f1f..2dacb9fe98 100644 --- a/tests/validation/CL/WarpAffine.cpp +++ b/tests/validation/CL/WarpAffine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 Arm Limited. + * Copyright (c) 2017-2020 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -54,47 +54,6 @@ constexpr AbsoluteTolerance<uint8_t> tolerance(1); TEST_SUITE(CL) TEST_SUITE(WarpAffine) -DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("DataType", DataType::U8)), - framework::dataset::make("InterpolationPolicy", { InterpolationPolicy::NEAREST_NEIGHBOR, InterpolationPolicy::BILINEAR })), - datasets::BorderModes()), - shape, data_type, policy, border_mode) -{ - // Generate a random constant value if border_mode is constant - std::mt19937 gen(library->seed()); - std::uniform_int_distribution<uint8_t> distribution_u8(0, 255); - uint8_t constant_border_value = distribution_u8(gen); - - // Create the matrix - std::array<float, 9> matrix{ {} }; - fill_warp_matrix<9>(matrix); - - // Create tensors - CLTensor src = create_tensor<CLTensor>(shape, data_type); - CLTensor dst = create_tensor<CLTensor>(shape, data_type); - - ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS); - ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS); - - // Create and configure function - CLWarpAffine warp_affine; - warp_affine.configure(&src, &dst, matrix, policy, border_mode, constant_border_value); - - // Validate valid region - const ValidRegion valid_region = shape_to_valid_region(shape); - - validate(src.info()->valid_region(), valid_region); - validate(dst.info()->valid_region(), valid_region); - - // Validate padding - int total_right = ceil_to_multiple(shape[0], 4); - const int access_right = total_right + (((total_right - shape[0]) == 0) ? 1 : 0); - const PaddingSize read_padding(1, access_right - shape[0], 1, 1); - validate(src.info()->padding(), read_padding); - - PaddingCalculator calculator(shape.x(), 4); - validate(dst.info()->padding(), calculator.required_padding()); -} - template <typename T> using CLWarpAffineFixture = WarpAffineValidationFixture<CLTensor, CLAccessor, CLWarpAffine, T>; |