21.02
|
Basic function to run CLStridedSliceKernel. More...
#include <CLStridedSlice.h>
Public Member Functions | |
CLStridedSlice (CLRuntimeContext *ctx=nullptr) | |
Constructor. More... | |
~CLStridedSlice () | |
Destructor. More... | |
CLStridedSlice (const CLStridedSlice &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLStridedSlice (CLStridedSlice &&) | |
Default move constructor. More... | |
CLStridedSlice & | operator= (const CLStridedSlice &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLStridedSlice & | operator= (CLStridedSlice &&) |
Default move assignment operator. More... | |
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... | |
void | configure (const CLCompileContext &compile_context, 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... | |
void | run () override |
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... | |
Basic function to run CLStridedSliceKernel.
Definition at line 37 of file CLStridedSlice.h.
CLStridedSlice | ( | CLRuntimeContext * | ctx = nullptr | ) |
Constructor.
[in] | ctx | Runtime context to be used by the function |
Definition at line 59 of file CLStridedSlice.cpp.
References CLStridedSlice::operator=(), and CLStridedSlice::~CLStridedSlice().
|
default |
Destructor.
Referenced by CLStridedSlice::CLStridedSlice().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
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.
[in] | input | Source tensor. Data type supported: All. |
[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 69 of file CLStridedSlice.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
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.
[in] | compile_context | The compile context to be used. |
[in] | input | Source tensor. Data type supported: All. |
[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 76 of file CLStridedSlice.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, and arm_compute::test::validation::input.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
Referenced by CLStridedSlice::CLStridedSlice().
|
default |
Default move assignment operator.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 96 of file CLStridedSlice.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, and ITensorPack::add_tensor().
|
static |
Static function to check if given info will lead to a valid configuration of CLStridedSlice.
[in] | input | Source tensor. Data type supported: All. |
[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 89 of file CLStridedSlice.cpp.
References CLStridedSlice::validate().
Referenced by arm_compute::test::validation::DATA_TEST_CASE(), and CLUnstack::validate().