diff options
author | 2016-05-06 01:10:21 +0200 | |
---|---|---|
committer | 2016-05-06 01:10:21 +0200 | |
commit | 1eb9c2077228ffe66ad589298c354e1390cad2e3 (patch) | |
tree | 81d86725526843b679290c105b2151c0d89e97c5 | |
parent | 658f6b432a7023a749d9a0650ab814bfdb681eca (diff) |
Fix standalone-compile.
-rw-r--r-- | src/lib/netlist/build/makefile | 15 | ||||
-rw-r--r-- | src/lib/netlist/nl_base.h | 1 | ||||
-rw-r--r-- | src/lib/netlist/plib/pdynlib.cpp | 12 | ||||
-rw-r--r-- | src/lib/netlist/solver/nld_matrix_solver.h | 6 | ||||
-rw-r--r-- | src/lib/netlist/solver/nld_ms_sm.h | 4 | ||||
-rw-r--r-- | src/lib/netlist/solver/nld_ms_w.h | 2 |
6 files changed, 17 insertions, 23 deletions
diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index 684b2687ba1..93e54f0e517 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -21,7 +21,7 @@ CDEFS = -DPSTANDALONE=1 -DPTR64=1 #CFLAGS = $(LTO) -g -O3 -std=c++98 -Doverride="" -march=native -msse4.2 -Wall -Wpedantic -Wsign-compare -Wextra -Wno-long-long -Wno-unused-parameter -Wno-unused-result -Wno-variadic-macros -I.. #LDFLAGS = $(LTO) -g -O3 -std=c++98 CFLAGS = $(LTO) -g -O3 -std=c++11 -march=native -I.. -Wall -Wpedantic -Wsign-compare -Wextra -Wno-unused-parameter -LDFLAGS = $(LTO) -g -O3 -std=c++11 -lpthread +LDFLAGS = $(LTO) -g -O3 -std=c++11 -lpthread -ldl CC = @g++-5 LD = @g++-5 @@ -53,6 +53,7 @@ POBJS := \ $(POBJ)/pstate.o \ $(POBJ)/pstream.o \ $(POBJ)/pfmtlog.o \ + $(POBJ)/pdynlib.o \ NLOBJS := \ $(NLOBJ)/nl_base.o \ @@ -66,22 +67,10 @@ NLOBJS := \ $(NLOBJ)/analog/nld_opamps.o \ $(NLOBJ)/devices/nld_4020.o \ $(NLOBJ)/devices/nld_4066.o \ - $(NLOBJ)/devices/nld_7402.o \ - $(NLOBJ)/devices/nld_7404.o \ - $(NLOBJ)/devices/nld_7408.o \ - $(NLOBJ)/devices/nld_7410.o \ - $(NLOBJ)/devices/nld_7411.o \ - $(NLOBJ)/devices/nld_7420.o \ - $(NLOBJ)/devices/nld_7425.o \ - $(NLOBJ)/devices/nld_7427.o \ - $(NLOBJ)/devices/nld_7430.o \ - $(NLOBJ)/devices/nld_7432.o \ - $(NLOBJ)/devices/nld_7437.o \ $(NLOBJ)/devices/nld_7448.o \ $(NLOBJ)/devices/nld_7450.o \ $(NLOBJ)/devices/nld_7474.o \ $(NLOBJ)/devices/nld_7483.o \ - $(NLOBJ)/devices/nld_7486.o \ $(NLOBJ)/devices/nld_7490.o \ $(NLOBJ)/devices/nld_7493.o \ $(NLOBJ)/devices/nld_74107.o \ diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 9e762554835..45da883b174 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -156,6 +156,7 @@ #define NLBASE_H_ #include <vector> +#include <memory> #include "nl_lists.h" #include "nl_time.h" diff --git a/src/lib/netlist/plib/pdynlib.cpp b/src/lib/netlist/plib/pdynlib.cpp index bbf741896bc..bc1d7d39fd8 100644 --- a/src/lib/netlist/plib/pdynlib.cpp +++ b/src/lib/netlist/plib/pdynlib.cpp @@ -41,7 +41,7 @@ pdynlib::pdynlib(const pstring libname) pdynlib::pdynlib(const pstring path, const pstring libname) : m_isLoaded(false), m_lib(nullptr) { - printf("win: loading <%s>\n", libname.cstr()); + // printf("win: loading <%s>\n", libname.cstr()); #ifdef _WIN32 if (libname != "") m_lib = LoadLibrary(libname.cstr()); @@ -50,9 +50,11 @@ pdynlib::pdynlib(const pstring path, const pstring libname) if (m_lib != nullptr) m_isLoaded = true; else - printf("win: library <%s> not found!\n", libname.cstr()); + { + //printf("win: library <%s> not found!\n", libname.cstr()); + } #else - printf("loading <%s>\n", libname.cstr()); + //printf("loading <%s>\n", libname.cstr()); if (libname != "") m_lib = dlopen(libname.cstr(), RTLD_LAZY); else @@ -60,7 +62,9 @@ pdynlib::pdynlib(const pstring path, const pstring libname) if (m_lib != nullptr) m_isLoaded = true; else - printf("library <%s> not found!\n", libname.cstr()); + { + //printf("library <%s> not found!\n", libname.cstr()); + } #endif } diff --git a/src/lib/netlist/solver/nld_matrix_solver.h b/src/lib/netlist/solver/nld_matrix_solver.h index ccea7dc065e..c58592258d6 100644 --- a/src/lib/netlist/solver/nld_matrix_solver.h +++ b/src/lib/netlist/solver/nld_matrix_solver.h @@ -52,9 +52,9 @@ public: unsigned m_railstart; - pvector_t<int> m_nz; /* all non zero for multiplication */ - pvector_t<int> m_nzrd; /* non zero right of the diagonal for elimination, may include RHS element */ - pvector_t<int> m_nzbd; /* non zero below of the diagonal for elimination */ + pvector_t<unsigned> m_nz; /* all non zero for multiplication */ + pvector_t<unsigned> m_nzrd; /* non zero right of the diagonal for elimination, may include RHS element */ + pvector_t<unsigned> m_nzbd; /* non zero below of the diagonal for elimination */ /* state */ nl_double m_last_V; diff --git a/src/lib/netlist/solver/nld_ms_sm.h b/src/lib/netlist/solver/nld_ms_sm.h index c5d0e1105b6..1a3c50b4a27 100644 --- a/src/lib/netlist/solver/nld_ms_sm.h +++ b/src/lib/netlist/solver/nld_ms_sm.h @@ -13,9 +13,9 @@ * In this specific implementation, u is a unit vector specifying the row which * changed. Thus v contains the changed column. * - * Than z = A^-1 u , w = transpose(A^-1) v , lambda = v z + * Than z = A⁻¹ u , w = transpose(A⁻¹) v , lambda = v z * - * A^-1 <- 1.0 / (1.0 + lambda) * (z x w) + * A⁻¹ <- 1.0 / (1.0 + lambda) * (z x w) * * The approach is iterative and applied for each row changed. * diff --git a/src/lib/netlist/solver/nld_ms_w.h b/src/lib/netlist/solver/nld_ms_w.h index e976fcf3184..f61c2b1b616 100644 --- a/src/lib/netlist/solver/nld_ms_w.h +++ b/src/lib/netlist/solver/nld_ms_w.h @@ -15,7 +15,7 @@ * Whilst the book proposes to invert the matrix R=(I+transpose(V)*Z) we define * * w = transpose(V)*y - * a = R^-1 * w + * a = R⁻¹ * w * * and consequently * |