Basic function to run arithmetic subtraction * * @note The tensor data type for the inputs must be U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. * @note The function performs an arithmetic subtraction between two tensors. */
| 39 | * @note The function performs an arithmetic subtraction between two tensors. |
| 40 | */ |
| 41 | class ClSub : public IClOperator |
| 42 | { |
| 43 | public: |
| 44 | /** Configure function for a given list of arguments. |
| 45 | * |
| 46 | * Valid configurations (src1,src2) -> dst : |
| 47 | * |
| 48 | * - (U8,U8) -> U8 |
| 49 | * - (U8,U8) -> S16 |
| 50 | * - (S16,U8) -> S16 |
| 51 | * - (U8,S16) -> S16 |
| 52 | * - (S16,S16) -> S16 |
| 53 | * - (S32,S32) -> S32 |
| 54 | * - (F16,F16) -> F16 |
| 55 | * - (F32,F32) -> F32 |
| 56 | * - (QASYMM8,QASYMM8) -> QASYMM8 |
| 57 | * - (QASYMM8_SIGNED,QASYMM8_SIGNED) -> QASYMM8_SIGNED |
| 58 | * - (QSYMM16,QSYMM16) -> QSYMM16 |
| 59 | * |
| 60 | * @param[in] compile_context The compile context to be used. |
| 61 | * @param[in, out] src1 First source tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. |
| 62 | * The source tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0. |
| 63 | * @param[in, out] src2 Second source tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. |
| 64 | * The source tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0. |
| 65 | * @param[out] dst Destination tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/S32/F16/F32. |
| 66 | * @param[in] policy Policy to use to handle overflow. |
| 67 | * @param[in] act_info (Optional) Activation layer information in case of a fused activation. |
| 68 | */ |
| 69 | void configure(const ClCompileContext &compile_context, |
| 70 | ITensorInfo *src1, |
| 71 | ITensorInfo *src2, |
| 72 | ITensorInfo *dst, |
| 73 | ConvertPolicy policy, |
| 74 | const ActivationLayerInfo &act_info = ActivationLayerInfo()); |
| 75 | /** Static function to check if given info will lead to a valid configuration |
| 76 | * |
| 77 | * Similar to @ref ClSub::configure() |
| 78 | * |
| 79 | * @return a status |
| 80 | */ |
| 81 | static Status validate(const ITensorInfo *src1, |
| 82 | const ITensorInfo *src2, |
| 83 | const ITensorInfo *dst, |
| 84 | ConvertPolicy policy, |
| 85 | const ActivationLayerInfo &act_info = ActivationLayerInfo()); |
| 86 | }; |
| 87 | } // namespace opencl |
| 88 | } // namespace arm_compute |
| 89 | #endif /* ARM_COMPUTE_CL_SUB_H */ |
nothing calls this directly
no test coverage detected