21.05
CLStridedSlice Class Reference

Basic function to run CLStridedSliceKernel. More...

#include <CLStridedSlice.h>

Collaboration diagram for CLStridedSlice:
[legend]

## Public Member Functions

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. More...

Public Member Functions inherited from ICLOperator
ICLOperator (IRuntimeContext *ctx=nullptr)
Constructor. More...

ICLOperator (const ICLOperator &)=delete
Prevent instances of this class from being copied (As this class contains pointers) More...

ICLOperator (ICLOperator &&)=default
Default move constructor. More...

ICLOperatoroperator= (const ICLOperator &)=delete
Prevent instances of this class from being copied (As this class contains pointers) More...

ICLOperatoroperator= (ICLOperator &&)=default
Default move assignment operator. More...

void run (ITensorPack &tensors) override
Run the kernels contained in the function. More...

void prepare (ITensorPack &constants) override
Prepare the function for executing. More...

MemoryRequirements workspace () const override
Return the memory requirements required by the workspace. More...

Public Member Functions inherited from IOperator
virtual ~IOperator ()=default
Destructor. More...

## Static Public Member Functions

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. More...

## Detailed Description

Basic function to run CLStridedSliceKernel.

Definition at line 128 of file CLStridedSlice.h.

## ◆ configure()

 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.

Note
Supported tensor rank: up to 4
Parameters
 [in] compile_context The compile context to be used. [in] input Source tensor info. Data type supported: All. [out] output Destination tensor info. Data type supported: Same as input [in] starts The starts of the dimensions of the input tensor to be sliced. The length must be of rank(input). [in] ends The ends of the dimensions of the input tensor to be sliced. The length must be of rank(input). [in] strides The strides of the dimensions of the input tensor to be sliced. The length must be of rank(input). [in] begin_mask (Optional) If the ith bit of begin_mask is set, starts[i] is ignored and the fullest possible range in that dimension is used instead. [in] end_mask (Optional) If the ith bit of end_mask is set, ends[i] is ignored and the fullest possible range in that dimension is used instead. [in] shrink_axis_mask (Optional) If the ith bit of shrink_axis_mask is set, it implies that the ith specification shrinks the dimensionality by 1. A slice of size 1 starting from starts[i] in the dimension must be preserved.

Definition at line 34 of file CLStridedSlice.cpp.

37 {
38  auto k = std::make_unique<CLStridedSliceKernel>();
40  _kernel = std::move(k);
41 }

References arm_compute::test::validation::input.

## ◆ validate()

 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

Static function to check if given info will lead to a valid configuration of CLStridedSlice.

Note
Supported tensor rank: up to 4
Parameters
 [in] input Source tensor info. Data type supported: All. [in] output Destination tensor info. Data type supported: Same as input [in] starts The starts of the dimensions of the input tensor to be sliced. The length must be of rank(input). [in] ends The ends of the dimensions of the input tensor to be sliced. The length must be of rank(input). [in] strides The strides of the dimensions of the input tensor to be sliced. The length must be of rank(input). [in] begin_mask (Optional) If the ith bit of begin_mask is set, starts[i] is ignored and the fullest possible range in that dimension is used instead. [in] end_mask (Optional) If the ith bit of end_mask is set, ends[i] is ignored and the fullest possible range in that dimension is used instead. [in] shrink_axis_mask (Optional) If the ith bit of shrink_axis_mask is set, it implies that the ith specification shrinks the dimensionality by 1. A slice of size 1 starting from starts[i] in the dimension must be preserved.

Definition at line 43 of file CLStridedSlice.cpp.

46 {