cMHN
1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
pRC
prc
core
value
functions
is_finite.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-2-Clause
2
3
#ifndef pRC_CORE_VALUE_FUNCTIONS_IS_FINITE_H
4
#define pRC_CORE_VALUE_FUNCTIONS_IS_FINITE_H
5
6
#include <cmath>
7
8
#include <
prc/core/value/value.hpp
>
9
10
namespace
pRC
11
{
12
template
<IsFloat T>
13
static
inline
constexpr
auto
isFinite
([[maybe_unused]]
T
const
&a)
14
{
15
#if !defined(__FINITE_MATH_ONLY__) || __FINITE_MATH_ONLY__ == 0
16
using
std::isfinite;
17
return
isfinite(a());
18
#else
19
return
true
;
20
#endif
// ! __FINITE_MATH_ONLY__
21
}
22
23
template
<IsInteger T>
24
static
inline
constexpr
auto
isFinite
(
T
const
&)
25
{
26
return
true
;
27
}
28
}
29
#endif
// pRC_CORE_VALUE_FUNCTIONS_IS_FINITE_H
pRC::Float
Definition
value.hpp:12
pRC
Definition
cholesky.hpp:10
pRC::isFinite
static constexpr auto isFinite(T const &a)
Definition
is_finite.hpp:13
value.hpp
Generated by
1.11.0