24.02.1
|
Basic function to run cpu::kernels::CpuCastKernel. More...
#include <NECast.h>
Public Member Functions | |
NECast () | |
Constructor. More... | |
~NECast () | |
Destructor. More... | |
NECast (const NECast &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NECast (NECast &&) | |
Default move constructor. More... | |
NECast & | operator= (const NECast &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NECast & | operator= (NECast &&) |
Default move assignment operator. More... | |
void | configure (ITensor *input, ITensor *output, ConvertPolicy policy) |
Initialize the function's source, destination. 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, ConvertPolicy policy) |
Static function to check if given info will lead to a valid configuration of NECast. More... | |
Basic function to run cpu::kernels::CpuCastKernel.
This function ignores the scale and zeroPoint of quanized tensors,so QASYMM8 input is treated as uint8 values.
NECast | ( | ) |
Constructor.
Definition at line 40 of file NECast.cpp.
|
default |
Destructor.
Prevent instances of this class from being copied (As this class contains pointers)
void configure | ( | ITensor * | input, |
ITensor * | output, | ||
ConvertPolicy | policy | ||
) |
Initialize the function's source, destination.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
QASYMM8_SIGNED | S16, S32, F32, F16 |
QASYMM8 | U16, S16, S32, F32, F16 |
U8 | U16, S16, S32, F32, F16 |
U16 | U8, U32 |
S16 | QASYMM8_SIGNED, U8, S32 |
F16 | QASYMM8_SIGNED, QASYMM8, F32, S32, U8 |
S32 | QASYMM8_SIGNED, QASYMM8, F16, F32, U8 |
F32 | QASYMM8_SIGNED, QASYMM8, BFLOAT16, F16, S32, U8 |
Input data type must be different than output data type.
[in] | input | The input tensor to convert. Data types supported: QASYMM8_SIGNED/QASYMM8/U8/U16/S16/F16/S32/F32. |
[out] | output | The output tensor. Data types supported: QASYMM8_SIGNED/QASYMM8/U8/S8/U16/S16/U32/S32/BFLOAT16/F16/F32. |
[in] | policy | Conversion policy. |
Definition at line 47 of file NECast.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_LOG_PARAMS, and arm_compute::test::validation::input.
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 63 of file NECast.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, and arm_compute::test::validation::pack.
|
static |
Static function to check if given info will lead to a valid configuration of NECast.
[in] | input | Source tensor info. Data types supported: QASYMM8_SIGNED/QASYMM8/U8/U16/S16/F16/S32/F32. |
[in] | output | Destination tensor info. Data type supported: QASYMM8_SIGNED/QASYMM8/U8/S8/U16/S16/U32/S32/BFLOAT16/F16/F32. |
[in] | policy | Conversion policy. |
Definition at line 58 of file NECast.cpp.
References arm_compute::test::validation::input, and CpuCast::validate().