aboutsummaryrefslogtreecommitdiff
path: root/src/armnnUtils/Half.hpp
diff options
context:
space:
mode:
authorarovir01 <Aron.Virginas-Tar@arm.com>2018-10-01 17:08:59 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-10-10 16:16:57 +0100
commit616e775763280992de92287b129dc335be91a24c (patch)
tree5b7ced2fa8005f4371fe8005ee98cb88d16e0e09 /src/armnnUtils/Half.hpp
parent29cadb3ff3066d6feb1801a921be326bf5ed8f47 (diff)
downloadarmnn-616e775763280992de92287b129dc335be91a24c.tar.gz
IVGCVSW-1913: Fix for ValidationTest.concat_float_3_relaxed
* Added RefPermuteFloat16Workload to serve as a fallback when CL does not support the required permute configuration for FP16 * Move Half.hpp to armnnUtils as the utils library should not be including private header files from the armnn library Change-Id: Ibf0f698451e8406f7ed7cce470dab60b6d16361d
Diffstat (limited to 'src/armnnUtils/Half.hpp')
-rw-r--r--src/armnnUtils/Half.hpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/armnnUtils/Half.hpp b/src/armnnUtils/Half.hpp
new file mode 100644
index 0000000000..c4b47a3609
--- /dev/null
+++ b/src/armnnUtils/Half.hpp
@@ -0,0 +1,35 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include <type_traits>
+#include <half/half.hpp>
+
+namespace armnn
+{
+ using Half = half_float::half; //import half float implementation
+} //namespace armnn
+
+
+namespace std
+{
+
+template<>
+struct is_floating_point<armnn::Half>
+ : integral_constant< bool, true >
+{};
+
+template<>
+struct is_floating_point<const armnn::Half>
+ : integral_constant< bool, true >
+{};
+
+template<>
+struct is_floating_point<volatile armnn::Half>
+ : integral_constant< bool, true >
+{};
+
+} //namespace std \ No newline at end of file