Fix Tizen cross-build break (#628)
author박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 12 Apr 2018 10:03:38 +0000 (19:03 +0900)
committer김정현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh0822.kim@samsung.com>
Thu, 12 Apr 2018 10:03:38 +0000 (19:03 +0900)
This commit inserts explicit type instantiation on abs method to fix
Tizen cross-build break.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
src/kernel/acl/src/util.h

index 74d4558..c16a241 100644 (file)
@@ -2,6 +2,7 @@
 #define __NNFW_KERNEL_ACL_UTIL_H__
 #include <OperationsUtils.h>
 
+#include <cmath>
 #include <cassert>
 #include <functional>
 
@@ -80,7 +81,7 @@ public:
     assert(_shape.type == OperandType::FLOAT32);
 
     for( uint32_t i = 0; i < _num_elems; ++i ) {
-      if( abs(at<float>(i) - t.at<float>(i)) > 0.001f ) {
+      if( std::fabs(static_cast<float>(at<float>(i) - t.at<float>(i))) > 0.001f ) {
         std::cout << "Comparing [" << i << "] " << at<float>(i) << "," << t.at<float>(i) << std::endl;
         return false;
       }