aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/cl_kernels/elementwise_operation_quantized.cl
diff options
context:
space:
mode:
authorgiuros01 <giuseppe.rossini@arm.com>2019-05-14 16:12:53 +0100
committerGiuseppe Rossini <giuseppe.rossini@arm.com>2019-05-24 09:20:27 +0000
commit1e6e1b899c1a88d3466cdc6fd097ccf32ff767e3 (patch)
tree124d00f9b2bd26ddbb5edf8f3bc7102e7494d404 /src/core/CL/cl_kernels/elementwise_operation_quantized.cl
parent048b0f300ee729cac1b3019311589c654771fb8f (diff)
downloadComputeLibrary-1e6e1b899c1a88d3466cdc6fd097ccf32ff767e3.tar.gz
COMPMID-2322: PRELU support in CLActivationLayer
Change-Id: I3aa8d4964a1861c2b8acef59dc863df7c48f3316 Signed-off-by: giuros01 <giuseppe.rossini@arm.com> Reviewed-on: https://review.mlplatform.org/c/1146 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/cl_kernels/elementwise_operation_quantized.cl')
-rw-r--r--src/core/CL/cl_kernels/elementwise_operation_quantized.cl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/CL/cl_kernels/elementwise_operation_quantized.cl b/src/core/CL/cl_kernels/elementwise_operation_quantized.cl
index 1f0533be13..1b45da164f 100644
--- a/src/core/CL/cl_kernels/elementwise_operation_quantized.cl
+++ b/src/core/CL/cl_kernels/elementwise_operation_quantized.cl
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -28,6 +28,7 @@
#define MAX(x, y) max((x), (y))
#define MIN(x, y) min((x), (y))
#define SQUARED_DIFF(x, y) (x - y) * (x - y)
+#define PRELU(x, y) (select(y * x, x, x > (DATA_TYPE_OUT)0))
#define DIV(x, y) (x / y)
#define CONVERT_RTE(x, type) (convert_##type##_rte((x)))