aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/cl_kernels
diff options
context:
space:
mode:
authorSang-Hoon Park <sang-hoon.park@arm.com>2020-11-18 13:52:11 +0000
committerSang-Hoon Park <sang-hoon.park@arm.com>2020-11-27 10:17:13 +0000
commit2dbc586417d5a36fcc0aca97267388466f7fff6e (patch)
tree4b480123678ee9767d4ab618e91ef032d7c669b0 /src/core/CL/cl_kernels
parentc90fcfe90721ecc4cf1045b60bf1c933cb4823f6 (diff)
downloadComputeLibrary-2dbc586417d5a36fcc0aca97267388466f7fff6e.tar.gz
COMPMID-3961: Cleaning up logical operators on OpenCL
Change-Id: I04cd23e9abcb1828e54cd59fee3bfa95a6dea3fb Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4461 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-by: Manuel Bottini <manuel.bottini@arm.com>
Diffstat (limited to 'src/core/CL/cl_kernels')
-rw-r--r--src/core/CL/cl_kernels/elementwise_operation.cl6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/CL/cl_kernels/elementwise_operation.cl b/src/core/CL/cl_kernels/elementwise_operation.cl
index ea25082a6c..f38f6202ad 100644
--- a/src/core/CL/cl_kernels/elementwise_operation.cl
+++ b/src/core/CL/cl_kernels/elementwise_operation.cl
@@ -23,6 +23,8 @@
*/
#include "helpers.h"
+#if defined(OP) && defined(VEC_SIZE_IN1) && defined(VEC_SIZE_IN2) && defined(VEC_SIZE_OUT) && defined(DATA_TYPE_IN1) && defined(DATA_TYPE_IN2) && defined(DATA_TYPE_OUT)
+
/** List of all the operations supported by this kernel.
* @note ADD and SUB operations, when executed on integers, support saturation */
#ifdef SATURATE
@@ -40,16 +42,12 @@
#define POWER(x, y) pow(x, y)
#define PRELU(x, y) (select(y * x, x, CONVERT((x > (DATA_TYPE_OUT)0), SELECT_VEC_DATA_TYPE(DATA_TYPE_OUT, VEC_SIZE_OUT))))
-#if defined(VEC_SIZE_OUT) && defined(DATA_TYPE_OUT)
#define AND(x, y) (CONVERT((x && y), VEC_DATA_TYPE(DATA_TYPE_OUT, VEC_SIZE_OUT)) & 1)
#define OR(x, y) (CONVERT((x || y), VEC_DATA_TYPE(DATA_TYPE_OUT, VEC_SIZE_OUT)) & 1)
-#endif // defined(VEC_SIZE_OUT) && defined(DATA_TYPE_OUT)
#define OP_FUN_NAME_STR(op) elementwise_operation_##op
#define OP_FUN_NAME(op) OP_FUN_NAME_STR(op)
-#if defined(OP) && defined(VEC_SIZE_IN1) && defined(VEC_SIZE_IN2) && defined(VEC_SIZE_OUT) && defined(DATA_TYPE_IN1) && defined(DATA_TYPE_IN2) && defined(DATA_TYPE_OUT)
-
#if defined(ACTIVATION_TYPE)
#include "activation_float_helpers.h"
#endif // defined(ACTIVATION_TYPE)