COMPMID-2397: 64bit bare metal build failure

Change-Id: I003973ab658edff580335c47ebe658ca038602ac
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1311
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
diff --git a/src/core/NEON/kernels/NEElementwiseUnaryKernel.cpp b/src/core/NEON/kernels/NEElementwiseUnaryKernel.cpp
index 4419169..45f0fed 100644
--- a/src/core/NEON/kernels/NEElementwiseUnaryKernel.cpp
+++ b/src/core/NEON/kernels/NEElementwiseUnaryKernel.cpp
@@ -34,6 +34,7 @@
 #include "arm_compute/core/NEON/wrapper/wrapper.h"
 #include "arm_compute/core/TensorInfo.h"
 #include "arm_compute/core/Validate.h"
+#include "support/ToolchainSupport.h"
 
 #include <algorithm>
 #include <arm_neon.h>
@@ -63,7 +64,7 @@
         case ElementWiseUnary::ABS:
             return std::abs(a);
         case ElementWiseUnary::ROUND:
-            return std::nearbyint(a);
+            return support::cpp11::nearbyint(a);
         default:
             ARM_COMPUTE_ERROR("NOT_SUPPORTED!");
     }
diff --git a/support/ToolchainSupport.h b/support/ToolchainSupport.h
index 7d02e67..020a4a1 100644
--- a/support/ToolchainSupport.h
+++ b/support/ToolchainSupport.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -117,6 +117,21 @@
     return stream.str();
 }
 
+/** Rounds the floating-point argument arg to an integer value in floating-point format, using the current rounding mode.
+ *
+ * @note This function acts as a convenience wrapper around std::nearbyint. The
+ *       latter is missing in some Android toolchains.
+ *
+ * @param[in] value Value to be rounded.
+ *
+ * @return The rounded value.
+ */
+template <typename T>
+inline T nearbyint(T value)
+{
+    return ::nearbyint(value);
+}
+
 /** Convert string values to float.
  *
  * @note This function implements the same behaviour as std::stof. The latter
@@ -212,6 +227,21 @@
     return ::std::to_string(std::forward<T>(value));
 }
 
+/** Rounds the floating-point argument arg to an integer value in floating-point format, using the current rounding mode.
+ *
+ * @note This function acts as a convenience wrapper around std::nearbyint. The
+ *       latter is missing in some Android toolchains.
+ *
+ * @param[in] value Value to be rounded.
+ *
+ * @return The rounded value.
+ */
+template <typename T>
+inline T nearbyint(T value)
+{
+    return std::nearbyint(value);
+}
+
 /** Convert string values to float.
  *
  * @note This function acts as a convenience wrapper around std::stof. The