24.02.1
|
Basic function to compute Scale. More...
#include <NEScale.h>
Public Member Functions | |
NEScale () | |
Constructor. More... | |
NEScale (const NEScale &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEScale (NEScale &&)=delete | |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
NEScale & | operator= (const NEScale &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEScale & | operator= (NEScale &&)=delete |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
~NEScale () | |
Destructor. More... | |
void | configure (ITensor *input, ITensor *output, const ScaleKernelInfo &info) |
Initialize the function's source, destination, interpolation type and border_mode. 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 ScaleKernelInfo &info) |
Static function to check if given info will lead to a valid configuration of NEScale. More... | |
NEScale | ( | ) |
Constructor.
Definition at line 45 of file NEScale.cpp.
Prevent instances of this class from being copied (As this class contains pointers)
Prevent instances of this class from being moved (As this class contains non movable objects)
|
default |
Destructor.
void configure | ( | ITensor * | input, |
ITensor * | output, | ||
const ScaleKernelInfo & | info | ||
) |
Initialize the function's source, destination, interpolation type and border_mode.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
QASYMM8 | QASYMM8 |
QASYMM8_SIGNED | QASYMM8_SIGNED |
F16 | F16 |
F32 | F32 |
U8 | U8 |
S8 | S8 |
S16 | S16 |
[in,out] | input | Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/U8/S8/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 |
border_mode
Replicate, and policy
Bilinear Definition at line 50 of file NEScale.cpp.
References ScaleKernelInfo::align_corners, arm_compute::AREA, ARM_COMPUTE_ERROR, ARM_COMPUTE_LOG_PARAMS, arm_compute::BILINEAR, ScaleKernelInfo::border_mode, arm_compute::scale_utils::calculate_resize_ratio(), arm_compute::cpu::data_layout, ScaleKernelInfo::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, arm_compute::test::validation::input, ScaleKernelInfo::interpolation_policy, arm_compute::scale_utils::is_align_corners_allowed_sampling_policy(), arm_compute::scale_utils::is_precomputation_required(), arm_compute::NEAREST_NEIGHBOR, arm_compute::S32, ScaleKernelInfo::sampling_policy, arm_compute::test::validation::shape, arm_compute::UNKNOWN, and arm_compute::WIDTH.
Prevent instances of this class from being copied (As this class contains pointers)
Prevent instances of this class from being moved (As this class contains non movable objects)
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 134 of file NEScale.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_INT_0, arm_compute::ACL_INT_1, arm_compute::ACL_INT_2, arm_compute::ACL_SRC, ITensorPack::add_tensor(), and arm_compute::test::validation::pack.
|
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/S8/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 129 of file NEScale.cpp.
References arm_compute::test::validation::info, arm_compute::test::validation::input, and CpuScale::validate().
Referenced by arm_compute::test::validation::TEST_CASE().