40 : _memory_group(
std::move(memory_manager)), _sobel_hor(), _sobel_vert(), _tmp_x(), _tmp_y(), _border_handler()
48 const bool run_sobel_x = output_x !=
nullptr;
49 const bool run_sobel_y = output_y !=
nullptr;
53 _sobel_hor = std::make_unique<NESobel5x5HorKernel>();
54 _sobel_vert = std::make_unique<NESobel5x5VertKernel>();
55 _border_handler = std::make_unique<NEFillBorderKernel>();
57 if(run_sobel_x && run_sobel_y)
61 _memory_group.
manage(&_tmp_x);
62 _memory_group.
manage(&_tmp_y);
71 _memory_group.
manage(&_tmp_x);
79 _memory_group.
manage(&_tmp_y);
85 _border_handler->configure(input, _sobel_hor->border_size(), border_mode,
PixelValue(constant_border_value));
BorderMode
Methods available to handle borders.
Class describing the value of a pixel for any image format.
void init(const TensorAllocator &allocator, const Coordinates &coords, TensorInfo &sub_info)
Shares the same backing memory with another tensor allocator, while the tensor info might be differen...
~NESobel5x5()
Default destructor.
1 channel, 1 U8 per channel
Interface for Neon tensor.
Copyright (c) 2017-2021 Arm Limited.
TensorAllocator * allocator()
Return a pointer to the tensor's allocator.
void manage(IMemoryManageable *obj) override
Sets a object to be managed by the given memory group.
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
NESobel5x5(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Default constructor.
void allocate() override
Allocate size specified by TensorInfo of CPU memory.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
void configure(ITensor *input, ITensor *output_x, ITensor *output_y, BorderMode border_mode, uint8_t constant_border_value=0)
Initialise the function's source, destinations and border mode.
1 channel, 1 S16 per channel
#define ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Memory group resources scope handling class.
virtual void schedule(ICPPKernel *kernel, const Hints &hints)=0
Runs the kernel in the same thread as the caller synchronously.
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
Borders are left undefined.
Store the tensor's metadata.
static IScheduler & get()
Access the scheduler singleton.
void run() override
Run the kernels contained in the function.