32 namespace experimental
36 int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
38 auto k = std::make_unique<CLStridedSliceKernel>();
39 k->configure(compile_context, input, output, starts, ends, strides, begin_mask, end_mask, shrink_axis_mask);
40 _kernel = std::move(k);
45 int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
51 struct CLStridedSlice::Impl
56 std::unique_ptr<experimental::CLStridedSlice> op{
nullptr };
60 : _impl(
std::make_unique<Impl>())
71 int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
78 int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
85 _impl->op = std::make_unique<experimental::CLStridedSlice>();
86 _impl->op->configure(compile_context, _impl->src->info(), _impl->dst->info(), starts, ends, strides, begin_mask, end_mask, shrink_axis_mask);
91 int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
101 _impl->op->run(pack);
~CLStridedSlice()
Destructor.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const Coordinates &starts, const Coordinates &ends, const BiStrides &strides, int32_t begin_mask=0, int32_t end_mask=0, int32_t shrink_axis_mask=0)
Static function to check if given info will lead to a valid configuration of CLStridedSlice.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
SimpleTensor< float > src
Copyright (c) 2017-2021 Arm Limited.
CLStridedSlice(CLRuntimeContext *ctx=nullptr)
Constructor.
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.
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const Coordinates &starts, const Coordinates &ends, const BiStrides &strides, int32_t begin_mask=0, int32_t end_mask=0, int32_t shrink_axis_mask=0)
Static function to check if given info will lead to a valid configuration of CLStridedSlice.
Basic function to run CLStridedSliceKernel.
void configure(const CLCompileContext &compile_context, const ITensorInfo *input, ITensorInfo *output, const Coordinates &starts, const Coordinates &ends, const BiStrides &strides, int32_t begin_mask=0, int32_t end_mask=0, int32_t shrink_axis_mask=0)
Configure kernel.
CLStridedSlice & operator=(const CLStridedSlice &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
Interface for OpenCL tensor.
void run() override
Run the kernels contained in the function.
void configure(const ICLTensor *input, ICLTensor *output, const Coordinates &starts, const Coordinates &ends, const BiStrides &strides, int32_t begin_mask=0, int32_t end_mask=0, int32_t shrink_axis_mask=0)
Configure kernel.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.