24.02.1
|
Basic function to stack tensors along an axis. More...
#include <CLStackLayer.h>
Public Member Functions | |
CLStackLayer () | |
Default constructor. More... | |
CLStackLayer (const CLStackLayer &)=delete | |
Prevent instances of this class from being copied. More... | |
CLStackLayer & | operator= (const CLStackLayer &)=delete |
Prevent instances of this class from being copied. More... | |
CLStackLayer (CLStackLayer &&)=delete | |
Prevent instances of this class to be moved. More... | |
CLStackLayer & | operator= (CLStackLayer &&)=delete |
Prevent instances of this class to be moved. More... | |
~CLStackLayer () | |
Default destructor. More... | |
void | configure (const std::vector< ICLTensor * > &input, int axis, ICLTensor *output) |
Initialise the kernel's inputs vector and output. More... | |
void | configure (const CLCompileContext &compile_context, const std::vector< ICLTensor * > &input, int axis, ICLTensor *output) |
Initialise the kernel's inputs vector and output. 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 std::vector< ITensorInfo * > &input, int axis, const ITensorInfo *output) |
Static function to check if given info will lead to a valid configuration of CLStackLayerKernel. More... | |
Basic function to stack tensors along an axis.
This function calls the following kernel:
Definition at line 45 of file CLStackLayer.h.
CLStackLayer | ( | ) |
Default constructor.
Definition at line 41 of file CLStackLayer.cpp.
|
delete |
Prevent instances of this class from being copied.
|
delete |
Prevent instances of this class to be moved.
|
default |
Default destructor.
void configure | ( | const CLCompileContext & | compile_context, |
const std::vector< ICLTensor * > & | input, | ||
int | axis, | ||
ICLTensor * | output | ||
) |
Initialise the kernel's inputs vector and output.
[in] | compile_context | The compile context to be used. |
[in] | input | The vectors containing all the tensors with the same shape to stack. Data types supported: All. |
[in] | axis | The dimension to stack the tensors along. It must be smaller than the number of input dimensions. Negative values wrap around |
[out] | output | Output tensor. Data types supported: Same as input . |
Definition at line 53 of file CLStackLayer.cpp.
References ARM_COMPUTE_LOG_PARAMS, arm_compute::test::validation::info, arm_compute::test::validation::input, and arm_compute::wrap_around().
Initialise the kernel's inputs vector and output.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
All | All |
[in] | input | The vectors containing all the tensors with the same shape to stack. Data types supported: All. |
[in] | axis | The dimension to stack the tensors along. It must be smaller than the number of input dimensions. Negative values wrap around |
[out] | output | Output tensor. Data types supported: Same as input . |
Definition at line 48 of file CLStackLayer.cpp.
References CLKernelLibrary::get(), and arm_compute::test::validation::input.
|
delete |
Prevent instances of this class to be moved.
|
delete |
Prevent instances of this class from being copied.
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 94 of file CLStackLayer.cpp.
References CLScheduler::enqueue(), and CLScheduler::get().
|
static |
Static function to check if given info will lead to a valid configuration of CLStackLayerKernel.
[in] | input | The vectors containing all the tensors info with the same shape to stack. Data types supported: All. |
[in] | axis | The dimension to stack the tensors along. It must be smaller than the number of input dimensions. Negative values wrap around |
[in] | output | Output tensor info. Data types supported: Same as input . |
Definition at line 72 of file CLStackLayer.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::test::validation::input, CLStackLayerKernel::validate(), and arm_compute::wrap_around().