Basic function to run @ref opencl::kernels::ClMulKernel */
| 36 | { |
| 37 | /** Basic function to run @ref opencl::kernels::ClMulKernel */ |
| 38 | class ClMul : public IClOperator |
| 39 | { |
| 40 | public: |
| 41 | /** Initialise the kernel's sources, dst and convertion policy. |
| 42 | * |
| 43 | * Valid configurations (src1,src2) -> Output : |
| 44 | * |
| 45 | * - (U8,U8) -> U8 |
| 46 | * - (U8,U8) -> S16 |
| 47 | * - (U8,S16) -> S16 |
| 48 | * - (S16,U8) -> S16 |
| 49 | * - (S16,S16) -> S16 |
| 50 | * - (F16,F16) -> F16 |
| 51 | * - (F32,F32) -> F32 |
| 52 | * - (QASYMM8,QASYMM8) -> QASYMM8 |
| 53 | * - (QASYMM8_SIGNED,QASYMM8_SIGNED) -> QASYMM8_SIGNED |
| 54 | * - (QSYMM16,QSYMM16) -> QSYMM16 |
| 55 | * - (QSYMM16,QSYMM16) -> S32 |
| 56 | * |
| 57 | * @param[in] compile_context The compile context to be used. |
| 58 | * @param[in, out] src1 An src tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. |
| 59 | * The src tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0. |
| 60 | * @param[in, out] src2 An src tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. |
| 61 | * The src tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0. |
| 62 | * @param[out] dst The dst tensor info. Data types supported: U8/QASYMM8/QASYMM8_SIGNED/S16/QSYMM16/F16/F32. |
| 63 | * @param[in] scale Scale to apply after multiplication. |
| 64 | * Scale must be positive and its value must be either 1/255 or 1/2^n where n is between 0 and 15. |
| 65 | * @param[in] overflow_policy Overflow policy. Supported overflow policies: Wrap, Saturate |
| 66 | * @param[in] rounding_policy Rounding policy. Supported rounding modes: to zero, to nearest even. |
| 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 | float scale, |
| 74 | ConvertPolicy overflow_policy, |
| 75 | RoundingPolicy rounding_policy, |
| 76 | const ActivationLayerInfo &act_info = ActivationLayerInfo()); |
| 77 | /** Static function to check if given info will lead to a valid configuration |
| 78 | * |
| 79 | * Similar to @ref ClMul::configure() |
| 80 | * |
| 81 | * @return a status |
| 82 | */ |
| 83 | static Status validate(const ITensorInfo *src1, |
| 84 | const ITensorInfo *src2, |
| 85 | const ITensorInfo *dst, |
| 86 | float scale, |
| 87 | ConvertPolicy overflow_policy, |
| 88 | RoundingPolicy rounding_policy, |
| 89 | const ActivationLayerInfo &act_info = ActivationLayerInfo()); |
| 90 | }; |
| 91 | |
| 92 | /** Basic function to run @ref opencl::kernels::ClComplexMulKernel */ |
| 93 | class ClComplexMul : public IClOperator |
nothing calls this directly
no test coverage detected