23.05
|
Basic function to perform tensor slicing. More...
#include <CLSlice.h>
Public Member Functions | |
void | configure (const CLCompileContext &compile_context, const ITensorInfo *input, ITensorInfo *output, const Coordinates &starts, const Coordinates &ends) |
Configure kernel. More... | |
![]() | |
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... | |
ICLOperator & | operator= (const ICLOperator &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLOperator & | operator= (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... | |
![]() | |
virtual | ~IOperator ()=default |
Destructor. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *output, const Coordinates &starts, const Coordinates &ends) |
Static function to check if given info will lead to a valid configuration of CLSlice. More... | |
void configure | ( | const CLCompileContext & | compile_context, |
const ITensorInfo * | input, | ||
ITensorInfo * | output, | ||
const Coordinates & | starts, | ||
const Coordinates & | ends | ||
) |
Configure kernel.
[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). |
Definition at line 37 of file CLSlice.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_LOG_PARAMS, arm_compute::helpers::tensor_transform::construct_slice_end_mask(), and arm_compute::test::validation::k.
|
static |
Static function to check if given info will lead to a valid configuration of CLSlice.
[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). |
Definition at line 50 of file CLSlice.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, Dimensions< T >::cbegin(), arm_compute::helpers::tensor_transform::construct_slice_end_mask(), arm_compute::test::validation::dst, Dimensions< T >::num_dimensions(), arm_compute::test::validation::src, and CLStridedSliceKernel::validate().
Referenced by CLSlice::validate().