Compute Library
 21.02
CLChannelExtractKernel Class Reference

Interface for the channel extract kernel. More...

#include <CLChannelExtractKernel.h>

Collaboration diagram for CLChannelExtractKernel:
[legend]

Public Member Functions

 CLChannelExtractKernel ()
 Default constructor. More...
 
 CLChannelExtractKernel (const CLChannelExtractKernel &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
CLChannelExtractKerneloperator= (const CLChannelExtractKernel &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 CLChannelExtractKernel (CLChannelExtractKernel &&)=default
 Allow instances of this class to be moved. More...
 
CLChannelExtractKerneloperator= (CLChannelExtractKernel &&)=default
 Allow instances of this class to be moved. More...
 
 ~CLChannelExtractKernel ()=default
 Default destructor. More...
 
void configure (const ICLTensor *input, Channel channel, ICLTensor *output)
 Set the input and output of the kernel. More...
 
void configure (const CLCompileContext &compile_context, const ICLTensor *input, Channel channel, ICLTensor *output)
 Set the input and output of the kernel. More...
 
void configure (const ICLMultiImage *input, Channel channel, ICLImage *output)
 Set the input and output of the kernel. More...
 
void configure (const CLCompileContext &compile_context, const ICLMultiImage *input, Channel channel, ICLImage *output)
 Set the input and output of the kernel. More...
 
void run (const Window &window, cl::CommandQueue &queue) override
 Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue. More...
 
- Public Member Functions inherited from ICLKernel
 ICLKernel ()
 Constructor. More...
 
cl::Kernel & kernel ()
 Returns a reference to the OpenCL kernel of this object. More...
 
template<typename T >
void add_1D_array_argument (unsigned int &idx, const ICLArray< T > *array, const Strides &strides, unsigned int num_dimensions, const Window &window)
 Add the passed 1D array's parameters to the object's kernel's arguments starting from the index idx. More...
 
void add_1D_tensor_argument (unsigned int &idx, const ICLTensor *tensor, const Window &window)
 Add the passed 1D tensor's parameters to the object's kernel's arguments starting from the index idx. More...
 
void add_1D_tensor_argument_if (bool cond, unsigned int &idx, const ICLTensor *tensor, const Window &window)
 Add the passed 1D tensor's parameters to the object's kernel's arguments starting from the index idx if the condition is true. More...
 
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. More...
 
void add_2D_tensor_argument_if (bool cond, 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 if the condition is true. More...
 
void add_3D_tensor_argument (unsigned int &idx, const ICLTensor *tensor, const Window &window)
 Add the passed 3D tensor's parameters to the object's kernel's arguments starting from the index idx. More...
 
void add_4D_tensor_argument (unsigned int &idx, const ICLTensor *tensor, const Window &window)
 Add the passed 4D tensor's parameters to the object's kernel's arguments starting from the index idx. More...
 
virtual void run_op (ITensorPack &tensors, const Window &window, cl::CommandQueue &queue)
 Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue. More...
 
template<typename T >
void add_argument (unsigned int &idx, T value)
 Add the passed parameters to the object's kernel's arguments starting from the index idx. More...
 
void set_lws_hint (const cl::NDRange &lws_hint)
 Set the Local-Workgroup-Size hint. More...
 
cl::NDRange lws_hint () const
 Return the Local-Workgroup-Size hint. More...
 
void set_wbsm_hint (const cl_int &wbsm_hint)
 Set the workgroup batch size modifier hint. More...
 
cl_int wbsm_hint () const
 Return the workgroup batch size modifier hint. More...
 
const std::string & config_id () const
 Get the configuration ID. More...
 
void set_target (GPUTarget target)
 Set the targeted GPU architecture. More...
 
void set_target (cl::Device &device)
 Set the targeted GPU architecture according to the CL device. More...
 
GPUTarget get_target () const
 Get the targeted GPU architecture. More...
 
size_t get_max_workgroup_size ()
 Get the maximum workgroup size for the device the CLKernelLibrary uses. More...
 
template<unsigned int dimension_size>
void add_tensor_argument (unsigned &idx, const ICLTensor *tensor, const Window &window)
 
template<typename T , unsigned int dimension_size>
void add_array_argument (unsigned &idx, const ICLArray< T > *array, const Strides &strides, unsigned int num_dimensions, const Window &window)
 Add the passed array's parameters to the object's kernel's arguments starting from the index idx. More...
 
- Public Member Functions inherited from IKernel
 IKernel ()
 Constructor. More...
 
virtual ~IKernel ()=default
 Destructor. More...
 
virtual bool is_parallelisable () const
 Indicates whether or not the kernel is parallelisable. More...
 
virtual BorderSize border_size () const
 The size of the border for that kernel. More...
 
const Windowwindow () const
 The maximum window the kernel can be executed on. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ICLKernel
static constexpr unsigned int num_arguments_per_1D_array ()
 Returns the number of arguments enqueued per 1D array object. More...
 
static constexpr unsigned int num_arguments_per_1D_tensor ()
 Returns the number of arguments enqueued per 1D tensor object. More...
 
static constexpr unsigned int num_arguments_per_2D_tensor ()
 Returns the number of arguments enqueued per 2D tensor object. More...
 
static constexpr unsigned int num_arguments_per_3D_tensor ()
 Returns the number of arguments enqueued per 3D tensor object. More...
 
static constexpr unsigned int num_arguments_per_4D_tensor ()
 Returns the number of arguments enqueued per 4D tensor object. More...
 
static cl::NDRange gws_from_window (const Window &window)
 Get the global work size given an execution window. More...
 

Detailed Description

Interface for the channel extract kernel.

Definition at line 39 of file CLChannelExtractKernel.h.

Constructor & Destructor Documentation

◆ CLChannelExtractKernel() [1/3]

Default constructor.

Definition at line 44 of file CLChannelExtractKernel.cpp.

45  : _input(nullptr), _output(nullptr), _num_elems_processed_per_iteration(8), _subsampling(1)
46 {
47 }

◆ CLChannelExtractKernel() [2/3]

Prevent instances of this class from being copied (As this class contains pointers)

◆ CLChannelExtractKernel() [3/3]

Allow instances of this class to be moved.

◆ ~CLChannelExtractKernel()

~CLChannelExtractKernel ( )
default

Default destructor.

Member Function Documentation

◆ configure() [1/4]

void configure ( const ICLTensor input,
Channel  channel,
ICLTensor output 
)

Set the input and output of the kernel.

Parameters
[in]inputSource tensor. Formats supported: RGB888/RGBA8888/YUYV422/UYVY422
[in]channelChannel to extract.
[out]outputDestination tensor. Must be of U8 format.

Definition at line 49 of file CLChannelExtractKernel.cpp.

References CLKernelLibrary::get().

Referenced by CLChannelExtractKernel::configure().

50 {
51  configure(CLKernelLibrary::get().get_compile_context(), input, channel, output);
52 }
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
void configure(const ICLTensor *input, Channel channel, ICLTensor *output)
Set the input and output of the kernel.

◆ configure() [2/4]

void configure ( const CLCompileContext compile_context,
const ICLTensor input,
Channel  channel,
ICLTensor output 
)

Set the input and output of the kernel.

Parameters
[in]compile_contextThe compile context to be used.
[in]inputSource tensor. Formats supported: RGB888/RGBA8888/YUYV422/UYVY422
[in]channelChannel to extract.
[out]outputDestination tensor. Must be of U8 format.

Definition at line 54 of file CLChannelExtractKernel.cpp.

References ValidRegion::anchor, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_CHANNEL_NOT_IN_KNOWN_FORMAT, ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN, ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D, ARM_COMPUTE_ERROR_ON_TENSORS_NOT_EVEN, arm_compute::calculate_max_window(), arm_compute::calculate_subsampled_shape(), arm_compute::create_kernel(), ITensorInfo::format(), ITensor::info(), arm_compute::test::validation::input, kernel_name, arm_compute::test::validation::output_shape, arm_compute::RGB888, arm_compute::RGBA8888, arm_compute::set_format_if_unknown(), arm_compute::set_shape_if_empty(), arm_compute::string_from_channel(), arm_compute::string_from_format(), ITensorInfo::tensor_shape(), arm_compute::U8, arm_compute::update_window_and_padding(), arm_compute::UYVY422, ITensorInfo::valid_region(), arm_compute::Y, and arm_compute::YUYV422.

55 {
56  ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
57  ARM_COMPUTE_ERROR_ON(input == output);
58 
60 
61  // Check if input tensor has a valid format
65 
66  // Check if channel is valid for given format
67  const Format format = input->info()->format();
69 
70  // Half the processed elements for U,V channels due to sub-sampling of 2
71  _subsampling = 1;
72 
73  if(format == Format::YUYV422 || format == Format::UYVY422)
74  {
75  // Check if the width of the tensor shape is even for formats with subsampled channels (UYVY422 and YUYV422)
77 
78  if(channel != Channel::Y)
79  {
80  _subsampling = 2;
81  }
82  }
83 
84  // Calculate output tensor shape using subsampling
87 
89 
90  _input = input;
91  _output = output;
92 
93  // Create kernel
94  std::string kernel_name = "channel_extract_" + string_from_format(format);
95  std::set<std::string> build_opts = { ("-DCHANNEL_" + string_from_channel(channel)) };
96  _kernel = create_kernel(compile_context, kernel_name, build_opts);
97 
98  // Configure window
99  Window win = calculate_max_window(*input->info(), Steps(_num_elems_processed_per_iteration));
100  AccessWindowHorizontal input_access(input->info(), 0, _num_elems_processed_per_iteration);
101  AccessWindowRectangle output_access(output->info(), 0, 0, _num_elems_processed_per_iteration, 1, 1.f / _subsampling, 1.f / _subsampling);
102 
103  update_window_and_padding(win, input_access, output_access);
104 
105  ValidRegion input_valid_region = input->info()->valid_region();
106  output_access.set_valid_region(win, ValidRegion(input_valid_region.anchor, output->info()->tensor_shape()));
107 
108  ICLKernel::configure_internal(win);
109 }
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...
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)
Shape of a tensor.
Definition: TensorShape.h:39
TensorShape calculate_subsampled_shape(const TensorShape &shape, Format format, Channel channel=Channel::UNKNOWN)
Calculate subsampled shape for a given format and channel.
Definition: Utils.h:774
#define ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D(t)
Definition: Validate.h:856
const std::string & string_from_channel(Channel channel)
Convert a channel identity into a string.
Definition: Utils.cpp:102
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.
Definition: Error.h:466
#define ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN(t,...)
Definition: Validate.h:643
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(...)
Definition: Validate.h:318
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.
Definition: CLHelpers.cpp:403
bool update_window_and_padding(Window &win, Ts &&... patterns)
Update window and padding size for each of the access patterns.
Definition: WindowHelpers.h:46
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
Format
Image colour formats.
Definition: Types.h:54
Class to describe a number of elements in each dimension.
Definition: Steps.h:40
Implementation of a row access pattern.
std::string kernel_name
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor&#39;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.
4 channels, 1 U8 per channel
#define ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(...)
Definition: Validate.h:286
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
Definition: Validate.h:161
Container for valid region of a window.
Definition: Types.h:188
A single plane of 32-bit macro pixel of Y0, U0, Y1, V0 bytes.
Describe a multidimensional execution window.
Definition: Window.h:39
Coordinates anchor
Anchor for the start of the valid region.
Definition: Types.h:260
const std::string & string_from_format(Format format)
Convert a tensor format into a string.
Definition: Utils.cpp:76
#define ARM_COMPUTE_ERROR_ON_CHANNEL_NOT_IN_KNOWN_FORMAT(f, c)
Definition: Validate.h:903

◆ configure() [3/4]

void configure ( const ICLMultiImage input,
Channel  channel,
ICLImage output 
)

Set the input and output of the kernel.

Parameters
[in]inputMulti-planar source image. Formats supported: NV12/NV21/IYUV/YUV444
[in]channelChannel to extract.
[out]outputSingle-planar 2D destination image. Must be of U8 format.

Definition at line 111 of file CLChannelExtractKernel.cpp.

References CLChannelExtractKernel::configure(), and CLKernelLibrary::get().

112 {
113  configure(CLKernelLibrary::get().get_compile_context(), input, channel, output);
114 }
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
void configure(const ICLTensor *input, Channel channel, ICLTensor *output)
Set the input and output of the kernel.

◆ configure() [4/4]

void configure ( const CLCompileContext compile_context,
const ICLMultiImage input,
Channel  channel,
ICLImage output 
)

Set the input and output of the kernel.

Parameters
[in]compile_contextThe compile context to be used.
[in]inputMulti-planar source image. Formats supported: NV12/NV21/IYUV/YUV444
[in]channelChannel to extract.
[out]outputSingle-planar 2D destination image. Must be of U8 format.

Definition at line 116 of file CLChannelExtractKernel.cpp.

References ARM_COMPUTE_ERROR_ON_CHANNEL_NOT_IN_KNOWN_FORMAT, ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN, ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D, ARM_COMPUTE_ERROR_ON_TENSORS_NOT_EVEN, arm_compute::calculate_max_window(), arm_compute::calculate_subsampled_shape(), ICLMultiImage::cl_plane(), arm_compute::create_kernel(), MultiImageInfo::format(), ITensor::info(), IMultiImage::info(), arm_compute::IYUV, kernel_name, arm_compute::NV12, arm_compute::NV21, arm_compute::test::validation::output_shape, arm_compute::plane_idx_from_channel(), arm_compute::set_format_if_unknown(), arm_compute::set_shape_if_empty(), arm_compute::string_from_channel(), arm_compute::string_from_format(), ITensorInfo::tensor_shape(), arm_compute::U8, arm_compute::update_window_and_padding(), ITensorInfo::valid_region(), arm_compute::Y, and arm_compute::YUV444.

117 {
118  ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
120 
122 
123  // Check if channel is valid for given format
124  const Format format = input->info()->format();
126 
127  // Get input plane from the given channel
128  const ICLImage *input_plane = input->cl_plane(plane_idx_from_channel(format, channel));
129  ARM_COMPUTE_ERROR_ON_NULLPTR(input_plane);
130 
131  if(Channel::Y == channel && format != Format::YUV444)
132  {
133  // Check if the width of the tensor shape is even for formats with subsampled channels (UYVY422 and YUYV422)
134  ARM_COMPUTE_ERROR_ON_TENSORS_NOT_EVEN(format, input_plane);
135  }
136 
137  // Calculate 2x2 subsampled tensor shape
138  TensorShape output_shape = calculate_subsampled_shape(input->cl_plane(0)->info()->tensor_shape(), format, channel);
139  set_shape_if_empty(*output->info(), output_shape);
140 
142 
143  // Check if input tensor has a valid format
146 
147  _output = output;
148  _input = input_plane;
149  _subsampling = 1;
150 
151  // Create kernel
152  std::string kernel_name;
153  std::set<std::string> build_opts;
154  if(Channel::Y == channel || Format::IYUV == format || Format::YUV444 == format)
155  {
156  kernel_name = "copy_plane";
157  }
158  else
159  {
160  kernel_name = "channel_extract_" + string_from_format(format);
161  build_opts.insert(("-DCHANNEL_" + string_from_channel(channel)));
162  }
163  _kernel = create_kernel(compile_context, kernel_name, build_opts);
164 
165  // Configure window
166  Window win = calculate_max_window(*input_plane->info(), Steps(_num_elems_processed_per_iteration));
167  AccessWindowHorizontal input_access(input_plane->info(), 0, _num_elems_processed_per_iteration);
168  AccessWindowHorizontal output_access(output->info(), 0, _num_elems_processed_per_iteration);
169 
170  update_window_and_padding(win, input_access, output_access);
171 
172  output_access.set_valid_region(win, input_plane->info()->valid_region());
173 
174  ICLKernel::configure_internal(win);
175 }
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 calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
Shape of a tensor.
Definition: TensorShape.h:39
int plane_idx_from_channel(Format format, Channel channel)
Return the plane index of a given channel given an input format.
Definition: Utils.h:262
TensorShape calculate_subsampled_shape(const TensorShape &shape, Format format, Channel channel=Channel::UNKNOWN)
Calculate subsampled shape for a given format and channel.
Definition: Utils.h:774
#define ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D(t)
Definition: Validate.h:856
const std::string & string_from_channel(Channel channel)
Convert a channel identity into a string.
Definition: Utils.cpp:102
1 channel, 1 U8 per channel
A 2 plane YUV format of Luma (Y) and interleaved UV data at 4:2:0 sampling.
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,...)
Definition: Validate.h:643
A 2 plane YUV format of Luma (Y) and interleaved VU data at 4:2:0 sampling.
virtual ValidRegion valid_region() const =0
Valid region of the tensor.
#define ARM_COMPUTE_ERROR_ON_TENSORS_NOT_EVEN(...)
Definition: Validate.h:318
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.
Definition: CLHelpers.cpp:403
bool update_window_and_padding(Window &win, Ts &&... patterns)
Update window and padding size for each of the access patterns.
Definition: WindowHelpers.h:46
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
Format
Image colour formats.
Definition: Types.h:54
Class to describe a number of elements in each dimension.
Definition: Steps.h:40
Implementation of a row access pattern.
std::string kernel_name
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&#39;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.
virtual const MultiImageInfo * info() const =0
Interface to be implemented by the child class to return the multi-planar image&#39;s metadata...
A 3 plane of 8-bit 4:2:0 sampled Y, U, V planes.
Interface for OpenCL tensor.
Definition: ICLTensor.h:42
#define ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(...)
Definition: Validate.h:286
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
Definition: Validate.h:161
Format format() const
Colour format of the image.
Describe a multidimensional execution window.
Definition: Window.h:39
const std::string & string_from_format(Format format)
Convert a tensor format into a string.
Definition: Utils.cpp:76
#define ARM_COMPUTE_ERROR_ON_CHANNEL_NOT_IN_KNOWN_FORMAT(f, c)
Definition: Validate.h:903

◆ operator=() [1/2]

CLChannelExtractKernel& operator= ( const CLChannelExtractKernel )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ operator=() [2/2]

CLChannelExtractKernel& operator= ( CLChannelExtractKernel &&  )
default

Allow instances of this class to be moved.

◆ run()

void run ( const Window window,
cl::CommandQueue &  queue 
)
overridevirtual

Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue.

Note
The queue is not flushed by this method, and therefore the kernel will not have been executed by the time this method returns.
Parameters
[in]windowRegion on which to execute the kernel. (Must be a valid region of the window returned by window()).
[in,out]queueCommand queue on which to enqueue the kernel.

Reimplemented from ICLKernel.

Definition at line 177 of file CLChannelExtractKernel.cpp.

References ICLKernel::add_2D_tensor_argument(), ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, Window::DimX, Window::DimY, Window::Dimension::end(), arm_compute::enqueue(), Window::first_slice_window_2D(), ICLKernel::lws_hint(), Window::set(), arm_compute::test::validation::reference::slice(), Window::slide_window_slice_2D(), Window::Dimension::start(), Window::Dimension::step(), IKernel::window(), Window::x(), and Window::y().

178 {
181 
183 
184  do
185  {
186  Window win_sub(slice);
187  win_sub.set(Window::DimX, Window::Dimension(win_sub.x().start() / _subsampling, win_sub.x().end() / _subsampling, win_sub.x().step() / _subsampling));
188  win_sub.set(Window::DimY, Window::Dimension(win_sub.y().start() / _subsampling, win_sub.y().end() / _subsampling, 1));
189 
190  unsigned int idx = 0;
191  add_2D_tensor_argument(idx, _input, slice);
192  add_2D_tensor_argument(idx, _output, win_sub);
193  enqueue(queue, *this, slice, lws_hint());
194  }
195  while(window.slide_window_slice_2D(slice));
196 }
Window first_slice_window_2D() const
First 2D slice of the window.
Definition: Window.h:283
const Window & window() const
The maximum window the kernel can be executed on.
Definition: IKernel.cpp:28
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.
Definition: IGCKernel.cpp:41
cl::NDRange lws_hint() const
Return the Local-Workgroup-Size hint.
Definition: ICLKernel.h:276
Describe one of the image&#39;s dimensions with a start, end and step.
Definition: Window.h:77
bool slide_window_slice_2D(Window &slice) const
Slide the passed 2D window slice.
Definition: Window.h:323
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
Definition: Window.h:43
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
Definition: Validate.h:941
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Definition: Window.h:45
void add_2D_tensor_argument(unsigned int &idx, const ICLTensor *tensor, const Window &window)
Add the passed 2D tensor&#39;s parameters to the object&#39;s kernel&#39;s arguments starting from the index idx...
Definition: ICLKernel.h:148
Describe a multidimensional execution window.
Definition: Window.h:39
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
Definition: Validate.h:205
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)

The documentation for this class was generated from the following files: