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 | |
Pablo Tello | f437213 | 2021-10-19 15:58:33 +0100 | [diff] [blame] | 8 | #include <type_traits> |
| 9 | |
Sadik Armagan | b6cce4f | 2018-10-11 15:26:57 +0100 | [diff] [blame] | 10 | // Set style to round to nearest |
| 11 | #define HALF_ROUND_STYLE 1 |
Pablo Tello | f437213 | 2021-10-19 15:58:33 +0100 | [diff] [blame] | 12 | #define HALF_ROUND_TIES_TO_EVEN 1 |
Sadik Armagan | b6cce4f | 2018-10-11 15:26:57 +0100 | [diff] [blame] | 13 | |
Pablo Tello | f437213 | 2021-10-19 15:58:33 +0100 | [diff] [blame] | 14 | #include "half/half.hpp" |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 15 | |
| 16 | namespace armnn |
| 17 | { |
| 18 | using Half = half_float::half; //import half float implementation |
| 19 | } //namespace armnn |
| 20 | |
| 21 | |
| 22 | namespace std |
| 23 | { |
| 24 | |
| 25 | template<> |
| 26 | struct is_floating_point<armnn::Half> |
| 27 | : integral_constant< bool, true > |
| 28 | {}; |
| 29 | |
| 30 | template<> |
| 31 | struct is_floating_point<const armnn::Half> |
| 32 | : integral_constant< bool, true > |
| 33 | {}; |
| 34 | |
| 35 | template<> |
| 36 | struct is_floating_point<volatile armnn::Half> |
| 37 | : integral_constant< bool, true > |
| 38 | {}; |
| 39 | |
Pablo Tello | f437213 | 2021-10-19 15:58:33 +0100 | [diff] [blame] | 40 | } //namespace std |