diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2019-10-21 17:59:07 +0100 |
---|---|---|
committer | Manuel Bottini <manuel.bottini@arm.com> | 2019-12-03 13:58:56 +0000 |
commit | 7b9998d0fe1f98768b690ead10ebfa166d1b873d (patch) | |
tree | d3f6b81fb2e414a9e0f8ed9597eab27ef970d725 /src/core/CL/cl_kernels/helpers.h | |
parent | f9179d393a07eb9eed753e315df79d22391906c6 (diff) | |
download | ComputeLibrary-7b9998d0fe1f98768b690ead10ebfa166d1b873d.tar.gz |
COMPMID-1816: Use parallel reduction on 0 axis in CL ARG_MIN/ARG_MAX
Introducing new CLArgMinMax kernel
Change-Id: I0b8254207cc3859d19ceef9b6429cf5c1c586db0
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2202
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Diffstat (limited to 'src/core/CL/cl_kernels/helpers.h')
-rw-r--r-- | src/core/CL/cl_kernels/helpers.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/CL/cl_kernels/helpers.h b/src/core/CL/cl_kernels/helpers.h index eaeaa6034d..ec5701dc69 100644 --- a/src/core/CL/cl_kernels/helpers.h +++ b/src/core/CL/cl_kernels/helpers.h @@ -266,6 +266,19 @@ #define CONVERT_SAT_ROUND_STR(x, type, round) (convert_##type##_sat_##round((x))) #define CONVERT_SAT_ROUND(x, type, round) CONVERT_SAT_ROUND_STR(x, type, round) +#if FLOAT_DATA_TYPE +#define ISGREATER(x, y) isgreater(x, y) +#define ISLESS(x, y) isless(x, y) +#else // !FLOAT_DATA_TYPE +#if defined(WIDTH) +#define ISGREATER(x, y) (x > y) ? 1 : 0 +#define ISLESS(x, y) (x < y) ? 1 : 0 +#else // !defined(WIDTH) +#define ISGREATER(x, y) select((int16)0, (int16)-1, x > y) +#define ISLESS(x, y) select((int16)0, (int16)-1, x < y) +#endif // defined(WIDTH) +#endif // FLOAT_DATA_TYPE + #define VECTOR_DECLARATION(name) \ __global uchar *name##_ptr, \ uint name##_stride_x, \ |