summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/solver/nld_ms_gcr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/solver/nld_ms_gcr.h')
-rw-r--r--src/lib/netlist/solver/nld_ms_gcr.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/netlist/solver/nld_ms_gcr.h b/src/lib/netlist/solver/nld_ms_gcr.h
index c9ab4a535a9..19dea107bc9 100644
--- a/src/lib/netlist/solver/nld_ms_gcr.h
+++ b/src/lib/netlist/solver/nld_ms_gcr.h
@@ -66,9 +66,6 @@ private:
plib::parray<FT, SIZE> RHS;
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;
-
mat_type mat;
//extsolver m_proc;
@@ -163,7 +160,7 @@ void matrix_solver_GCR_t<FT, SIZE>::vsetup(analog_net_t::list_t &nets)
for (mat_index_type k=0; k<iN; k++)
{
- m_term_cr[k].clear();
+ std::size_t cnt(0);
/* build pointers into the compressed row format matrix for each terminal */
for (std::size_t j=0; j< this->m_terms[k]->m_railstart;j++)
{
@@ -171,12 +168,13 @@ void matrix_solver_GCR_t<FT, SIZE>::vsetup(analog_net_t::list_t &nets)
for (auto i = mat.row_idx[k]; i < mat.row_idx[k+1]; i++)
if (other == static_cast<int>(mat.col_idx[i]))
{
- m_term_cr[k].push_back(&mat.A[i]);
+ m_mat_ptr[k][j] = &mat.A[i];
+ cnt++;
break;
}
}
- nl_assert(m_term_cr[k].size() == this->m_terms[k]->m_railstart);
- m_term_cr[k].push_back(&mat.A[mat.diag[k]]);
+ nl_assert(cnt == this->m_terms[k]->m_railstart);
+ m_mat_ptr[k][this->m_terms[k]->m_railstart] = &mat.A[mat.diag[k]];
}
this->log().verbose("maximum fill: {1}", gr.first);
@@ -297,7 +295,7 @@ unsigned matrix_solver_GCR_t<FT, SIZE>::vsolve_non_dynamic(const bool newton_rap
/* populate matrix */
- this->fill_matrix(iN, m_term_cr, RHS);
+ this->fill_matrix(iN, m_mat_ptr, RHS);
/* now solve it */