26.07
Half.hpp
Go to the documentation of this file.
1
//
2
// Copyright © 2017, 2026 Arm Ltd. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
6
#pragma once
7
8
#include <type_traits>
9
10
// Set style to round to nearest
11
#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
17
18
#include "half/half.hpp"
19
20
namespace
armnn
21
{
22
using
Half
= half_float::half;
//import half float implementation
23
24
template
<
typename
T>
25
struct
IsArmnnHalf
26
: std::is_same<typename std::remove_cv<T>::type, Half>
27
{};
28
29
template
<
typename
T>
30
struct
IsFloatingPoint
31
: std::integral_constant<bool, std::is_floating_point<T>::value || IsArmnnHalf<T>::value>
32
{};
33
34
}
//namespace armnn
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition:
01_00_quick_start.dox:7
armnn::Half
half_float::half Half
Definition:
Half.hpp:22
armnn::IsArmnnHalf
Definition:
Half.hpp:27
armnn::IsFloatingPoint
Definition:
Half.hpp:32
src
armnnUtils
Half.hpp
Generated on Mon Jul 6 2026 14:59:45 for Arm NN by
1.9.1