diff options
author | 2019-02-24 17:55:28 +0100 | |
---|---|---|
committer | 2019-02-24 18:45:16 +0100 | |
commit | 2e055aa97b9b60c79985f8b5c5d16cbf5391f887 (patch) | |
tree | 1325e2110e8e3851775c158dd2617c7011208914 /src | |
parent | 0e07f9ac34ec82066792fb9fdaaf04546b582fab (diff) |
netlist: tidy changes and better constexpr support for ptime class. (nw)
Diffstat (limited to 'src')
30 files changed, 103 insertions, 94 deletions
diff --git a/src/lib/netlist/analog/nlid_twoterm.h b/src/lib/netlist/analog/nlid_twoterm.h index 67939f32645..06c278d58a3 100644 --- a/src/lib/netlist/analog/nlid_twoterm.h +++ b/src/lib/netlist/analog/nlid_twoterm.h @@ -33,9 +33,9 @@ #ifndef NLID_TWOTERM_H_ #define NLID_TWOTERM_H_ -#include "plib/pfunction.h" #include "netlist/nl_base.h" #include "netlist/nl_setup.h" +#include "plib/pfunction.h" // ----------------------------------------------------------------------------- // Implementation diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 17dfe2f8edc..79c51b54bec 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -14,7 +14,7 @@ VSBUILD = $(SRC)/buildVS DOC = $(SRC)/documentation TIDY_DB = ../compile_commands.json -TIDY_FLAGSX = -checks=*,google*,-hicpp*,-readability*,-fuchsia*,cert-*,-android-*, +TIDY_FLAGSX = -checks=*,-google*,-hicpp*,-readability*,-fuchsia*,cert-*,-android-*, TIDY_FLAGSX += -llvm-header-guard,-cppcoreguidelines-pro-type-reinterpret-cast, TIDY_FLAGSX += -cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-owning-memory, TIDY_FLAGSX += -modernize-use-default-member-init,-cppcoreguidelines-pro-bounds-constant-array-index, @@ -235,7 +235,7 @@ native: $(MAKE) CEXTRAFLAGS="-march=native -msse4.2 -Wall -Wpedantic -Wsign-compare -Wextra " clang: - $(MAKE) CC=clang++-9 LD=clang++-9 CEXTRAFLAGS="-march=native -Weverything -Werror -Wno-unused-template -Wno-non-virtual-dtor -Wno-unreachable-code -Wno-padded -Wno-weak-vtables -Wno-missing-variable-declarations -Wconversion -Wno-c++98-compat -Wno-float-equal -Wno-global-constructors -Wno-c++98-compat-pedantic -Wno-format-nonliteral -Wweak-template-vtables -Wno-exit-time-destructors" + $(MAKE) CC=clang++-9 LD=clang++-9 CEXTRAFLAGS="-march=native -Weverything -Werror -Wno-padded -Wno-weak-vtables -Wno-unused-template -Wno-missing-variable-declarations -Wno-float-equal -Wconversion -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-format-nonliteral -Wno-exit-time-destructors" clang-5: $(MAKE) CC=clang++-5.0 LD=clang++-5.0 CEXTRAFLAGS="-march=native -Weverything -Werror -Wno-inconsistent-missing-destructor-override -Wno-unreachable-code -Wno-padded -Wno-weak-vtables -Wno-missing-variable-declarations -Wconversion -Wno-c++98-compat -Wno-float-equal -Wno-global-constructors -Wno-c++98-compat-pedantic -Wno-format-nonliteral -Wno-weak-template-vtables -Wno-exit-time-destructors" @@ -252,6 +252,10 @@ tidy_db: compile_commands_prefix $(ALL_TIDY_FILES) compile_commands_postfix # FIXME: -Wno-weak-vtables -Wno-missing-variable-declarations -Wno-conversion -Wno-exit-time-destructors # FIXME: -Winconsistent-missing-destructor-override : c++ community has diverging opinions on this https://github.com/isocpp/CppCoreGuidelines/issues/721 # FIXME: -Wunreachable-code : False warnings, this a documented clang bug: https://llvm.org/bugs/show_bug.cgi?id=28994 +# -Wweak-template-vtables +# +# These have to be given: +# -Wno-missing-variable-declarations : Device factory code, on purpose mingw: $(MAKE) CEXTRAFLAGS="-DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501 -DWIN32_LEAN_AND_MEAN" \ diff --git a/src/lib/netlist/devices/nld_4020.cpp b/src/lib/netlist/devices/nld_4020.cpp index 88cc05ada8f..13518f9d3cb 100644 --- a/src/lib/netlist/devices/nld_4020.cpp +++ b/src/lib/netlist/devices/nld_4020.cpp @@ -98,7 +98,7 @@ namespace netlist NETLIB_FUNC_VOID(CD4020_sub, update_outputs, (const unsigned cnt)) { - static const std::array<netlist_time, 14> out_delayQn = { + static constexpr const std::array<netlist_time, 14> out_delayQn = { NLTIME_FROM_NS(180), NLTIME_FROM_NS(280), NLTIME_FROM_NS(380), NLTIME_FROM_NS(480), NLTIME_FROM_NS(580), NLTIME_FROM_NS(680), diff --git a/src/lib/netlist/devices/nld_74107.cpp b/src/lib/netlist/devices/nld_74107.cpp index 6939a5d6db6..763760e2c6a 100644 --- a/src/lib/netlist/devices/nld_74107.cpp +++ b/src/lib/netlist/devices/nld_74107.cpp @@ -13,8 +13,8 @@ namespace netlist namespace devices { - static constexpr netlist_time delay_107[2] = { NLTIME_FROM_NS(16), NLTIME_FROM_NS(25) }; - static constexpr netlist_time delay_107A[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(15) }; + static constexpr const netlist_time delay_107[2] = { NLTIME_FROM_NS(16), NLTIME_FROM_NS(25) }; + static constexpr const netlist_time delay_107A[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(15) }; NETLIB_OBJECT(74107A) { diff --git a/src/lib/netlist/devices/nld_74161.cpp b/src/lib/netlist/devices/nld_74161.cpp index e75eaf10c88..7a3b54d6368 100644 --- a/src/lib/netlist/devices/nld_74161.cpp +++ b/src/lib/netlist/devices/nld_74161.cpp @@ -85,7 +85,7 @@ namespace netlist } // FIXME: Timing - static constexpr netlist_time delay[4] = + static constexpr const netlist_time delay[4] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(40), diff --git a/src/lib/netlist/devices/nld_74192.cpp b/src/lib/netlist/devices/nld_74192.cpp index a256f89451e..954fc351179 100644 --- a/src/lib/netlist/devices/nld_74192.cpp +++ b/src/lib/netlist/devices/nld_74192.cpp @@ -110,7 +110,7 @@ namespace netlist } // FIXME: Timing - static constexpr netlist_time delay[4] = + static constexpr const netlist_time delay[4] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(40), diff --git a/src/lib/netlist/devices/nld_74193.cpp b/src/lib/netlist/devices/nld_74193.cpp index 73b1d697b7b..16d7438d799 100644 --- a/src/lib/netlist/devices/nld_74193.cpp +++ b/src/lib/netlist/devices/nld_74193.cpp @@ -87,7 +87,7 @@ namespace netlist } // FIXME: Timing - static constexpr netlist_time delay[4] = + static constexpr const netlist_time delay[4] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(40), diff --git a/src/lib/netlist/devices/nld_7448.cpp b/src/lib/netlist/devices/nld_7448.cpp index 25d3ba5d108..4500229a1c5 100644 --- a/src/lib/netlist/devices/nld_7448.cpp +++ b/src/lib/netlist/devices/nld_7448.cpp @@ -137,7 +137,7 @@ namespace netlist #define BITS7(b6,b5,b4,b3,b2,b1,b0) ((b6)<<6) | ((b5)<<5) | ((b4)<<4) | ((b3)<<3) | ((b2)<<2) | ((b1)<<1) | ((b0)<<0) - static constexpr std::array<uint8_t, 16> tab7448 = + static constexpr const std::array<uint8_t, 16> tab7448 = { BITS7( 1, 1, 1, 1, 1, 1, 0 ), /* 00 - not blanked ! */ BITS7( 0, 1, 1, 0, 0, 0, 0 ), /* 01 */ diff --git a/src/lib/netlist/devices/nld_7490.cpp b/src/lib/netlist/devices/nld_7490.cpp index 3dabd026cd7..bde02e25edb 100644 --- a/src/lib/netlist/devices/nld_7490.cpp +++ b/src/lib/netlist/devices/nld_7490.cpp @@ -78,7 +78,7 @@ namespace netlist m_last_B = 0; } - static C14CONSTEXPR const netlist_time delay[4] = + static constexpr const netlist_time delay[4] = { NLTIME_FROM_NS(18), NLTIME_FROM_NS(36) - NLTIME_FROM_NS(18), diff --git a/src/lib/netlist/devices/nld_7497.cpp b/src/lib/netlist/devices/nld_7497.cpp index f74e386faac..1432884b8dd 100644 --- a/src/lib/netlist/devices/nld_7497.cpp +++ b/src/lib/netlist/devices/nld_7497.cpp @@ -17,8 +17,8 @@ namespace netlist namespace devices { - static constexpr netlist_time out_delay_CLK_Y[2] = { NLTIME_FROM_NS(20), NLTIME_FROM_NS(26) }; // tPHL, tPLH - static constexpr netlist_time out_delay_CLK_Z[2] = { NLTIME_FROM_NS(17), NLTIME_FROM_NS(12) }; + static constexpr const netlist_time out_delay_CLK_Y[2] = { NLTIME_FROM_NS(20), NLTIME_FROM_NS(26) }; // tPHL, tPLH + static constexpr const netlist_time out_delay_CLK_Z[2] = { NLTIME_FROM_NS(17), NLTIME_FROM_NS(12) }; NETLIB_OBJECT(7497) { diff --git a/src/lib/netlist/devices/nld_log.cpp b/src/lib/netlist/devices/nld_log.cpp index 3ecfe65f40c..6b1b3d8efc1 100644 --- a/src/lib/netlist/devices/nld_log.cpp +++ b/src/lib/netlist/devices/nld_log.cpp @@ -6,9 +6,9 @@ */ #include "netlist/nl_base.h" +#include "nld_log.h" #include "plib/pfmtlog.h" #include "plib/pstream.h" -#include "nld_log.h" //#include "sound/wavwrite.h" namespace netlist diff --git a/src/lib/netlist/devices/nlid_truthtable.cpp b/src/lib/netlist/devices/nlid_truthtable.cpp index 1e9cc8b1ec1..622aee0e0c7 100644 --- a/src/lib/netlist/devices/nlid_truthtable.cpp +++ b/src/lib/netlist/devices/nlid_truthtable.cpp @@ -77,8 +77,8 @@ namespace netlist return ret; } - static constexpr sbitset all_bits() { return sbitset(~static_cast<T>(0)); } - static constexpr sbitset no_bits() { return sbitset(static_cast<T>(0)); } + static constexpr const sbitset all_bits() noexcept { return sbitset(~static_cast<T>(0)); } + static constexpr const sbitset no_bits() noexcept{ return sbitset(static_cast<T>(0)); } private: T m_bs; }; diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 22bd9848565..e54d3b1abae 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -24,9 +24,9 @@ #include "plib/pstate.h" #include "plib/pstream.h" -#include "nltypes.h" #include "nl_errstr.h" #include "nl_lists.h" +#include "nltypes.h" #include "plib/ptime.h" //============================================================ @@ -1034,8 +1034,8 @@ namespace netlist : m_value(param.model_value(name)) { } - const double &operator()() const NL_NOEXCEPT { return m_value; } - operator const double&() const NL_NOEXCEPT { return m_value; } + const double &operator()() const noexcept { return m_value; } + operator const double&() const noexcept { return m_value; } private: const double m_value; }; @@ -1248,6 +1248,12 @@ namespace netlist public: using entry_t = pqentry_t<net_t *, netlist_time>; explicit queue_t(netlist_state_t &nl); + virtual ~queue_t() noexcept = default; + + queue_t(const queue_t &) = delete; + queue_t(queue_t &&) = delete; + queue_t &operator=(const queue_t &) = delete; + queue_t &operator=(queue_t &&) = delete; protected: diff --git a/src/lib/netlist/nltypes.h b/src/lib/netlist/nltypes.h index ca1972ee527..1ddc29adfae 100644 --- a/src/lib/netlist/nltypes.h +++ b/src/lib/netlist/nltypes.h @@ -14,12 +14,12 @@ #define NLTYPES_H_ #include "nl_config.h" -#include "plib/ptime.h" #include "plib/pchrono.h" #include "plib/pfmtlog.h" #include "plib/pmempool.h" -#include "plib/pstring.h" #include "plib/pstate.h" +#include "plib/pstring.h" +#include "plib/ptime.h" #include <cstdint> #include <unordered_map> @@ -126,9 +126,9 @@ namespace netlist // MACROS //============================================================ - template <typename T> inline constexpr netlist_time NLTIME_FROM_NS(T &&t) noexcept { return netlist_time::from_nsec(t); } - template <typename T> inline constexpr netlist_time NLTIME_FROM_US(T &&t) noexcept { return netlist_time::from_usec(t); } - template <typename T> inline constexpr netlist_time NLTIME_FROM_MS(T &&t) noexcept { return netlist_time::from_msec(t); } + template <typename T> inline constexpr const netlist_time NLTIME_FROM_NS(T &&t) noexcept { return netlist_time::from_nsec(t); } + template <typename T> inline constexpr const netlist_time NLTIME_FROM_US(T &&t) noexcept { return netlist_time::from_usec(t); } + template <typename T> inline constexpr const netlist_time NLTIME_FROM_MS(T &&t) noexcept { return netlist_time::from_msec(t); } } // namespace netlist diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h index c7aad9372d3..d8e4ffbb5d7 100644 --- a/src/lib/netlist/plib/palloc.h +++ b/src/lib/netlist/plib/palloc.h @@ -36,13 +36,13 @@ namespace plib { #if defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER) return _aligned_malloc(size, alignment); #elif defined(__APPLE__) - void* p; - if (::posix_memalign(&p, alignment, size) != 0) { - p = nullptr; - } - return p; + void* p; + if (::posix_memalign(&p, alignment, size) != 0) { + p = nullptr; + } + return p; #else - return aligned_alloc(alignment, size); + return aligned_alloc(alignment, size); #endif } @@ -90,7 +90,7 @@ namespace plib { static_assert(is_pow2(ALIGN), "Alignment must be a power of 2"); //auto t = reinterpret_cast<std::uintptr_t>(p); //if (t & (ALIGN-1)) - // printf("alignment error!"); + // printf("alignment error!"); #if (USE_ALIGNED_HINTS) return reinterpret_cast<T *>(__builtin_assume_aligned(p, ALIGN)); #else @@ -142,8 +142,8 @@ namespace plib { constexpr pdefault_deleter() noexcept = default; template<typename U, typename = typename - std::enable_if<std::is_convertible< U*, T*>::value>::type> - pdefault_deleter(const pdefault_deleter<U>&) noexcept { } + std::enable_if<std::is_convertible< U*, T*>::value>::type> + pdefault_deleter(const pdefault_deleter<U>&) noexcept { } void operator()(T *p) const { @@ -271,30 +271,30 @@ namespace plib { class aligned_allocator { public: - using value_type = T; - static constexpr const std::size_t align_size = (USE_ALIGNED_ALLOCATION) ? ALIGN : alignof(std::max_align_t); + using value_type = T; + static constexpr const std::size_t align_size = (USE_ALIGNED_ALLOCATION) ? ALIGN : alignof(std::max_align_t); - static_assert(align_size >= alignof(T) && (align_size % alignof(T)) == 0, - "ALIGN must be greater than alignof(T) and a multiple"); + static_assert(align_size >= alignof(T) && (align_size % alignof(T)) == 0, + "ALIGN must be greater than alignof(T) and a multiple"); - aligned_allocator() noexcept = default; - ~aligned_allocator() noexcept = default; + aligned_allocator() noexcept = default; + ~aligned_allocator() noexcept = default; - aligned_allocator(const aligned_allocator&) noexcept = default; - aligned_allocator& operator=(const aligned_allocator&) noexcept = delete; + aligned_allocator(const aligned_allocator&) noexcept = default; + aligned_allocator& operator=(const aligned_allocator&) noexcept = delete; - aligned_allocator(aligned_allocator&&) noexcept = default; - aligned_allocator& operator=(aligned_allocator&&) = delete; + aligned_allocator(aligned_allocator&&) noexcept = default; + aligned_allocator& operator=(aligned_allocator&&) = delete; - template <class U> - aligned_allocator(const aligned_allocator<U, ALIGN>& rhs) noexcept - { - unused_var(rhs); - } + template <class U> + aligned_allocator(const aligned_allocator<U, ALIGN>& rhs) noexcept + { + unused_var(rhs); + } - template <class U> struct rebind + template <class U> struct rebind { - using other = aligned_allocator<U, ALIGN>; + using other = aligned_allocator<U, ALIGN>; }; T* allocate(std::size_t n) @@ -331,22 +331,22 @@ namespace plib { //============================================================ // traits to determine alignment size and stride size - // from types supporting alignment + // from types supporting alignment //============================================================ PDEFINE_HAS_MEMBER(has_align, align_size); - template <typename T, typename X = void> - struct align_traits + template <typename T, typename X = void> + struct align_traits { - static constexpr const std::size_t align_size = alignof(std::max_align_t); + static constexpr const std::size_t align_size = alignof(std::max_align_t); static constexpr const std::size_t stride_size = (sizeof(T) % align_size == 0 ? 1 //T is a multiple of align_size : (align_size % sizeof(T) != 0 ? align_size // align_size is not a multiple of T : align_size / sizeof(T))); }; - template <typename T> + template <typename T> struct align_traits<T, typename std::enable_if<has_align<T>::value, void>::type> { static constexpr const std::size_t align_size = T::align_size; @@ -360,7 +360,7 @@ namespace plib { // Aligned vector //============================================================ - // FIXME: needs a separate file + // FIXME: needs a separate file template <class T, std::size_t ALIGN = alignof(T)> class aligned_vector : public std::vector<T, aligned_allocator<T, ALIGN>> { diff --git a/src/lib/netlist/plib/pconfig.h b/src/lib/netlist/plib/pconfig.h index ecb9cc3511b..158fb3faae7 100644 --- a/src/lib/netlist/plib/pconfig.h +++ b/src/lib/netlist/plib/pconfig.h @@ -42,13 +42,13 @@ #endif #define USE_ALIGNED_ALLOCATION (USE_ALIGNED_OPTIMIZATIONS) -#define USE_ALIGNED_HINTS (USE_ALIGNED_OPTIMIZATIONS) +#define USE_ALIGNED_HINTS (USE_ALIGNED_OPTIMIZATIONS) /* * Standard alignment macros */ #define PALIGN_CACHELINE (64) -#define PALIGN_VECTOROPT (32) +#define PALIGN_VECTOROPT (8) #define PALIGNAS_CACHELINE() PALIGNAS(PALIGN_CACHELINE) #define PALIGNAS_VECTOROPT() PALIGNAS(PALIGN_VECTOROPT) diff --git a/src/lib/netlist/plib/pfmtlog.h b/src/lib/netlist/plib/pfmtlog.h index 50acf457114..4d13fa3424b 100644 --- a/src/lib/netlist/plib/pfmtlog.h +++ b/src/lib/netlist/plib/pfmtlog.h @@ -35,7 +35,6 @@ struct ptype_traits_base template <> struct ptype_traits_base<bool> { - static unsigned int cast(bool &x) { return static_cast<unsigned int>(x); } static unsigned int cast(const bool &x) { return static_cast<unsigned int>(x); } static const bool is_signed = std::numeric_limits<bool>::is_signed; static const char *size_spec() { return ""; } diff --git a/src/lib/netlist/plib/plists.h b/src/lib/netlist/plib/plists.h index 0a1345d5e1f..2a0fd3a6c3c 100644 --- a/src/lib/netlist/plib/plists.h +++ b/src/lib/netlist/plib/plists.h @@ -200,9 +200,9 @@ public: LC* p; public: explicit constexpr iter_t(LC* x) noexcept : p(x) { } - explicit constexpr iter_t(iter_t &rhs) noexcept : p(rhs.p) { } + constexpr iter_t(iter_t &rhs) noexcept : p(rhs.p) { } iter_t(iter_t &&rhs) noexcept { std::swap(*this, rhs); } - iter_t& operator=(const iter_t &rhs) { iter_t t(rhs); std::swap(*this, t); return *this; } + iter_t& operator=(const iter_t &rhs) noexcept { iter_t t(rhs); std::swap(*this, t); return *this; } iter_t& operator=(iter_t &&rhs) noexcept { std::swap(*this, rhs); return *this; } iter_t& operator++() noexcept {p = p->next();return *this;} // NOLINTNEXTLINE(cert-dcl21-cpp) diff --git a/src/lib/netlist/plib/pstream.h b/src/lib/netlist/plib/pstream.h index 29f79e0dd4a..aaccf577c4d 100644 --- a/src/lib/netlist/plib/pstream.h +++ b/src/lib/netlist/plib/pstream.h @@ -658,7 +658,7 @@ inline void copystream(postream &dest, pistream &src) struct perrlogger { template <typename ... Args> - perrlogger(Args&& ... args) + explicit perrlogger(Args&& ... args) { h()(std::forward<Args>(args)...); } diff --git a/src/lib/netlist/plib/ptime.h b/src/lib/netlist/plib/ptime.h index 4767a197342..32ccc4f7b0d 100644 --- a/src/lib/netlist/plib/ptime.h +++ b/src/lib/netlist/plib/ptime.h @@ -47,19 +47,19 @@ namespace plib C14CONSTEXPR ptime &operator-=(const ptime rhs) noexcept { m_time -= rhs.m_time; return *this; } C14CONSTEXPR ptime &operator*=(const mult_type factor) noexcept { m_time *= static_cast<internal_type>(factor); return *this; } - friend C14CONSTEXPR ptime operator-(ptime lhs, const ptime rhs) noexcept + friend constexpr const ptime operator-(ptime lhs, const ptime rhs) noexcept { - return lhs -= rhs; + return ptime(lhs.m_time - rhs.m_time); } - friend C14CONSTEXPR ptime operator+(ptime lhs, const ptime rhs) noexcept + friend constexpr const ptime operator+(ptime lhs, const ptime rhs) noexcept { - return lhs += rhs; + return ptime(lhs.m_time + rhs.m_time); } - friend C14CONSTEXPR ptime operator*(ptime lhs, const mult_type &factor) noexcept + friend constexpr const ptime operator*(ptime lhs, const mult_type &factor) noexcept { - return lhs *= factor; + return ptime(lhs.m_time * factor); } friend constexpr mult_type operator/(const ptime lhs, const ptime rhs) noexcept diff --git a/src/lib/netlist/plib/ptypes.h b/src/lib/netlist/plib/ptypes.h index 84f6453e8f2..99bc5715a05 100644 --- a/src/lib/netlist/plib/ptypes.h +++ b/src/lib/netlist/plib/ptypes.h @@ -87,13 +87,13 @@ namespace plib // Define a "has member" trait. //============================================================ -#define PDEFINE_HAS_MEMBER(name, member) \ - template <typename T> class name \ - { \ - template <typename U> static long test(decltype(&U:: member)); \ - template <typename U> static char test(...); \ - public: \ - static constexpr const bool value = sizeof(test<T>(nullptr)) == sizeof(long); \ - } +#define PDEFINE_HAS_MEMBER(name, member) \ + template <typename T> class name \ + { \ + template <typename U> static long test(decltype(&U:: member)); \ + template <typename U> static char test(...); \ + public: \ + static constexpr const bool value = sizeof(test<T>(nullptr)) == sizeof(long); \ + } #endif /* PTYPES_H_ */ diff --git a/src/lib/netlist/plib/putil.h b/src/lib/netlist/plib/putil.h index fbf6f2af26d..0db2ae28ffb 100644 --- a/src/lib/netlist/plib/putil.h +++ b/src/lib/netlist/plib/putil.h @@ -12,7 +12,7 @@ #include <algorithm> #include <initializer_list> -#include <vector> // <<= needed by windows build +#include <vector> #define PSTRINGIFY_HELP(y) # y #define PSTRINGIFY(x) PSTRINGIFY_HELP(x) diff --git a/src/lib/netlist/solver/nld_matrix_solver.h b/src/lib/netlist/solver/nld_matrix_solver.h index ac5a2a464f7..88d4dbb4bb0 100644 --- a/src/lib/netlist/solver/nld_matrix_solver.h +++ b/src/lib/netlist/solver/nld_matrix_solver.h @@ -11,9 +11,9 @@ #include "netlist/nl_base.h" #include "netlist/nl_errstr.h" #include "plib/palloc.h" +#include "plib/pmatrix2d.h" #include "plib/putil.h" #include "plib/vector_ops.h" -#include "plib/pmatrix2d.h" #include <cmath> @@ -240,12 +240,12 @@ namespace devices template <typename T> using aligned_alloc = plib::aligned_allocator<T, PALIGN_VECTOROPT>; - plib::pmatrix2d<nl_double, aligned_alloc<nl_double>> m_gon; - plib::pmatrix2d<nl_double, aligned_alloc<nl_double>> m_gtn; - plib::pmatrix2d<nl_double, aligned_alloc<nl_double>> m_Idrn; - plib::pmatrix2d<nl_double *, aligned_alloc<nl_double *>> m_connected_net_Vn; + plib::pmatrix2d<nl_double, aligned_alloc<nl_double>> m_gon; + plib::pmatrix2d<nl_double, aligned_alloc<nl_double>> m_gtn; + plib::pmatrix2d<nl_double, aligned_alloc<nl_double>> m_Idrn; + plib::pmatrix2d<nl_double *, aligned_alloc<nl_double *>> m_connected_net_Vn; - plib::pmatrix2d<nl_double> m_test; + plib::pmatrix2d<nl_double> m_test; std::vector<plib::unique_ptr<terms_for_net_t>> m_terms; std::vector<analog_net_t *> m_nets; diff --git a/src/lib/netlist/solver/nld_ms_direct.h b/src/lib/netlist/solver/nld_ms_direct.h index c0995d99e54..0e3cd677ef7 100644 --- a/src/lib/netlist/solver/nld_ms_direct.h +++ b/src/lib/netlist/solver/nld_ms_direct.h @@ -8,10 +8,10 @@ #ifndef NLD_MS_DIRECT_H_ #define NLD_MS_DIRECT_H_ -#include <algorithm> -#include <cmath> #include "plib/mat_cr.h" #include "plib/vector_ops.h" +#include <algorithm> +#include <cmath> #include "nld_matrix_solver.h" #include "nld_solver.h" diff --git a/src/lib/netlist/solver/nld_ms_gcr.h b/src/lib/netlist/solver/nld_ms_gcr.h index fce7b5bae2c..c9ab4a535a9 100644 --- a/src/lib/netlist/solver/nld_ms_gcr.h +++ b/src/lib/netlist/solver/nld_ms_gcr.h @@ -12,11 +12,11 @@ #include "plib/mat_cr.h" +#include "nld_ms_direct.h" +#include "nld_solver.h" #include "plib/pdynlib.h" #include "plib/pstream.h" #include "plib/vector_ops.h" -#include "nld_ms_direct.h" -#include "nld_solver.h" #include <algorithm> @@ -67,7 +67,7 @@ private: plib::parray<FT, SIZE> new_V; std::array<plib::aligned_vector<FT *, PALIGN_VECTOROPT>, storage_N> m_term_cr; - // std::array<std::vector<FT *>, storage_N> m_term_cr; + // std::array<std::vector<FT *>, storage_N> m_term_cr; mat_type mat; diff --git a/src/lib/netlist/solver/nld_ms_gmres.h b/src/lib/netlist/solver/nld_ms_gmres.h index 95de1bbae31..f3d894881e2 100644 --- a/src/lib/netlist/solver/nld_ms_gmres.h +++ b/src/lib/netlist/solver/nld_ms_gmres.h @@ -8,12 +8,12 @@ #ifndef NLD_MS_GMRES_H_ #define NLD_MS_GMRES_H_ +#include "nld_ms_direct.h" +#include "nld_solver.h" #include "plib/gmres.h" #include "plib/mat_cr.h" #include "plib/parray.h" #include "plib/vector_ops.h" -#include "nld_ms_direct.h" -#include "nld_solver.h" #include <algorithm> #include <cmath> diff --git a/src/lib/netlist/solver/nld_ms_sm.h b/src/lib/netlist/solver/nld_ms_sm.h index 6c0f610e3f2..9d5b4e0843a 100644 --- a/src/lib/netlist/solver/nld_ms_sm.h +++ b/src/lib/netlist/solver/nld_ms_sm.h @@ -35,9 +35,9 @@ #include <algorithm> -#include "plib/vector_ops.h" #include "nld_matrix_solver.h" #include "nld_solver.h" +#include "plib/vector_ops.h" namespace netlist { diff --git a/src/lib/netlist/solver/nld_ms_w.h b/src/lib/netlist/solver/nld_ms_w.h index 584d50fdb15..76225724a21 100644 --- a/src/lib/netlist/solver/nld_ms_w.h +++ b/src/lib/netlist/solver/nld_ms_w.h @@ -42,9 +42,9 @@ #include <algorithm> -#include "plib/vector_ops.h" #include "nld_matrix_solver.h" #include "nld_solver.h" +#include "plib/vector_ops.h" namespace netlist { diff --git a/src/lib/netlist/solver/nld_solver.h b/src/lib/netlist/solver/nld_solver.h index fb6d05fbbcb..8b1f1f0b96d 100644 --- a/src/lib/netlist/solver/nld_solver.h +++ b/src/lib/netlist/solver/nld_solver.h @@ -9,8 +9,8 @@ #define NLD_SOLVER_H_ #include "netlist/nl_base.h" -#include "plib/pstream.h" #include "nld_matrix_solver.h" +#include "plib/pstream.h" #include <map> #include <memory> diff --git a/src/lib/netlist/tools/nl_convert.cpp b/src/lib/netlist/tools/nl_convert.cpp index a9e17d56120..d6d5f3e2e01 100644 --- a/src/lib/netlist/tools/nl_convert.cpp +++ b/src/lib/netlist/tools/nl_convert.cpp @@ -6,8 +6,8 @@ */ #include "plib/palloc.h" -#include "plib/putil.h" #include "nl_convert.h" +#include "plib/putil.h" #include <algorithm> #include <cmath> #include <unordered_map> |