From 3243efee70dce118e01effd8093d465ee750eecb Mon Sep 17 00:00:00 2001 From: couriersud Date: Mon, 20 Apr 2020 20:52:21 +0200 Subject: 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. --- src/lib/netlist/plib/pfunction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/netlist/plib/pfunction.cpp') 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 - static inline typename std::enable_if::value, NT>::type + static inline typename std::enable_if::value, NT>::type lfsr_random(std::uint16_t &lfsr) noexcept { std::uint16_t lsb = lfsr & 1; @@ -247,7 +247,7 @@ namespace plib { } template - static inline typename std::enable_if::value, NT>::type + static inline typename std::enable_if::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; template class pfunction; #if (PUSE_FLOAT128) - template class pfunction<__float128>; + template class pfunction; #endif } // namespace plib -- cgit v1.2.3-70-g09d2