mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
Align with standalone-build.
This commit is contained in:
parent
7b3d46dea7
commit
b13e02f975
@ -4,7 +4,7 @@
|
|||||||
#include "netlist/devices/nld_system.h"
|
#include "netlist/devices/nld_system.h"
|
||||||
#include "netlist/analog/nld_bjt.h"
|
#include "netlist/analog/nld_bjt.h"
|
||||||
|
|
||||||
#define USE_FRONTIERS 0
|
#define USE_FRONTIERS 1
|
||||||
#define USE_FIXED_STV 1
|
#define USE_FIXED_STV 1
|
||||||
|
|
||||||
NETLIST_START(dummy)
|
NETLIST_START(dummy)
|
||||||
|
@ -20,8 +20,8 @@ CDEFS = -DPSTANDALONE=1 -DPTR64=1
|
|||||||
#-Werror
|
#-Werror
|
||||||
#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..
|
#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
|
#LDFLAGS = $(LTO) -g -O3 -std=c++98
|
||||||
CFLAGS = $(LTO) -g -O3 -std=c++11 -I.. -Wall -Wpedantic -Wsign-compare -Wextra -Wno-unused-parameter
|
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
|
LDFLAGS = $(LTO) -g -O3 -std=c++11 -lpthread
|
||||||
|
|
||||||
CC = @g++-5
|
CC = @g++-5
|
||||||
LD = @g++-5
|
LD = @g++-5
|
||||||
|
@ -50,8 +50,7 @@ struct ti_t
|
|||||||
};
|
};
|
||||||
|
|
||||||
static ti_t ti[MAXTHR];
|
static ti_t ti[MAXTHR];
|
||||||
//static std::thread thr[MAXTHR];
|
static std::thread thr[MAXTHR];
|
||||||
static std::thread thr[num_thr];
|
|
||||||
|
|
||||||
int thr_init = 0;
|
int thr_init = 0;
|
||||||
|
|
||||||
@ -485,15 +484,15 @@ void matrix_solver_direct_t<m_N, _storage_N>::build_LE_RHS()
|
|||||||
nl_double rhsk_a = 0.0;
|
nl_double rhsk_a = 0.0;
|
||||||
nl_double rhsk_b = 0.0;
|
nl_double rhsk_b = 0.0;
|
||||||
|
|
||||||
const int terms_count = m_terms[k]->count();
|
const unsigned terms_count = m_terms[k]->count();
|
||||||
const nl_double * RESTRICT go = m_terms[k]->go();
|
const nl_double * RESTRICT go = m_terms[k]->go();
|
||||||
const nl_double * RESTRICT Idr = m_terms[k]->Idr();
|
const nl_double * RESTRICT Idr = m_terms[k]->Idr();
|
||||||
const nl_double * const * RESTRICT other_cur_analog = m_terms[k]->other_curanalog();
|
const nl_double * const * RESTRICT other_cur_analog = m_terms[k]->other_curanalog();
|
||||||
|
|
||||||
for (int i = 0; i < terms_count; i++)
|
for (unsigned i = 0; i < terms_count; i++)
|
||||||
rhsk_a = rhsk_a + Idr[i];
|
rhsk_a = rhsk_a + Idr[i];
|
||||||
|
|
||||||
for (int i = m_terms[k]->m_railstart; i < terms_count; i++)
|
for (unsigned i = m_terms[k]->m_railstart; i < terms_count; i++)
|
||||||
//rhsk = rhsk + go[i] * terms[i]->m_otherterm->net().as_analog().Q_Analog();
|
//rhsk = rhsk + go[i] * terms[i]->m_otherterm->net().as_analog().Q_Analog();
|
||||||
rhsk_b = rhsk_b + go[i] * *other_cur_analog[i];
|
rhsk_b = rhsk_b + go[i] * *other_cur_analog[i];
|
||||||
|
|
||||||
@ -587,9 +586,9 @@ void matrix_solver_direct_t<m_N, _storage_N>::LE_solve()
|
|||||||
{
|
{
|
||||||
#if TEST_PARALLEL
|
#if TEST_PARALLEL
|
||||||
const unsigned eb = m_terms[i]->m_nzbd.size();
|
const unsigned eb = m_terms[i]->m_nzbd.size();
|
||||||
if (eb > 16)
|
if (eb > 0)
|
||||||
{
|
{
|
||||||
printf("here %d\n", eb);
|
//printf("here %d\n", eb);
|
||||||
unsigned chunks = (eb) / (num_thr + 1);
|
unsigned chunks = (eb) / (num_thr + 1);
|
||||||
for (int p=0; p < num_thr + 1; p++)
|
for (int p=0; p < num_thr + 1; p++)
|
||||||
{
|
{
|
||||||
@ -617,10 +616,10 @@ void matrix_solver_direct_t<m_N, _storage_N>::LE_solve()
|
|||||||
|
|
||||||
/* Eliminate column i from row j */
|
/* Eliminate column i from row j */
|
||||||
|
|
||||||
for (auto j : nzbd)
|
for (auto & j : nzbd)
|
||||||
{
|
{
|
||||||
const nl_double f1 = - A(j,i) * f;
|
const nl_double f1 = - A(j,i) * f;
|
||||||
for (auto k : nzrd)
|
for (auto & k : nzrd)
|
||||||
A(j,k) += A(i,k) * f1;
|
A(j,k) += A(i,k) * f1;
|
||||||
//RHS(j) += RHS(i) * f1;
|
//RHS(j) += RHS(i) * f1;
|
||||||
}
|
}
|
||||||
@ -632,10 +631,10 @@ void matrix_solver_direct_t<m_N, _storage_N>::LE_solve()
|
|||||||
|
|
||||||
/* Eliminate column i from row j */
|
/* Eliminate column i from row j */
|
||||||
|
|
||||||
for (auto j : nzbd)
|
for (auto & j : nzbd)
|
||||||
{
|
{
|
||||||
const nl_double f1 = - A(j,i) * f;
|
const nl_double f1 = - A(j,i) * f;
|
||||||
for (auto k : nzrd)
|
for (auto & k : nzrd)
|
||||||
A(j,k) += A(i,k) * f1;
|
A(j,k) += A(i,k) * f1;
|
||||||
//RHS(j) += RHS(i) * f1;
|
//RHS(j) += RHS(i) * f1;
|
||||||
}
|
}
|
||||||
|
@ -369,15 +369,15 @@ void matrix_solver_sm_t<m_N, _storage_N>::build_LE_RHS()
|
|||||||
nl_double rhsk_a = 0.0;
|
nl_double rhsk_a = 0.0;
|
||||||
nl_double rhsk_b = 0.0;
|
nl_double rhsk_b = 0.0;
|
||||||
|
|
||||||
const int terms_count = m_terms[k]->count();
|
const unsigned terms_count = m_terms[k]->count();
|
||||||
const nl_double * RESTRICT go = m_terms[k]->go();
|
const nl_double * RESTRICT go = m_terms[k]->go();
|
||||||
const nl_double * RESTRICT Idr = m_terms[k]->Idr();
|
const nl_double * RESTRICT Idr = m_terms[k]->Idr();
|
||||||
const nl_double * const * RESTRICT other_cur_analog = m_terms[k]->other_curanalog();
|
const nl_double * const * RESTRICT other_cur_analog = m_terms[k]->other_curanalog();
|
||||||
|
|
||||||
for (int i = 0; i < terms_count; i++)
|
for (unsigned i = 0; i < terms_count; i++)
|
||||||
rhsk_a = rhsk_a + Idr[i];
|
rhsk_a = rhsk_a + Idr[i];
|
||||||
|
|
||||||
for (int i = m_terms[k]->m_railstart; i < terms_count; i++)
|
for (unsigned i = m_terms[k]->m_railstart; i < terms_count; i++)
|
||||||
//rhsk = rhsk + go[i] * terms[i]->m_otherterm->net().as_analog().Q_Analog();
|
//rhsk = rhsk + go[i] * terms[i]->m_otherterm->net().as_analog().Q_Analog();
|
||||||
rhsk_b = rhsk_b + go[i] * *other_cur_analog[i];
|
rhsk_b = rhsk_b + go[i] * *other_cur_analog[i];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user