From a9676118fd2a0e5bc916969af83ecee049bae76b Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Thu, 22 Feb 2018 18:07:43 +0000 Subject: COMPMID-886 Don't use LWS hints by default for GPU post Mali-G72 Change-Id: I64cb2d7f9513d69aebd9307a803b1b2c9c0e04c3 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/121929 Reviewed-by: Anthony Barbier Tested-by: Jenkins --- arm_compute/core/CL/CLHelpers.h | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'arm_compute/core/CL/CLHelpers.h') diff --git a/arm_compute/core/CL/CLHelpers.h b/arm_compute/core/CL/CLHelpers.h index 365ecb06c4..66423d648a 100644 --- a/arm_compute/core/CL/CLHelpers.h +++ b/arm_compute/core/CL/CLHelpers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -103,6 +103,14 @@ std::unique_ptr create_kernel() return k; } +/** Helper function to get the GPU target from a device name + * + * @param[in] device_name A device name + * + * @return the GPU target + */ +GPUTarget get_target_from_name(const std::string &device_name); + /** Helper function to get the GPU target from CL device * * @param[in] device A CL device @@ -140,5 +148,24 @@ bool fp16_support(const cl::Device &device); * @return True if the extension is supported */ bool non_uniform_workgroup_support(const cl::Device &device); +/** Helper function to check whether a gpu target is equal to the provided targets + * + * @param[in] target_to_check gpu target to check + * @param[in] target First target to compare against + * @param[in] targets (Optional) Additional targets to compare with + * + * @return True if the target is equal with at least one of the targets. + */ +template +bool gpu_target_is_in(GPUTarget target_to_check, GPUTarget target, Args... targets) +{ + return (target_to_check == target) | gpu_target_is_in(target_to_check, targets...); +} + +/** Variant of gpu_target_is_in for comparing two targets */ +inline bool gpu_target_is_in(GPUTarget target_to_check, GPUTarget target) +{ + return target_to_check == target; +} } #endif /* __ARM_COMPUTE_CLHELPERS_H__ */ -- cgit v1.2.1