24.02.1
|
Go to the documentation of this file.
35 namespace experimental
49 auto k = std::make_unique<CLStridedSliceKernel>();
50 k->configure(compile_context,
input, output, starts, ends,
BiStrides(), 0, slice_end_mask, 0);
51 _kernel = std::move(k);
75 ICLTensor *
dst{
nullptr};
76 std::unique_ptr<experimental::CLSlice> op{
nullptr};
107 _impl->op = std::make_unique<experimental::CLSlice>();
108 _impl->op->configure(compile_context,
input->info(), output->
info(), starts, ends);
116 _impl->op->run(
pack);
SimpleTensor< float > src
void configure(const CLCompileContext &compile_context, const ITensorInfo *input, ITensorInfo *output, const Coordinates &starts, const Coordinates &ends)
Configure kernel.
Coordinates BiStrides
Bidirectional strides.
Interface for OpenCL tensor.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const Coordinates &starts, const Coordinates &ends, const BiStrides &strides, int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
Static function to check if given info will lead to a valid configuration of CLStridedSliceKernel.
~CLSlice()
Default Destructor.
Basic function to perform tensor slicing.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
void configure(const ICLTensor *input, ICLTensor *output, const Coordinates &starts, const Coordinates &ends)
Configure kernel.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const Coordinates &starts, const Coordinates &ends)
Static function to check if given info will lead to a valid configuration of CLSlice.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const Coordinates &starts, const Coordinates &ends)
Static function to check if given info will lead to a valid configuration of CLSlice.
CLSlice & operator=(const CLSlice &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
void run() override
Run the kernels contained in the function.
std::array< T, num_max_dimensions >::const_iterator cbegin() const
Returns a read-only (constant) iterator that points to the first element in the dimension array.
Copyright (c) 2017-2024 Arm Limited.
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
Store the tensor's metadata.
CLSlice()
Default Constructor.
#define ARM_COMPUTE_LOG_PARAMS(...)
unsigned int num_dimensions() const
Returns the effective dimensionality of the tensor.