24.02.1
|
Basic function to pad a tensor. More...
#include <CLPadLayer.h>
Public Member Functions | |
CLPadLayer () | |
Default constructor. More... | |
CLPadLayer (const CLPadLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLPadLayer (CLPadLayer &&)=default | |
Default move constructor. More... | |
CLPadLayer & | operator= (const CLPadLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLPadLayer & | operator= (CLPadLayer &&)=default |
Default move assignment operator. More... | |
~CLPadLayer () | |
Default destructor. More... | |
void | configure (ICLTensor *input, ICLTensor *output, const PaddingList &padding, PixelValue constant_value=PixelValue(), PaddingMode mode=PaddingMode::CONSTANT) |
Initialize the function. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, const PaddingList &padding, PixelValue constant_value=PixelValue(), PaddingMode mode=PaddingMode::CONSTANT) |
Initialize the function. 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 PaddingList &padding, PixelValue constant_value=PixelValue(), PaddingMode mode=PaddingMode::CONSTANT) |
Static function to check if given info will lead to a valid configuration of CLPadLayer. More... | |
Basic function to pad a tensor.
This function calls the following OpenCL functions/kernels:
Definition at line 44 of file CLPadLayer.h.
CLPadLayer | ( | ) |
Default constructor.
Definition at line 31 of file CLPadLayer.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
|
default |
Default destructor.
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
ICLTensor * | output, | ||
const PaddingList & | padding, | ||
PixelValue | constant_value = PixelValue() , |
||
PaddingMode | mode = PaddingMode::CONSTANT |
||
) |
Initialize the function.
[in] | compile_context | The compile context to be used. |
[in] | input | Source tensor. Data types supported: All. |
[out] | output | Output tensor. Data type supported: same as input |
[in] | padding | The padding for each spatial dimension of the input tensor. The pair padding[i] specifies the front and the end padding in the i-th dimension. |
[in] | constant_value | (Optional) Constant value to be used for the padding. |
[in] | mode | (Optional) Controls whether the padding should be filled with constant_value using CONSTANT, or reflect the input, either including the border values (SYMMETRIC) or not (REFLECT). |
Definition at line 43 of file CLPadLayer.cpp.
References ARM_COMPUTE_ERROR_THROW_ON, ARM_COMPUTE_LOG_PARAMS, CLCopy::configure(), ITensor::info(), arm_compute::test::validation::info, arm_compute::test::validation::input, clang_tidy_rules::mode, and CLPadLayer::validate().
void configure | ( | ICLTensor * | input, |
ICLTensor * | output, | ||
const PaddingList & | padding, | ||
PixelValue | constant_value = PixelValue() , |
||
PaddingMode | mode = PaddingMode::CONSTANT |
||
) |
Initialize the function.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
All | All |
[in] | input | Source tensor. Data types supported: All. |
[out] | output | Output tensor. Data type supported: same as input |
[in] | padding | The padding for each spatial dimension of the input tensor. The pair padding[i] specifies the front and the end padding in the i-th dimension. |
[in] | constant_value | (Optional) Constant value to be used for the padding. |
[in] | mode | (Optional) Controls whether the padding should be filled with constant_value using CONSTANT, or reflect the input, either including the border values (SYMMETRIC) or not (REFLECT). |
Definition at line 37 of file CLPadLayer.cpp.
References CLKernelLibrary::get(), arm_compute::test::validation::input, and clang_tidy_rules::mode.
Referenced by CLFFTConvolutionLayer::configure().
|
default |
Default move assignment operator.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 85 of file CLPadLayer.cpp.
References CLScheduler::enqueue(), CLScheduler::get(), and CLCopy::run().
Referenced by CLFFTConvolutionLayer::prepare(), and CLFFTConvolutionLayer::run().
|
static |
Static function to check if given info will lead to a valid configuration of CLPadLayer.
[in] | input | Source tensor info. Data types supported: All. |
[in] | output | Output tensor info. Data type supported: same as input |
[in] | padding | The padding for each spatial dimension of the input tensor. The pair padding[i] specifies the front and the end padding in the i-th dimension. |
[in] | constant_value | (Optional) Constant value to be used for the padding |
[in] | mode | (Optional) Controls whether the padding should be filled with constant_value using CONSTANT, or reflect the input, either including the border values (SYMMETRIC) or not (REFLECT). |
Definition at line 66 of file CLPadLayer.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::test::validation::info, arm_compute::test::validation::input, clang_tidy_rules::mode, CLCopy::validate(), and CLPadLayerKernel::validate().
Referenced by CLPadLayer::configure().