21.02
|
Basic function to run NEScaleKernel. More...
#include <NEScale.h>
Public Member Functions | |
NEScale () | |
Constructor. More... | |
void | configure (ITensor *input, ITensor *output, const ScaleKernelInfo &info) |
Initialize the function's source, destination, interpolation type and border_mode. More... | |
Public Member Functions inherited from INESimpleFunctionNoBorder | |
INESimpleFunctionNoBorder (IRuntimeContext *ctx=nullptr) | |
Constructor. More... | |
INESimpleFunctionNoBorder (const INESimpleFunctionNoBorder &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
INESimpleFunctionNoBorder (INESimpleFunctionNoBorder &&)=default | |
Default move constructor. More... | |
INESimpleFunctionNoBorder & | operator= (const INESimpleFunctionNoBorder &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
INESimpleFunctionNoBorder & | operator= (INESimpleFunctionNoBorder &&)=default |
Default move assignment operator. More... | |
~INESimpleFunctionNoBorder () | |
Default destructor. More... | |
void | run () override final |
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 ScaleKernelInfo &info) |
Static function to check if given info will lead to a valid configuration of NEScale. More... | |
Basic function to run NEScaleKernel.
NEScale | ( | ) |
void configure | ( | ITensor * | input, |
ITensor * | output, | ||
const ScaleKernelInfo & | info | ||
) |
Initialize the function's source, destination, interpolation type and border_mode.
[in,out] | input | Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/U8/S16/F16/F32. (Written to only for border_mode != UNDEFINED) |
[out] | output | Destination tensor. Data type supported: Same as input . All but the lowest two dimensions must be the same size as in the input tensor, i.e. scaling is only performed within the XY-plane. |
[in] | info | ScaleKernelInfo to be used for configuration |
Definition at line 104 of file NEScale.cpp.
References ScaleKernelInfo::align_corners, TensorAllocator::allocate(), Tensor::allocator(), arm_compute::AREA, ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, arm_compute::BILINEAR, arm_compute::scale_utils::calculate_resize_ratio(), arm_compute::test::validation::data_layout, ScaleKernelInfo::data_layout, ITensorInfo::data_layout(), ITensorInfo::dimension(), arm_compute::F32, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, ITensor::info(), arm_compute::test::validation::info, TensorAllocator::init(), ScaleKernelInfo::interpolation_policy, arm_compute::scale_utils::is_align_corners_allowed_sampling_policy(), arm_compute::NEAREST_NEIGHBOR, arm_compute::S32, ScaleKernelInfo::sampling_policy, arm_compute::test::validation::shape, arm_compute::UNKNOWN, NEScale::validate(), and arm_compute::WIDTH.
Referenced by arm_compute::test::validation::DATA_TEST_CASE().
|
static |
Static function to check if given info will lead to a valid configuration of NEScale.
[in] | input | Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/U8/S16/F16/F32. (Written to only for border_mode != UNDEFINED) |
[in] | output | Destination tensor. Data type supported: Same as input . All but the lowest two dimensions must be the same size as in the input tensor, i.e. scaling is only performed within the XY-plane. |
[in] | info | ScaleKernelInfo to be used for validation |
Definition at line 175 of file NEScale.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::BILINEAR, arm_compute::CENTER, ICloneable< T >::clone(), arm_compute::test::validation::data_layout, ScaleKernelInfo::data_layout, ITensorInfo::data_layout(), ITensorInfo::dimension(), arm_compute::F32, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, arm_compute::test::validation::info, ScaleKernelInfo::interpolation_policy, arm_compute::NEAREST_NEIGHBOR, arm_compute::S32, ScaleKernelInfo::sampling_policy, arm_compute::test::validation::shape, arm_compute::TOP_LEFT, arm_compute::UNKNOWN, NEScaleKernel::validate(), and arm_compute::WIDTH.
Referenced by NEScale::configure(), and arm_compute::test::validation::TEST_CASE().