21.02
|
Basic function to unpack a rank-R tensor into rank-(R-1) tensors. More...
#include <CLUnstack.h>
Public Member Functions | |
CLUnstack () | |
Default constructor. More... | |
void | configure (const ICLTensor *input, const std::vector< ICLTensor *> &output_vector, int axis) |
Set the input, output and unstacking axis. More... | |
void | configure (const CLCompileContext &compile_context, const ICLTensor *input, const std::vector< ICLTensor *> &output_vector, int axis) |
Set the input, output and unstacking axis. 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 std::vector< ITensorInfo *> &output_vector, int axis) |
Static function to check if given info will lead to a valid configuration of CLUnstack. More... | |
Basic function to unpack a rank-R tensor into rank-(R-1) tensors.
This function calls the following functions:
Definition at line 44 of file CLUnstack.h.
CLUnstack | ( | ) |
Default constructor.
Definition at line 56 of file CLUnstack.cpp.
void configure | ( | const ICLTensor * | input, |
const std::vector< ICLTensor *> & | output_vector, | ||
int | axis | ||
) |
Set the input, output and unstacking axis.
[in] | input | A tensor to be unstacked. Data type supported: All. |
[in,out] | output_vector | A vector of tensors. Data types supported: same as input . Note: The number of elements of the vector will be used as the number of slices to be taken from the axis. |
[in] | axis | The axis to unstack along. Valid values are [-R,R) where R is the input's rank. Negative values wrap around. |
Definition at line 62 of file CLUnstack.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
const ICLTensor * | input, | ||
const std::vector< ICLTensor *> & | output_vector, | ||
int | axis | ||
) |
Set the input, output and unstacking axis.
[in] | compile_context | The compile context to be used. |
[in] | input | A tensor to be unstacked. Data type supported: All. |
[in,out] | output_vector | A vector of tensors. Data types supported: same as input . Note: The number of elements of the vector will be used as the number of slices to be taken from the axis. |
[in] | axis | The axis to unstack along. Valid values are [-R,R) where R is the input's rank. Negative values wrap around. |
Definition at line 67 of file CLUnstack.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, ITensorInfo::dimension(), ITensor::info(), Dimensions< T >::num_dimensions(), Dimensions< T >::set(), arm_compute::test::validation::reference::slice(), tf_frozen_model_extractor::t, ITensorInfo::tensor_shape(), and CLUnstack::validate().
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 115 of file CLUnstack.cpp.
|
static |
Static function to check if given info will lead to a valid configuration of CLUnstack.
[in] | input | Input tensor info. Data type supported: All. |
[in] | output_vector | Vector of output tensors' info. Data types supported: same as input . |
[in] | axis | The axis to unstack along. Valid values are [-R,R) where R is the input's rank. Negative values wrap around. |
Definition at line 95 of file CLUnstack.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, ITensorInfo::dimension(), Dimensions< T >::num_dimensions(), Dimensions< T >::set(), ITensorInfo::tensor_shape(), and CLStridedSlice::validate().
Referenced by CLUnstack::configure(), and arm_compute::test::validation::DATA_TEST_CASE().