telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Sadik Armagan | b6cce4f | 2018-10-11 15:26:57 +0100 | [diff] [blame] | 8 | // Set style to round to nearest |
| 9 | #define HALF_ROUND_STYLE 1 |
| 10 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 11 | #include <type_traits> |
| 12 | #include <half/half.hpp> |
| 13 | |
| 14 | namespace armnn |
| 15 | { |
| 16 | using Half = half_float::half; //import half float implementation |
| 17 | } //namespace armnn |
| 18 | |
| 19 | |
| 20 | namespace std |
| 21 | { |
| 22 | |
| 23 | template<> |
| 24 | struct is_floating_point<armnn::Half> |
| 25 | : integral_constant< bool, true > |
| 26 | {}; |
| 27 | |
| 28 | template<> |
| 29 | struct is_floating_point<const armnn::Half> |
| 30 | : integral_constant< bool, true > |
| 31 | {}; |
| 32 | |
| 33 | template<> |
| 34 | struct is_floating_point<volatile armnn::Half> |
| 35 | : integral_constant< bool, true > |
| 36 | {}; |
| 37 | |
| 38 | } //namespace std |