blob: d55c2f9ecd409699076cdef1abb856b6268f536c [file] [log] [blame]
telsoa01c577f2c2018-08-31 09:22:23 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa01c577f2c2018-08-31 09:22:23 +01004//
5
6#pragma once
7
Pablo Tellof4372132021-10-19 15:58:33 +01008#include <type_traits>
9
Sadik Armaganb6cce4f2018-10-11 15:26:57 +010010// Set style to round to nearest
11#define HALF_ROUND_STYLE 1
Pablo Tellof4372132021-10-19 15:58:33 +010012#define HALF_ROUND_TIES_TO_EVEN 1
Sadik Armaganb6cce4f2018-10-11 15:26:57 +010013
Pablo Tellof4372132021-10-19 15:58:33 +010014#include "half/half.hpp"
telsoa01c577f2c2018-08-31 09:22:23 +010015
16namespace armnn
17{
18 using Half = half_float::half; //import half float implementation
19} //namespace armnn
20
21
22namespace std
23{
24
25template<>
26struct is_floating_point<armnn::Half>
27 : integral_constant< bool, true >
28{};
29
30template<>
31struct is_floating_point<const armnn::Half>
32 : integral_constant< bool, true >
33{};
34
35template<>
36struct is_floating_point<volatile armnn::Half>
37 : integral_constant< bool, true >
38{};
39
Pablo Tellof4372132021-10-19 15:58:33 +010040} //namespace std