43 : _input(nullptr), _lws(gles::NDRange(1
U, 1
U, 1
U)), _left_padding(0)
53 std::set<std::string> options;
60 options.emplace((
"#define " + dt_name));
65 kernel_name <<
"tensorshift";
76 IGCKernel::configure(win);
101 _kernel.set_argument(idx++, static_cast<unsigned int>(_left_padding));
103 _kernel.update_shader_params();
const Window & window() const
The maximum window the kernel can be executed on.
void add_3D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window)
Add the passed 3D tensor's parameters to the object's kernel's arguments starting from the index idx...
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.
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
void shift(size_t dimension, int shift_value)
Shift the values of a given dimension by the given shift_value.
std::string to_string(T &&value)
Convert integer and float values to string.
virtual DataType data_type() const =0
Data type used for each element of the tensor.
1 channel, 1 F32 per channel
Interface for GLES Compute tensor.
Describe one of the image's dimensions with a start, end and step.
void use_tensor_dimensions(const TensorShape &shape, size_t first_dimension=Window::DimX)
Use the tensor's dimensions to fill the window dimensions.
Copyright (c) 2017-2021 Arm Limited.
1 channel, 1 F16 per channel
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
Manages all the GLES kernels compilation and caching, provides accessors for the GLES Context...
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
virtual PaddingSize padding() const =0
Padding of tensor.
bool needs_shifting() const
Flag indicating whether the tensor has been left aligned by a kernel and therefore needs shifting...
unsigned int left
left of the border
bool slide_window_slice_3D(Window &slice) const
Slide the passed 3D window slice.
unsigned int right
right of the border
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
GCTensorShiftKernel()
Default constructor.
#define ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
void run(const Window &window) override
Enqueue the OpenGL ES shader to process the given window.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
static GCKernelLibrary & get()
Get the static instance of GCKernelLibrary.
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
GCKernel create_kernel(const std::string &shader_name, const StringSet &build_options_set={}) const
Creates a kernel from the kernel library.
Window first_slice_window_3D() const
First 3D slice of the window.
Describe a multidimensional execution window.
void configure(IGCTensor *input)
Set the input of the kernel.
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)