aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-05-17 14:04:47 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-05-20 11:47:29 +0000
commit0af4418f4d4b6bceaea64fa21eaf127b1b8fed35 (patch)
treee8bb9a755182419752e014aecdef2bfc78ed0f0a /arm_compute
parent3db1ba9938986e7096184ad22020a71775075d03 (diff)
downloadComputeLibrary-0af4418f4d4b6bceaea64fa21eaf127b1b8fed35.tar.gz
COMPMID-2282: Implement SIN operator for CL
Change-Id: I9f67d2b0ccfddaecb0f26bab2b04b87212495502 Reviewed-on: https://review.mlplatform.org/c/1156 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/Types.h1
-rw-r--r--arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h20
2 files changed, 21 insertions, 0 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 382b7f4abe..8e0173c492 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -582,6 +582,7 @@ enum class ElementWiseUnary
NEG, /**< Negate */
LOG, /**< Natural Logarithm */
ABS, /**< Absolute value */
+ SIN, /**< Sine */
};
/** The normalization type used for the normalization layer */
diff --git a/arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h b/arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h
index a2012ab054..7b5a0c155a 100644
--- a/arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h
+++ b/arm_compute/runtime/CL/functions/CLElementWiseUnaryLayer.h
@@ -89,5 +89,25 @@ public:
*/
static Status validate(const ITensorInfo *input, const ITensorInfo *output);
};
+
+/** Basic function to calculate sine of an input tensor. */
+class CLSinLayer : public ICLSimpleFunction
+{
+public:
+ /** Initialize the function
+ *
+ * @param[in] input Input tensor. Data types supported: F16/F32.
+ * @param[out] output Output tensor. Data types supported: same as @p input.
+ */
+ void configure(const ICLTensor *input, ICLTensor *output);
+ /** Static function to check if given info will lead to a valid configuration of @ref CLSinLayer
+ *
+ * @param[in] input First tensor input info. Data types supported: F16/F32.
+ * @param[in] output Output tensor info. Data types supported: Same as @p input.
+ *
+ * @return a status
+ */
+ static Status validate(const ITensorInfo *input, const ITensorInfo *output);
+};
} // namespace arm_compute
#endif /* __ARM_COMPUTE_CLELEMENTWISEUNARYLAYER_H__ */