summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/solver/nld_ms_w.h
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2016-05-26 21:29:41 +0200
committer couriersud <couriersud@arcor.de>2016-05-27 01:20:09 +0200
commit02e3213897e592aca825c977c580b1395e441f57 (patch)
tree80518372cdb224bd8d0d85cc8f81bec48191fc50 /src/lib/netlist/solver/nld_ms_w.h
parentfd62273a87b8fe43492e4a466ea97993b88904f8 (diff)
Leading underscore massacre. (nw)
Diffstat (limited to 'src/lib/netlist/solver/nld_ms_w.h')
-rw-r--r--src/lib/netlist/solver/nld_ms_w.h62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/lib/netlist/solver/nld_ms_w.h b/src/lib/netlist/solver/nld_ms_w.h
index 6f0e03cf170..2fd64b2f990 100644
--- a/src/lib/netlist/solver/nld_ms_w.h
+++ b/src/lib/netlist/solver/nld_ms_w.h
@@ -48,11 +48,11 @@
NETLIB_NAMESPACE_DEVICES_START()
-//#define nl_ext_double __float128 // slow, very slow
+//#define nl_ext_double _float128 // slow, very slow
//#define nl_ext_double long double // slightly slower
#define nl_ext_double nl_double
-template <unsigned m_N, unsigned _storage_N>
+template <unsigned m_N, unsigned storage_N>
class matrix_solver_w_t: public matrix_solver_t
{
friend class matrix_solver_t;
@@ -92,26 +92,26 @@ protected:
template <typename T1, typename T2>
inline nl_ext_double &lA(const T1 &r, const T2 &c) { return m_lA[r][c]; }
- ATTR_ALIGN nl_double m_last_RHS[_storage_N]; // right hand side - contains currents
+ ATTR_ALIGN nl_double m_last_RHS[storage_N]; // right hand side - contains currents
private:
- static const std::size_t m_pitch = ((( _storage_N) + 7) / 8) * 8;
- ATTR_ALIGN nl_ext_double m_A[_storage_N][m_pitch];
- ATTR_ALIGN nl_ext_double m_Ainv[_storage_N][m_pitch];
- ATTR_ALIGN nl_ext_double m_W[_storage_N][m_pitch];
- ATTR_ALIGN nl_ext_double m_RHS[_storage_N]; // right hand side - contains currents
+ static const std::size_t m_pitch = ((( storage_N) + 7) / 8) * 8;
+ ATTR_ALIGN nl_ext_double m_A[storage_N][m_pitch];
+ ATTR_ALIGN nl_ext_double m_Ainv[storage_N][m_pitch];
+ ATTR_ALIGN nl_ext_double m_W[storage_N][m_pitch];
+ ATTR_ALIGN nl_ext_double m_RHS[storage_N]; // right hand side - contains currents
- ATTR_ALIGN nl_ext_double m_lA[_storage_N][m_pitch];
+ ATTR_ALIGN nl_ext_double m_lA[storage_N][m_pitch];
/* temporary */
- ATTR_ALIGN nl_double H[_storage_N][m_pitch] ;
- unsigned rows[_storage_N];
- unsigned cols[_storage_N][m_pitch];
- unsigned colcount[_storage_N];
+ ATTR_ALIGN nl_double H[storage_N][m_pitch] ;
+ unsigned rows[storage_N];
+ unsigned cols[storage_N][m_pitch];
+ unsigned colcount[storage_N];
unsigned m_cnt;
- //ATTR_ALIGN nl_ext_double m_RHSx[_storage_N];
+ //ATTR_ALIGN nl_ext_double m_RHSx[storage_N];
const unsigned m_dim;
@@ -121,13 +121,13 @@ private:
// matrix_solver_direct
// ----------------------------------------------------------------------------------------
-template <unsigned m_N, unsigned _storage_N>
-matrix_solver_w_t<m_N, _storage_N>::~matrix_solver_w_t()
+template <unsigned m_N, unsigned storage_N>
+matrix_solver_w_t<m_N, storage_N>::~matrix_solver_w_t()
{
}
-template <unsigned m_N, unsigned _storage_N>
-ATTR_COLD void matrix_solver_w_t<m_N, _storage_N>::vsetup(analog_net_t::list_t &nets)
+template <unsigned m_N, unsigned storage_N>
+ATTR_COLD void matrix_solver_w_t<m_N, storage_N>::vsetup(analog_net_t::list_t &nets)
{
if (m_dim < nets.size())
log().fatal("Dimension {1} less than {2}", m_dim, nets.size());
@@ -147,8 +147,8 @@ ATTR_COLD void matrix_solver_w_t<m_N, _storage_N>::vsetup(analog_net_t::list_t &
-template <unsigned m_N, unsigned _storage_N>
-void matrix_solver_w_t<m_N, _storage_N>::LE_invert()
+template <unsigned m_N, unsigned storage_N>
+void matrix_solver_w_t<m_N, storage_N>::LE_invert()
{
const unsigned kN = N();
@@ -209,9 +209,9 @@ void matrix_solver_w_t<m_N, _storage_N>::LE_invert()
}
}
-template <unsigned m_N, unsigned _storage_N>
+template <unsigned m_N, unsigned storage_N>
template <typename T>
-void matrix_solver_w_t<m_N, _storage_N>::LE_compute_x(
+void matrix_solver_w_t<m_N, storage_N>::LE_compute_x(
T * RESTRICT x)
{
const unsigned kN = N();
@@ -229,12 +229,12 @@ void matrix_solver_w_t<m_N, _storage_N>::LE_compute_x(
}
-template <unsigned m_N, unsigned _storage_N>
-int matrix_solver_w_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool newton_raphson)
+template <unsigned m_N, unsigned storage_N>
+int matrix_solver_w_t<m_N, storage_N>::solve_non_dynamic(ATTR_UNUSED const bool newton_raphson)
{
const auto iN = N();
- nl_double new_V[_storage_N]; // = { 0.0 };
+ nl_double new_V[storage_N]; // = { 0.0 };
if ((m_cnt % 100) == 0)
{
@@ -272,7 +272,7 @@ int matrix_solver_w_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool
/* construct w = transform(V) * y
* dim: rowcount x iN
* */
- nl_double w[_storage_N];
+ nl_double w[storage_N];
for (unsigned i = 0; i < rowcount; i++)
{
const unsigned r = rows[i];
@@ -322,7 +322,7 @@ int matrix_solver_w_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool
}
/* Back substitution */
//inv(H) w = t w = H t
- nl_double t[_storage_N]; // FIXME: convert to member
+ nl_double t[storage_N]; // FIXME: convert to member
for (int j = rowcount - 1; j >= 0; j--)
{
nl_double tmp = 0;
@@ -375,8 +375,8 @@ int matrix_solver_w_t<m_N, _storage_N>::solve_non_dynamic(ATTR_UNUSED const bool
}
}
-template <unsigned m_N, unsigned _storage_N>
-inline int matrix_solver_w_t<m_N, _storage_N>::vsolve_non_dynamic(const bool newton_raphson)
+template <unsigned m_N, unsigned storage_N>
+inline int matrix_solver_w_t<m_N, storage_N>::vsolve_non_dynamic(const bool newton_raphson)
{
build_LE_A<matrix_solver_w_t>();
build_LE_RHS<matrix_solver_w_t>();
@@ -388,8 +388,8 @@ inline int matrix_solver_w_t<m_N, _storage_N>::vsolve_non_dynamic(const bool new
return this->solve_non_dynamic(newton_raphson);
}
-template <unsigned m_N, unsigned _storage_N>
-matrix_solver_w_t<m_N, _storage_N>::matrix_solver_w_t(netlist_t &anetlist, const pstring &name,
+template <unsigned m_N, unsigned storage_N>
+matrix_solver_w_t<m_N, storage_N>::matrix_solver_w_t(netlist_t &anetlist, const pstring &name,
const solver_parameters_t *params, const int size)
: matrix_solver_t(anetlist, name, NOSORT, params)
,m_cnt(0)