cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
zero.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_VALUE_ZERO_H
4#define pRC_CORE_VALUE_ZERO_H
5
9
10namespace pRC
11{
12 template<IsValue T>
13 struct Zero<T>
14 {
15 constexpr T operator()() const
16 {
17 return 0;
18 }
19 };
20
21 template<>
22 struct Zero<Float<16>>
23 {
24 constexpr Float<16> operator()() const
25 {
26 return BFloat16::FromRepresentation(0x0000);
27 }
28 };
29}
30#endif // pRC_CORE_VALUE_ZERO_H
static constexpr auto FromRepresentation(Representation const rep)
Definition bfloat16.hpp:24
Definition value.hpp:12
Definition cholesky.hpp:10
constexpr Float< 16 > operator()() const
Definition zero.hpp:24
constexpr T operator()() const
Definition zero.hpp:15
Definition zero.hpp:11