mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
netlist: emscripten can not use specialization efficiently.
* Consequently prefer to save on compile time and size.
This commit is contained in:
parent
e62e2d759b
commit
ec742d3eda
@ -1,5 +1,7 @@
|
||||
#include "plib/pdynlib.h"
|
||||
|
||||
#if !defined(__EMSCRIPTEN__)
|
||||
|
||||
// elim
|
||||
static void nl_gcr_11c2ae166b240b6e_10_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
|
||||
|
||||
@ -72411,8 +72413,12 @@ static void nl_gcr_feae15b80dd73620_7_double_double(double * __restrict V, const
|
||||
V[0] = (RHS0 - tmp0) / m_A0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
extern const plib::dynlib_static_sym nl_static_solver_syms[];
|
||||
const plib::dynlib_static_sym nl_static_solver_syms[] = {
|
||||
#if !defined(__EMSCRIPTEN__)
|
||||
|
||||
// elim
|
||||
{"nl_gcr_11c2ae166b240b6e_10_double_double", reinterpret_cast<void *>(&nl_gcr_11c2ae166b240b6e_10_double_double)},
|
||||
// tankbatt
|
||||
@ -72809,5 +72815,7 @@ const plib::dynlib_static_sym nl_static_solver_syms[] = {
|
||||
{"nl_gcr_fd2796828f1ebd00_36_double_double", reinterpret_cast<void *>(&nl_gcr_fd2796828f1ebd00_36_double_double)},
|
||||
// starfire
|
||||
{"nl_gcr_feae15b80dd73620_7_double_double", reinterpret_cast<void *>(&nl_gcr_feae15b80dd73620_7_double_double)},
|
||||
#endif
|
||||
|
||||
{"", nullptr}
|
||||
};
|
||||
|
@ -694,18 +694,22 @@ void tool_app_t::static_compile()
|
||||
throw netlist::nl_exception(netlist::MF_FILE_OPEN_ERROR(opt_out()));
|
||||
|
||||
sout << "#include \"plib/pdynlib.h\"\n\n";
|
||||
sout << "#if !defined(__EMSCRIPTEN__)\n\n";
|
||||
for (auto &e : map)
|
||||
{
|
||||
sout << "// " << putf8string(e.second.m_module) << "\n";
|
||||
sout << putf8string(e.second.m_code);
|
||||
}
|
||||
sout << "#endif\n\n";
|
||||
sout << "extern const plib::dynlib_static_sym nl_static_solver_syms[];\n";
|
||||
sout << "const plib::dynlib_static_sym nl_static_solver_syms[] = {\n";
|
||||
sout << "#if !defined(__EMSCRIPTEN__)\n\n";
|
||||
for (auto &e : map)
|
||||
{
|
||||
sout << "// " << putf8string(e.second.m_module) << "\n";
|
||||
sout << "\t{\"" << putf8string(e.first) << "\", reinterpret_cast<void *>(&" << putf8string(e.first) << ")},\n";
|
||||
}
|
||||
sout << "#endif\n\n";
|
||||
sout << "{\"\", nullptr}\n";
|
||||
sout << "};\n";
|
||||
|
||||
|
@ -227,6 +227,7 @@ namespace devices
|
||||
std::size_t net_count = nets.size();
|
||||
switch (net_count)
|
||||
{
|
||||
#if !defined(__EMSCRIPTEN__)
|
||||
case 1:
|
||||
return plib::make_unique<solver::matrix_solver_direct1_t<FT>, device_arena>(*this, sname, nets, params);
|
||||
case 2:
|
||||
@ -243,6 +244,7 @@ namespace devices
|
||||
return create_solver<FT, 7>(7, sname, params, nets);
|
||||
case 8:
|
||||
return create_solver<FT, 8>(8, sname, params, nets);
|
||||
#endif
|
||||
default:
|
||||
log().info(MI_NO_SPECIFIC_SOLVER(net_count));
|
||||
if (net_count <= 16)
|
||||
|
Loading…
Reference in New Issue
Block a user