19.08
CLStridedSlice Class Reference

Basic function to run CLStridedSliceKernel. More...

#include <CLStridedSlice.h>

Collaboration diagram for CLStridedSlice:
[legend]

## Public Member Functions

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

Public Member Functions inherited from ICLSimpleFunction
ICLSimpleFunction ()
Default constructor. More...

void run () override final
Run the kernels contained in the function. More...

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

virtual void prepare ()
Prepare the function for executing. 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 35 of file CLStridedSlice.h.

## ◆ configure()

 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.

Note
Supported tensor rank: up to 4
Parameters
 [in] input Source tensor. Data type supported: U8/S8/QASYMM8/U16/S16/QSYMM16/U32/S32/F16/F32 [out] output Destination tensor. 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 32 of file CLStridedSlice.cpp.

35 {
36  auto k = arm_compute::support::cpp14::make_unique<CLStridedSliceKernel>();
38  _kernel = std::move(k);
39 }

## ◆ 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. Data type supported: U8/S8/QASYMM8/U16/S16/QSYMM16/U32/S32/F16/F32 [in] output Destination tensor. 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 41 of file CLStridedSlice.cpp.

44 {
45  return CLStridedSliceKernel::validate(input, output, starts, ends, strides, begin_mask, end_mask, shrink_axis_mask);
46 }
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.

References CLStridedSliceKernel::validate().

Referenced by CLUnstack::validate().

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