diff options
Diffstat (limited to 'src/emu/netlist/analog/nld_ms_gauss_seidel.h')
-rw-r--r-- | src/emu/netlist/analog/nld_ms_gauss_seidel.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/emu/netlist/analog/nld_ms_gauss_seidel.h b/src/emu/netlist/analog/nld_ms_gauss_seidel.h index 270aaf227a3..e09bf33cfb2 100644 --- a/src/emu/netlist/analog/nld_ms_gauss_seidel.h +++ b/src/emu/netlist/analog/nld_ms_gauss_seidel.h @@ -17,7 +17,7 @@ class ATTR_ALIGNED(64) netlist_matrix_solver_gauss_seidel_t: public netlist_matr public: netlist_matrix_solver_gauss_seidel_t(const netlist_solver_parameters_t ¶ms, int size) - : netlist_matrix_solver_direct_t<m_N, _storage_N>(params, size) + : netlist_matrix_solver_direct_t<m_N, _storage_N>(netlist_matrix_solver_t::GAUSS_SEIDEL, params, size) , m_lp_fact(0) , m_gs_fail(0) , m_gs_total(0) @@ -45,20 +45,21 @@ private: template <int m_N, int _storage_N> void netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::log_stats() { -#if 0 - if (this->m_calculations == 0) +#if 1 + if (this->m_stat_calculations == 0) return; printf("==============================================\n"); printf("Solver %s\n", this->name().cstr()); printf(" ==> %d nets\n", this->N()); //, (*(*groups[i].first())->m_core_terms.first())->name().cstr()); printf(" has %s elements\n", this->is_dynamic() ? "dynamic" : "no dynamic"); printf(" has %s elements\n", this->is_timestep() ? "timestep" : "no timestep"); + printf(" %6.3f average newton raphson loops\n", (double) this->m_stat_newton_raphson / (double) this->m_stat_vsolver_calls); printf(" %10d invocations (%6d Hz) %10d gs fails (%6.2f%%) %6.3f average\n", - this->m_calculations, - this->m_calculations * 10 / (int) (this->netlist().time().as_double() * 10.0), + this->m_stat_calculations, + this->m_stat_calculations * 10 / (int) (this->netlist().time().as_double() * 10.0), this->m_gs_fail, - 100.0 * (double) this->m_gs_fail / (double) this->m_calculations, - (double) this->m_gs_total / (double) this->m_calculations); + 100.0 * (double) this->m_gs_fail / (double) this->m_stat_calculations, + (double) this->m_gs_total / (double) this->m_stat_calculations); #endif } @@ -292,7 +293,7 @@ ATTR_HOT inline int netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::vsolv //if (fabs(gabs_t - fabs(gtot_t)) > 1e-20) // printf("%d %e abs: %f tot: %f\n",k, gabs_t / gtot_t -1.0, gabs_t, gtot_t); - gabs_t *= 0.5; // avoid rounding issues + gabs_t *= 0.95; // avoid rounding issues if (!USE_GABS || gabs_t <= gtot_t) { w[k] = ws / gtot_t; @@ -336,7 +337,7 @@ ATTR_HOT inline int netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::vsolv this->m_nets[k]->m_cur_Analog = new_V[k]; this->m_gs_total += resched_cnt; - this->m_calculations++; + this->m_stat_calculations++; if (resched) { |