blob: e39968f54d5c2e84ac39a219cffc30aa305304f7 [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
Matthew Sloyan164bf4f2022-10-28 18:02:17 +010011#ifndef HALF_ROUND_STYLE
12 #define HALF_ROUND_STYLE 1
13#endif
14#ifndef HALF_ROUND_TIES_TO_EVEN
15 #define HALF_ROUND_TIES_TO_EVEN 1
16#endif
Sadik Armaganb6cce4f2018-10-11 15:26:57 +010017
Pablo Tellof4372132021-10-19 15:58:33 +010018#include "half/half.hpp"
telsoa01c577f2c2018-08-31 09:22:23 +010019
20namespace armnn
21{
22 using Half = half_float::half; //import half float implementation
23} //namespace armnn
24
25
26namespace std
27{
28
29template<>
30struct is_floating_point<armnn::Half>
31 : integral_constant< bool, true >
32{};
33
34template<>
35struct is_floating_point<const armnn::Half>
36 : integral_constant< bool, true >
37{};
38
39template<>
40struct is_floating_point<volatile armnn::Half>
41 : integral_constant< bool, true >
42{};
43
Pablo Tellof4372132021-10-19 15:58:33 +010044} //namespace std