From 7905f91d0765ea59cf0aadc2a338135f4965586f Mon Sep 17 00:00:00 2001 From: Abe Mbise Date: Thu, 7 Sep 2017 18:21:28 +0100 Subject: COMPMID-499: Port Gaussian 3x3 and 5x5 to new validation Change-Id: Icb82186cb97bd8d6e2c4c63f050ee44e5d753ff7 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/86926 Tested-by: Kaizen Reviewed-by: Moritz Pflanzer --- tests/validation_old/TensorOperations.h | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'tests/validation_old/TensorOperations.h') diff --git a/tests/validation_old/TensorOperations.h b/tests/validation_old/TensorOperations.h index af17ea8dfd..bba09175ca 100644 --- a/tests/validation_old/TensorOperations.h +++ b/tests/validation_old/TensorOperations.h @@ -511,38 +511,6 @@ void accumulate_weighted(const Tensor &in, Tensor &out, float alpha) } } -// Gaussian3x3 filter -template ::value>::type> -void gaussian3x3(const Tensor &in, Tensor &out, BorderMode border_mode, T constant_border_value) -{ - const std::array filter{ { 1, 2, 1, 2, 4, 2, 1, 2, 1 } }; - const float scale = 1.f / 16.f; - for(int element_idx = 0; element_idx < in.num_elements(); ++element_idx) - { - const Coordinates id = index2coord(in.shape(), element_idx); - apply_2d_spatial_filter(id, in, out, TensorShape(3U, 3U), filter.data(), scale, border_mode, constant_border_value); - } -} - -// Gaussian5x5 filter -template ::value>::type> -void gaussian5x5(const Tensor &in, Tensor &out, BorderMode border_mode, T constant_border_value) -{ - const std::array filter{ { - 1, 4, 6, 4, 1, - 4, 16, 24, 16, 4, - 6, 24, 36, 24, 6, - 4, 16, 24, 16, 4, - 1, 4, 6, 4, 1 - } }; - const float scale = 1.f / 256.f; - for(int element_idx = 0; element_idx < in.num_elements(); ++element_idx) - { - const Coordinates id = index2coord(in.shape(), element_idx); - apply_2d_spatial_filter(id, in, out, TensorShape(5U, 5U), filter.data(), scale, border_mode, constant_border_value); - } -} - // Non linear filter template void non_linear_filter(const Tensor &in, Tensor &out, NonLinearFilterFunction function, unsigned int mask_size, -- cgit v1.2.1