From 21dde6fd16a6fe96a6ac4d84322ff5e7e93ce6f3 Mon Sep 17 00:00:00 2001 From: utsabsingharoy <48694199+utsabsingharoy@users.noreply.github.com> Date: Sat, 23 Mar 2019 01:47:56 +0530 Subject: [PATCH] Clang build failure in test (#683) * fixing clang build failure --- .../test/providers/cpu/math/element_wise_ops_test.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc b/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc index d3f7bc0508..3c031d3405 100644 --- a/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc +++ b/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc @@ -4,6 +4,7 @@ #include "gtest/gtest.h" #include "test/providers/provider_test_utils.h" #include "core/util/math.h" +#include namespace onnxruntime { namespace test { @@ -374,7 +375,7 @@ TEST(MathOpTest, Pow) { std::vector dims{2, 2}; test.AddInput("X", dims, {2.0f, 2.0f, - sqrt(2.0f), 1.0f}); + std::sqrt(2.0f), 1.0f}); test.AddInput("Y", dims, {0.0f, 8.0f, 2.0f, 9.0f}); @@ -411,8 +412,8 @@ TEST(MathOpTest, Exp) { {0.0f, 1.0f, 2.0f, 10.0f}); test.AddOutput("Y", dims, - {1.0f, exp(1.0f), - exp(2.0f), exp(10.0f)}); + {1.0f, std::exp(1.0f), + std::exp(2.0f), std::exp(10.0f)}); test.SetOutputRelErr("Y", 1e-7f); test.Run(); } @@ -424,8 +425,8 @@ TEST(MathOpTest, Log) { {1.0f, 2.0f, 5.0f, 10.0f}); test.AddOutput("Y", dims, - {0.0f, log(2.0f), - log(5.0f), log(10.0f)}); + {0.0f, std::log(2.0f), + std::log(5.0f), std::log(10.0f)}); test.Run(); }