summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pfunction.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-04-20 20:52:21 +0200
committer couriersud <couriersud@gmx.org>2020-04-20 20:52:21 +0200
commit3243efee70dce118e01effd8093d465ee750eecb (patch)
tree22a283d70cbe0798092ed6565d749f1164cfb9f8 /src/lib/netlist/plib/pfunction.cpp
parent4c9e3dc171ed4f1d27be16947a442383085c2d3d (diff)
netlist: code maintenance and edge case fixes. (nw)
"Edge cases" are compiles were the floting point type used for the core may be different from the one used by solvers, e.g. double/float. This does not happen in MAME, here currently this is always double/double. Since floats are better suited for GPUs whose double performance is limited it was time to review the code. This commit fixes warnings about type conversions and precision loss. In addition there is better support for INT128 and FLOAT128. The MAT solver has seen some minor performance increases.
Diffstat (limited to 'src/lib/netlist/plib/pfunction.cpp')
-rw-r--r--src/lib/netlist/plib/pfunction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/netlist/plib/pfunction.cpp b/src/lib/netlist/plib/pfunction.cpp
index 21f61643fea..b5b4dd779c5 100644
--- a/src/lib/netlist/plib/pfunction.cpp
+++ b/src/lib/netlist/plib/pfunction.cpp
@@ -236,7 +236,7 @@ namespace plib {
}
template <typename NT>
- static inline typename std::enable_if<std::is_floating_point<NT>::value, NT>::type
+ static inline typename std::enable_if<plib::is_floating_point<NT>::value, NT>::type
lfsr_random(std::uint16_t &lfsr) noexcept
{
std::uint16_t lsb = lfsr & 1;
@@ -247,7 +247,7 @@ namespace plib {
}
template <typename NT>
- static inline typename std::enable_if<std::is_integral<NT>::value, NT>::type
+ static inline typename std::enable_if<plib::is_integral<NT>::value, NT>::type
lfsr_random(std::uint16_t &lfsr) noexcept
{
std::uint16_t lsb = lfsr & 1;
@@ -304,7 +304,7 @@ namespace plib {
template class pfunction<double>;
template class pfunction<long double>;
#if (PUSE_FLOAT128)
- template class pfunction<__float128>;
+ template class pfunction<FLOAT128>;
#endif
} // namespace plib