45 : _input(nullptr), _output(nullptr), _num_elems_processed_per_iteration(8), _subsampling(1)
96 _kernel =
create_kernel(compile_context, kernel_name, build_opts);
101 AccessWindowRectangle output_access(output->
info(), 0, 0, _num_elems_processed_per_iteration, 1, 1.f / _subsampling, 1.f / _subsampling);
108 ICLKernel::configure_internal(win);
148 _input = input_plane;
153 std::set<std::string> build_opts;
156 kernel_name =
"copy_plane";
163 _kernel =
create_kernel(compile_context, kernel_name, build_opts);
174 ICLKernel::configure_internal(win);
190 unsigned int idx = 0;
bool set_format_if_unknown(ITensorInfo &info, Format format)
Set the format, data type and number of channels to the specified value if the current data type is u...
Window first_slice_window_2D() const
First 2D slice of the window.
A single plane of 32-bit macro pixel of U0, Y0, V0, Y1 byte.
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
const Window & window() const
The maximum window the kernel can be executed on.
int plane_idx_from_channel(Format format, Channel channel)
Return the plane index of a given channel given an input format.
TensorShape calculate_subsampled_shape(const TensorShape &shape, Format format, Channel channel=Channel::UNKNOWN)
Calculate subsampled shape for a given format and channel.
void enqueue(IGCKernel &kernel, const Window &window, const gles::NDRange &lws=gles::NDRange(1U, 1U, 1U))
Add the kernel to the command queue with the given window.
#define ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D(t)
const std::string & string_from_channel(Channel channel)
Convert a channel identity into a string.
constexpr int step() const
Return the step of the dimension.
cl::NDRange lws_hint() const
Return the Local-Workgroup-Size hint.
1 channel, 1 U8 per channel
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Interface for OpenCL multi-planar images.
A 2 plane YUV format of Luma (Y) and interleaved UV data at 4:2:0 sampling.
Describe one of the image's dimensions with a start, end and step.
virtual ICLImage * cl_plane(unsigned int index)=0
Return a pointer to the requested OpenCL plane of the image.
#define ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN(t,...)
A 2 plane YUV format of Luma (Y) and interleaved VU data at 4:2:0 sampling.
bool slide_window_slice_2D(Window &slice) const
Slide the passed 2D window slice.
Copyright (c) 2017-2021 Arm Limited.
virtual ValidRegion valid_region() const =0
Valid region of the tensor.
3 channels, 1 U8 per channel
#define ARM_COMPUTE_ERROR_ON_TENSORS_NOT_EVEN(...)
Implementation of a rectangular access pattern.
virtual Format format() const =0
Colour format of the image.
cl::Kernel create_kernel(const CLCompileContext &ctx, const std::string &kernel_name, const std::set< std::string > &build_opts=std::set< std::string >())
Creates an opencl kernel using a compile context.
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
bool update_window_and_padding(Window &win, Ts &&... patterns)
Update window and padding size for each of the access patterns.
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
Channel
Available channels.
Format
Image colour formats.
Class to describe a number of elements in each dimension.
Implementation of a row access pattern.
A 3 plane of 8 bit 4:4:4 sampled Y, U, V planes.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
bool set_shape_if_empty(ITensorInfo &info, const TensorShape &shape)
Set the shape to the specified value if the current assignment is empty.
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
virtual const MultiImageInfo * info() const =0
Interface to be implemented by the child class to return the multi-planar image's metadata...
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
A 3 plane of 8-bit 4:2:0 sampled Y, U, V planes.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
4 channels, 1 U8 per channel
void add_2D_tensor_argument(unsigned int &idx, const ICLTensor *tensor, const Window &window)
Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx...
Interface for OpenCL tensor.
#define ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(...)
Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context...
constexpr const Dimension & y() const
Alias to access the second dimension of the window.
Wrapper to configure the Khronos OpenCL C++ header.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
Container for valid region of a window.
constexpr int end() const
Return the end of the dimension.
A single plane of 32-bit macro pixel of Y0, U0, Y1, V0 bytes.
Format format() const
Colour format of the image.
constexpr int start() const
Return the start of the dimension.
Describe a multidimensional execution window.
Coordinates anchor
Anchor for the start of the valid region.
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)
constexpr const Dimension & x() const
Alias to access the first dimension of the window.
const std::string & string_from_format(Format format)
Convert a tensor format into a string.
#define ARM_COMPUTE_ERROR_ON_CHANNEL_NOT_IN_KNOWN_FORMAT(f, c)