19.08
NEStridedSlice Class Reference

Basic function to run NEStridedSliceKernel. More...

#include <NEStridedSlice.h>

Collaboration diagram for NEStridedSlice:
[legend]

## Public Member Functions

void configure (const ITensor *input, ITensor *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 INESimpleFunction
INESimpleFunction ()
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 NEStridedSlice. More...

## Detailed Description

Basic function to run NEStridedSliceKernel.

Definition at line 35 of file NEStridedSlice.h.

## ◆ configure()

 void configure ( const ITensor * input, ITensor * 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/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 NEStridedSlice.cpp.

35 {
36  auto k = arm_compute::support::cpp14::make_unique<NEStridedSliceKernel>();
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 NEStridedSlice.

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

44 {