From 4f69f983570918e307da62b04cb675ead6b98235 Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Thu, 23 Nov 2023 11:05:19 +0100 Subject: [PATCH] Reduce binary size --- .../include/openvino/reference/select.hpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/core/reference/include/openvino/reference/select.hpp b/src/core/reference/include/openvino/reference/select.hpp index 743c8b089d0..7516c966f9d 100644 --- a/src/core/reference/include/openvino/reference/select.hpp +++ b/src/core/reference/include/openvino/reference/select.hpp @@ -11,6 +11,13 @@ namespace ov { namespace reference { +namespace func { +template +T select(char s, T x, T y) { + return s ? x : y; +} +} // namespace func + template void select(const char* arg0, const T* arg1, @@ -34,17 +41,7 @@ void select(const char* arg0, const Shape& arg1_shape, const Shape& arg2_shape, const op::AutoBroadcastSpec& broadcast_spec) { - autobroadcast_select(arg0, - arg1, - arg2, - out, - arg0_shape, - arg1_shape, - arg2_shape, - broadcast_spec, - [](char s, T x, T y) -> T { - return static_cast(s ? x : y); - }); + autobroadcast_select(arg0, arg1, arg2, out, arg0_shape, arg1_shape, arg2_shape, broadcast_spec, func::select); } } // namespace reference } // namespace ov