From fd02b384a73aca6678f681e06755a1528f067171 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomasz=20Do=C5=82bniak?= Date: Wed, 9 Sep 2020 12:04:33 +0200 Subject: [PATCH] Clang compilation error fix for Linux (#2126) --- .../tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp | 2 +- inference-engine/tests_deprecated/helpers/tests_common_func.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp index 11d5eb1..d09f50c 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp @@ -51,7 +51,7 @@ public: static float getMaxAbsValue(const float* data, size_t size) { float maxVal = 0.f; for (size_t i = 0; i < size; i++) { - if (fabs(data[i] > maxVal)) { + if (fabs(data[i]) > maxVal) { maxVal = fabs(data[i]); } } diff --git a/inference-engine/tests_deprecated/helpers/tests_common_func.cpp b/inference-engine/tests_deprecated/helpers/tests_common_func.cpp index 2087abb..9277883 100644 --- a/inference-engine/tests_deprecated/helpers/tests_common_func.cpp +++ b/inference-engine/tests_deprecated/helpers/tests_common_func.cpp @@ -255,7 +255,7 @@ bool TestsCommonFunc::compareTop( #endif for (size_t i = 0; i < blob.size(); ++i) { - if (abs(ref_top[i].second - buffer[i]) > threshold) { + if (std::abs(ref_top[i].second - buffer[i]) > threshold) { return false; } } -- 2.7.4