32 #include "tests/datasets/BorderModeDataset.h" 33 #include "tests/datasets/ShapeDatasets.h" 38 #include "tests/validation/fixtures/SobelFixture.h" 57 std::mt19937 gen(
library->seed());
58 std::uniform_int_distribution<uint8_t> int_dist(0, 255);
59 const uint8_t constant_border_value = int_dist(gen);
76 sobel.configure(&src, &dst_x, &dst_y, border_mode, constant_border_value);
178 std::mt19937 gen(
library->seed());
179 std::uniform_int_distribution<uint8_t> int_dist(0, 255);
180 const uint8_t constant_border_value = int_dist(gen);
197 sobel.configure(&src, &dst_x, &dst_y, border_mode, constant_border_value);
296 std::mt19937 gen(
library->seed());
297 std::uniform_int_distribution<uint8_t> int_dist(0, 255);
298 const uint8_t constant_border_value = int_dist(gen);
315 sobel.configure(&src, &dst_x, &dst_y, border_mode, constant_border_value);
void set_accessed_elements(int elements)
Set number of accessed elements.
bool is_resizable() const override
Flag indicating whether the size of the tensor can be changed.
Container for 2D border size.
1 channel, 1 U8 per channel
PaddingCalculator calculator(shape.x(), 8)
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
PaddingSize padding() const override
Padding of tensor.
SobelValidationFixture< CLTensor, CLAccessor, CLSobel3x3, uint8_t, int16_t > CLSobel3x3Fixture
void set_border_size(int size)
Set border size.
PaddingSize required_padding() const
Compute the required padding.
TensorInfo * info() const override
Interface to be implemented by the child class to return the tensor's metadata.
This file contains all available output stages for GEMMLowp on OpenCL.
SobelValidationFixture< CLTensor, CLAccessor, CLSobel7x7, uint8_t, int32_t > CLSobel7x7Fixture
Basic function to execute sobel 5x5 filter.
void set_access_offset(int offset)
Set offset of the access relative to the current position.
#define TEST_SUITE(SUITE_NAME)
1 channel, 1 S32 per channel
const PaddingSize dst_padding
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsoluteDifferenceFixture< uint8_t >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), AbsoluteDifferenceU8Dataset))
validate(dst.info() ->valid_region(), dst_valid_region)
DatasetMode
Possible dataset modes.
template std::pair< SimpleTensor< int16_t >, SimpleTensor< int16_t > > sobel(const SimpleTensor< uint8_t > &src, int filter_size, BorderMode border_mode, uint8_t constant_border_value, GradientDimension gradient_dimension)
std::unique_ptr< AssetsLibrary > library
ITensorInfo & set_format(Format format) override
Set the format of an already initialized tensor.
Format
Image colour formats.
Accessor implementation for CLTensor objects.
SobelValidationFixture< CLTensor, CLAccessor, CLSobel5x5, uint8_t, int16_t > CLSobel5x5Fixture
1 channel, 1 S16 per channel
DataType data_type_from_format(Format format)
Return the data type used by a given single-planar pixel format.
DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), AbsoluteDifferenceU8Dataset), shape, data_type0, data_type1, output_data_type)
x and y gradient dimension
TEST_SUITE_END() DATA_TEST_CASE(Configuration
const ValidRegion dst_valid_region
const PaddingSize src_padding
ARM_COMPUTE_EXPECT(src.info() ->is_resizable(), framework::LogLevel::ERRORS)
Borders are left undefined.
combine(combine(combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("DataType",{DataType::U8, DataType::S16})), datasets::BorderModes()), framework::dataset::make("filter_size",{5}))
JoinDataset< T, U > concat(T &&dataset1, U &&dataset2)
Helper function to create a JoinDataset.
Container for valid region of a window.
Basic function to execute sobel 7x7 filter.
virtual ITensorInfo & set_format(Format format)=0
Set the format of an already initialized tensor.
GradientDimension
Gradient dimension type.
convolution configure & src
ValidRegion shape_to_valid_region(const TensorShape &a_shape, bool border_undefined=false, BorderSize border_size=BorderSize(0))
Create a valid region based on tensor shape, border mode and border size.
Basic function to execute sobel 3x3 filter.
Calculate required padding.
void set_border_mode(BorderMode mode)
Set border mode.
Basic implementation of the OpenCL tensor interface.