summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/formats/a26_cas.cpp16
-rw-r--r--src/lib/formats/ace_tap.cpp14
-rw-r--r--src/lib/formats/adam_cas.cpp27
-rw-r--r--src/lib/formats/apf_apt.cpp24
-rw-r--r--src/lib/formats/apridisk.cpp4
-rw-r--r--src/lib/formats/atom_tap.cpp21
-rw-r--r--src/lib/formats/camplynx_cas.cpp20
-rw-r--r--src/lib/formats/cassimg.cpp848
-rw-r--r--src/lib/formats/cassimg.h330
-rw-r--r--src/lib/formats/cbm_tap.cpp10
-rw-r--r--src/lib/formats/cgen_cas.cpp12
-rw-r--r--src/lib/formats/coco_cas.cpp36
-rw-r--r--src/lib/formats/csw_cas.cpp420
-rw-r--r--src/lib/formats/csw_cas.h2
-rw-r--r--src/lib/formats/fc100_cas.cpp16
-rw-r--r--src/lib/formats/fm7_cas.cpp16
-rw-r--r--src/lib/formats/fmsx_cas.cpp10
-rw-r--r--src/lib/formats/gtp_cas.cpp16
-rw-r--r--src/lib/formats/h8_cas.cpp16
-rw-r--r--src/lib/formats/hect_tap.cpp22
-rw-r--r--src/lib/formats/imd_dsk.cpp20
-rw-r--r--src/lib/formats/ioprocs.h24
-rw-r--r--src/lib/formats/ipf_dsk.cpp35
-rw-r--r--src/lib/formats/ipf_dsk.h22
-rw-r--r--src/lib/formats/kc_cas.cpp36
-rw-r--r--src/lib/formats/kim1_cas.cpp16
-rw-r--r--src/lib/formats/lviv_lvt.cpp33
-rw-r--r--src/lib/formats/mbee_cas.cpp10
-rw-r--r--src/lib/formats/mfi_dsk.cpp15
-rw-r--r--src/lib/formats/mz_cas.cpp13
-rw-r--r--src/lib/formats/orao_cas.cpp16
-rw-r--r--src/lib/formats/oric_tap.cpp13
-rw-r--r--src/lib/formats/p2000t_cas.cpp82
-rw-r--r--src/lib/formats/p6001_cas.cpp19
-rw-r--r--src/lib/formats/phc25_cas.cpp16
-rw-r--r--src/lib/formats/pmd_cas.cpp16
-rw-r--r--src/lib/formats/primoptp.cpp17
-rw-r--r--src/lib/formats/rk_cas.cpp59
-rw-r--r--src/lib/formats/sc3000_bit.cpp20
-rw-r--r--src/lib/formats/sol_cas.cpp14
-rw-r--r--src/lib/formats/sorc_cas.cpp12
-rw-r--r--src/lib/formats/sord_cas.cpp36
-rw-r--r--src/lib/formats/spc1000_cas.cpp24
-rw-r--r--src/lib/formats/svi_cas.cpp16
-rw-r--r--src/lib/formats/thom_cas.cpp117
-rw-r--r--src/lib/formats/trs_cas.cpp14
-rw-r--r--src/lib/formats/tvc_cas.cpp14
-rw-r--r--src/lib/formats/tzx_cas.cpp32
-rw-r--r--src/lib/formats/tzx_cas.h2
-rw-r--r--src/lib/formats/uef_cas.cpp22
-rw-r--r--src/lib/formats/uef_cas.h2
-rw-r--r--src/lib/formats/vg5k_cas.cpp18
-rw-r--r--src/lib/formats/vt_cas.cpp38
-rw-r--r--src/lib/formats/wavfile.cpp39
-rw-r--r--src/lib/formats/wavfile.h2
-rw-r--r--src/lib/formats/x07_cas.cpp16
-rw-r--r--src/lib/formats/x1_tap.cpp14
-rw-r--r--src/lib/formats/zx81_p.cpp30
-rw-r--r--src/lib/netlist/analog/nlid_fourterm.h15
-rw-r--r--src/lib/netlist/analog/nlid_twoterm.h2
-rwxr-xr-xsrc/lib/netlist/buildVS/netlistlib.vcxproj13
-rwxr-xr-xsrc/lib/netlist/buildVS/netlistlib.vcxproj.filters35
-rw-r--r--src/lib/netlist/core/analog.h3
-rw-r--r--src/lib/netlist/core/base_objects.h10
-rw-r--r--src/lib/netlist/core/core_device.h16
-rw-r--r--src/lib/netlist/core/exec.h25
-rw-r--r--src/lib/netlist/core/logic.h12
-rw-r--r--src/lib/netlist/core/netlist_state.h35
-rw-r--r--src/lib/netlist/core/nets.h158
-rw-r--r--src/lib/netlist/core/object_array.h6
-rw-r--r--src/lib/netlist/core/param.h4
-rw-r--r--src/lib/netlist/core/queue.h3
-rw-r--r--src/lib/netlist/core/setup.h22
-rw-r--r--src/lib/netlist/core/state_var.h7
-rwxr-xr-x[-rw-r--r--]src/lib/netlist/devices/nld_2102a.cpp (renamed from src/lib/netlist/devices/nld_2102A.cpp)0
-rw-r--r--src/lib/netlist/devices/nld_4029.cpp272
-rw-r--r--src/lib/netlist/devices/nld_4042.cpp120
-rw-r--r--src/lib/netlist/devices/nld_4076.cpp132
-rw-r--r--src/lib/netlist/devices/nld_7448.cpp2
-rw-r--r--src/lib/netlist/devices/nld_7493.cpp34
-rwxr-xr-x[-rw-r--r--]src/lib/netlist/devices/nld_82s115.cpp (renamed from src/lib/netlist/devices/nld_82S115.cpp)0
-rwxr-xr-x[-rw-r--r--]src/lib/netlist/devices/nld_82s16.cpp (renamed from src/lib/netlist/devices/nld_82S16.cpp)0
-rw-r--r--src/lib/netlist/devices/nld_9316_base.hxx20
-rw-r--r--src/lib/netlist/devices/nld_9321.cpp2
-rw-r--r--src/lib/netlist/devices/nld_log.cpp4
-rw-r--r--src/lib/netlist/devices/nld_roms.cpp77
-rw-r--r--src/lib/netlist/devices/nld_system.cpp2
-rw-r--r--src/lib/netlist/devices/nlid_proxy.cpp18
-rw-r--r--src/lib/netlist/devices/nlid_system.h51
-rw-r--r--src/lib/netlist/devices/nlid_truthtable.cpp26
-rw-r--r--src/lib/netlist/examples/2n6027.cpp (renamed from src/lib/netlist/examples/2N6027.cpp)0
-rw-r--r--src/lib/netlist/examples/lm3900_test.cpp (renamed from src/lib/netlist/examples/LM3900_test.cpp)0
-rwxr-xr-xsrc/lib/netlist/generated/lib_entries.hxx4
-rwxr-xr-xsrc/lib/netlist/generated/nld_devinc.h90
-rwxr-xr-xsrc/lib/netlist/generated/nlm_modules_lib.cpp2
-rw-r--r--src/lib/netlist/generated/static_solvers.cpp13574
-rwxr-xr-x[-rw-r--r--]src/lib/netlist/macro/modules/nlmod_icl8038_dip.cpp (renamed from src/lib/netlist/macro/modules/nlmod_ICL8038_DIP.cpp)0
-rwxr-xr-x[-rw-r--r--]src/lib/netlist/macro/modules/nlmod_ne556_dip.cpp (renamed from src/lib/netlist/macro/modules/nlmod_NE556_DIP.cpp)0
-rwxr-xr-x[-rw-r--r--]src/lib/netlist/macro/modules/nlmod_rtest.cpp (renamed from src/lib/netlist/macro/modules/nlmod_RTEST.cpp)0
-rw-r--r--src/lib/netlist/macro/nlm_cd4xxx_lib.cpp398
-rw-r--r--src/lib/netlist/macro/nlm_opamp_lib.cpp11
-rw-r--r--src/lib/netlist/macro/nlm_roms_lib.cpp34
-rw-r--r--src/lib/netlist/nl_base.cpp54
-rw-r--r--src/lib/netlist/nl_config.h60
-rw-r--r--src/lib/netlist/nl_errstr.h11
-rw-r--r--src/lib/netlist/nl_parser.h2
-rw-r--r--src/lib/netlist/nl_setup.cpp58
-rw-r--r--src/lib/netlist/nl_setup.h6
-rw-r--r--src/lib/netlist/nltypes.h18
-rw-r--r--src/lib/netlist/plib/gmres.h189
-rw-r--r--src/lib/netlist/plib/palloc.h7
-rw-r--r--src/lib/netlist/plib/parray.h17
-rwxr-xr-x[-rw-r--r--]src/lib/netlist/plib/pchrono.h42
-rw-r--r--src/lib/netlist/plib/pconfig.h7
-rw-r--r--src/lib/netlist/plib/pexception.cpp6
-rw-r--r--src/lib/netlist/plib/pexception.h4
-rw-r--r--src/lib/netlist/plib/pfmtlog.cpp7
-rw-r--r--src/lib/netlist/plib/pfmtlog.h27
-rw-r--r--src/lib/netlist/plib/pfunction.cpp133
-rw-r--r--src/lib/netlist/plib/pfunction.h25
-rw-r--r--src/lib/netlist/plib/pgsl.h35
-rwxr-xr-xsrc/lib/netlist/plib/plists.h43
-rw-r--r--src/lib/netlist/plib/pmath.h104
-rwxr-xr-xsrc/lib/netlist/plib/pmatrix2d.h11
-rw-r--r--src/lib/netlist/plib/pmatrix_cr.h (renamed from src/lib/netlist/plib/mat_cr.h)208
-rw-r--r--src/lib/netlist/plib/pmempool.h5
-rw-r--r--src/lib/netlist/plib/pmulti_threading.h11
-rw-r--r--src/lib/netlist/plib/poptions.h10
-rw-r--r--src/lib/netlist/plib/ppmf.h2
-rw-r--r--src/lib/netlist/plib/ppreprocessor.cpp6
-rw-r--r--src/lib/netlist/plib/prandom.h8
-rw-r--r--src/lib/netlist/plib/pstream.h10
-rw-r--r--src/lib/netlist/plib/pstring.h24
-rw-r--r--src/lib/netlist/plib/ptests.h8
-rw-r--r--src/lib/netlist/plib/ptime.h22
-rw-r--r--src/lib/netlist/plib/ptimed_queue.h85
-rw-r--r--src/lib/netlist/plib/vector_ops.h73
-rw-r--r--src/lib/netlist/prg/nltool.cpp8
-rw-r--r--src/lib/netlist/solver/nld_matrix_solver.cpp16
-rw-r--r--src/lib/netlist/solver/nld_matrix_solver.h4
-rw-r--r--src/lib/netlist/solver/nld_ms_gcr.h13
-rw-r--r--src/lib/netlist/solver/nld_ms_gmres.h4
-rw-r--r--src/lib/netlist/solver/nld_solver.cpp91
-rw-r--r--src/lib/netlist/tests/test_pfunction.cpp7
-rw-r--r--src/lib/util/avhuff.cpp23
-rw-r--r--src/lib/util/avhuff.h64
-rw-r--r--src/lib/util/aviio.cpp16
-rw-r--r--src/lib/util/bitmap.cpp104
-rw-r--r--src/lib/util/bitmap.h79
-rw-r--r--src/lib/util/chdcodec.cpp2
-rw-r--r--src/lib/util/corealloc.h40
-rw-r--r--src/lib/util/coretmpl.h6
-rw-r--r--src/lib/util/msdib.cpp642
-rw-r--r--src/lib/util/msdib.h46
-rw-r--r--src/lib/util/nanosvg.cpp6
-rw-r--r--src/lib/util/nanosvg.h33
-rw-r--r--src/lib/util/png.cpp271
-rw-r--r--src/lib/util/png.h42
-rw-r--r--src/lib/util/xmlfile.cpp9
159 files changed, 16725 insertions, 4202 deletions
diff --git a/src/lib/formats/a26_cas.cpp b/src/lib/formats/a26_cas.cpp
index 0074da6aba3..09d7e2479e5 100644
--- a/src/lib/formats/a26_cas.cpp
+++ b/src/lib/formats/a26_cas.cpp
@@ -6,10 +6,10 @@ Atari 2600 SuperCharger support
*/
-#include <cassert>
-
#include "formats/a26_cas.h"
+#include <cassert>
+
#define A26_CAS_SIZE 8448
#define A26_WAV_FREQUENCY 44100
@@ -132,7 +132,7 @@ static int a26_cas_to_wav_size( const uint8_t *casdata, int caslen ) {
return a26_cas_do_work( nullptr, casdata );
}
-static const struct CassetteLegacyWaveFiller a26_legacy_fill_wave = {
+static const cassette_image::LegacyWaveFiller a26_legacy_fill_wave = {
a26_cas_fill_wave,
-1,
0,
@@ -142,21 +142,21 @@ static const struct CassetteLegacyWaveFiller a26_legacy_fill_wave = {
0
};
-static cassette_image::error a26_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) {
+static cassette_image::error a26_cassette_identify( cassette_image *cassette, cassette_image::Options *opts ) {
uint64_t size;
- size = cassette_image_size( cassette );
+ size = cassette->image_size( );
if ( size == A26_CAS_SIZE ) {
- return cassette_legacy_identify( cassette, opts, &a26_legacy_fill_wave );
+ return cassette->legacy_identify( opts, &a26_legacy_fill_wave );
}
return cassette_image::error::INVALID_IMAGE;
}
static cassette_image::error a26_cassette_load( cassette_image *cassette ) {
- return cassette_legacy_construct( cassette, &a26_legacy_fill_wave );
+ return cassette->legacy_construct( &a26_legacy_fill_wave );
}
-static const struct CassetteFormat a26_cassette_format = {
+static const cassette_image::Format a26_cassette_format = {
"a26",
a26_cassette_identify,
a26_cassette_load,
diff --git a/src/lib/formats/ace_tap.cpp b/src/lib/formats/ace_tap.cpp
index 522050f612a..1619280b66b 100644
--- a/src/lib/formats/ace_tap.cpp
+++ b/src/lib/formats/ace_tap.cpp
@@ -10,10 +10,10 @@ For more information see:
********************************************************************/
-#include <cassert>
-
#include "ace_tap.h"
+#include <cassert>
+
#define SMPLO -32768
#define SILENCE 0
@@ -155,7 +155,7 @@ static int ace_tap_to_wav_size(const uint8_t *casdata, int caslen)
}
-static const struct CassetteLegacyWaveFiller ace_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller ace_legacy_fill_wave =
{
ace_tap_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -167,19 +167,19 @@ static const struct CassetteLegacyWaveFiller ace_legacy_fill_wave =
};
-static cassette_image::error ace_tap_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error ace_tap_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &ace_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &ace_legacy_fill_wave);
}
static cassette_image::error ace_tap_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &ace_legacy_fill_wave);
+ return cassette->legacy_construct(&ace_legacy_fill_wave);
}
-static const struct CassetteFormat ace_tap_format =
+static const cassette_image::Format ace_tap_format =
{
"tap",
ace_tap_identify,
diff --git a/src/lib/formats/adam_cas.cpp b/src/lib/formats/adam_cas.cpp
index 5d24eed2543..4c678bb0796 100644
--- a/src/lib/formats/adam_cas.cpp
+++ b/src/lib/formats/adam_cas.cpp
@@ -1,10 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
+#include "adam_cas.h"
#include <cassert>
-#include "cassimg.h"
-#include "adam_cas.h"
// This code will reproduce the timing of an adam tape played back on a standard tape deck with a 1 7/8ips speed.
#define CASS_AMP 0x1fffffff
@@ -50,7 +49,7 @@ Data is phase encoded, with 70us bit cells with a transition at 31us for a 1 and
****************************************************************/
-static cassette_image::error coladam_ddp_identify ( cassette_image *cass, struct CassetteOptions *opts )
+static cassette_image::error coladam_ddp_identify ( cassette_image *cass, cassette_image::Options *opts )
{
opts -> bits_per_sample = 16;
opts -> channels = 2;
@@ -67,14 +66,14 @@ cassette_image::error coladam_put_byte(cassette_image *cass, int channel, double
{
if(byte & 0x80)
{
- err = cassette_put_sample( cass, channel, *time_index, COL_ADAM_PERIOD1, -CASS_AMP*(*prev_sign) );
+ err = cass->put_sample( channel, *time_index, COL_ADAM_PERIOD1, -CASS_AMP*(*prev_sign) );
(*time_index) += COL_ADAM_PERIOD1;
- err = cassette_put_sample( cass, channel, *time_index, COL_ADAM_PERIOD2, CASS_AMP*(*prev_sign) );
+ err = cass->put_sample( channel, *time_index, COL_ADAM_PERIOD2, CASS_AMP*(*prev_sign) );
(*time_index) += COL_ADAM_PERIOD2;
}
else
{
- err = cassette_put_sample( cass, channel, *time_index, COL_ADAM_PERIOD, -CASS_AMP*(*prev_sign) );
+ err = cass->put_sample( channel, *time_index, COL_ADAM_PERIOD, -CASS_AMP*(*prev_sign) );
(*prev_sign) *=-1;
(*time_index) += COL_ADAM_PERIOD;
}
@@ -146,12 +145,12 @@ static cassette_image::error coladam_ddp_load( cassette_image *cass )
for (block = 0; block < 128; block++)
{
- cassette_image_read( cass, buffer, 0x20000+0x400*block, 0x400 );
+ cass->image_read( buffer, 0x20000+0x400*block, 0x400 );
err = coladam_put_block(cass, 0, &time, &prev_sign, block, buffer, layout_type);
}
for (block = 128; block < 131; block++)
{
- cassette_image_read( cass, buffer, 0x3f400+0x400*(block-128), 0x400 );
+ cass->image_read( buffer, 0x3f400+0x400*(block-128), 0x400 );
err = coladam_put_block(cass, 0, &time, &prev_sign, block, buffer, layout_type);
}
@@ -165,17 +164,17 @@ static cassette_image::error coladam_ddp_load( cassette_image *cass )
{
for (block = 0; block < 64; block++)
{
- cassette_image_read( cass, buffer, 0x10000+0x400*block, 0x400 );
+ cass->image_read( buffer, 0x10000+0x400*block, 0x400 );
err = coladam_put_block(cass, 1, &time, &prev_sign, block, buffer, layout_type);
}
for (block = 64; block < 128; block++)
{
- cassette_image_read( cass, buffer, 0x00000+0x400*(block-64), 0x400 );
+ cass->image_read( buffer, 0x00000+0x400*(block-64), 0x400 );
err = coladam_put_block(cass, 1, &time, &prev_sign, block, buffer, layout_type);
}
for (block = 128; block < 131; block++)
{
- cassette_image_read( cass, buffer, 0x0f400+0x400*(block-128), 0x400 );
+ cass->image_read( buffer, 0x0f400+0x400*(block-128), 0x400 );
err = coladam_put_block(cass, 1, &time, &prev_sign, block, buffer, layout_type);
}
}
@@ -188,12 +187,12 @@ static cassette_image::error coladam_ddp_load( cassette_image *cass )
}
for (block = 0; block < 128; block++)
{
- cassette_image_read( cass, buffer, 0x400*block, 0x400 );
+ cass->image_read( buffer, 0x400*block, 0x400 );
err = coladam_put_block(cass, 1, &time, &prev_sign, block, buffer, layout_type);
}
for (block = 128; block < 131; block++)
{
- cassette_image_read( cass, buffer, 0x1f400+0x400*(block-128), 0x400 );
+ cass->image_read( buffer, 0x1f400+0x400*(block-128), 0x400 );
err = coladam_put_block(cass, 1, &time, &prev_sign, block, buffer, layout_type);
}
}
@@ -203,7 +202,7 @@ static cassette_image::error coladam_ddp_load( cassette_image *cass )
-static const struct CassetteFormat coladam_ddp =
+static const cassette_image::Format coladam_ddp =
{ "ddp", coladam_ddp_identify, coladam_ddp_load, nullptr /* no save */ };
CASSETTE_FORMATLIST_START(coleco_adam_cassette_formats)
diff --git a/src/lib/formats/apf_apt.cpp b/src/lib/formats/apf_apt.cpp
index 28793f0f853..e820090ef04 100644
--- a/src/lib/formats/apf_apt.cpp
+++ b/src/lib/formats/apf_apt.cpp
@@ -34,10 +34,10 @@ e. A checksum byte (8-bit addition)
********************************************************************/
-#include <cassert>
-
#include "formats/apf_apt.h"
+#include <cassert>
+
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
@@ -184,7 +184,7 @@ static int apf_cpf_calculate_size_in_samples(const uint8_t *bytes, int length)
//*********************************************************************************
-static const struct CassetteLegacyWaveFiller apf_cpf_fill_intf =
+static const cassette_image::LegacyWaveFiller apf_cpf_fill_intf =
{
apf_cpf_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -195,17 +195,17 @@ static const struct CassetteLegacyWaveFiller apf_cpf_fill_intf =
0 /* trailer_samples */
};
-static cassette_image::error apf_cpf_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error apf_cpf_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &apf_cpf_fill_intf);
+ return cassette->legacy_identify(opts, &apf_cpf_fill_intf);
}
static cassette_image::error apf_cpf_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &apf_cpf_fill_intf);
+ return cassette->legacy_construct(&apf_cpf_fill_intf);
}
-static const struct CassetteFormat apf_cpf_format =
+static const cassette_image::Format apf_cpf_format =
{
"cas,cpf",
apf_cpf_identify,
@@ -215,7 +215,7 @@ static const struct CassetteFormat apf_cpf_format =
//*********************************************************************************
-static const struct CassetteLegacyWaveFiller apf_apt_fill_intf =
+static const cassette_image::LegacyWaveFiller apf_apt_fill_intf =
{
apf_apt_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -226,17 +226,17 @@ static const struct CassetteLegacyWaveFiller apf_apt_fill_intf =
0 /* trailer_samples */
};
-static cassette_image::error apf_apt_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error apf_apt_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &apf_apt_fill_intf);
+ return cassette->legacy_identify(opts, &apf_apt_fill_intf);
}
static cassette_image::error apf_apt_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &apf_apt_fill_intf);
+ return cassette->legacy_construct(&apf_apt_fill_intf);
}
-static const struct CassetteFormat apf_apt_format =
+static const cassette_image::Format apf_apt_format =
{
"apt",
apf_apt_identify,
diff --git a/src/lib/formats/apridisk.cpp b/src/lib/formats/apridisk.cpp
index bb53006f188..aad688167cf 100644
--- a/src/lib/formats/apridisk.cpp
+++ b/src/lib/formats/apridisk.cpp
@@ -48,8 +48,8 @@ int apridisk_format::identify(io_generic *io, uint32_t form_factor)
bool apridisk_format::load(io_generic *io, uint32_t form_factor, floppy_image *image)
{
desc_pc_sector sectors[80][2][18];
- uint8_t sector_data[MAX_SECTORS * SECTOR_SIZE];
- uint8_t *data_ptr = sector_data;
+ std::unique_ptr<uint8_t []> sector_data(new uint8_t [MAX_SECTORS * SECTOR_SIZE]);
+ uint8_t *data_ptr = sector_data.get();
int track_count = 0, head_count = 0, sector_count = 0;
uint64_t file_size = io_generic_size(io);
diff --git a/src/lib/formats/atom_tap.cpp b/src/lib/formats/atom_tap.cpp
index 212208a6d37..cfe83bc1bae 100644
--- a/src/lib/formats/atom_tap.cpp
+++ b/src/lib/formats/atom_tap.cpp
@@ -40,11 +40,12 @@
*/
-#include <cassert>
-
#include "atom_tap.h"
#include "csw_cas.h"
#include "uef_cas.h"
+
+#include <cassert>
+
/***************************************************************************
PARAMETERS
***************************************************************************/
@@ -59,9 +60,9 @@
CassetteModulation atom_tap_modulation
-------------------------------------------------*/
-static const struct CassetteModulation atom_tap_modulation =
+static const cassette_image::Modulation atom_tap_modulation =
{
- CASSETTE_MODULATION_SINEWAVE,
+ cassette_image::MODULATION_SINEWAVE,
1200.0 - 300, 1200.0, 1200.0 + 300,
2400.0 - 600, 2400.0, 2400.0 + 600
};
@@ -73,7 +74,7 @@ static const struct CassetteModulation atom_tap_modulation =
static uint8_t cassette_image_read_uint8(cassette_image *cassette, uint64_t offset)
{
uint8_t data;
- cassette_image_read(cassette, &data, offset, 1);
+ cassette->image_read(&data, offset, 1);
return data;
}
@@ -81,9 +82,9 @@ static uint8_t cassette_image_read_uint8(cassette_image *cassette, uint64_t offs
atom_tap_identify - identify cassette
-------------------------------------------------*/
-static cassette_image::error atom_tap_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error atom_tap_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_modulation_identify( cassette, &atom_tap_modulation, opts);
+ return cassette->modulation_identify(atom_tap_modulation, opts);
}
/*-------------------------------------------------
@@ -92,7 +93,7 @@ static cassette_image::error atom_tap_identify(cassette_image *cassette, struct
#define MODULATE(_value) \
for (int i = 0; i < (_value ? 8 : 4); i++) { \
- err = cassette_put_modulated_data_bit(cassette, 0, time_index, _value, &atom_tap_modulation, &time_displacement);\
+ err = cassette->put_modulated_data_bit(0, time_index, _value, atom_tap_modulation, &time_displacement);\
if (err != cassette_image::error::SUCCESS) return err;\
time_index += time_displacement;\
}
@@ -102,7 +103,7 @@ static cassette_image::error atom_tap_identify(cassette_image *cassette, struct
static cassette_image::error atom_tap_load(cassette_image *cassette)
{
cassette_image::error err;
- uint64_t image_size = cassette_image_size(cassette);
+ uint64_t image_size = cassette->image_size();
uint64_t image_pos = 0;
double time_index = 0.0;
double time_displacement;
@@ -134,7 +135,7 @@ static cassette_image::error atom_tap_load(cassette_image *cassette)
CassetteFormat atom_tap_cassette_format
-------------------------------------------------*/
-const struct CassetteFormat atom_tap_format =
+const cassette_image::Format atom_tap_format =
{
"tap",
atom_tap_identify,
diff --git a/src/lib/formats/camplynx_cas.cpp b/src/lib/formats/camplynx_cas.cpp
index e802be4426f..5945650ca0a 100644
--- a/src/lib/formats/camplynx_cas.cpp
+++ b/src/lib/formats/camplynx_cas.cpp
@@ -191,7 +191,7 @@ static int camplynx_cassette_calculate_size_in_samples(const uint8_t *bytes, int
return camplynx_handle_cassette(nullptr, bytes);
}
-static const struct CassetteLegacyWaveFiller lynx48k_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller lynx48k_legacy_fill_wave =
{
camplynx_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -202,7 +202,7 @@ static const struct CassetteLegacyWaveFiller lynx48k_legacy_fill_wave =
0 /* trailer_samples */
};
-static const struct CassetteLegacyWaveFiller lynx128k_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller lynx128k_legacy_fill_wave =
{
camplynx_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -213,27 +213,27 @@ static const struct CassetteLegacyWaveFiller lynx128k_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error lynx48k_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error lynx48k_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &lynx48k_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &lynx48k_legacy_fill_wave);
}
-static cassette_image::error lynx128k_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error lynx128k_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &lynx128k_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &lynx128k_legacy_fill_wave);
}
static cassette_image::error lynx48k_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &lynx48k_legacy_fill_wave);
+ return cassette->legacy_construct(&lynx48k_legacy_fill_wave);
}
static cassette_image::error lynx128k_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &lynx128k_legacy_fill_wave);
+ return cassette->legacy_construct(&lynx128k_legacy_fill_wave);
}
-static const struct CassetteFormat lynx48k_cassette_image_format =
+static const cassette_image::Format lynx48k_cassette_image_format =
{
"tap",
lynx48k_cassette_identify,
@@ -241,7 +241,7 @@ static const struct CassetteFormat lynx48k_cassette_image_format =
nullptr
};
-static const struct CassetteFormat lynx128k_cassette_image_format =
+static const cassette_image::Format lynx128k_cassette_image_format =
{
"tap",
lynx128k_cassette_identify,
diff --git a/src/lib/formats/cassimg.cpp b/src/lib/formats/cassimg.cpp
index 4f5d9320754..25b060e0311 100644
--- a/src/lib/formats/cassimg.cpp
+++ b/src/lib/formats/cassimg.cpp
@@ -8,12 +8,12 @@
*********************************************************************/
-#include <cstring>
-#include <cassert>
-
-#include "imageutl.h"
#include "cassimg.h"
+#include "imageutl.h"
+
#include <algorithm>
+#include <cassert>
+#include <cstring>
/* debugging parameters */
@@ -28,21 +28,22 @@ CASSETTE_FORMATLIST_START(cassette_default_formats)
CASSETTE_FORMATLIST_END
+namespace {
/*********************************************************************
helper code
*********************************************************************/
-static double map_double(double d, uint64_t low, uint64_t high, uint64_t value)
+constexpr double map_double(double d, uint64_t low, uint64_t high, uint64_t value)
{
return d * (value - low) / (high - low);
}
-static size_t waveform_bytes_per_sample(int waveform_flags)
+constexpr size_t waveform_bytes_per_sample(int waveform_flags)
{
- return (size_t) (1 << ((waveform_flags & 0x06) / 2));
+ return size_t(1 << ((waveform_flags & 0x06) / 2));
}
@@ -51,361 +52,319 @@ static size_t waveform_bytes_per_sample(int waveform_flags)
extrapolation and interpolation
*********************************************************************/
-static int32_t extrapolate8(int8_t value)
+constexpr int32_t extrapolate8(int8_t value)
{
- return ((int32_t) value) << 24;
+ return int32_t(value) << 24;
}
-static int32_t extrapolate16(int16_t value)
+constexpr int32_t extrapolate16(int16_t value)
{
- return ((int32_t) value) << 16;
+ return int32_t(value) << 16;
}
-static int8_t interpolate8(int32_t value)
+constexpr int8_t interpolate8(int32_t value)
{
- return (int8_t) (value >> 24);
+ return int8_t(value >> 24);
}
-static int16_t interpolate16(int32_t value)
+constexpr int16_t interpolate16(int32_t value)
{
- return (int16_t) (value >> 16);
+ return int16_t(value >> 16);
}
-/*********************************************************************
- initialization and termination
-*********************************************************************/
-
-static cassette_image *cassette_init(const struct CassetteFormat *format, void *file, const struct io_procs *procs, int flags)
+constexpr size_t my_round(double d)
{
- cassette_image *cassette;
-
- cassette = global_alloc_clear<cassette_image>();
- cassette->format = format;
- cassette->io.file = file;
- cassette->io.procs = procs;
- cassette->flags = flags;
- return cassette;
+ return size_t(d + 0.5);
}
-static void cassette_finishinit(cassette_image::error err, cassette_image *cassette, cassette_image **outcassette)
+/*********************************************************************
+ waveform accesses to/from the raw image
+*********************************************************************/
+
+const int8_t *choose_wave(const cassette_image::Modulation &modulation, size_t &wave_bytes_length)
{
- if (cassette && ((err != cassette_image::error::SUCCESS) || !outcassette))
+ static const int8_t square_wave[] = { -128, 127 };
+ static const int8_t sine_wave[] = { 0, 48, 89, 117, 127, 117, 89, 48, 0, -48, -89, -117, -127, -117, -89, -48 };
+
+ if (modulation.flags & cassette_image::MODULATION_SINEWAVE)
+ {
+ wave_bytes_length = ARRAY_LENGTH(sine_wave);
+ return sine_wave;
+ }
+ else
{
- cassette_close(cassette);
- cassette = nullptr;
+ wave_bytes_length = ARRAY_LENGTH(square_wave);
+ return square_wave;
}
- if (outcassette)
- *outcassette = cassette;
}
+} // anonymous namespace
-static cassette_image::error try_identify_format(const struct CassetteFormat &format, cassette_image *image, const std::string &extension, int flags, struct CassetteOptions &opts)
+
+/*********************************************************************
+ initialization and termination
+*********************************************************************/
+
+cassette_image::error cassette_image::try_identify_format(const Format &format, const std::string &extension, int flags, Options &opts)
{
// is this the right extension?
if (!extension.empty() && !image_find_extension(format.extensions, extension.c_str()))
- return cassette_image::error::INVALID_IMAGE;
+ return error::INVALID_IMAGE;
// invoke format->identify
- memset(&opts, 0, sizeof(opts));
- cassette_image::error err = format.identify(image, &opts);
- if (err != cassette_image::error::SUCCESS)
+ opts = Options();
+ error err = format.identify(this, &opts);
+ if (err != error::SUCCESS)
return err;
// is this a read only format, but the cassette was not opened read only?
- if (((flags & CASSETTE_FLAG_READONLY) == 0) && (format.save == nullptr))
- return cassette_image::error::READ_WRITE_UNSUPPORTED;
+ if (((flags & FLAG_READONLY) == 0) && (format.save == nullptr))
+ return error::READ_WRITE_UNSUPPORTED;
// success!
- return cassette_image::error::SUCCESS;
+ return error::SUCCESS;
+}
+
+
+cassette_image::error cassette_image::perform_save()
+{
+ Info info = get_info();
+ return m_format->save(this, &info);
}
-cassette_image::error cassette_open_choices(void *file, const struct io_procs *procs, const std::string &extension,
- const struct CassetteFormat *const *formats, int flags, cassette_image **outcassette)
+/*********************************************************************
+ waveform accesses
+*********************************************************************/
+
+struct cassette_image::manipulation_ranges
{
- cassette_image::error err;
- cassette_image *cassette;
- const struct CassetteFormat *format;
- struct CassetteOptions opts = {0, };
- int i;
+ int channel_first;
+ int channel_last;
+ size_t sample_first;
+ size_t sample_last;
+};
- /* if not specified, use the dummy arguments */
- if (!formats)
- formats = cassette_default_formats;
- /* create the cassette object */
- cassette = cassette_init(nullptr, file, procs, flags);
- if (!cassette)
- {
- err = cassette_image::error::OUT_OF_MEMORY;
- goto done;
- }
- /* identify the image */
- format = nullptr;
- for (i = 0; !format && formats[i]; i++)
+cassette_image::error cassette_image::compute_manipulation_ranges(int channel,
+ double time_index, double sample_period, manipulation_ranges &ranges) const
+{
+ if (channel < 0)
{
- // try this format
- err = try_identify_format(*formats[i], cassette, extension, flags, opts);
- if (err != cassette_image::error::SUCCESS && err != cassette_image::error::INVALID_IMAGE)
- goto done;
-
- // did we succeed?
- if (err == cassette_image::error::SUCCESS)
- format = formats[i];
+ ranges.channel_first = 0;
+ ranges.channel_last = m_channels - 1;
}
-
- /* have we found a proper format */
- if (!format)
+ else
{
- err = cassette_image::error::INVALID_IMAGE;
- goto done;
+ ranges.channel_first = channel;
+ ranges.channel_last = channel;
}
- cassette->format = format;
-
- /* read the options */
- cassette->channels = opts.channels;
- cassette->sample_frequency = opts.sample_frequency;
- /* load the image */
- err = format->load(cassette);
- if (err != cassette_image::error::SUCCESS)
- goto done;
+ ranges.sample_first = my_round(time_index * m_sample_frequency);
+ ranges.sample_last = my_round((time_index + sample_period) * m_sample_frequency);
- /* success */
- cassette->flags &= ~CASSETTE_FLAG_DIRTY;
- err = cassette_image::error::SUCCESS;
+ if (ranges.sample_last > ranges.sample_first)
+ ranges.sample_last--;
-done:
- cassette_finishinit(err, cassette, outcassette);
- return err;
+ return error::SUCCESS;
}
-cassette_image::error cassette_open(void *file, const struct io_procs *procs,
- const struct CassetteFormat *format, int flags, cassette_image **outcassette)
+cassette_image::error cassette_image::lookup_sample(int channel, size_t sample, int32_t *&ptr)
{
- const struct CassetteFormat *formats[2];
- formats[0] = format;
- formats[1] = nullptr;
- return cassette_open_choices(file, procs, nullptr, formats, flags, outcassette);
-}
-
+ ptr = nullptr;
+ size_t sample_blocknum = (sample / SAMPLES_PER_BLOCK) * m_channels + channel;
+ size_t sample_index = sample % SAMPLES_PER_BLOCK;
+ // is this block beyond the edge of our waveform?
+ if (sample_blocknum >= m_blocks.size())
+ m_blocks.resize(sample_blocknum + 1);
-cassette_image::error cassette_create(void *file, const struct io_procs *procs, const struct CassetteFormat *format,
- const struct CassetteOptions *opts, int flags, cassette_image **outcassette)
-{
- cassette_image::error err;
- cassette_image *cassette;
- static const struct CassetteOptions default_options = { 1, 16, 44100 };
+ if (!m_blocks[sample_blocknum])
+ m_blocks[sample_blocknum] = make_unique_clear<int32_t []>(SAMPLES_PER_BLOCK);
- /* cannot create to a read only image */
- if (flags & CASSETTE_FLAG_READONLY)
- return cassette_image::error::INVALID_IMAGE;
+ ptr = &m_blocks[sample_blocknum][sample_index];
+ return error::SUCCESS;
+}
- /* is this a good format? */
- if (format->save == nullptr)
- return cassette_image::error::INVALID_IMAGE;
- /* normalize arguments */
- if (!opts)
- opts = &default_options;
- /* create the cassette object */
- cassette = cassette_init(format, file, procs, flags);
- if (!cassette)
- {
- err = cassette_image::error::OUT_OF_MEMORY;
- goto done;
- }
+cassette_image::cassette_image(const Format *format, void *file, const io_procs *procs, int flags)
+{
+ m_format = format;
+ m_io.file = file;
+ m_io.procs = procs;
+ m_flags = flags;
+}
- /* read the options */
- cassette->channels = opts->channels;
- cassette->sample_frequency = opts->sample_frequency;
- err = cassette_image::error::SUCCESS;
-done:
- cassette_finishinit(err, cassette, outcassette);
- return err;
+cassette_image::~cassette_image()
+{
+ if ((m_flags & CASSETTE_FLAG_DIRTY) && (m_flags & FLAG_SAVEONEXIT))
+ save();
}
-static cassette_image::error cassette_perform_save(cassette_image *cassette)
+cassette_image::error cassette_image::open(void *file, const io_procs *procs,
+ const Format *format, int flags, ptr &outcassette)
{
- struct CassetteInfo info;
- cassette_get_info(cassette, &info);
- return cassette->format->save(cassette, &info);
+ const Format *const formats[2] = { format, nullptr };
+ return open_choices(file, procs, nullptr, formats, flags, outcassette);
}
-cassette_image::error cassette_save(cassette_image *cassette)
+cassette_image::error cassette_image::open_choices(void *file, const io_procs *procs, const std::string &extension,
+ const Format *const *formats, int flags, ptr &outcassette)
{
- cassette_image::error err;
+ // if not specified, use the dummy arguments
+ if (!formats)
+ formats = cassette_default_formats;
- if (!cassette->format || !cassette->format->save)
- return cassette_image::error::UNSUPPORTED;
+ // create the cassette object
+ ptr cassette;
+ try { cassette.reset(new cassette_image(nullptr, file, procs, flags)); }
+ catch (std::bad_alloc const &) { return error::OUT_OF_MEMORY; }
- err = cassette_perform_save(cassette);
- if (err != cassette_image::error::SUCCESS)
+ // identify the image
+ const Format *format = nullptr;
+ Options opts;
+ for (int i = 0; !format && formats[i]; i++)
+ {
+ // try this format
+ error err = cassette->try_identify_format(*formats[i], extension, flags, opts);
+ if (err != error::SUCCESS && err != error::INVALID_IMAGE)
+ return err;
+
+ // did we succeed?
+ if (err == error::SUCCESS)
+ format = formats[i];
+ }
+
+ // have we found a proper format
+ if (!format)
+ return error::INVALID_IMAGE;
+ cassette->m_format = format;
+
+ // read the options
+ cassette->m_channels = opts.channels;
+ cassette->m_sample_frequency = opts.sample_frequency;
+
+ // load the image
+ error err = format->load(cassette.get());
+ if (err != error::SUCCESS)
return err;
- cassette->flags &= ~CASSETTE_FLAG_DIRTY;
- return cassette_image::error::SUCCESS;
+ /* success */
+ cassette->m_flags &= ~CASSETTE_FLAG_DIRTY;
+ outcassette = std::move(cassette);
+ return error::SUCCESS;
}
-void cassette_get_info(cassette_image *cassette, struct CassetteInfo *info)
+cassette_image::error cassette_image::create(void *file, const io_procs *procs, const Format *format,
+ const Options *opts, int flags, ptr &outcassette)
{
- memset(info, 0, sizeof(*info));
- info->channels = cassette->channels;
- info->sample_count = cassette->sample_count;
- info->sample_frequency = cassette->sample_frequency;
- info->bits_per_sample = (int) waveform_bytes_per_sample(cassette->flags) * 8;
-}
+ static const Options default_options = { 1, 16, 44100 };
+ // cannot create to a read only image
+ if (flags & FLAG_READONLY)
+ return error::INVALID_IMAGE;
+ // is this a good format?
+ if (format->save == nullptr)
+ return error::INVALID_IMAGE;
-void cassette_close(cassette_image *cassette)
-{
- if (cassette)
- {
- if ((cassette->flags & CASSETTE_FLAG_DIRTY) && (cassette->flags & CASSETTE_FLAG_SAVEONEXIT))
- cassette_save(cassette);
- for (auto & elem : cassette->blocks)
- {
- global_free(elem);
- }
- global_free(cassette);
- }
-}
+ // normalize arguments
+ if (!opts)
+ opts = &default_options;
+ // create the cassette object
+ ptr cassette;
+ try { cassette.reset(new cassette_image(format, file, procs, flags)); }
+ catch (std::bad_alloc const &) { return error::OUT_OF_MEMORY; }
+ // read the options
+ cassette->m_channels = opts->channels;
+ cassette->m_sample_frequency = opts->sample_frequency;
-void cassette_change(cassette_image *cassette, void *file, const struct io_procs *procs, const struct CassetteFormat *format, int flags)
-{
- if ((flags & CASSETTE_FLAG_READONLY) == 0)
- flags |= CASSETTE_FLAG_DIRTY;
- cassette->io.file = file;
- cassette->io.procs = procs;
- cassette->format = format;
- cassette->flags = flags;
+ outcassette = std::move(cassette);
+ return error::SUCCESS;
}
-/*********************************************************************
- calls for accessing the raw cassette image
-*********************************************************************/
-
-void cassette_image_read(cassette_image *cassette, void *buffer, uint64_t offset, size_t length)
+cassette_image::error cassette_image::save()
{
- io_generic_read(&cassette->io, buffer, offset, length);
+ if (!m_format || !m_format->save)
+ return error::UNSUPPORTED;
+
+ error err = perform_save();
+ if (err != error::SUCCESS)
+ return err;
+
+ m_flags &= ~CASSETTE_FLAG_DIRTY;
+ return error::SUCCESS;
}
-void cassette_image_write(cassette_image *cassette, const void *buffer, uint64_t offset, size_t length)
+cassette_image::Info cassette_image::get_info() const
{
- io_generic_write(&cassette->io, buffer, offset, length);
+ Info result;
+ result.channels = m_channels;
+ result.sample_count = m_sample_count;
+ result.sample_frequency = m_sample_frequency;
+ result.bits_per_sample = (int)waveform_bytes_per_sample(m_flags) * 8;
+ return result;
}
-uint64_t cassette_image_size(cassette_image *cassette)
+void cassette_image::change(void *file, const io_procs *procs, const Format *format, int flags)
{
- return io_generic_size(&cassette->io);
+ if ((flags & FLAG_READONLY) == 0)
+ flags |= CASSETTE_FLAG_DIRTY;
+ m_io.file = file;
+ m_io.procs = procs;
+ m_format = format;
+ m_flags = flags;
}
/*********************************************************************
- waveform accesses
+ calls for accessing the raw cassette image
*********************************************************************/
-struct manipulation_ranges
+void cassette_image::image_read(void *buffer, uint64_t offset, size_t length)
{
- int channel_first;
- int channel_last;
- size_t sample_first;
- size_t sample_last;
-};
-
-
-
-static size_t my_round(double d)
-{
- size_t result;
- d += 0.5;
- result = (size_t) d;
- return result;
+ io_generic_read(&m_io, buffer, offset, length);
}
-static cassette_image::error compute_manipulation_ranges(cassette_image *cassette, int channel,
- double time_index, double sample_period, struct manipulation_ranges *ranges)
+void cassette_image::image_write(const void *buffer, uint64_t offset, size_t length)
{
- if (channel < 0)
- {
- ranges->channel_first = 0;
- ranges->channel_last = cassette->channels - 1;
- }
- else
- {
- ranges->channel_first = channel;
- ranges->channel_last = channel;
- }
-
- ranges->sample_first = my_round(time_index * cassette->sample_frequency);
- ranges->sample_last = my_round((time_index + sample_period) * cassette->sample_frequency);
-
- if (ranges->sample_last > ranges->sample_first)
- ranges->sample_last--;
-
- return cassette_image::error::SUCCESS;
+ io_generic_write(&m_io, buffer, offset, length);
}
-static cassette_image::error lookup_sample(cassette_image *cassette, int channel, size_t sample, int32_t **ptr)
+uint64_t cassette_image::image_size()
{
- *ptr = nullptr;
- size_t sample_blocknum = (sample / SAMPLES_PER_BLOCK) * cassette->channels + channel;
- size_t sample_index = sample % SAMPLES_PER_BLOCK;
-
- /* is this block beyond the edge of our waveform? */
- if (sample_blocknum >= cassette->blocks.size()) {
- size_t osize = cassette->blocks.size();
- cassette->blocks.resize(sample_blocknum + 1);
- memset(&cassette->blocks[osize], 0, (cassette->blocks.size()-osize)*sizeof(cassette->blocks[0]));
- }
-
- if (cassette->blocks[sample_blocknum] == nullptr)
- cassette->blocks[sample_blocknum] = global_alloc(sample_block);
-
- sample_block &block = *cassette->blocks[sample_blocknum];
-
- /* is this sample access off the current block? */
- if (sample_index >= block.size()) {
- size_t osize = block.size();
- block.resize(SAMPLES_PER_BLOCK);
- memset(&block[osize], 0, (SAMPLES_PER_BLOCK-osize)*sizeof(block[0]));
- }
-
- *ptr = &block[sample_index];
- return cassette_image::error::SUCCESS;
+ return io_generic_size(&m_io);
}
@@ -417,38 +376,29 @@ static cassette_image::error lookup_sample(cassette_image *cassette, int channel
// Note: In normal use, the sample_spacing is the same as the sample size (in bytes)
// But it can be larger to help do an interleaved write to samples
// (see cassette_write_samples)
-cassette_image::error cassette_get_samples(cassette_image *cassette, int channel,
+cassette_image::error cassette_image::get_samples(int channel,
double time_index, double sample_period, size_t sample_count, size_t sample_spacing,
void *samples, int waveform_flags)
{
- cassette_image::error err;
- struct manipulation_ranges ranges;
- size_t sample_index;
- size_t cassette_sample_index;
- uint8_t *dest_ptr;
- const int32_t *source_ptr;
- double d;
- int16_t word;
- int32_t dword;
- int64_t sum;
-
- assert(cassette);
-
- err = compute_manipulation_ranges(cassette, channel, time_index, sample_period, &ranges);
- if (err != cassette_image::error::SUCCESS)
+ error err;
+ manipulation_ranges ranges;
+ int32_t *source_ptr;
+
+ err = compute_manipulation_ranges(channel, time_index, sample_period, ranges);
+ if (err != error::SUCCESS)
return err;
- for (sample_index = 0; sample_index < sample_count; sample_index++)
+ for (size_t sample_index = 0; sample_index < sample_count; sample_index++)
{
- sum = 0;
+ int64_t sum = 0;
for (channel = ranges.channel_first; channel <= ranges.channel_last; channel++)
{
/* find the sample that we are putting */
- d = map_double(ranges.sample_last + 1 - ranges.sample_first, 0, sample_count, sample_index) + ranges.sample_first;
- cassette_sample_index = (size_t) d;
- err = lookup_sample(cassette, channel, cassette_sample_index, (int32_t **) &source_ptr);
- if (err != cassette_image::error::SUCCESS)
+ double d = map_double(ranges.sample_last + 1 - ranges.sample_first, 0, sample_count, sample_index) + ranges.sample_first;
+ size_t cassette_sample_index = (size_t) d;
+ err = lookup_sample(channel, cassette_sample_index, source_ptr);
+ if (err != error::SUCCESS)
return err;
sum += *source_ptr;
@@ -458,61 +408,54 @@ cassette_image::error cassette_get_samples(cassette_image *cassette, int channel
sum /= (ranges.channel_last + 1 - ranges.channel_first);
/* and write out the result */
- dest_ptr = (uint8_t*)samples;
+ uint8_t *dest_ptr = (uint8_t*)samples;
dest_ptr += sample_index * sample_spacing;
- switch(waveform_bytes_per_sample(waveform_flags))
+ int16_t word;
+ int32_t dword;
+ switch (waveform_bytes_per_sample(waveform_flags))
{
- case 1:
- *((int8_t *) dest_ptr) = interpolate8(sum);
- break;
- case 2:
- word = interpolate16(sum);
- if (waveform_flags & CASSETTE_WAVEFORM_ENDIAN_FLIP)
- word = swapendian_int16(word);
- *((int16_t *) dest_ptr) = word;
- break;
- case 4:
- dword = sum;
- if (waveform_flags & CASSETTE_WAVEFORM_ENDIAN_FLIP)
- dword = swapendian_int32(dword);
- *((int32_t *) dest_ptr) = dword;
- break;
+ case 1:
+ *((int8_t *) dest_ptr) = interpolate8(sum);
+ break;
+ case 2:
+ word = interpolate16(sum);
+ if (waveform_flags & WAVEFORM_ENDIAN_FLIP)
+ word = swapendian_int16(word);
+ *((int16_t *) dest_ptr) = word;
+ break;
+ case 4:
+ dword = sum;
+ if (waveform_flags & WAVEFORM_ENDIAN_FLIP)
+ dword = swapendian_int32(dword);
+ *((int32_t *) dest_ptr) = dword;
+ break;
}
}
- return cassette_image::error::SUCCESS;
+ return error::SUCCESS;
}
// Note: In normal use, the sample_spacing is the same as the sample size (in bytes)
// But it can be larger to help do an interleaved read from samples
// (see cassette_read_samples)
-cassette_image::error cassette_put_samples(cassette_image *cassette, int channel,
+cassette_image::error cassette_image::put_samples(int channel,
double time_index, double sample_period, size_t sample_count, size_t sample_spacing,
const void *samples, int waveform_flags)
{
- cassette_image::error err;
- struct manipulation_ranges ranges;
- size_t sample_index;
+ error err;
+ manipulation_ranges ranges;
int32_t *dest_ptr;
- int32_t dest_value;
- int16_t word;
- int32_t dword;
- const uint8_t *source_ptr;
- double d;
-
- if (!cassette)
- return cassette_image::error::SUCCESS;
if (sample_period == 0)
- return cassette_image::error::SUCCESS;
+ return error::SUCCESS;
- err = compute_manipulation_ranges(cassette, channel, time_index, sample_period, &ranges);
- if (err != cassette_image::error::SUCCESS)
+ err = compute_manipulation_ranges(channel, time_index, sample_period, ranges);
+ if (err != error::SUCCESS)
return err;
- if (cassette->sample_count < ranges.sample_last+1)
- cassette->sample_count = ranges.sample_last + 1;
- cassette->flags |= CASSETTE_FLAG_DIRTY;
+ if (m_sample_count < ranges.sample_last+1)
+ m_sample_count = ranges.sample_last + 1;
+ m_flags |= CASSETTE_FLAG_DIRTY;
if (LOG_PUT_SAMPLES)
{
@@ -521,65 +464,68 @@ cassette_image::error cassette_put_samples(cassette_image *cassette, int channel
(int)ranges.sample_first, (int)ranges.sample_last);
}
- for (sample_index = ranges.sample_first; sample_index <= ranges.sample_last; sample_index++)
+ for (size_t sample_index = ranges.sample_first; sample_index <= ranges.sample_last; sample_index++)
{
/* figure out the source pointer */
- d = map_double(sample_count, ranges.sample_first, ranges.sample_last + 1, sample_index);
- source_ptr = (const uint8_t*)samples;
+ double d = map_double(sample_count, ranges.sample_first, ranges.sample_last + 1, sample_index);
+ const uint8_t *source_ptr = (const uint8_t*)samples;
source_ptr += ((size_t) d) * sample_spacing;
/* compute the value that we are writing */
+ int32_t dest_value;
+ int16_t word;
+ int32_t dword;
switch(waveform_bytes_per_sample(waveform_flags)) {
case 1:
- if (waveform_flags & CASSETTE_WAVEFORM_UNSIGNED)
+ if (waveform_flags & WAVEFORM_UNSIGNED)
dest_value = extrapolate8((int8_t)(*source_ptr - 128));
else
dest_value = extrapolate8(*((int8_t *) source_ptr));
break;
case 2:
word = *((int16_t *) source_ptr);
- if (waveform_flags & CASSETTE_WAVEFORM_ENDIAN_FLIP)
+ if (waveform_flags & WAVEFORM_ENDIAN_FLIP)
word = swapendian_int16(word);
dest_value = extrapolate16(word);
break;
case 4:
dword = *((int32_t *) source_ptr);
- if (waveform_flags & CASSETTE_WAVEFORM_ENDIAN_FLIP)
+ if (waveform_flags & WAVEFORM_ENDIAN_FLIP)
dword = swapendian_int32(dword);
dest_value = dword;
break;
default:
- return cassette_image::error::INTERNAL;
+ return error::INTERNAL;
}
for (channel = ranges.channel_first; channel <= ranges.channel_last; channel++)
{
/* find the sample that we are putting */
- err = lookup_sample(cassette, channel, sample_index, &dest_ptr);
- if (err != cassette_image::error::SUCCESS)
+ err = lookup_sample(channel, sample_index, dest_ptr);
+ if (err != error::SUCCESS)
return err;
*dest_ptr = dest_value;
}
}
- return cassette_image::error::SUCCESS;
+ return error::SUCCESS;
}
-cassette_image::error cassette_get_sample(cassette_image *cassette, int channel,
+cassette_image::error cassette_image::get_sample(int channel,
double time_index, double sample_period, int32_t *sample)
{
- return cassette_get_samples(cassette, channel, time_index,
- sample_period, 1, 0, sample, CASSETTE_WAVEFORM_32BIT);
+ return get_samples(channel, time_index,
+ sample_period, 1, 0, sample, WAVEFORM_32BIT);
}
-cassette_image::error cassette_put_sample(cassette_image *cassette, int channel,
+cassette_image::error cassette_image::put_sample(int channel,
double time_index, double sample_period, int32_t sample)
{
- return cassette_put_samples(cassette, channel, time_index,
- sample_period, 1, 0, &sample, CASSETTE_WAVEFORM_32BIT);
+ return put_samples(channel, time_index,
+ sample_period, 1, 0, &sample, WAVEFORM_32BIT);
}
@@ -588,153 +534,112 @@ cassette_image::error cassette_put_sample(cassette_image *cassette, int channel,
waveform accesses to/from the raw image
*********************************************************************/
-cassette_image::error cassette_read_samples(cassette_image *cassette, int channels, double time_index,
+cassette_image::error cassette_image::read_samples(int channels, double time_index,
double sample_period, size_t sample_count, uint64_t offset, int waveform_flags)
{
- cassette_image::error err;
- size_t chunk_sample_count;
- size_t bytes_per_sample;
- size_t sample_spacing;
+ error err;
size_t samples_loaded = 0;
- double chunk_time_index;
- double chunk_sample_period;
- int channel;
uint8_t buffer[8192];
- bytes_per_sample = waveform_bytes_per_sample(waveform_flags);
- sample_spacing = bytes_per_sample * channels;
+ size_t bytes_per_sample = waveform_bytes_per_sample(waveform_flags);
+ size_t sample_spacing = bytes_per_sample * channels;
- while(samples_loaded < sample_count)
+ while (samples_loaded < sample_count)
{
- chunk_sample_count = std::min(sizeof(buffer) / sample_spacing, (sample_count - samples_loaded));
- chunk_sample_period = map_double(sample_period, 0, sample_count, chunk_sample_count);
- chunk_time_index = time_index + map_double(sample_period, 0, sample_count, samples_loaded);
+ size_t chunk_sample_count = std::min(sizeof(buffer) / sample_spacing, (sample_count - samples_loaded));
+ double chunk_sample_period = map_double(sample_period, 0, sample_count, chunk_sample_count);
+ double chunk_time_index = time_index + map_double(sample_period, 0, sample_count, samples_loaded);
- cassette_image_read(cassette, buffer, offset, chunk_sample_count * sample_spacing);
+ image_read(buffer, offset, chunk_sample_count * sample_spacing);
- for (channel = 0; channel < channels; channel++)
+ for (int channel = 0; channel < channels; channel++)
{
- err = cassette_put_samples(cassette, channel, chunk_time_index, chunk_sample_period,
+ err = put_samples(channel, chunk_time_index, chunk_sample_period,
chunk_sample_count, sample_spacing, &buffer[channel * bytes_per_sample], waveform_flags);
- if (err != cassette_image::error::SUCCESS)
+ if (err != error::SUCCESS)
return err;
}
offset += chunk_sample_count * sample_spacing;
samples_loaded += chunk_sample_count;
}
- return cassette_image::error::SUCCESS;
+ return error::SUCCESS;
}
-cassette_image::error cassette_write_samples(cassette_image *cassette, int channels, double time_index,
+cassette_image::error cassette_image::write_samples(int channels, double time_index,
double sample_period, size_t sample_count, uint64_t offset, int waveform_flags)
{
- cassette_image::error err;
- size_t chunk_sample_count;
- size_t bytes_per_sample;
- size_t sample_spacing;
+ error err;
size_t samples_saved = 0;
- double chunk_time_index;
- double chunk_sample_period;
- int channel;
uint8_t buffer[8192];
- bytes_per_sample = waveform_bytes_per_sample(waveform_flags);
- sample_spacing = bytes_per_sample * channels;
+ size_t bytes_per_sample = waveform_bytes_per_sample(waveform_flags);
+ size_t sample_spacing = bytes_per_sample * channels;
- while(samples_saved < sample_count)
+ while (samples_saved < sample_count)
{
- chunk_sample_count = std::min(sizeof(buffer) / sample_spacing, (sample_count - samples_saved));
- chunk_sample_period = map_double(sample_period, 0, sample_count, chunk_sample_count);
- chunk_time_index = time_index + map_double(sample_period, 0, sample_count, samples_saved);
+ size_t chunk_sample_count = std::min(sizeof(buffer) / sample_spacing, (sample_count - samples_saved));
+ double chunk_sample_period = map_double(sample_period, 0, sample_count, chunk_sample_count);
+ double chunk_time_index = time_index + map_double(sample_period, 0, sample_count, samples_saved);
- for (channel = 0; channel < channels; channel++)
+ for (int channel = 0; channel < channels; channel++)
{
- err = cassette_get_samples(cassette, channel, chunk_time_index, chunk_sample_period,
+ err = get_samples(channel, chunk_time_index, chunk_sample_period,
chunk_sample_count, sample_spacing, &buffer[channel * bytes_per_sample], waveform_flags);
- if (err != cassette_image::error::SUCCESS)
+ if (err != error::SUCCESS)
return err;
}
- cassette_image_write(cassette, buffer, offset, chunk_sample_count * sample_spacing);
+ image_write(buffer, offset, chunk_sample_count * sample_spacing);
offset += chunk_sample_count * sample_spacing;
samples_saved += chunk_sample_count;
}
- return cassette_image::error::SUCCESS;
+ return error::SUCCESS;
}
-/*********************************************************************
- waveform accesses to/from the raw image
-*********************************************************************/
-
-static const int8_t *choose_wave(const struct CassetteModulation *modulation, size_t *wave_bytes_length)
-{
- static const int8_t square_wave[] = { -128, 127 };
- static const int8_t sine_wave[] = { 0, 48, 89, 117, 127, 117, 89, 48, 0, -48, -89, -117, -127, -117, -89, -48 };
-
- if (modulation->flags & CASSETTE_MODULATION_SINEWAVE)
- {
- *wave_bytes_length = ARRAY_LENGTH(sine_wave);
- return sine_wave;
- }
- else
- {
- *wave_bytes_length = ARRAY_LENGTH(square_wave);
- return square_wave;
- }
-}
-
-
-
-cassette_image::error cassette_modulation_identify(cassette_image *cassette, const struct CassetteModulation *modulation,
- struct CassetteOptions *opts)
+cassette_image::error cassette_image::modulation_identify(const Modulation &modulation, Options *opts)
{
size_t wave_bytes_length;
- choose_wave(modulation, &wave_bytes_length);
+ choose_wave(modulation, wave_bytes_length);
opts->bits_per_sample = 8;
opts->channels = 1;
- opts->sample_frequency = (uint32_t) (std::max(modulation->zero_frequency_high, modulation->one_frequency_high) * wave_bytes_length * 2);
- return cassette_image::error::SUCCESS;
+ opts->sample_frequency = uint32_t(std::max(modulation.zero_frequency_high, modulation.one_frequency_high) * wave_bytes_length * 2);
+ return error::SUCCESS;
}
-cassette_image::error cassette_put_modulated_data(cassette_image *cassette, int channel, double time_index,
- const void *data, size_t data_length, const struct CassetteModulation *modulation,
+cassette_image::error cassette_image::put_modulated_data(int channel, double time_index,
+ const void *data, size_t data_length, const Modulation &modulation,
double *time_displacement)
{
- cassette_image::error err;
+ error err;
const uint8_t *data_bytes = (const uint8_t *)data;
- const int8_t *wave_bytes;
size_t wave_bytes_length;
double total_displacement = 0.0;
- double pulse_period;
- double pulse_frequency;
- uint8_t b;
- int i;
- wave_bytes = choose_wave(modulation, &wave_bytes_length);
+ const int8_t *wave_bytes = choose_wave(modulation, wave_bytes_length);
- while(data_length--)
+ while (data_length--)
{
- b = *(data_bytes++);
- for (i = 0; i < 8; i++)
+ uint8_t b = *(data_bytes++);
+ for (int i = 0; i < 8; i++)
{
- pulse_frequency = (b & (1 << i)) ? modulation->one_frequency_canonical : modulation->zero_frequency_canonical;
- pulse_period = 1 / pulse_frequency;
- err = cassette_put_samples(cassette, 0, time_index, pulse_period, wave_bytes_length, 1, wave_bytes, CASSETTE_WAVEFORM_8BIT);
- if (err != cassette_image::error::SUCCESS)
+ double pulse_frequency = (b & (1 << i)) ? modulation.one_frequency_canonical : modulation.zero_frequency_canonical;
+ double pulse_period = 1 / pulse_frequency;
+ err = put_samples(0, time_index, pulse_period, wave_bytes_length, 1, wave_bytes, WAVEFORM_8BIT);
+ if (err != error::SUCCESS)
goto done;
time_index += pulse_period;
total_displacement += pulse_period;
}
}
- err = cassette_image::error::SUCCESS;
+ err = error::SUCCESS;
done:
if (time_displacement)
@@ -744,18 +649,18 @@ done:
-cassette_image::error cassette_put_modulated_filler(cassette_image *cassette, int channel, double time_index,
- uint8_t filler, size_t filler_length, const struct CassetteModulation *modulation,
+cassette_image::error cassette_image::put_modulated_filler(int channel, double time_index,
+ uint8_t filler, size_t filler_length, const Modulation &modulation,
double *time_displacement)
{
- cassette_image::error err;
+ error err;
double delta;
double total_displacement = 0.0;
- while(filler_length--)
+ while (filler_length--)
{
- err = cassette_put_modulated_data(cassette, channel, time_index, &filler, 1, modulation, &delta);
- if (err != cassette_image::error::SUCCESS)
+ err = put_modulated_data(channel, time_index, &filler, 1, modulation, &delta);
+ if (err != error::SUCCESS)
return err;
total_displacement += delta;
time_index += delta;
@@ -763,24 +668,19 @@ cassette_image::error cassette_put_modulated_filler(cassette_image *cassette, in
if (time_displacement)
*time_displacement = total_displacement;
- return cassette_image::error::SUCCESS;
+ return error::SUCCESS;
}
-cassette_image::error cassette_read_modulated_data(cassette_image *cassette, int channel, double time_index,
- uint64_t offset, uint64_t length, const struct CassetteModulation *modulation,
+cassette_image::error cassette_image::read_modulated_data(int channel, double time_index,
+ uint64_t offset, uint64_t length, const Modulation &modulation,
double *time_displacement)
{
- cassette_image::error err;
- uint8_t buffer_stack[1024];
uint8_t *buffer;
- uint8_t *alloc_buffer = nullptr;
- double delta;
- double total_displacement = 0.0;
- size_t this_length;
+ uint8_t buffer_stack[1024];
+ std::unique_ptr<uint8_t []> alloc_buffer;
size_t buffer_length;
-
if (length <= sizeof(buffer_stack))
{
buffer = buffer_stack;
@@ -789,23 +689,21 @@ cassette_image::error cassette_read_modulated_data(cassette_image *cassette, int
else
{
buffer_length = std::min<uint64_t>(length, 100000);
- alloc_buffer = (uint8_t*)malloc(buffer_length);
- if (!alloc_buffer)
- {
- err = cassette_image::error::OUT_OF_MEMORY;
- goto done;
- }
- buffer = alloc_buffer;
+ try { alloc_buffer = std::make_unique<uint8_t []>(buffer_length); }
+ catch (std::bad_alloc const &) { return error::OUT_OF_MEMORY; }
+ buffer = alloc_buffer.get();
}
- while(length > 0)
+ double delta;
+ double total_displacement = 0.0;
+ while (length > 0)
{
- this_length = (std::min<uint64_t>)(length, buffer_length);
- cassette_image_read(cassette, buffer, offset, this_length);
+ size_t this_length = std::min<uint64_t>(length, buffer_length);
+ image_read(buffer, offset, this_length);
- err = cassette_put_modulated_data(cassette, channel, time_index, buffer, this_length, modulation, &delta);
- if (err != cassette_image::error::SUCCESS)
- goto done;
+ error err = put_modulated_data(channel, time_index, buffer, this_length, modulation, &delta);
+ if (err != error::SUCCESS)
+ return err;
total_displacement += delta;
time_index += delta;
length -= this_length;
@@ -813,38 +711,30 @@ cassette_image::error cassette_read_modulated_data(cassette_image *cassette, int
if (time_displacement)
*time_displacement = total_displacement;
- err = cassette_image::error::SUCCESS;
-
-done:
- if (alloc_buffer)
- free(alloc_buffer);
- return err;
+ return error::SUCCESS;
}
-cassette_image::error cassette_put_modulated_data_bit(cassette_image *cassette, int channel, double time_index,
- uint8_t data, const struct CassetteModulation *modulation,
+cassette_image::error cassette_image::put_modulated_data_bit(int channel, double time_index,
+ uint8_t data, const Modulation &modulation,
double *time_displacement)
{
- cassette_image::error err;
- const int8_t *wave_bytes;
+ error err;
size_t wave_bytes_length;
double total_displacement = 0.0;
- double pulse_period;
- double pulse_frequency;
- wave_bytes = choose_wave(modulation, &wave_bytes_length);
+ const int8_t *wave_bytes = choose_wave(modulation, wave_bytes_length);
- pulse_frequency = (data) ? modulation->one_frequency_canonical : modulation->zero_frequency_canonical;
- pulse_period = 1 / pulse_frequency;
- err = cassette_put_samples(cassette, 0, time_index, pulse_period, wave_bytes_length, 1, wave_bytes, CASSETTE_WAVEFORM_8BIT);
- if (err != cassette_image::error::SUCCESS)
+ double pulse_frequency = (data) ? modulation.one_frequency_canonical : modulation.zero_frequency_canonical;
+ double pulse_period = 1 / pulse_frequency;
+ err = put_samples(0, time_index, pulse_period, wave_bytes_length, 1, wave_bytes, WAVEFORM_8BIT);
+ if (err != error::SUCCESS)
goto done;
time_index += pulse_period;
total_displacement += pulse_period;
- err = cassette_image::error::SUCCESS;
+ err = error::SUCCESS;
done:
if (time_displacement)
@@ -858,67 +748,63 @@ done:
waveform accesses to/from the raw image
*********************************************************************/
-cassette_image::error cassette_legacy_identify(cassette_image *cassette, struct CassetteOptions *opts,
- const struct CassetteLegacyWaveFiller *legacy_args)
+cassette_image::error cassette_image::legacy_identify(Options *opts,
+ const LegacyWaveFiller *legacy_args)
{
opts->channels = 1;
opts->bits_per_sample = 16;
opts->sample_frequency = legacy_args->sample_frequency;
- return cassette_image::error::SUCCESS;
+ return error::SUCCESS;
}
-cassette_image::error cassette_legacy_construct(cassette_image *cassette,
- const struct CassetteLegacyWaveFiller *legacy_args)
+cassette_image::error cassette_image::legacy_construct(const LegacyWaveFiller *legacy_args)
{
- cassette_image::error err;
+ error err;
int length;
int sample_count;
std::vector<uint8_t> bytes;
- std::vector<uint8_t> chunk;
std::vector<int16_t> samples;
int pos = 0;
uint64_t offset = 0;
- uint64_t size;
- struct CassetteLegacyWaveFiller args;
/* sanity check the args */
assert(legacy_args->header_samples >= -1);
assert(legacy_args->trailer_samples >= 0);
assert(legacy_args->fill_wave);
- size = cassette_image_size(cassette);
+ uint64_t size = image_size();
/* normalize the args */
- args = *legacy_args;
+ LegacyWaveFiller args = *legacy_args;
if (args.chunk_size == 0)
args.chunk_size = 1;
else if (args.chunk_size < 0)
- args.chunk_size = cassette_image_size(cassette);
+ args.chunk_size = image_size();
if (args.sample_frequency == 0)
args.sample_frequency = 11025;
/* allocate a buffer for the binary data */
- chunk.resize(args.chunk_size);
+ std::vector<uint8_t> chunk(args.chunk_size);
/* determine number of samples */
if (args.chunk_sample_calc != nullptr)
{
if (size > 0x7FFFFFFF)
{
- err = cassette_image::error::OUT_OF_MEMORY;
+ err = error::OUT_OF_MEMORY;
goto done;
}
bytes.resize(size);
- cassette_image_read(cassette, &bytes[0], 0, size);
+ image_read(&bytes[0], 0, size);
sample_count = args.chunk_sample_calc(&bytes[0], (int)size);
// chunk_sample_calc functions report errors by returning negative numbers
if (sample_count < 0)
{
- err = cassette_image::error::INVALID_IMAGE;
+ err = error::INVALID_IMAGE;
goto done;
}
@@ -941,22 +827,22 @@ cassette_image::error cassette_legacy_construct(cassette_image *cassette,
length = args.fill_wave(&samples[pos], sample_count - pos, CODE_HEADER);
if (length < 0)
{
- err = cassette_image::error::INVALID_IMAGE;
+ err = error::INVALID_IMAGE;
goto done;
}
pos += length;
}
/* convert the file data to samples */
- while((pos < sample_count) && (offset < size))
+ while ((pos < sample_count) && (offset < size))
{
- cassette_image_read(cassette, &chunk[0], offset, args.chunk_size);
+ image_read(&chunk[0], offset, args.chunk_size);
offset += args.chunk_size;
length = args.fill_wave(&samples[pos], sample_count - pos, &chunk[0]);
if (length < 0)
{
- err = cassette_image::error::INVALID_IMAGE;
+ err = error::INVALID_IMAGE;
goto done;
}
pos += length;
@@ -970,23 +856,23 @@ cassette_image::error cassette_legacy_construct(cassette_image *cassette,
length = args.fill_wave(&samples[pos], sample_count - pos, CODE_TRAILER);
if (length < 0)
{
- err = cassette_image::error::INVALID_IMAGE;
+ err = error::INVALID_IMAGE;
goto done;
}
pos += length;
}
/* specify the wave */
- err = cassette_put_samples(cassette, 0, 0.0, ((double) pos) / args.sample_frequency,
- pos, 2, &samples[0], CASSETTE_WAVEFORM_16BIT);
- if (err != cassette_image::error::SUCCESS)
+ err = put_samples(0, 0.0, ((double) pos) / args.sample_frequency,
+ pos, 2, &samples[0], WAVEFORM_16BIT);
+ if (err != error::SUCCESS)
goto done;
/* success! */
- err = cassette_image::error::SUCCESS;
+ err = error::SUCCESS;
#if DUMP_CASSETTES
- cassette_dump(cassette, "C:\\TEMP\\CASDUMP.WAV");
+ dump("C:\\TEMP\\CASDUMP.WAV");
#endif
done:
@@ -1001,26 +887,22 @@ done:
A debugging call to dump a cassette image to a disk based wave file
*********************************************************************/
-void cassette_dump(cassette_image *image, const char *filename)
+void cassette_image::dump(const char *filename)
{
- FILE *f;
- struct io_generic saved_io;
- const struct CassetteFormat *saved_format;
-
- f = fopen(filename, "wb");
+ FILE *f = fopen(filename, "wb");
if (!f)
return;
- memcpy(&saved_io, &image->io, sizeof(saved_io));
- saved_format = image->format;
+ io_generic saved_io = m_io;
+ const Format *saved_format = m_format;
- image->io.file = f;
- image->io.procs = &stdio_ioprocs_noclose;
- image->format = &wavfile_format;
- cassette_perform_save(image);
+ m_io.file = f;
+ m_io.procs = &stdio_ioprocs_noclose;
+ m_format = &wavfile_format;
+ perform_save();
- memcpy(&image->io, &saved_io, sizeof(saved_io));
- image->format = saved_format;
+ m_io = saved_io;
+ m_format = saved_format;
fclose(f);
}
diff --git a/src/lib/formats/cassimg.h b/src/lib/formats/cassimg.h
index 5199c0e4a04..ed71c49cbf5 100644
--- a/src/lib/formats/cassimg.h
+++ b/src/lib/formats/cassimg.h
@@ -14,14 +14,15 @@
#include "ioprocs.h"
-#include "osdcore.h"
#include "coretmpl.h"
+#include "osdcore.h"
+#include <memory>
#include <string>
#include <vector>
#ifndef LOG_FORMATS
-#define LOG_FORMATS if (0) printf
+#define LOG_FORMATS(...) do { if (0) osd_printf_info(__VA_ARGS__); } while (false)
#endif
// hack to get around rogues that define this
@@ -31,65 +32,51 @@
/***************************************************************************
- Constants
+ Type definitions
***************************************************************************/
-#define CASSETTE_FLAG_READWRITE 0
-#define CASSETTE_FLAG_READONLY 1
-#define CASSETTE_FLAG_NOSAVEONEXIT 0
-#define CASSETTE_FLAG_SAVEONEXIT 2
-
-#define CASSETTE_WAVEFORM_8BIT 0
-#define CASSETTE_WAVEFORM_16BIT 2
-#define CASSETTE_WAVEFORM_16BIT_FLIP 3
-#define CASSETTE_WAVEFORM_32BIT 4
-#define CASSETTE_WAVEFORM_32BIT_FLIP 5
-#define CASSETTE_WAVEFORM_ENDIAN_FLIP 1
-#define CASSETTE_WAVEFORM_UNSIGNED 8
-
-#define CASSETTE_MODULATION_SQUAREWAVE 0
-#define CASSETTE_MODULATION_SINEWAVE 1
+class cassette_image
+{
+public:
+ enum : int
+ {
+ FLAG_READWRITE = 0,
+ FLAG_READONLY = 1,
+ FLAG_NOSAVEONEXIT = 0,
+ FLAG_SAVEONEXIT = 2
+ };
+ enum : int
+ {
+ WAVEFORM_8BIT = 0,
+ WAVEFORM_16BIT = 2,
+ WAVEFORM_16BIT_FLIP = 3,
+ WAVEFORM_32BIT = 4,
+ WAVEFORM_32BIT_FLIP = 5,
+ WAVEFORM_ENDIAN_FLIP = 1,
+ WAVEFORM_UNSIGNED = 8,
#ifdef LSB_FIRST
-#define CASSETTE_WAVEFORM_16BITBE CASSETTE_WAVEFORM_16BIT_FLIP
-#define CASSETTE_WAVEFORM_16BITLE CASSETTE_WAVEFORM_16BIT
-#define CASSETTE_WAVEFORM_32BITBE CASSETTE_WAVEFORM_32BIT_FLIP
-#define CASSETTE_WAVEFORM_32BITLE CASSETTE_WAVEFORM_32BIT
+ WAVEFORM_16BITBE = WAVEFORM_16BIT_FLIP,
+ WAVEFORM_16BITLE = WAVEFORM_16BIT,
+ WAVEFORM_32BITBE = WAVEFORM_32BIT_FLIP,
+ WAVEFORM_32BITLE = WAVEFORM_32BIT
#else
-#define CASSETTE_WAVEFORM_16BITBE CASSETTE_WAVEFORM_16BIT
-#define CASSETTE_WAVEFORM_16BITLE CASSETTE_WAVEFORM_16BIT_FLIP
-#define CASSETTE_WAVEFORM_32BITBE CASSETTE_WAVEFORM_32BIT
-#define CASSETTE_WAVEFORM_32BITLE CASSETTE_WAVEFORM_32BIT_FLIP
+ WAVEFORM_16BITBE = WAVEFORM_16BIT,
+ WAVEFORM_16BITLE = WAVEFORM_16BIT_FLIP,
+ WAVEFORM_32BITBE = WAVEFORM_32BIT,
+ WAVEFORM_32BITLE = WAVEFORM_32BIT_FLIP
#endif
+ };
+ enum : int
+ {
+ MODULATION_SQUAREWAVE = 0,
+ MODULATION_SINEWAVE = 1
+ };
-/***************************************************************************
-
- Type definitions
-
-***************************************************************************/
-
-typedef std::vector<int32_t> sample_block;
-
-struct CassetteOptions
-{
- int channels;
- int bits_per_sample;
- uint32_t sample_frequency;
-};
-
-struct CassetteInfo
-{
- int channels;
- int bits_per_sample;
- uint32_t sample_frequency;
- size_t sample_count;
-};
-struct cassette_image
-{
enum class error
{
SUCCESS, // no error
@@ -100,133 +87,156 @@ struct cassette_image
READ_WRITE_UNSUPPORTED // read/write is not supported by this image format
};
- const struct CassetteFormat *format;
- struct io_generic io;
+ using ptr = std::unique_ptr<cassette_image>;
- int channels;
- int flags;
- uint32_t sample_frequency;
+ struct Options
+ {
+ int channels = 0;
+ int bits_per_sample = 0;
+ uint32_t sample_frequency = 0;
+ };
- std::vector<sample_block *> blocks;
- size_t sample_count;
-};
+ struct Info
+ {
+ int channels = 0;
+ int bits_per_sample = 0;
+ uint32_t sample_frequency = 0;
+ size_t sample_count = 0;
+ };
-struct CassetteFormat
-{
- const char *extensions;
- cassette_image::error (*identify)(cassette_image *cassette, struct CassetteOptions *opts);
- cassette_image::error (*load)(cassette_image *cassette);
- cassette_image::error (*save)(cassette_image *cassette, const struct CassetteInfo *info);
-};
+ struct Format
+ {
+ const char *extensions = nullptr;
+ error (*identify)(cassette_image *cassette, Options *opts) = nullptr;
+ error (*load)(cassette_image *cassette) = nullptr;
+ error (*save)(cassette_image *cassette, const Info *info) = nullptr;
+ };
-/* used for the core modulation code */
-struct CassetteModulation
-{
- int flags;
- double zero_frequency_low;
- double zero_frequency_canonical;
- double zero_frequency_high;
- double one_frequency_low;
- double one_frequency_canonical;
- double one_frequency_high;
-};
+ /* used for the core modulation code */
+ struct Modulation
+ {
+ int flags = 0;
+ double zero_frequency_low = 0;
+ double zero_frequency_canonical = 0;
+ double zero_frequency_high = 0;
+ double one_frequency_low = 0;
+ double one_frequency_canonical = 0;
+ double one_frequency_high = 0;
+ };
-/* code to adapt existing legacy fill_wave functions */
-struct CassetteLegacyWaveFiller
-{
- int (*fill_wave)(int16_t *, int, uint8_t *);
- int chunk_size;
- int chunk_samples;
- int (*chunk_sample_calc)(const uint8_t *bytes, int length);
- uint32_t sample_frequency;
- int header_samples;
- int trailer_samples;
-};
+ /* code to adapt existing legacy fill_wave functions */
+ struct LegacyWaveFiller
+ {
+ int (*fill_wave)(int16_t *, int, uint8_t *) = nullptr;
+ int chunk_size = 0;
+ int chunk_samples = 0;
+ int (*chunk_sample_calc)(const uint8_t *bytes, int length) = nullptr;
+ uint32_t sample_frequency = 0;
+ int header_samples = 0;
+ int trailer_samples = 0;
+ };
+
+ ~cassette_image();
+
+ // calls for accessing the raw cassette image
+ void image_read(void *buffer, uint64_t offset, size_t length);
+ void image_write(const void *buffer, uint64_t offset, size_t length);
+ uint64_t image_size();
+
+ // waveform accesses
+ error get_samples(int channel,
+ double time_index, double sample_period, size_t sample_count, size_t sample_spacing,
+ void *samples, int waveform_flags);
+ error put_samples(int channel,
+ double time_index, double sample_period, size_t sample_count, size_t sample_spacing,
+ const void *samples, int waveform_flags);
+ error get_sample(int channel, double time_index, double sample_period, int32_t *sample);
+ error put_sample(int channel, double time_index, double sample_period, int32_t sample);
+
+ // waveform accesses to/from the raw image - these are only used by lib\formats\wavfile.cpp
+ error read_samples(int channels, double time_index,
+ double sample_period, size_t sample_count, uint64_t offset, int waveform_flags);
+ error write_samples(int channels, double time_index,
+ double sample_period, size_t sample_count, uint64_t offset, int waveform_flags);
+
+ // modulation support
+ error modulation_identify(const Modulation &modulation,
+ Options *opts);
+ error put_modulated_data(int channel, double time_index,
+ const void *data, size_t data_length, const Modulation &modulation,
+ double *time_displacement);
+ error put_modulated_filler(int channel, double time_index,
+ uint8_t filler, size_t filler_length, const Modulation &modulation,
+ double *time_displacement);
+ error read_modulated_data(int channel, double time_index,
+ uint64_t offset, uint64_t length, const Modulation &modulation,
+ double *time_displacement);
+ error put_modulated_data_bit(int channel, double time_index,
+ uint8_t data, const Modulation &modulation,
+ double *time_displacement);
+
+ /* legacy code support */
+#define CODE_HEADER ((uint8_t*)-1)
+#define CODE_TRAILER ((uint8_t*)-2)
+ error legacy_identify(Options *opts, const LegacyWaveFiller *legacy_args);
+ error legacy_construct(const LegacyWaveFiller *legacy_args);
+
+ /* debug calls */
+ void dump(const char *filename);
+
+ error save();
+ void change(void *file, const io_procs *procs, const Format *format, int flags);
+ Info get_info() const;
+
+ static error open(void *file, const io_procs *procs,
+ const Format *format, int flags, ptr &outcassette);
+ static error open_choices(void *file, const io_procs *procs, const std::string &extension,
+ const Format *const *formats, int flags, ptr &outcassette);
+ static error create(void *file, const io_procs *procs, const cassette_image::Format *format,
+ const cassette_image::Options *opts, int flags, ptr &outcassette);
-/* builtin formats */
-extern const struct CassetteFormat wavfile_format;
+ // builtin formats
+ static const Format wavfile_format;
+
+private:
+ struct manipulation_ranges;
+
+ cassette_image(const Format *format, void *file, const io_procs *procs, int flags);
+ cassette_image(const cassette_image &) = delete;
+ cassette_image(cassette_image &&) = delete;
+ cassette_image &operator=(const cassette_image &) = delete;
+ cassette_image &operator=(cassette_image &&) = delete;
+
+ error try_identify_format(const Format &format, const std::string &extension, int flags, Options &opts);
+ error perform_save();
+ error compute_manipulation_ranges(int channel, double time_index, double sample_period, manipulation_ranges &ranges) const;
+ error lookup_sample(int channel, size_t sample, int32_t *&ptr);
+
+ const Format *m_format = nullptr;
+ io_generic m_io;
+
+ int m_channels = 0;
+ int m_flags = 0;
+ uint32_t m_sample_frequency = 0;
+
+ std::vector<std::unique_ptr<int32_t []> > m_blocks;
+ size_t m_sample_count = 0;
+};
/* macros for specifying format lists */
#define CASSETTE_FORMATLIST_EXTERN(name) \
- extern const struct CassetteFormat *const name[]
+ extern const cassette_image::Format *const name[]
#define CASSETTE_FORMATLIST_START(name) \
- const struct CassetteFormat *const name[] = \
+ const cassette_image::Format *const name[] = \
{ \
- &wavfile_format,
+ &cassette_image::wavfile_format,
#define CASSETTE_FORMAT(name) \
&(name),
#define CASSETTE_FORMATLIST_END \
- nullptr \
+ nullptr \
};
CASSETTE_FORMATLIST_EXTERN(cassette_default_formats);
-/***************************************************************************
-
- Prototypes
-
-***************************************************************************/
-
-cassette_image::error cassette_open(void *file, const struct io_procs *procs,
- const struct CassetteFormat *format, int flags, cassette_image **outcassette);
-cassette_image::error cassette_open_choices(void *file, const struct io_procs *procs, const std::string &extension,
- const struct CassetteFormat *const *formats, int flags, cassette_image **outcassette);
-cassette_image::error cassette_create(void *file, const struct io_procs *procs, const struct CassetteFormat *format,
- const struct CassetteOptions *opts, int flags, cassette_image **outcassette);
-cassette_image::error cassette_save(cassette_image *cassette);
-void cassette_close(cassette_image *cassette);
-void cassette_change(cassette_image *cassette, void *file, const struct io_procs *procs, const struct CassetteFormat *format, int flags);
-void cassette_get_info(cassette_image *cassette, struct CassetteInfo *info);
-
-/* calls for accessing the raw cassette image */
-void cassette_image_read(cassette_image *cassette, void *buffer, uint64_t offset, size_t length);
-void cassette_image_write(cassette_image *cassette, const void *buffer, uint64_t offset, size_t length);
-uint64_t cassette_image_size(cassette_image *cassette);
-
-/* waveform accesses */
-cassette_image::error cassette_get_samples(cassette_image *cassette, int channel,
- double time_index, double sample_period, size_t sample_count, size_t sample_spacing,
- void *samples, int waveform_flags);
-cassette_image::error cassette_put_samples(cassette_image *cassette, int channel,
- double time_index, double sample_period, size_t sample_count, size_t sample_spacing,
- const void *samples, int waveform_flags);
-cassette_image::error cassette_get_sample(cassette_image *cassette, int channel,
- double time_index, double sample_period, int32_t *sample);
-cassette_image::error cassette_put_sample(cassette_image *cassette, int channel,
- double time_index, double sample_period, int32_t sample);
-
-/* waveform accesses to/from the raw image - these are only used by lib\formats\wavfile.cpp */
-cassette_image::error cassette_read_samples(cassette_image *cassette, int channels, double time_index,
- double sample_period, size_t sample_count, uint64_t offset, int waveform_flags);
-cassette_image::error cassette_write_samples(cassette_image *cassette, int channels, double time_index,
- double sample_period, size_t sample_count, uint64_t offset, int waveform_flags);
-
-/* modulation support */
-cassette_image::error cassette_modulation_identify(cassette_image *cassette, const struct CassetteModulation *modulation,
- struct CassetteOptions *opts);
-cassette_image::error cassette_put_modulated_data(cassette_image *cassette, int channel, double time_index,
- const void *data, size_t data_length, const struct CassetteModulation *modulation,
- double *time_displacement);
-cassette_image::error cassette_put_modulated_filler(cassette_image *cassette, int channel, double time_index,
- uint8_t filler, size_t filler_length, const struct CassetteModulation *modulation,
- double *time_displacement);
-cassette_image::error cassette_read_modulated_data(cassette_image *cassette, int channel, double time_index,
- uint64_t offset, uint64_t length, const struct CassetteModulation *modulation,
- double *time_displacement);
-cassette_image::error cassette_put_modulated_data_bit(cassette_image *cassette, int channel, double time_index,
- uint8_t data, const struct CassetteModulation *modulation,
- double *time_displacement);
-
-/* debug calls */
-void cassette_dump(cassette_image *image, const char *filename);
-
-/* legacy code support */
-#define CODE_HEADER ((uint8_t*)-1)
-#define CODE_TRAILER ((uint8_t*)-2)
-cassette_image::error cassette_legacy_identify(cassette_image *cassette, struct CassetteOptions *opts,
- const struct CassetteLegacyWaveFiller *legacy_args);
-cassette_image::error cassette_legacy_construct(cassette_image *cassette,
- const struct CassetteLegacyWaveFiller *legacy_args);
-
#endif // MAME_FORMATS_CASSIMG_H
diff --git a/src/lib/formats/cbm_tap.cpp b/src/lib/formats/cbm_tap.cpp
index 7ef8015c6f9..542c0c3ea87 100644
--- a/src/lib/formats/cbm_tap.cpp
+++ b/src/lib/formats/cbm_tap.cpp
@@ -339,7 +339,7 @@ static int cbm_tap_fill_wave( int16_t *buffer, int length, uint8_t *bytes )
-static const struct CassetteLegacyWaveFiller cbm_legacy_fill_wave = {
+static const cassette_image::LegacyWaveFiller cbm_legacy_fill_wave = {
cbm_tap_fill_wave, /* fill_wave */
-1, /* chunk_size */
0, /* chunk_samples */
@@ -350,19 +350,19 @@ static const struct CassetteLegacyWaveFiller cbm_legacy_fill_wave = {
};
-static cassette_image::error cbm_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts )
+static cassette_image::error cbm_cassette_identify( cassette_image *cassette, cassette_image::Options *opts )
{
- return cassette_legacy_identify( cassette, opts, &cbm_legacy_fill_wave );
+ return cassette->legacy_identify( opts, &cbm_legacy_fill_wave );
}
static cassette_image::error cbm_cassette_load( cassette_image *cassette )
{
- return cassette_legacy_construct( cassette, &cbm_legacy_fill_wave );
+ return cassette->legacy_construct( &cbm_legacy_fill_wave );
}
-static const struct CassetteFormat cbm_tap_cassette_format = {
+static const cassette_image::Format cbm_tap_cassette_format = {
"tap",
cbm_cassette_identify,
cbm_cassette_load,
diff --git a/src/lib/formats/cgen_cas.cpp b/src/lib/formats/cgen_cas.cpp
index de47a45375d..8a208044960 100644
--- a/src/lib/formats/cgen_cas.cpp
+++ b/src/lib/formats/cgen_cas.cpp
@@ -18,10 +18,10 @@ NOTE: There exist multiples type of .cas files for Colour Genie
We now support these three types below...
********************************************************************/
+#include "formats/cgen_cas.h"
#include <cassert>
-#include "formats/cgen_cas.h"
#define TAPE_HEADER "Colour Genie - Virtual Tape File"
@@ -124,7 +124,7 @@ static int cgenie_cas_to_wav_size(const uint8_t *casdata, int caslen)
return cgenie_handle_cas(nullptr, casdata);
}
-static const struct CassetteLegacyWaveFiller cgenie_cas_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller cgenie_cas_legacy_fill_wave =
{
cgenie_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -136,19 +136,19 @@ static const struct CassetteLegacyWaveFiller cgenie_cas_legacy_fill_wave =
};
-static cassette_image::error cgenie_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error cgenie_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &cgenie_cas_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &cgenie_cas_legacy_fill_wave);
}
static cassette_image::error cgenie_cas_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &cgenie_cas_legacy_fill_wave);
+ return cassette->legacy_construct(&cgenie_cas_legacy_fill_wave);
}
-static const struct CassetteFormat cgenie_cas_format =
+static const cassette_image::Format cgenie_cas_format =
{
"cas",
cgenie_cas_identify,
diff --git a/src/lib/formats/coco_cas.cpp b/src/lib/formats/coco_cas.cpp
index f3df09266b0..c0ed5d616ff 100644
--- a/src/lib/formats/coco_cas.cpp
+++ b/src/lib/formats/coco_cas.cpp
@@ -47,18 +47,18 @@
static int synccount;
-const struct CassetteModulation coco_cas_modulation =
+const cassette_image::Modulation coco_cas_modulation =
{
- CASSETTE_MODULATION_SINEWAVE,
+ cassette_image::MODULATION_SINEWAVE,
600.0, 1200.0, 1500.0,
1500.0, 2400.0, 3000.0
};
-static cassette_image::error coco_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error coco_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_modulation_identify(cassette, &coco_cas_modulation, opts);
+ return cassette->modulation_identify(coco_cas_modulation, opts);
}
@@ -76,12 +76,12 @@ static bool get_cas_block(cassette_image *cassette, uint64_t *offset, uint8_t *b
synccount = 0;
p.w.l = 0;
- image_size = cassette_image_size(cassette);
+ image_size = cassette->image_size();
current_offset = *offset;
while(current_offset < image_size)
{
- cassette_image_read(cassette, &p.b.h, current_offset, 1);
+ cassette->image_read(&p.b.h, current_offset, 1);
current_offset++;
for (i = 0; i < 8; i++)
@@ -192,18 +192,18 @@ static cassette_image::error cas_load(cassette_image *cassette, uint8_t silence)
0x3C, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A
};
time_index = 10.0;
- return cassette_put_modulated_data(cassette, 0, time_index, dummy_bytes, sizeof(dummy_bytes), &coco_cas_modulation, &time_displacement);
+ return cassette_put_modulated_data(cassette, 0, time_index, dummy_bytes, sizeof(dummy_bytes), coco_cas_modulation, &time_displacement);
}
#endif
- err = cassette_put_sample(cassette, 0, time_index, COCO_WAVESAMPLES_HEADER, 0);
+ err = cassette->put_sample(0, time_index, COCO_WAVESAMPLES_HEADER, 0);
if (err != cassette_image::error::SUCCESS)
return err;
time_index += COCO_WAVESAMPLES_HEADER;
offset = 0;
last_blocktype = 0;
- image_size = cassette_image_size(cassette);
+ image_size = cassette->image_size();
/* try to find a block that we can untangle */
while(get_cas_block(cassette, &offset, block, &block_length))
@@ -214,13 +214,13 @@ static cassette_image::error cas_load(cassette_image *cassette, uint8_t silence)
if ((last_blocktype == 0) || (last_blocktype == 0xFF) || (block[0] == 0))
{
/* silence */
- err = cassette_put_sample(cassette, 0, time_index, silence, 0);
+ err = cassette->put_sample(0, time_index, silence, 0);
if (err != cassette_image::error::SUCCESS)
return err;
time_index += silence;
/* sync data */
- err = cassette_put_modulated_filler(cassette, 0, time_index, 0x55, 128, &coco_cas_modulation, &time_displacement);
+ err = cassette->put_modulated_filler(0, time_index, 0x55, 128, coco_cas_modulation, &time_displacement);
if (err != cassette_image::error::SUCCESS)
return err;
time_index += time_displacement;
@@ -228,26 +228,26 @@ static cassette_image::error cas_load(cassette_image *cassette, uint8_t silence)
else if (synccount != 0) /* If we have multiple sync bytes in cas file, make sure they */
{ /* are passed through */
/* sync data */
- err = cassette_put_modulated_filler(cassette, 0, time_index, 0x55, synccount, &coco_cas_modulation, &time_displacement);
+ err = cassette->put_modulated_filler(0, time_index, 0x55, synccount, coco_cas_modulation, &time_displacement);
if (err != cassette_image::error::SUCCESS)
return err;
time_index += time_displacement;
}
/* now fill in the magic bytes */
- err = cassette_put_modulated_data(cassette, 0, time_index, magic_bytes, sizeof(magic_bytes), &coco_cas_modulation, &time_displacement);
+ err = cassette->put_modulated_data(0, time_index, magic_bytes, sizeof(magic_bytes), coco_cas_modulation, &time_displacement);
if (err != cassette_image::error::SUCCESS)
return err;
time_index += time_displacement;
/* now fill in the block */
- err = cassette_put_modulated_data(cassette, 0, time_index, block, block_length, &coco_cas_modulation, &time_displacement);
+ err = cassette->put_modulated_data(0, time_index, block, block_length, coco_cas_modulation, &time_displacement);
if (err != cassette_image::error::SUCCESS)
return err;
time_index += time_displacement;
/* and the last magic byte */
- err = cassette_put_modulated_filler(cassette, 0, time_index, 0x55, 1, &coco_cas_modulation, &time_displacement);
+ err = cassette->put_modulated_filler(0, time_index, 0x55, 1, coco_cas_modulation, &time_displacement);
if (err != cassette_image::error::SUCCESS)
return err;
time_index += time_displacement;
@@ -256,7 +256,7 @@ static cassette_image::error cas_load(cassette_image *cassette, uint8_t silence)
}
/* all futher data is undecipherable, so output it verbatim */
- err = cassette_read_modulated_data(cassette, 0, time_index, offset, image_size - offset, &coco_cas_modulation, &time_displacement);
+ err = cassette->read_modulated_data(0, time_index, offset, image_size - offset, coco_cas_modulation, &time_displacement);
if (err != cassette_image::error::SUCCESS)
return err;
time_index += time_displacement;
@@ -274,7 +274,7 @@ static cassette_image::error alice32_cas_load(cassette_image *cassette)
return cas_load(cassette, ALICE32_WAVESAMPLES_HEADER);
}
-const struct CassetteFormat coco_cas_format =
+const cassette_image::Format coco_cas_format =
{
"cas",
coco_cas_identify,
@@ -282,7 +282,7 @@ const struct CassetteFormat coco_cas_format =
nullptr
};
-const struct CassetteFormat alice32_cas_format =
+const cassette_image::Format alice32_cas_format =
{
"cas,c10,k7",
coco_cas_identify,
diff --git a/src/lib/formats/csw_cas.cpp b/src/lib/formats/csw_cas.cpp
index 9edea5c3ff7..3db3eb70c34 100644
--- a/src/lib/formats/csw_cas.cpp
+++ b/src/lib/formats/csw_cas.cpp
@@ -1,294 +1,218 @@
// license:BSD-3-Clause
-// copyright-holders:Gordon Jefferyes
+// copyright-holders:Nigel Barnes
/*
-CSW format
-----------
-Header Description
-
-Offset Value Type Description
-0x00 (note) ASCII 22 bytes "Compressed Square Wave" signature
-0x16 0x1A BYTE Terminator code
-0x17 0x02 BYTE CSW major revision number
-0x18 0x00 BYTE CSW minor revision number
-0x19 DWORD Sample rate
-0x1D DWORD Total number of pulses (after decompression)
-0x21 BYTE Compression type 0x01: RLE 0x02: Z-RLE
-0x22 BYTE Flags b0: initial polarity: if set, the signal starts at logical high
-0x23 HDR BYTE Header extension length in bytes (0x00)
-0x24 ASCII 16 bytes free use
-0x34 BYTE Start of Header is HDR>0
-
-
-
+ CSW format
+ ----------
+ Header Description
+
+ Offset Value Type Description
+ 0x00 (note) ASCII 22 bytes "Compressed Square Wave" signature
+ 0x16 0x1A BYTE Terminator code
+ 0x17 0x02 BYTE CSW major revision number
+ 0x18 0x00 BYTE CSW minor revision number
+ 0x19 DWORD Sample rate
+ 0x1D DWORD Total number of pulses (after decompression)
+ 0x21 BYTE Compression type 0x01: RLE 0x02: Z-RLE
+ 0x22 BYTE Flags b0: initial polarity; if set, the signal starts at logical high
+ 0x23 HDR BYTE Header extension length in bytes (0x00)
+ 0x24 ASCII Encoding application description
+ 0x34 BYTE Header extension data (if present HDR>0)
+ 0x34+HDR CSW data
*/
-#include <cstring>
+#include "csw_cas.h"
+#include "uef_cas.h"
#include <zlib.h>
-#include <cassert>
-#include "uef_cas.h"
-#include "csw_cas.h"
+#include <cassert>
+#include <cstring>
-#define CSW_WAV_FREQUENCY 44100
static const uint8_t CSW_HEADER[] = { "Compressed Square Wave" };
-static uint32_t get_leuint32(const void *ptr)
-{
- uint32_t value;
- memcpy(&value, ptr, sizeof(value));
- return little_endianize_int32(value);
-}
-static int mycaslen;
+/*-------------------------------------------------
+ csw_cassette_identify - identify cassette
+-------------------------------------------------*/
-static int csw_cas_to_wav_size( const uint8_t *casdata, int caslen )
+static cassette_image::error csw_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- uint8_t MajorRevision;
- uint8_t MinorRevision;
- uint8_t HeaderExtensionLength;
- std::vector<uint8_t> gz_ptr;
-
- int total_size;
- z_stream d_stream;
- int err;
- uint8_t *in_ptr;
- int bsize=0;
-
- if ( memcmp( casdata, CSW_HEADER, sizeof(CSW_HEADER)-1 ) )
- {
- LOG_FORMATS( "csw_cas_to_wav_size: cassette image has incompatible header\n" );
- goto cleanup;
- }
+ uint8_t header[0x34];
- if (casdata[0x16]!=0x1a)
- {
- LOG_FORMATS( "csw_cas_to_wav_size: Terminator Code Not Found\n" );
- goto cleanup;
+ cassette->image_read(header, 0, sizeof(header));
+ if (memcmp(&header[0], CSW_HEADER, sizeof(CSW_HEADER) - 1)) {
+ return cassette_image::error::INVALID_IMAGE;
}
- MajorRevision=casdata[0x17];
- MinorRevision=casdata[0x18];
+ opts->bits_per_sample = 8;
+ opts->channels = 1;
+ opts->sample_frequency = little_endianize_int16(*(uint32_t*)(header + 0x19));
+ return cassette_image::error::SUCCESS;
+}
+
- LOG_FORMATS("Version %d : %d\n",MajorRevision,MinorRevision);
+/*-------------------------------------------------
+ csw_cassette_load - load cassette
+-------------------------------------------------*/
- if (casdata[0x17]!=2)
+static cassette_image::error csw_cassette_load(cassette_image *cassette)
+{
+ uint8_t header[0x34];
+ uint64_t image_size = cassette->image_size();
+ std::vector<uint8_t> image_data(image_size);
+
+ int8_t bit;
+ uint8_t compression;
+ int bsize = 0;
+ size_t csw_data = 0;
+ size_t sample_count = 0;
+ uint32_t sample_rate;
+ std::vector<int8_t> samples;
+
+ /* csw header */
+ cassette->image_read(header, 0, sizeof(header));
+
+ if (header[0x16] != 0x1a)
{
- LOG_FORMATS( "csw_cas_to_wav_size: Unsuported Major Version\n" );
- goto cleanup;
+ LOG_FORMATS("csw_cassette_load: Terminator Code Not Found\n");
+ return cassette_image::error::INVALID_IMAGE;
}
- HeaderExtensionLength=casdata[0x23];
-
- mycaslen=caslen;
- //from here on down for now I am assuming it is compressed csw file.
- in_ptr = (uint8_t*) casdata+0x34+HeaderExtensionLength;
-
- gz_ptr.resize( 8 );
-
- d_stream.next_in = (unsigned char *)in_ptr;
- d_stream.avail_in = caslen - ( in_ptr - casdata );
- d_stream.total_in=0;
-
- d_stream.next_out = &gz_ptr[0];
- d_stream.avail_out = 1;
- d_stream.total_out=0;
-
- d_stream.zalloc = nullptr;
- d_stream.zfree = nullptr;
- d_stream.opaque = nullptr;
- d_stream.data_type=0;
-
- err = inflateInit( &d_stream );
- if ( err != Z_OK )
+ LOG_FORMATS("CSW Version %d.%d\n", header[0x17], header[0x18]);
+ switch (header[0x17])
{
- LOG_FORMATS( "inflateInit2 error: %d\n", err );
- goto cleanup;
+ case 1:
+ sample_rate = little_endianize_int16(*(uint32_t*)(header + 0x19));
+ compression = header[0x1b];
+ bit = (header[0x1c] & 1) ? 127 : -128;
+ csw_data = 0x20;
+
+ LOG_FORMATS("Sample Rate: %u\n", sample_rate);
+ LOG_FORMATS("CompressionType: %u Flags: %u\n", header[0x1b], header[0x1c]);
+ break;
+
+ case 2:
+ sample_rate = little_endianize_int32(*(uint32_t*)(header + 0x19));
+ compression = header[0x21];
+ bit = (header[0x22] & 1) ? 127 : -128;
+ csw_data = (size_t) header[0x23] + 0x34;
+
+ LOG_FORMATS("Sample Rate: %u\n", sample_rate);
+ LOG_FORMATS("Number of Pulses: %u\n", little_endianize_int32(*(uint32_t *)(header + 0x1d)));
+ LOG_FORMATS("CompressionType: %u Flags: %u\n", header[0x21], header[0x22]);
+ LOG_FORMATS("Encoder: ");
+ for (int i = 0; i < 16; i++)
+ LOG_FORMATS("%c", header[0x24 + i]);
+ LOG_FORMATS("\n");
+ break;
+
+ default:
+ LOG_FORMATS("Unsupported Major Version\n");
+ return cassette_image::error::INVALID_IMAGE;
}
-
-
- total_size=1;
- do
+
+ /* csw data */
+ switch (compression)
{
- d_stream.next_out = &gz_ptr[0];
- d_stream.avail_out=1;
- err=inflate( &d_stream, Z_SYNC_FLUSH );
- if (err==Z_OK)
+ case 0x01:
+ /* RLE (Run Length Encoding) */
+ for (size_t pos = csw_data; pos < image_size; pos++)
{
- bsize=gz_ptr[0];
- if (bsize==0)
+ bsize = image_data[pos];
+ if (bsize == 0)
+ {
+ bsize = little_endianize_int32(*(uint32_t *)(&image_data[pos + 1]));
+ pos += 4;
+ }
+ for (int i = 0; i < bsize; i++)
{
- d_stream.avail_out=4;
- d_stream.next_out = &gz_ptr[0];
- err=inflate( &d_stream, Z_SYNC_FLUSH );
- bsize=get_leuint32(&gz_ptr[0]);
+ samples.resize(sample_count + 1);
+ samples[sample_count++] = bit;
}
- total_size=total_size+bsize;
+ bit ^= 0xff;
}
- }
- while (err==Z_OK);
-
- if ( err != Z_STREAM_END )
- {
- LOG_FORMATS( "inflate error: %d\n", err );
- goto cleanup;
- }
-
- err = inflateEnd( &d_stream );
- if ( err != Z_OK )
- {
- LOG_FORMATS( "inflateEnd error: %d\n", err );
- goto cleanup;
- }
-
- return total_size;
-
-cleanup:
- return -1;
-}
-
-static int csw_cas_fill_wave( int16_t *buffer, int length, uint8_t *bytes )
-{
- uint32_t SampleRate;
- uint32_t NumberOfPulses;
- uint8_t CompressionType;
- uint8_t Flags;
- uint8_t HeaderExtensionLength;
- int8_t Bit;
-
- std::vector<uint8_t> gz_ptr;
- int total_size;
- z_stream d_stream;
- int err;
- uint8_t *in_ptr;
- int bsize=0;
- int i;
-
- LOG_FORMATS("Length %d\n",length);
-
- SampleRate=get_leuint32(bytes+0x19);
- LOG_FORMATS("Sample rate %u\n",SampleRate);
-
- NumberOfPulses=get_leuint32(bytes+0x1d);
- LOG_FORMATS("Number Of Pulses %u\n",NumberOfPulses);
-
- CompressionType=bytes[0x21];
- Flags=bytes[0x22];
- HeaderExtensionLength=bytes[0x23];
-
- Bit = (Flags & 1) ? 100 : -100;
-
- LOG_FORMATS("CompressionType %u Flags %u HeaderExtensionLength %u\n",CompressionType,Flags,HeaderExtensionLength);
-
- LOG_FORMATS("Encoder: ");
- for (i = 0; i < 16; i++)
- LOG_FORMATS("%c", bytes[0x24 + i]);
- LOG_FORMATS("\n");
-
- LOG_FORMATS("Header: ");
- for (i = 0; i < HeaderExtensionLength; i++)
- LOG_FORMATS("%c", bytes[0x34 + i]);
- LOG_FORMATS("\n");
-
- //from here on down for now I am assuming it is compressed csw file.
- in_ptr = (uint8_t*) bytes+0x34+HeaderExtensionLength;
-
- gz_ptr.resize( 8 );
-
- d_stream.next_in = (unsigned char *)in_ptr;
- d_stream.avail_in = mycaslen - ( in_ptr - bytes );
- d_stream.total_in=0;
-
- d_stream.next_out = &gz_ptr[0];
- d_stream.avail_out = 1;
- d_stream.total_out=0;
-
- d_stream.zalloc = nullptr;
- d_stream.zfree = nullptr;
- d_stream.opaque = nullptr;
- d_stream.data_type=0;
+ break;
+
+ case 0x02:
+ /* Z-RLE (CSW v2.xx only) */
+ cassette->image_read(&image_data[0], 0, image_size);
+
+ std::vector<uint8_t> gz_ptr;
+ z_stream d_stream;
+ int err;
+
+ gz_ptr.resize(8);
+
+ d_stream.next_in = (unsigned char *) &image_data[csw_data];
+ d_stream.avail_in = image_size - 0x34 - header[0x23];
+ d_stream.total_in = 0;
+
+ d_stream.next_out = &gz_ptr[0];
+ d_stream.avail_out = 1;
+ d_stream.total_out = 0;
- err = inflateInit( &d_stream );
- if ( err != Z_OK )
- {
- LOG_FORMATS( "inflateInit2 error: %d\n", err );
- goto cleanup;
- }
+ d_stream.zalloc = nullptr;
+ d_stream.zfree = nullptr;
+ d_stream.opaque = nullptr;
+ d_stream.data_type = 0;
- total_size=0;
+ err = inflateInit(&d_stream);
+ if (err != Z_OK)
+ {
+ LOG_FORMATS("inflateInit error: %d\n", err);
+ return cassette_image::error::INVALID_IMAGE;
+ }
- do
- {
- d_stream.next_out = &gz_ptr[0];
- d_stream.avail_out=1;
- err=inflate( &d_stream, Z_SYNC_FLUSH );
- if (err==Z_OK)
+ do
{
- bsize=gz_ptr[0];
- if (bsize==0)
+ d_stream.next_out = &gz_ptr[0];
+ d_stream.avail_out = 1;
+ err = inflate(&d_stream, Z_SYNC_FLUSH);
+ if (err == Z_OK)
{
- d_stream.avail_out=4;
- d_stream.next_out = &gz_ptr[0];
- err=inflate( &d_stream, Z_SYNC_FLUSH );
- bsize=get_leuint32(&gz_ptr[0]);
+ bsize = gz_ptr[0];
+ if (bsize == 0)
+ {
+ d_stream.avail_out = 4;
+ d_stream.next_out = &gz_ptr[0];
+ err = inflate(&d_stream, Z_SYNC_FLUSH);
+ bsize = little_endianize_int32(*(uint32_t *)(&gz_ptr[0]));
+ }
+ for (int i = 0; i < bsize; i++)
+ {
+ samples.resize(sample_count + 1);
+ samples[sample_count++] = bit;
+ }
+ bit ^= 0xff;
}
- for (i=0;i<bsize;i++)
- {
- buffer[total_size++]=Bit;
- }
- Bit=-Bit;
- }
- }
- while (err==Z_OK);
+ }
+ while (err == Z_OK);
- if ( err != Z_STREAM_END )
- {
- LOG_FORMATS( "inflate error: %d\n", err );
- goto cleanup;
- }
+ if (err != Z_STREAM_END)
+ {
+ LOG_FORMATS("inflate error: %d\n", err);
+ return cassette_image::error::INVALID_IMAGE;
+ }
- err = inflateEnd( &d_stream );
- if ( err != Z_OK )
- {
- LOG_FORMATS( "inflateEnd error: %d\n", err );
- goto cleanup;
+ err = inflateEnd(&d_stream);
+ if (err != Z_OK)
+ {
+ LOG_FORMATS("inflateEnd error: %d\n", err);
+ return cassette_image::error::INVALID_IMAGE;
+ }
+ break;
}
- return length;
-
-cleanup:
- return -1;
+ return cassette->put_samples(0, 0.0, (double) sample_count / sample_rate, sample_count, 1, &samples[0], cassette_image::WAVEFORM_8BIT);
}
-static const struct CassetteLegacyWaveFiller csw_legacy_fill_wave = {
- csw_cas_fill_wave, /* fill_wave */
- -1, /* chunk_size */
- 0, /* chunk_samples */
- csw_cas_to_wav_size, /* chunk_sample_calc */
- CSW_WAV_FREQUENCY, /* sample_frequency */
- 0, /* header_samples */
- 0 /* trailer_samples */
-};
-
-static cassette_image::error csw_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts )
-{
- uint8_t header[22];
-
- cassette_image_read(cassette, header, 0, sizeof(header));
- if (memcmp(&header[0], CSW_HEADER, sizeof(CSW_HEADER) - 1)) {
- return cassette_image::error::INVALID_IMAGE;
- }
- return cassette_legacy_identify( cassette, opts, &csw_legacy_fill_wave );
-}
-
-static cassette_image::error csw_cassette_load( cassette_image *cassette )
-{
- return cassette_legacy_construct( cassette, &csw_legacy_fill_wave );
-}
+/*-------------------------------------------------
+ CassetteFormat csw_cassette_format
+-------------------------------------------------*/
-const struct CassetteFormat csw_cassette_format = {
+const cassette_image::Format csw_cassette_format = {
"csw",
csw_cassette_identify,
csw_cassette_load,
diff --git a/src/lib/formats/csw_cas.h b/src/lib/formats/csw_cas.h
index e6e5a62d764..270d85bcd37 100644
--- a/src/lib/formats/csw_cas.h
+++ b/src/lib/formats/csw_cas.h
@@ -12,7 +12,7 @@
#include "cassimg.h"
-extern const struct CassetteFormat csw_cassette_format;
+extern const cassette_image::Format csw_cassette_format;
CASSETTE_FORMATLIST_EXTERN(csw_cassette_formats);
CASSETTE_FORMATLIST_EXTERN(bbc_cassette_formats);
diff --git a/src/lib/formats/fc100_cas.cpp b/src/lib/formats/fc100_cas.cpp
index 42b99ad3f0e..56c7b8294db 100644
--- a/src/lib/formats/fc100_cas.cpp
+++ b/src/lib/formats/fc100_cas.cpp
@@ -10,10 +10,10 @@ it's all a guess.
********************************************************************/
-#include <cassert>
-
#include "fc100_cas.h"
+#include <cassert>
+
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
@@ -21,7 +21,7 @@ it's all a guess.
#define FC100_HEADER_BYTES 16
// image size
-static int fc100_image_size;
+static int fc100_image_size; // FIXME: global variable prevents multiple instances
static int fc100_put_samples(int16_t *buffer, int sample_pos, int count, int level)
{
@@ -122,7 +122,7 @@ static int fc100_cassette_calculate_size_in_samples(const uint8_t *bytes, int le
return fc100_handle_cassette(nullptr, bytes);
}
-static const struct CassetteLegacyWaveFiller fc100_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller fc100_legacy_fill_wave =
{
fc100_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -133,17 +133,17 @@ static const struct CassetteLegacyWaveFiller fc100_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error fc100_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error fc100_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &fc100_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &fc100_legacy_fill_wave);
}
static cassette_image::error fc100_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &fc100_legacy_fill_wave);
+ return cassette->legacy_construct(&fc100_legacy_fill_wave);
}
-static const struct CassetteFormat fc100_cassette_image_format =
+static const cassette_image::Format fc100_cassette_image_format =
{
"cas",
fc100_cassette_identify,
diff --git a/src/lib/formats/fm7_cas.cpp b/src/lib/formats/fm7_cas.cpp
index f275866d31b..a0c0151be7b 100644
--- a/src/lib/formats/fm7_cas.cpp
+++ b/src/lib/formats/fm7_cas.cpp
@@ -4,14 +4,14 @@
* Fujitsu FM-7 series cassette handling
*/
-#include <cassert>
-
#include "fm7_cas.h"
+#include <cassert>
+
#define WAVE_HIGH 0x5a9e
#define WAVE_LOW -0x5a9e
-static int cas_size;
+static int cas_size; // FIXME: global variable prevents multiple instances
static int fm7_fill_wave(int16_t* buffer, uint8_t high, uint8_t low, int sample_pos)
{
@@ -76,7 +76,7 @@ static int fm7_cas_fill_wave(int16_t *buffer, int sample_count, uint8_t *bytes)
return fm7_handle_t77(buffer,bytes);
}
-static const struct CassetteLegacyWaveFiller fm7_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller fm7_legacy_fill_wave =
{
fm7_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -87,20 +87,20 @@ static const struct CassetteLegacyWaveFiller fm7_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error fm7_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error fm7_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &fm7_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &fm7_legacy_fill_wave);
}
static cassette_image::error fm7_cas_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &fm7_legacy_fill_wave);
+ return cassette->legacy_construct(&fm7_legacy_fill_wave);
}
-static const struct CassetteFormat fm7_cassette_format = {
+static const cassette_image::Format fm7_cassette_format = {
"t77",
fm7_cas_identify,
fm7_cas_load,
diff --git a/src/lib/formats/fmsx_cas.cpp b/src/lib/formats/fmsx_cas.cpp
index 3b00b81dc92..7bda85782b5 100644
--- a/src/lib/formats/fmsx_cas.cpp
+++ b/src/lib/formats/fmsx_cas.cpp
@@ -104,7 +104,7 @@ static int fmsx_cas_fill_wave(int16_t *buffer, int sample_count, uint8_t *bytes)
}
-static const struct CassetteLegacyWaveFiller fmsx_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller fmsx_legacy_fill_wave =
{
fmsx_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -117,21 +117,21 @@ static const struct CassetteLegacyWaveFiller fmsx_legacy_fill_wave =
-static cassette_image::error fmsx_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error fmsx_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &fmsx_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &fmsx_legacy_fill_wave);
}
static cassette_image::error fmsx_cas_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &fmsx_legacy_fill_wave);
+ return cassette->legacy_construct(&fmsx_legacy_fill_wave);
}
-static const struct CassetteFormat fmsx_cas_format =
+static const cassette_image::Format fmsx_cas_format =
{
"tap,cas",
fmsx_cas_identify,
diff --git a/src/lib/formats/gtp_cas.cpp b/src/lib/formats/gtp_cas.cpp
index 0a5c34d140c..f8ac6917d64 100644
--- a/src/lib/formats/gtp_cas.cpp
+++ b/src/lib/formats/gtp_cas.cpp
@@ -6,10 +6,10 @@
Miodrag Milanovic
*/
-#include <cassert>
-
#include "gtp_cas.h"
+#include <cassert>
+
#define GTP_WAV_FREQUENCY 44100
#define WAVE_LOW -0x5a9e
@@ -20,7 +20,7 @@
#define GTP_BLOCK_TURBO 0x01
#define GTP_BLOCK_NAME 0x10
-static int16_t wave_data;
+static int16_t wave_data; // FIXME: global variable prevent multiple instances
static int16_t len;
#define PULSE_WIDTH 30
@@ -164,7 +164,7 @@ static int gtp_cas_fill_wave( int16_t *buffer, int length, uint8_t *bytes ) {
-static const struct CassetteLegacyWaveFiller gtp_legacy_fill_wave = {
+static const cassette_image::LegacyWaveFiller gtp_legacy_fill_wave = {
gtp_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
0, /* chunk_samples */
@@ -176,19 +176,19 @@ static const struct CassetteLegacyWaveFiller gtp_legacy_fill_wave = {
-static cassette_image::error gtp_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) {
- return cassette_legacy_identify( cassette, opts, &gtp_legacy_fill_wave );
+static cassette_image::error gtp_cassette_identify( cassette_image *cassette, cassette_image::Options *opts ) {
+ return cassette->legacy_identify( opts, &gtp_legacy_fill_wave );
}
static cassette_image::error gtp_cassette_load( cassette_image *cassette ) {
- return cassette_legacy_construct( cassette, &gtp_legacy_fill_wave );
+ return cassette->legacy_construct( &gtp_legacy_fill_wave );
}
-static const struct CassetteFormat gtp_cassette_format = {
+static const cassette_image::Format gtp_cassette_format = {
"gtp",
gtp_cassette_identify,
gtp_cassette_load,
diff --git a/src/lib/formats/h8_cas.cpp b/src/lib/formats/h8_cas.cpp
index ec92a94b10f..80ad3e07f5a 100644
--- a/src/lib/formats/h8_cas.cpp
+++ b/src/lib/formats/h8_cas.cpp
@@ -11,17 +11,17 @@ We output a leader, followed by the contents of the H8T file.
********************************************************************/
-#include <cassert>
-
#include "h8_cas.h"
+#include <cassert>
+
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
#define H8_WAV_FREQUENCY 9600
// image size
-static int h8_image_size;
+static int h8_image_size; // FIXME: global variable prevents multiple instances
static int h8_put_samples(int16_t *buffer, int sample_pos, int count, int level)
{
@@ -115,7 +115,7 @@ static int h8_cassette_calculate_size_in_samples(const uint8_t *bytes, int lengt
return h8_handle_cassette(nullptr, bytes);
}
-static const struct CassetteLegacyWaveFiller h8_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller h8_legacy_fill_wave =
{
h8_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -126,17 +126,17 @@ static const struct CassetteLegacyWaveFiller h8_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error h8_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error h8_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &h8_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &h8_legacy_fill_wave);
}
static cassette_image::error h8_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &h8_legacy_fill_wave);
+ return cassette->legacy_construct(&h8_legacy_fill_wave);
}
-static const struct CassetteFormat h8_cassette_image_format =
+static const cassette_image::Format h8_cassette_image_format =
{
"h8t",
h8_cassette_identify,
diff --git a/src/lib/formats/hect_tap.cpp b/src/lib/formats/hect_tap.cpp
index 78f1bad2e42..a450b9507b4 100644
--- a/src/lib/formats/hect_tap.cpp
+++ b/src/lib/formats/hect_tap.cpp
@@ -24,7 +24,7 @@ Updated 3/1/10 : use real value for timing.
#define SMPHI 32767
-static int cas_size;
+static int cas_size; // FIXME: global variable prevents multiple instances
enum
@@ -240,7 +240,7 @@ static int hector_tap_to_wav_size(const uint8_t *casdata, int caslen)
}
-static const struct CassetteLegacyWaveFiller hector_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller hector_legacy_fill_wave =
{
hector_tap_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -251,7 +251,7 @@ static const struct CassetteLegacyWaveFiller hector_legacy_fill_wave =
0 /* trailer_samples */
};
-static const struct CassetteLegacyWaveFiller hector_forth_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller hector_forth_legacy_fill_wave =
{
hector_tap_forth_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -263,30 +263,30 @@ static const struct CassetteLegacyWaveFiller hector_forth_legacy_fill_wave =
};
-static cassette_image::error hector_k7_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error hector_k7_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &hector_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &hector_legacy_fill_wave);
}
static cassette_image::error hector_k7_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &hector_legacy_fill_wave);
+ return cassette->legacy_construct(&hector_legacy_fill_wave);
}
-static cassette_image::error hector_k7forth_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error hector_k7forth_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &hector_forth_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &hector_forth_legacy_fill_wave);
}
static cassette_image::error hector_k7forth_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &hector_forth_legacy_fill_wave);
+ return cassette->legacy_construct(&hector_forth_legacy_fill_wave);
}
-static const struct CassetteFormat hector_k7_format =
+static const cassette_image::Format hector_k7_format =
{
"k7,cin",
hector_k7_identify,
@@ -294,7 +294,7 @@ static const struct CassetteFormat hector_k7_format =
nullptr
};
-static const struct CassetteFormat hector_k7Forth_format =
+static const cassette_image::Format hector_k7Forth_format =
{
"for",
hector_k7forth_identify,
diff --git a/src/lib/formats/imd_dsk.cpp b/src/lib/formats/imd_dsk.cpp
index 4a42d1c80c8..631eac9b297 100644
--- a/src/lib/formats/imd_dsk.cpp
+++ b/src/lib/formats/imd_dsk.cpp
@@ -158,18 +158,18 @@ static floperr_t imd_expand_file(floppy_image_legacy *floppy , uint64_t offset ,
return FLOPPY_ERROR_SUCCESS;
}
- auto buffer = global_alloc_array(uint8_t , size_after_off);
+ auto buffer = std::make_unique<uint8_t []>(size_after_off);
// Read the part of file after offset
- floppy_image_read(floppy , buffer , offset , size_after_off);
+ floppy_image_read(floppy, buffer.get(), offset, size_after_off);
// Add zeroes
- floppy_image_write_filler(floppy , 0 , offset , amount);
+ floppy_image_write_filler(floppy, 0, offset, amount);
// Write back the part of file after offset
- floppy_image_write(floppy, buffer, offset + amount, size_after_off);
+ floppy_image_write(floppy, buffer.get(), offset + amount, size_after_off);
- global_free_array(buffer);
+ buffer.reset();
// Update track offsets
struct imddsk_tag *tag = get_tag(floppy);
@@ -439,6 +439,12 @@ bool imd_format::load(io_generic *io, uint32_t form_factor, floppy_image *image)
int tracks, heads;
image->get_maximal_geometry(tracks, heads);
+ m_mode.clear();
+ m_track.clear();
+ m_head.clear();
+ m_sector_count.clear();
+ m_ssize.clear();
+
while(pos < size) {
m_mode.push_back(img[pos++]);
m_track.push_back(img[pos++]);
@@ -522,7 +528,7 @@ bool imd_format::load(io_generic *io, uint32_t form_factor, floppy_image *image)
sects[i].bad_crc = stype == 5 || stype == 6 || stype == 7 || stype == 8;
if(stype == 2 || stype == 4 || stype == 6 || stype == 8) {
- sects[i].data = global_alloc_array(uint8_t, actual_size);
+ sects[i].data = new uint8_t [actual_size];
memset(sects[i].data, img[pos++], actual_size);
} else {
sects[i].data = &img[pos];
@@ -541,7 +547,7 @@ bool imd_format::load(io_generic *io, uint32_t form_factor, floppy_image *image)
for(int i=0; i< m_sector_count.back(); i++)
if(sects[i].data && (sects[i].data < &img[0] || sects[i].data >= (&img[0] + size)))
- global_free_array(sects[i].data);
+ delete [] sects[i].data;
}
return true;
diff --git a/src/lib/formats/ioprocs.h b/src/lib/formats/ioprocs.h
index 5b45b4a1450..1244873f14c 100644
--- a/src/lib/formats/ioprocs.h
+++ b/src/lib/formats/ioprocs.h
@@ -25,20 +25,20 @@
struct io_procs
{
- void (*closeproc)(void *file);
- int (*seekproc)(void *file, int64_t offset, int whence);
- size_t (*readproc)(void *file, void *buffer, size_t length);
- size_t (*writeproc)(void *file, const void *buffer, size_t length);
- uint64_t (*filesizeproc)(void *file);
+ void (*closeproc)(void *file) = nullptr;
+ int (*seekproc)(void *file, int64_t offset, int whence) = nullptr;
+ size_t (*readproc)(void *file, void *buffer, size_t length) = nullptr;
+ size_t (*writeproc)(void *file, const void *buffer, size_t length) = nullptr;
+ uint64_t (*filesizeproc)(void *file) = nullptr;
};
struct io_generic
{
- const struct io_procs *procs;
- void *file;
- uint8_t filler;
+ const struct io_procs *procs = nullptr;
+ void *file = nullptr;
+ uint8_t filler = 0;
};
@@ -48,10 +48,10 @@ struct io_generic
***************************************************************************/
-extern const struct io_procs stdio_ioprocs;
-extern const struct io_procs stdio_ioprocs_noclose;
-extern const struct io_procs corefile_ioprocs;
-extern const struct io_procs corefile_ioprocs_noclose;
+extern const io_procs stdio_ioprocs;
+extern const io_procs stdio_ioprocs_noclose;
+extern const io_procs corefile_ioprocs;
+extern const io_procs corefile_ioprocs_noclose;
diff --git a/src/lib/formats/ipf_dsk.cpp b/src/lib/formats/ipf_dsk.cpp
index ed6505fd385..fc81ffe66ce 100644
--- a/src/lib/formats/ipf_dsk.cpp
+++ b/src/lib/formats/ipf_dsk.cpp
@@ -1,12 +1,27 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
-#include <cassert>
#include "ipf_dsk.h"
+#include <cassert>
+
+
const floppy_format_type FLOPPY_IPF_FORMAT = &floppy_image_format_creator<ipf_format>;
-ipf_format::ipf_format(): tinfos(nullptr), tcount(0), type(0), release(0), revision(0), encoder_type(0),
-encoder_revision(0), origin(0), min_cylinder(0), max_cylinder(0), min_head(0), max_head(0), credit_day(0), credit_time(0)
+ipf_format::ipf_format() :
+ tinfos(),
+ tcount(0),
+ type(0),
+ release(0),
+ revision(0),
+ encoder_type(0),
+ encoder_revision(0),
+ origin(0),
+ min_cylinder(0),
+ max_cylinder(0),
+ min_head(0),
+ max_head(0),
+ credit_day(0),
+ credit_time(0)
{
}
@@ -84,12 +99,11 @@ bool ipf_format::parse(std::vector<uint8_t> &data, floppy_image *image)
{
image->set_variant(floppy_image::DSDD); // Not handling anything else yet
tcount = 84*2+1; // Usual max
- tinfos = global_alloc_array_clear<track_info>(tcount);
+ tinfos.resize(tcount);
bool res = scan_all_tags(data);
if(res)
res = generate_tracks(image);
- global_free_array(tinfos);
- tinfos = nullptr;
+ tinfos.clear();
return res;
}
@@ -121,14 +135,11 @@ ipf_format::track_info *ipf_format::get_index(uint32_t idx)
if(idx > 1000)
return nullptr;
if(idx >= tcount) {
- auto ti1 = global_alloc_array_clear<track_info>(idx+1);
- memcpy(ti1, tinfos, tcount*sizeof(tinfos));
- global_free_array(tinfos);
+ tinfos.resize(idx+1);
tcount = idx+1;
- tinfos = ti1;
}
- return tinfos+idx;
+ return &tinfos[idx];
}
bool ipf_format::parse_imge(const uint8_t *imge)
@@ -246,7 +257,7 @@ bool ipf_format::scan_all_tags(std::vector<uint8_t> &data)
bool ipf_format::generate_tracks(floppy_image *image)
{
for(uint32_t i = 0; i != tcount; i++) {
- track_info *t = tinfos + i;
+ track_info *t = &tinfos[i];
if(t->info_set && t->data) {
if(!generate_track(t, image))
return false;
diff --git a/src/lib/formats/ipf_dsk.h b/src/lib/formats/ipf_dsk.h
index 7db2415afd4..e026cab2c4c 100644
--- a/src/lib/formats/ipf_dsk.h
+++ b/src/lib/formats/ipf_dsk.h
@@ -24,22 +24,22 @@ public:
private:
struct track_info {
- uint32_t cylinder, head, type;
- uint32_t sigtype, process, reserved[3];
- uint32_t size_bytes, size_cells;
- uint32_t index_bytes, index_cells;
- uint32_t datasize_cells, gapsize_cells;
- uint32_t block_count, weak_bits;
+ uint32_t cylinder = 0, head = 0, type = 0;
+ uint32_t sigtype = 0, process = 0, reserved[3] = { 0, 0, 0 };
+ uint32_t size_bytes = 0, size_cells = 0;
+ uint32_t index_bytes = 0, index_cells = 0;
+ uint32_t datasize_cells = 0, gapsize_cells = 0;
+ uint32_t block_count = 0, weak_bits = 0;
- uint32_t data_size_bits;
+ uint32_t data_size_bits = 0;
- bool info_set;
+ bool info_set = false;
- const uint8_t *data;
- uint32_t data_size;
+ const uint8_t *data = nullptr;
+ uint32_t data_size = 0;
};
- track_info *tinfos;
+ std::vector<track_info> tinfos;
uint32_t tcount;
uint32_t type, release, revision;
diff --git a/src/lib/formats/kc_cas.cpp b/src/lib/formats/kc_cas.cpp
index ee3d392e86f..74397e3f89a 100644
--- a/src/lib/formats/kc_cas.cpp
+++ b/src/lib/formats/kc_cas.cpp
@@ -13,10 +13,10 @@
********************************************************************/
-#include <cassert>
-
#include "kc_cas.h"
+#include <cassert>
+
#define SMPLO -32768
#define SMPHI 32767
#define SILENCE 0
@@ -38,7 +38,7 @@ enum
};
// image size
-static int kc_image_size;
+static int kc_image_size; // FIXME: global variable prevents multiple instances
/*******************************************************************
Generate one high-low cycle of sample data
@@ -249,7 +249,7 @@ static int kc_kcc_to_wav_size(const uint8_t *casdata, int caslen)
}
-static const struct CassetteLegacyWaveFiller kc_kcc_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller kc_kcc_legacy_fill_wave =
{
kc_kcc_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -260,19 +260,19 @@ static const struct CassetteLegacyWaveFiller kc_kcc_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error kc_kcc_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error kc_kcc_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &kc_kcc_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &kc_kcc_legacy_fill_wave);
}
static cassette_image::error kc_kcc_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &kc_kcc_legacy_fill_wave);
+ return cassette->legacy_construct(&kc_kcc_legacy_fill_wave);
}
-static const struct CassetteFormat kc_kcc_format =
+static const cassette_image::Format kc_kcc_format =
{
"kcc,kcb",
kc_kcc_identify,
@@ -301,7 +301,7 @@ static int kc_tap_to_wav_size(const uint8_t *casdata, int caslen)
}
-static const struct CassetteLegacyWaveFiller kc_tap_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller kc_tap_legacy_fill_wave =
{
kc_tap_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -312,19 +312,19 @@ static const struct CassetteLegacyWaveFiller kc_tap_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error kc_tap_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error kc_tap_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &kc_tap_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &kc_tap_legacy_fill_wave);
}
static cassette_image::error kc_tap_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &kc_tap_legacy_fill_wave);
+ return cassette->legacy_construct(&kc_tap_legacy_fill_wave);
}
-static const struct CassetteFormat kc_tap_format =
+static const cassette_image::Format kc_tap_format =
{
"tap,853,854,855,tp2,kcm",
kc_tap_identify,
@@ -353,7 +353,7 @@ static int kc_sss_to_wav_size(const uint8_t *casdata, int caslen)
}
-static const struct CassetteLegacyWaveFiller kc_sss_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller kc_sss_legacy_fill_wave =
{
kc_sss_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -364,18 +364,18 @@ static const struct CassetteLegacyWaveFiller kc_sss_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error kc_sss_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error kc_sss_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &kc_sss_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &kc_sss_legacy_fill_wave);
}
static cassette_image::error kc_sss_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &kc_sss_legacy_fill_wave);
+ return cassette->legacy_construct(&kc_sss_legacy_fill_wave);
}
-static const struct CassetteFormat kc_sss_format =
+static const cassette_image::Format kc_sss_format =
{
"sss",
kc_sss_identify,
diff --git a/src/lib/formats/kim1_cas.cpp b/src/lib/formats/kim1_cas.cpp
index b7853ee967e..0ae96280ee3 100644
--- a/src/lib/formats/kim1_cas.cpp
+++ b/src/lib/formats/kim1_cas.cpp
@@ -1,14 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Wilbert Pol
-#include <cassert>
-
#include "kim1_cas.h"
+#include <cassert>
+
#define SMPLO -32768
#define SMPHI 32767
-static int cas_size;
+static int cas_size; // FIXME: global variable prevents multiple instances
static inline int kim1_output_signal( int16_t *buffer, int sample_pos, int high )
@@ -159,7 +159,7 @@ static int kim1_kim_to_wav_size(const uint8_t *casdata, int caslen)
return kim1_handle_kim( nullptr, casdata );
}
-static const struct CassetteLegacyWaveFiller kim1_kim_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller kim1_kim_legacy_fill_wave =
{
kim1_kim_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -171,19 +171,19 @@ static const struct CassetteLegacyWaveFiller kim1_kim_legacy_fill_wave =
};
-static cassette_image::error kim1_kim_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error kim1_kim_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &kim1_kim_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &kim1_kim_legacy_fill_wave);
}
static cassette_image::error kim1_kim_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &kim1_kim_legacy_fill_wave);
+ return cassette->legacy_construct(&kim1_kim_legacy_fill_wave);
}
-static const struct CassetteFormat kim1_kim_format =
+static const cassette_image::Format kim1_kim_format =
{
"kim,kim1",
kim1_kim_identify,
diff --git a/src/lib/formats/lviv_lvt.cpp b/src/lib/formats/lviv_lvt.cpp
index 3a94114d421..3725c181f3c 100644
--- a/src/lib/formats/lviv_lvt.cpp
+++ b/src/lib/formats/lviv_lvt.cpp
@@ -1,10 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Krzysztof Strzecha
/* .LVT tape images */
-#include <cassert>
-
#include "lviv_lvt.h"
+#include <cassert>
+
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
@@ -19,9 +19,7 @@
static int16_t *lviv_emit_level(int16_t *p, int count, int level)
{
- int i;
-
- for (i=0; i<count; i++)
+ for (int i=0; i<count; i++)
{
*(p++) = level;
}
@@ -47,11 +45,9 @@ static int16_t* lviv_output_bit(int16_t *p, uint8_t b)
static int16_t* lviv_output_byte(int16_t *p, uint8_t byte)
{
- int i;
-
p = lviv_output_bit (p, 0);
- for (i=0; i<8; i++)
+ for (int i=0; i<8; i++)
p = lviv_output_bit(p,(byte>>i) & 0x01);
p = lviv_output_bit (p, 1);
@@ -78,23 +74,22 @@ static int lviv_cassette_calculate_size_in_samples(const uint8_t *bytes, int len
static int lviv_cassette_fill_wave(int16_t *buffer, int length, uint8_t *bytes)
{
- int i;
int16_t * p = buffer;
int data_size;
- for (i=0; i<LVIV_LVT_HEADER_PILOT_LENGTH; i++)
+ for (int i=0; i<LVIV_LVT_HEADER_PILOT_LENGTH; i++)
p = lviv_output_bit (p, 1);
- for (i=0; i<10; i++)
+ for (int i=0; i<10; i++)
p = lviv_output_byte (p, bytes[0x09]);
- for (i=0; i<6; i++)
+ for (int i=0; i<6; i++)
p = lviv_output_byte (p, bytes[0x0a+i]);
p = lviv_emit_level (p, LVIV_LVT_PAUSE_SAMPLES, WAVEENTRY_HIGH);
- for (i=0; i<LVIV_LVT_BLOCK_PILOT_LENGTH; i++)
+ for (int i=0; i<LVIV_LVT_BLOCK_PILOT_LENGTH; i++)
p = lviv_output_bit (p, 1);
data_size = length - ( LVIV_LVT_HEADER_PILOT_SAMPLES +
@@ -103,7 +98,7 @@ static int lviv_cassette_fill_wave(int16_t *buffer, int length, uint8_t *bytes)
LVIV_LVT_BLOCK_PILOT_SAMPLES );
data_size/=660;
- for (i=0; i<data_size; i++)
+ for (int i=0; i<data_size; i++)
p = lviv_output_byte (p, bytes[0x10+i]);
return p - buffer;
@@ -111,7 +106,7 @@ static int lviv_cassette_fill_wave(int16_t *buffer, int length, uint8_t *bytes)
-static const struct CassetteLegacyWaveFiller lviv_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller lviv_legacy_fill_wave =
{
lviv_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -124,21 +119,21 @@ static const struct CassetteLegacyWaveFiller lviv_legacy_fill_wave =
-static cassette_image::error lviv_lvt_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error lviv_lvt_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &lviv_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &lviv_legacy_fill_wave);
}
static cassette_image::error lviv_lvt_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &lviv_legacy_fill_wave);
+ return cassette->legacy_construct(&lviv_legacy_fill_wave);
}
-static const struct CassetteFormat lviv_lvt_image_format =
+static const cassette_image::Format lviv_lvt_image_format =
{
"lvt,lvr,lv0,lv1,lv2,lv3",
lviv_lvt_identify,
diff --git a/src/lib/formats/mbee_cas.cpp b/src/lib/formats/mbee_cas.cpp
index 181bca6aac0..855b4757581 100644
--- a/src/lib/formats/mbee_cas.cpp
+++ b/src/lib/formats/mbee_cas.cpp
@@ -227,7 +227,7 @@ static int mbee_tap_calculate_size_in_samples(const uint8_t *bytes, int length)
return mbee_handle_tap(nullptr, bytes);
}
-static const struct CassetteLegacyWaveFiller mbee_tap_config =
+static const cassette_image::LegacyWaveFiller mbee_tap_config =
{
mbee_tap_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -238,17 +238,17 @@ static const struct CassetteLegacyWaveFiller mbee_tap_config =
0 /* trailer_samples */
};
-static cassette_image::error mbee_tap_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error mbee_tap_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &mbee_tap_config);
+ return cassette->legacy_identify(opts, &mbee_tap_config);
}
static cassette_image::error mbee_tap_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &mbee_tap_config);
+ return cassette->legacy_construct(&mbee_tap_config);
}
-static const struct CassetteFormat mbee_tap_image_format =
+static const cassette_image::Format mbee_tap_image_format =
{
"tap",
mbee_tap_identify,
diff --git a/src/lib/formats/mfi_dsk.cpp b/src/lib/formats/mfi_dsk.cpp
index 0f118ce620f..eb86d8d80da 100644
--- a/src/lib/formats/mfi_dsk.cpp
+++ b/src/lib/formats/mfi_dsk.cpp
@@ -187,8 +187,8 @@ bool mfi_format::save(io_generic *io, floppy_image *image)
int pos = sizeof(header) + (tracks << resolution)*heads*sizeof(entry);
int epos = 0;
- auto precomp = global_alloc_array(uint32_t, max_track_size);
- auto postcomp = global_alloc_array(uint8_t, max_track_size*4 + 1000);
+ auto precomp = std::make_unique<uint32_t []>(max_track_size);
+ auto postcomp = std::make_unique<uint8_t []>(max_track_size*4 + 1000);
for(int track=0; track <= (tracks-1) << 2; track += 4 >> resolution)
for(int head=0; head<heads; head++) {
@@ -199,7 +199,7 @@ bool mfi_format::save(io_generic *io, floppy_image *image)
continue;
}
- memcpy(precomp, &buffer[0], tsize*4);
+ memcpy(&precomp[0], &buffer[0], tsize*4);
for(int j=0; j<tsize-1; j++)
precomp[j] = (precomp[j] & floppy_image::MG_MASK) |
((precomp[j+1] & floppy_image::TIME_MASK) -
@@ -208,11 +208,8 @@ bool mfi_format::save(io_generic *io, floppy_image *image)
(200000000 - (precomp[tsize-1] & floppy_image::TIME_MASK));
uLongf csize = max_track_size*4 + 1000;
- if(compress(postcomp, &csize, (const Bytef *)precomp, tsize*4) != Z_OK) {
- global_free_array(precomp);
- global_free_array(postcomp);
+ if(compress(postcomp.get(), &csize, (const Bytef *)precomp.get(), tsize*4) != Z_OK)
return false;
- }
entries[epos].offset = pos;
entries[epos].uncompressed_size = tsize*4;
@@ -220,13 +217,11 @@ bool mfi_format::save(io_generic *io, floppy_image *image)
entries[epos].write_splice = image->get_write_splice_position(track >> 2, head, track & 3);
epos++;
- io_generic_write(io, postcomp, pos, csize);
+ io_generic_write(io, postcomp.get(), pos, csize);
pos += csize;
}
io_generic_write(io, entries, sizeof(header), (tracks << resolution)*heads*sizeof(entry));
- global_free_array(precomp);
- global_free_array(postcomp);
return true;
}
diff --git a/src/lib/formats/mz_cas.cpp b/src/lib/formats/mz_cas.cpp
index e7af23aafb4..0ab4cec8e84 100644
--- a/src/lib/formats/mz_cas.cpp
+++ b/src/lib/formats/mz_cas.cpp
@@ -1,8 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Nathan Woods
+#include "mz_cas.h"
+
#include <cstring>
#include <cassert>
-#include "mz_cas.h"
#ifndef VERBOSE
#define VERBOSE 0
@@ -301,7 +302,7 @@ static int fill_wave(int16_t *buffer, int length, uint8_t *code)
-static const struct CassetteLegacyWaveFiller mz700_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller mz700_legacy_fill_wave =
{
fill_wave, /* fill_wave */
1, /* chunk_size */
@@ -314,21 +315,21 @@ static const struct CassetteLegacyWaveFiller mz700_legacy_fill_wave =
-static cassette_image::error mz700_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error mz700_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &mz700_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &mz700_legacy_fill_wave);
}
static cassette_image::error mz700_cas_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &mz700_legacy_fill_wave);
+ return cassette->legacy_construct(&mz700_legacy_fill_wave);
}
-static const struct CassetteFormat mz700_cas_format =
+static const cassette_image::Format mz700_cas_format =
{
"m12,mzf,mzt",
mz700_cas_identify,
diff --git a/src/lib/formats/orao_cas.cpp b/src/lib/formats/orao_cas.cpp
index 9a2ac05547e..a9c3f7473d4 100644
--- a/src/lib/formats/orao_cas.cpp
+++ b/src/lib/formats/orao_cas.cpp
@@ -5,10 +5,10 @@
Tape support for Orao TAP format
*/
-#include <cassert>
-
#include "orao_cas.h"
+#include <cassert>
+
#define ORAO_WAV_FREQUENCY 44100
#define WAVE_HIGH -32768
@@ -19,7 +19,7 @@
#define ORAO_HEADER_SIZE 360
-static int16_t wave_data;
+static int16_t wave_data; // FIXME: global variables prevent multiple instances
static int len;
static void orao_output_wave( int16_t **buffer, int length ) {
@@ -85,7 +85,7 @@ static int orao_cas_fill_wave( int16_t *buffer, int length, uint8_t *bytes ) {
-static const struct CassetteLegacyWaveFiller orao_legacy_fill_wave = {
+static const cassette_image::LegacyWaveFiller orao_legacy_fill_wave = {
orao_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
0, /* chunk_samples */
@@ -97,19 +97,19 @@ static const struct CassetteLegacyWaveFiller orao_legacy_fill_wave = {
-static cassette_image::error orao_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) {
- return cassette_legacy_identify( cassette, opts, &orao_legacy_fill_wave );
+static cassette_image::error orao_cassette_identify( cassette_image *cassette, cassette_image::Options *opts ) {
+ return cassette->legacy_identify( opts, &orao_legacy_fill_wave );
}
static cassette_image::error orao_cassette_load( cassette_image *cassette ) {
- return cassette_legacy_construct( cassette, &orao_legacy_fill_wave );
+ return cassette->legacy_construct( &orao_legacy_fill_wave );
}
-static const struct CassetteFormat orao_cassette_format = {
+static const cassette_image::Format orao_cassette_format = {
"tap",
orao_cassette_identify,
orao_cassette_load,
diff --git a/src/lib/formats/oric_tap.cpp b/src/lib/formats/oric_tap.cpp
index dcee2f0bd2d..9dc98239fac 100644
--- a/src/lib/formats/oric_tap.cpp
+++ b/src/lib/formats/oric_tap.cpp
@@ -1,8 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Kevin Thacker
+#include "oric_tap.h"
+
#include <cassert>
-#include "oric_tap.h"
#define ORIC_WAV_DEBUG 0
#define LOG(x) do { if (ORIC_WAV_DEBUG) printf x; } while (0)
@@ -481,7 +482,7 @@ static int oric_cassette_fill_wave(int16_t *buffer, int length, uint8_t *bytes)
-static const struct CassetteLegacyWaveFiller oric_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller oric_legacy_fill_wave =
{
oric_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -494,21 +495,21 @@ static const struct CassetteLegacyWaveFiller oric_legacy_fill_wave =
-static cassette_image::error oric_tap_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error oric_tap_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &oric_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &oric_legacy_fill_wave);
}
static cassette_image::error oric_tap_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &oric_legacy_fill_wave);
+ return cassette->legacy_construct(&oric_legacy_fill_wave);
}
-static const struct CassetteFormat oric_tap_format =
+static const cassette_image::Format oric_tap_format =
{
"tap",
oric_tap_identify,
diff --git a/src/lib/formats/p2000t_cas.cpp b/src/lib/formats/p2000t_cas.cpp
index e3351dc99dc..7bc0c6b21a9 100644
--- a/src/lib/formats/p2000t_cas.cpp
+++ b/src/lib/formats/p2000t_cas.cpp
@@ -1,12 +1,12 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
-#include <cassert>
-
-#include "cassimg.h"
#include "p2000t_cas.h"
+
+#include <cassert>
#include <ostream>
+
// This code will reproduce the timing of a P2000 mini cassette tape.
constexpr double P2000_CLOCK_PERIOD = 0.000084;
constexpr double P2000_BOT_GAP = 1;
@@ -153,10 +153,10 @@ struct P2000T_Header
std::ostream &operator<<(std::ostream &os, P2000T_Header const &hdr)
{
return os << "File: " << std::string(hdr.file_name, 8) << '.'
- << std::string(hdr.ext, 3) << " " << hdr.file_length;
+ << std::string(hdr.ext, 3) << " " << hdr.file_length;
}
-static cassette_image::error p2000t_cas_identify(cassette_image *cass, struct CassetteOptions *opts)
+static cassette_image::error p2000t_cas_identify(cassette_image *cass, cassette_image::Options *opts)
{
opts->bits_per_sample = 32;
opts->channels = 1;
@@ -189,36 +189,36 @@ void update_chksum(uint16_t *de, bool bit)
}
/*
- A transition on a clock boundary from low to high is a 1.
- A transition on a clock boundary from high to low is a 0
- An intermediate transition halfway between the clock boundary
- can occur when there are consecutive 0s or 1s. See the example
- below where the clock is marked by a |
-
-
- 1 0 1 1 0 0
- RDA: _|----|____|--__|----|__--|__--
- RDC: _|-___|-___|-___|-___|-___|-___
- ^ ^
- |-- clock signal |-- intermediate transition.
-
- This signal can be written by a simple algorithm where the first bit
- is always false (transition to low, half clock). Now only one bit is needed
- to determine what the next partial clock should look like.
-
- This works because we are always guaranteed that a block starts with 0xAA,
- and hence will ALWAYS find a signal like this on tape: _-- (low, high, high)
- after a gap. This is guaranteed when the tape is moving forward as well as
- backwards.
+ A transition on a clock boundary from low to high is a 1.
+ A transition on a clock boundary from high to low is a 0
+ An intermediate transition halfway between the clock boundary
+ can occur when there are consecutive 0s or 1s. See the example
+ below where the clock is marked by a |
+
+
+ 1 0 1 1 0 0
+ RDA: _|----|____|--__|----|__--|__--
+ RDC: _|-___|-___|-___|-___|-___|-___
+ ^ ^
+ |-- clock signal |-- intermediate transition.
+
+ This signal can be written by a simple algorithm where the first bit
+ is always false (transition to low, half clock). Now only one bit is needed
+ to determine what the next partial clock should look like.
+
+ This works because we are always guaranteed that a block starts with 0xAA,
+ and hence will ALWAYS find a signal like this on tape: _-- (low, high, high)
+ after a gap. This is guaranteed when the tape is moving forward as well as
+ backwards.
*/
cassette_image::error p2000t_put_bit(cassette_image *cass, double *time_index, bool bit)
{
const int channel = 0;
cassette_image::error err = cassette_image::error::SUCCESS;
- CHR(cassette_put_sample(cass, channel, *time_index, P2000_CLOCK_PERIOD, bit ? P2000_HIGH : P2000_LOW));
+ CHR(cass->put_sample(channel, *time_index, P2000_CLOCK_PERIOD, bit ? P2000_HIGH : P2000_LOW));
*time_index += P2000_CLOCK_PERIOD;
- CHR(cassette_put_sample(cass, channel, *time_index, P2000_CLOCK_PERIOD, bit ? P2000_LOW : P2000_HIGH));
+ CHR(cass->put_sample(channel, *time_index, P2000_CLOCK_PERIOD, bit ? P2000_LOW : P2000_HIGH));
*time_index += P2000_CLOCK_PERIOD;
return err;
}
@@ -251,7 +251,7 @@ cassette_image::error p2000t_silence(cassette_image *cassette,
double *time_index,
double time)
{
- auto err = cassette_put_sample(cassette, 0, *time_index, time, 0);
+ auto err = cassette->put_sample(0, *time_index, time, 0);
*time_index += time;
return err;
}
@@ -259,21 +259,21 @@ double time)
static cassette_image::error p2000t_cas_load(cassette_image *cassette)
{
cassette_image::error err = cassette_image::error::SUCCESS;
- uint64_t image_size = cassette_image_size(cassette);
+ uint64_t image_size = cassette->image_size();
constexpr int CAS_BLOCK = 1280;
/*
- The cas format is pretty simple. it consists of a sequence of blocks,
- where a block consists of the following:
+ The cas format is pretty simple. it consists of a sequence of blocks,
+ where a block consists of the following:
- [0-256] P2000 memory address 0x6000 - 0x6100
- .... Nonsense (keyboard status etc.)
- 0x30 P200T_Header
- 0x50
- ... Nonsense..
- [0-1024] Data block
+ [0-256] P2000 memory address 0x6000 - 0x6100
+ .... Nonsense (keyboard status etc.)
+ 0x30 P200T_Header
+ 0x50
+ ... Nonsense..
+ [0-1024] Data block
- This means that one block gets stored in 1280 bytes.
+ This means that one block gets stored in 1280 bytes.
*/
if (image_size % CAS_BLOCK != 0)
{
@@ -290,7 +290,7 @@ static cassette_image::error p2000t_cas_load(cassette_image *cassette)
for (int i = 0; i < blocks; i++)
{
uint16_t crc = 0, unused = 0;
- cassette_image_read(cassette, &block, CAS_BLOCK * i, CAS_BLOCK);
+ cassette->image_read(&block, CAS_BLOCK * i, CAS_BLOCK);
// Insert sync header.. 0xAA, 0x00, 0x00, 0xAA
CHR(p2000t_silence(cassette, &time_idx, P2000_BOB_GAP));
@@ -312,7 +312,7 @@ static cassette_image::error p2000t_cas_load(cassette_image *cassette)
return p2000t_silence(cassette, &time_idx, P2000_EOT_GAP);
}
-static const struct CassetteFormat p2000t_cas = {
+static const cassette_image::Format p2000t_cas = {
"cas", p2000t_cas_identify, p2000t_cas_load, nullptr /* no save */
};
diff --git a/src/lib/formats/p6001_cas.cpp b/src/lib/formats/p6001_cas.cpp
index 3319e377b3d..425a4e8dd2c 100644
--- a/src/lib/formats/p6001_cas.cpp
+++ b/src/lib/formats/p6001_cas.cpp
@@ -4,22 +4,21 @@
* NEC PC-6001 cassette format handling
*/
-#include <cassert>
-
#include "p6001_cas.h"
+#include <cassert>
+
#define WAVE_HIGH 0x5a9e
#define WAVE_LOW -0x5a9e
-static int cas_size;
+static int cas_size; // FIXME: global variable prevents multiple instances
static int pc6001_fill_wave(int16_t* buffer, uint8_t data, int sample_pos)
{
- int x;
int sample_count = 0;
// one byte = 8 samples
- for(x=0;x<8;x++)
+ for(int x=0;x<8;x++)
{
if(buffer)
buffer[sample_pos+x] = ((data >> (7-x)) & 1) ? WAVE_HIGH : WAVE_LOW;
@@ -61,7 +60,7 @@ static int pc6001_cas_fill_wave(int16_t *buffer, int sample_count, uint8_t *byte
return pc6001_handle_cas(buffer,bytes);
}
-static const struct CassetteLegacyWaveFiller pc6001_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller pc6001_legacy_fill_wave =
{
pc6001_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -72,20 +71,20 @@ static const struct CassetteLegacyWaveFiller pc6001_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error pc6001_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error pc6001_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &pc6001_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &pc6001_legacy_fill_wave);
}
static cassette_image::error pc6001_cas_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &pc6001_legacy_fill_wave);
+ return cassette->legacy_construct(&pc6001_legacy_fill_wave);
}
-static const struct CassetteFormat pc6001_cassette_format = {
+static const cassette_image::Format pc6001_cassette_format = {
"cas",
pc6001_cas_identify,
pc6001_cas_load,
diff --git a/src/lib/formats/phc25_cas.cpp b/src/lib/formats/phc25_cas.cpp
index 197c3db50ae..ee8864adbb5 100644
--- a/src/lib/formats/phc25_cas.cpp
+++ b/src/lib/formats/phc25_cas.cpp
@@ -29,10 +29,10 @@ enough to make it work.
********************************************************************/
-#include <cassert>
-
#include "phc25_cas.h"
+#include <cassert>
+
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
@@ -40,7 +40,7 @@ enough to make it work.
#define PHC25_HEADER_BYTES 16
// image size
-static int phc25_image_size;
+static int phc25_image_size; // FIXME: global variable prevents multiple instances
static int phc25_put_samples(int16_t *buffer, int sample_pos, int count, int level)
{
@@ -147,7 +147,7 @@ static int phc25_cassette_calculate_size_in_samples(const uint8_t *bytes, int le
return phc25_handle_cassette(nullptr, bytes);
}
-static const struct CassetteLegacyWaveFiller phc25_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller phc25_legacy_fill_wave =
{
phc25_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -158,17 +158,17 @@ static const struct CassetteLegacyWaveFiller phc25_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error phc25_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error phc25_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &phc25_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &phc25_legacy_fill_wave);
}
static cassette_image::error phc25_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &phc25_legacy_fill_wave);
+ return cassette->legacy_construct(&phc25_legacy_fill_wave);
}
-static const struct CassetteFormat phc25_cassette_image_format =
+static const cassette_image::Format phc25_cassette_image_format =
{
"phc",
phc25_cassette_identify,
diff --git a/src/lib/formats/pmd_cas.cpp b/src/lib/formats/pmd_cas.cpp
index a046580bc17..20e4a64bbe1 100644
--- a/src/lib/formats/pmd_cas.cpp
+++ b/src/lib/formats/pmd_cas.cpp
@@ -10,10 +10,10 @@
********************************************************************/
-#include <cassert>
-
#include "pmd_cas.h"
+#include <cassert>
+
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
@@ -26,7 +26,7 @@
#define PMD85_BITS_PER_BYTE 11
// image size
-static int pmd85_image_size;
+static int pmd85_image_size; // FIXME: global variable prevents multiple instances
static int pmd85_emit_level(int16_t *buffer, int sample_pos, int count, int level)
{
@@ -184,7 +184,7 @@ static int pmd85_cassette_calculate_size_in_samples(const uint8_t *bytes, int le
return pmd85_handle_cassette(nullptr, bytes);
}
-static const struct CassetteLegacyWaveFiller pmd85_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller pmd85_legacy_fill_wave =
{
pmd85_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -195,17 +195,17 @@ static const struct CassetteLegacyWaveFiller pmd85_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error pmd85_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error pmd85_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &pmd85_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &pmd85_legacy_fill_wave);
}
static cassette_image::error pmd85_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &pmd85_legacy_fill_wave);
+ return cassette->legacy_construct(&pmd85_legacy_fill_wave);
}
-static const struct CassetteFormat pmd85_cassette_image_format =
+static const cassette_image::Format pmd85_cassette_image_format =
{
"pmd,tap,ptp",
pmd85_cassette_identify,
diff --git a/src/lib/formats/primoptp.cpp b/src/lib/formats/primoptp.cpp
index 906a08239a6..6e04f01bc62 100644
--- a/src/lib/formats/primoptp.cpp
+++ b/src/lib/formats/primoptp.cpp
@@ -2,11 +2,10 @@
// copyright-holders:Krzysztof Strzecha
/* .PTP Microkey Primo tape images */
+#include "primoptp.h"
#include <cassert>
-#include "primoptp.h"
-
#define PRIMO_WAVEENTRY_LOW -32768
#define PRIMO_WAVEENTRY_HIGH 32767
@@ -30,9 +29,7 @@ static uint32_t primo_tape_image_length;
static int16_t *primo_emit_level(int16_t *p, int count, int level)
{
- int i;
-
- for (i=0; i<count; i++) *(p++) = level;
+ for (int i=0; i<count; i++) *(p++) = level;
return p;
}
@@ -215,7 +212,7 @@ static int primo_cassette_fill_wave(int16_t *buffer, int length, uint8_t *bytes)
return p - buffer;
}
-static const struct CassetteLegacyWaveFiller primo_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller primo_legacy_fill_wave =
{
primo_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -226,17 +223,17 @@ static const struct CassetteLegacyWaveFiller primo_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error primo_ptp_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error primo_ptp_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &primo_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &primo_legacy_fill_wave);
}
static cassette_image::error primo_ptp_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &primo_legacy_fill_wave);
+ return cassette->legacy_construct(&primo_legacy_fill_wave);
}
-static const struct CassetteFormat primo_ptp_image_format =
+static const cassette_image::Format primo_ptp_image_format =
{
"ptp",
primo_ptp_identify,
diff --git a/src/lib/formats/rk_cas.cpp b/src/lib/formats/rk_cas.cpp
index b522fea2f3b..a31c47592db 100644
--- a/src/lib/formats/rk_cas.cpp
+++ b/src/lib/formats/rk_cas.cpp
@@ -5,10 +5,10 @@
Tape support for RK format
*/
-#include <cassert>
-
#include "rk_cas.h"
+#include <cassert>
+
#define RK_WAV_FREQUENCY 44000
#define WAVE_HIGH 32767
@@ -20,13 +20,12 @@
#define RK_SIZE_22 22
#define RK_SIZE_60 60
-static int data_size;
+static int data_size; // FIXME: global variable prevents multiple instances
static int16_t *rk_emit_level(int16_t *p, int count, int level)
{
- int i;
- for (i=0; i<count; i++)
+ for (int i=0; i<count; i++)
{
*(p++) = level;
}
@@ -141,7 +140,7 @@ static int gam_cas_fill_wave( int16_t *buffer, int length, uint8_t *bytes ) {
return p - buffer;
}
-static const struct CassetteLegacyWaveFiller rk20_legacy_fill_wave = {
+static const cassette_image::LegacyWaveFiller rk20_legacy_fill_wave = {
rk20_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
0, /* chunk_samples */
@@ -151,15 +150,15 @@ static const struct CassetteLegacyWaveFiller rk20_legacy_fill_wave = {
0 /* trailer_samples */
};
-static cassette_image::error rk20_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) {
- return cassette_legacy_identify( cassette, opts, &rk20_legacy_fill_wave );
+static cassette_image::error rk20_cassette_identify( cassette_image *cassette, cassette_image::Options *opts ) {
+ return cassette->legacy_identify( opts, &rk20_legacy_fill_wave );
}
static cassette_image::error rk20_cassette_load( cassette_image *cassette ) {
- return cassette_legacy_construct( cassette, &rk20_legacy_fill_wave );
+ return cassette->legacy_construct( &rk20_legacy_fill_wave );
}
-static const struct CassetteLegacyWaveFiller rk22_legacy_fill_wave = {
+static const cassette_image::LegacyWaveFiller rk22_legacy_fill_wave = {
rk22_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
0, /* chunk_samples */
@@ -169,15 +168,15 @@ static const struct CassetteLegacyWaveFiller rk22_legacy_fill_wave = {
0 /* trailer_samples */
};
-static cassette_image::error rk22_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) {
- return cassette_legacy_identify( cassette, opts, &rk22_legacy_fill_wave );
+static cassette_image::error rk22_cassette_identify( cassette_image *cassette, cassette_image::Options *opts ) {
+ return cassette->legacy_identify( opts, &rk22_legacy_fill_wave );
}
static cassette_image::error rk22_cassette_load( cassette_image *cassette ) {
- return cassette_legacy_construct( cassette, &rk22_legacy_fill_wave );
+ return cassette->legacy_construct( &rk22_legacy_fill_wave );
}
-static const struct CassetteLegacyWaveFiller gam_legacy_fill_wave = {
+static const cassette_image::LegacyWaveFiller gam_legacy_fill_wave = {
gam_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
0, /* chunk_samples */
@@ -187,15 +186,15 @@ static const struct CassetteLegacyWaveFiller gam_legacy_fill_wave = {
0 /* trailer_samples */
};
-static cassette_image::error gam_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) {
- return cassette_legacy_identify( cassette, opts, &gam_legacy_fill_wave );
+static cassette_image::error gam_cassette_identify( cassette_image *cassette, cassette_image::Options *opts ) {
+ return cassette->legacy_identify( opts, &gam_legacy_fill_wave );
}
static cassette_image::error gam_cassette_load( cassette_image *cassette ) {
- return cassette_legacy_construct( cassette, &gam_legacy_fill_wave );
+ return cassette->legacy_construct( &gam_legacy_fill_wave );
}
-static const struct CassetteLegacyWaveFiller rk60_legacy_fill_wave = {
+static const cassette_image::LegacyWaveFiller rk60_legacy_fill_wave = {
rk60_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
0, /* chunk_samples */
@@ -205,71 +204,71 @@ static const struct CassetteLegacyWaveFiller rk60_legacy_fill_wave = {
0 /* trailer_samples */
};
-static cassette_image::error rk60_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) {
- return cassette_legacy_identify( cassette, opts, &rk60_legacy_fill_wave );
+static cassette_image::error rk60_cassette_identify( cassette_image *cassette, cassette_image::Options *opts ) {
+ return cassette->legacy_identify( opts, &rk60_legacy_fill_wave );
}
static cassette_image::error rk60_cassette_load( cassette_image *cassette ) {
- return cassette_legacy_construct( cassette, &rk60_legacy_fill_wave );
+ return cassette->legacy_construct( &rk60_legacy_fill_wave );
}
-static const struct CassetteFormat rku_cassette_format = {
+static const cassette_image::Format rku_cassette_format = {
"rku",
rk20_cassette_identify,
rk20_cassette_load,
nullptr
};
-static const struct CassetteFormat rk8_cassette_format = {
+static const cassette_image::Format rk8_cassette_format = {
"rk8",
rk60_cassette_identify,
rk60_cassette_load,
nullptr
};
-static const struct CassetteFormat rks_cassette_format = {
+static const cassette_image::Format rks_cassette_format = {
"rks",
rk20_cassette_identify,
rk20_cassette_load,
nullptr
};
-static const struct CassetteFormat rko_cassette_format = {
+static const cassette_image::Format rko_cassette_format = {
"rko",
rk20_cassette_identify,
rk20_cassette_load,
nullptr
};
-static const struct CassetteFormat rkr_cassette_format = {
+static const cassette_image::Format rkr_cassette_format = {
"rk,rkr",
rk20_cassette_identify,
rk20_cassette_load,
nullptr
};
-static const struct CassetteFormat rka_cassette_format = {
+static const cassette_image::Format rka_cassette_format = {
"rka",
rk20_cassette_identify,
rk20_cassette_load,
nullptr
};
-static const struct CassetteFormat rkm_cassette_format = {
+static const cassette_image::Format rkm_cassette_format = {
"rkm",
rk22_cassette_identify,
rk22_cassette_load,
nullptr
};
-static const struct CassetteFormat rkp_cassette_format = {
+static const cassette_image::Format rkp_cassette_format = {
"rkp",
rk20_cassette_identify,
rk20_cassette_load,
nullptr
};
-static const struct CassetteFormat gam_cassette_format = {
+static const cassette_image::Format gam_cassette_format = {
"gam,g16,pki",
gam_cassette_identify,
gam_cassette_load,
diff --git a/src/lib/formats/sc3000_bit.cpp b/src/lib/formats/sc3000_bit.cpp
index 6e3600b7aeb..ab0828e709a 100644
--- a/src/lib/formats/sc3000_bit.cpp
+++ b/src/lib/formats/sc3000_bit.cpp
@@ -7,10 +7,10 @@
Cassette code for Sega SC-3000 *.bit files
*********************************************************************/
+#include "sc3000_bit.h"
#include <cassert>
-#include "sc3000_bit.h"
/***************************************************************************
PARAMETERS
@@ -26,9 +26,9 @@
CassetteModulation sc3000_bit_modulation
-------------------------------------------------*/
-static const struct CassetteModulation sc3000_bit_modulation =
+static const cassette_image::Modulation sc3000_bit_modulation =
{
- CASSETTE_MODULATION_SINEWAVE,
+ cassette_image::MODULATION_SINEWAVE,
1200.0 - 300, 1200.0, 1200.0 + 300,
2400.0 - 600, 2400.0, 2400.0 + 600
};
@@ -37,9 +37,9 @@ static const struct CassetteModulation sc3000_bit_modulation =
sc3000_bit_identify - identify cassette
-------------------------------------------------*/
-static cassette_image::error sc3000_bit_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error sc3000_bit_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_modulation_identify( cassette, &sc3000_bit_modulation, opts);
+ return cassette->modulation_identify(sc3000_bit_modulation, opts);
}
/*-------------------------------------------------
@@ -48,7 +48,7 @@ static cassette_image::error sc3000_bit_identify(cassette_image *cassette, struc
#define MODULATE(_value) \
for (int i = 0; i < (_value ? 2 : 1); i++) { \
- err = cassette_put_modulated_data_bit(cassette, 0, time_index, _value, &sc3000_bit_modulation, &time_displacement);\
+ err = cassette->put_modulated_data_bit(0, time_index, _value, sc3000_bit_modulation, &time_displacement);\
if (err != cassette_image::error::SUCCESS) return err;\
time_index += time_displacement;\
}
@@ -56,7 +56,7 @@ static cassette_image::error sc3000_bit_identify(cassette_image *cassette, struc
static cassette_image::error sc3000_bit_load(cassette_image *cassette)
{
cassette_image::error err;
- uint64_t image_size = cassette_image_size(cassette);
+ uint64_t image_size = cassette->image_size();
uint64_t image_pos = 0;
double time_index = 0.0;
double time_displacement;
@@ -64,7 +64,7 @@ static cassette_image::error sc3000_bit_load(cassette_image *cassette)
while (image_pos < image_size)
{
- cassette_image_read(cassette, &data, image_pos, 1);
+ cassette->image_read(&data, image_pos, 1);
switch (data)
{
@@ -77,7 +77,7 @@ static cassette_image::error sc3000_bit_load(cassette_image *cassette)
break;
case ' ':
- err = cassette_put_sample( cassette, 0, time_index, 1/1200.0, 0);
+ err = cassette->put_sample(0, time_index, 1/1200.0, 0);
if (err != cassette_image::error::SUCCESS) return err;
time_index += 1/1200.0;
break;
@@ -93,7 +93,7 @@ static cassette_image::error sc3000_bit_load(cassette_image *cassette)
CassetteFormat sc3000_bit_cassette_format
-------------------------------------------------*/
-const struct CassetteFormat sc3000_bit_format =
+const cassette_image::Format sc3000_bit_format =
{
"bit",
sc3000_bit_identify,
diff --git a/src/lib/formats/sol_cas.cpp b/src/lib/formats/sol_cas.cpp
index 4672ff95080..a48a5b918fd 100644
--- a/src/lib/formats/sol_cas.cpp
+++ b/src/lib/formats/sol_cas.cpp
@@ -33,10 +33,10 @@ SVT - The full explanation may be found on the Solace web site,
escaped characters
********************************************************************/
+#include "sol_cas.h"
#include <cassert>
-#include "sol_cas.h"
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
@@ -44,7 +44,7 @@ SVT - The full explanation may be found on the Solace web site,
#define SOL20_WAV_FREQUENCY 4800
// image size
-static uint32_t sol20_image_size;
+static uint32_t sol20_image_size; // FIXME: global variable prevent multiple instances
static bool level;
static uint8_t sol20_cksm_byte;
static uint32_t sol20_byte_num;
@@ -356,7 +356,7 @@ static int sol20_cassette_calculate_size_in_samples(const uint8_t *bytes, int le
return sol20_handle_cassette(nullptr, bytes);
}
-static const struct CassetteLegacyWaveFiller sol20_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller sol20_legacy_fill_wave =
{
sol20_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -367,17 +367,17 @@ static const struct CassetteLegacyWaveFiller sol20_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error sol20_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error sol20_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &sol20_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &sol20_legacy_fill_wave);
}
static cassette_image::error sol20_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &sol20_legacy_fill_wave);
+ return cassette->legacy_construct(&sol20_legacy_fill_wave);
}
-static const struct CassetteFormat sol20_cassette_image_format =
+static const cassette_image::Format sol20_cassette_image_format =
{
"svt",
sol20_cassette_identify,
diff --git a/src/lib/formats/sorc_cas.cpp b/src/lib/formats/sorc_cas.cpp
index 50585d444c7..21b3f8b5c2c 100644
--- a/src/lib/formats/sorc_cas.cpp
+++ b/src/lib/formats/sorc_cas.cpp
@@ -24,10 +24,10 @@ header and leader bytes.
********************************************************************/
+#include "sorc_cas.h"
#include <cassert>
-#include "sorc_cas.h"
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
@@ -124,7 +124,7 @@ static int sorcerer_cassette_calculate_size_in_samples(const uint8_t *bytes, int
return sorcerer_handle_cassette(nullptr, bytes);
}
-static const struct CassetteLegacyWaveFiller sorcerer_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller sorcerer_legacy_fill_wave =
{
sorcerer_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -135,17 +135,17 @@ static const struct CassetteLegacyWaveFiller sorcerer_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error sorcerer_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error sorcerer_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &sorcerer_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &sorcerer_legacy_fill_wave);
}
static cassette_image::error sorcerer_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &sorcerer_legacy_fill_wave);
+ return cassette->legacy_construct(&sorcerer_legacy_fill_wave);
}
-static const struct CassetteFormat sorcerer_cassette_image_format =
+static const cassette_image::Format sorcerer_cassette_image_format =
{
"tape",
sorcerer_cassette_identify,
diff --git a/src/lib/formats/sord_cas.cpp b/src/lib/formats/sord_cas.cpp
index 145cd3c3221..f90daafd248 100644
--- a/src/lib/formats/sord_cas.cpp
+++ b/src/lib/formats/sord_cas.cpp
@@ -7,10 +7,10 @@
Format code for Sord M5 cassette files
**************************************************************************/
+#include "sord_cas.h"
#include <cstring>
#include <cassert>
-#include "sord_cas.h"
#define SORDM5_WAVESAMPLES_HEADER 1
#define SORDM5_WAVESAMPLES_TRAILER 1
@@ -18,9 +18,9 @@
static const uint8_t SORDM5_CAS_HEADER[6] = { 'S', 'O', 'R', 'D', 'M', '5'};
-static const struct CassetteModulation sordm5_cas_modulation =
+static const cassette_image::Modulation sordm5_cas_modulation =
{
- CASSETTE_MODULATION_SINEWAVE,
+ cassette_image::MODULATION_SINEWAVE,
1575.0 - 300, 1575.0, 1575.0 + 300,
3150.0 - 600, 3150.0, 3150.0 + 600
};
@@ -28,13 +28,13 @@ static const struct CassetteModulation sordm5_cas_modulation =
static uint8_t cassette_image_read_uint8( cassette_image *cassette, uint64_t offset)
{
uint8_t data;
- cassette_image_read( cassette, &data, offset, 1);
+ cassette->image_read(&data, offset, 1);
return data;
}
-static cassette_image::error sordm5_tap_identify( cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error sordm5_tap_identify( cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_modulation_identify( cassette, &sordm5_cas_modulation, opts);
+ return cassette->modulation_identify(sordm5_cas_modulation, opts);
}
static cassette_image::error sordm5_tap_load( cassette_image *cassette)
@@ -49,44 +49,44 @@ static cassette_image::error sordm5_tap_load( cassette_image *cassette)
uint32_t block_size, i, j;
size_t filler_length;
// init
- image_size = cassette_image_size(cassette);
+ image_size = cassette->image_size();
image_pos = 0;
// read/check header
if (image_size < 16) return cassette_image::error::INVALID_IMAGE;
- cassette_image_read( cassette, &header, image_pos, 16);
+ cassette->image_read(&header, image_pos, 16);
image_pos += 16;
if (memcmp( header, SORDM5_CAS_HEADER, sizeof(SORDM5_CAS_HEADER)) != 0) return cassette_image::error::INVALID_IMAGE;
// add silence (header)
- err = cassette_put_sample( cassette, 0, time_index, SORDM5_WAVESAMPLES_HEADER, 0);
+ err = cassette->put_sample(0, time_index, SORDM5_WAVESAMPLES_HEADER, 0);
if (err != cassette_image::error::SUCCESS) return err;
time_index += SORDM5_WAVESAMPLES_HEADER;
// process blocks
while (image_pos < image_size)
{
// read block type
- block_type = cassette_image_read_uint8( cassette, image_pos + 0);
+ block_type = cassette_image_read_uint8(cassette, image_pos + 0);
if ((block_type != 'H') && (block_type != 'D')) return cassette_image::error::INVALID_IMAGE;
// read block size
- block_size = cassette_image_read_uint8( cassette, image_pos + 1);
+ block_size = cassette_image_read_uint8(cassette, image_pos + 1);
if (block_size == 0) block_size = 0x100;
block_size += 3;
// add silence (header block)
if (block_type == 'H')
{
- err = cassette_put_sample( cassette, 0, time_index, SORDM5_WAVESAMPLES_BLOCK, 0);
+ err = cassette->put_sample(0, time_index, SORDM5_WAVESAMPLES_BLOCK, 0);
if (err != cassette_image::error::SUCCESS) return err;
time_index += SORDM5_WAVESAMPLES_BLOCK;
}
// add sync
if (block_type == 'H') filler_length = 2.4 * (3150 / 8); else filler_length = 0.15 * (3150 / 8);
- err = cassette_put_modulated_filler(cassette, 0, time_index, 0xFF, filler_length, &sordm5_cas_modulation, &time_displacement);
+ err = cassette->put_modulated_filler(0, time_index, 0xFF, filler_length, sordm5_cas_modulation, &time_displacement);
if (err != cassette_image::error::SUCCESS) return err;
time_index += time_displacement;
// process block
for (i=0;i<block_size;i++)
{
// read byte
- byte = cassette_image_read_uint8( cassette, image_pos + i);
+ byte = cassette_image_read_uint8(cassette, image_pos + i);
// calc/check checksum
#if 0
if (i == block_size)
@@ -108,27 +108,27 @@ static cassette_image::error sordm5_tap_load( cassette_image *cassette)
bit = (byte >> (j-2)) & 1;
}
// add bit
- err = cassette_put_modulated_data_bit( cassette, 0, time_index, bit, &sordm5_cas_modulation, &time_displacement);
+ err = cassette->put_modulated_data_bit(0, time_index, bit, sordm5_cas_modulation, &time_displacement);
if (err != cassette_image::error::SUCCESS) return err;
time_index += time_displacement;
}
}
// mark end of block
- err = cassette_put_modulated_data_bit( cassette, 0, time_index, 1, &sordm5_cas_modulation, &time_displacement);
+ err = cassette->put_modulated_data_bit(0, time_index, 1, sordm5_cas_modulation, &time_displacement);
if (err != cassette_image::error::SUCCESS) return err;
time_index += time_displacement;
// next block
image_pos += block_size;
}
// add silence (trailer)
- err = cassette_put_sample( cassette, 0, time_index, SORDM5_WAVESAMPLES_TRAILER, 0);
+ err = cassette->put_sample(0, time_index, SORDM5_WAVESAMPLES_TRAILER, 0);
if (err != cassette_image::error::SUCCESS) return err;
time_index += SORDM5_WAVESAMPLES_TRAILER;
//
return cassette_image::error::SUCCESS;
}
-static const struct CassetteFormat sordm5_cas_format =
+static const cassette_image::Format sordm5_cas_format =
{
"cas",
sordm5_tap_identify,
diff --git a/src/lib/formats/spc1000_cas.cpp b/src/lib/formats/spc1000_cas.cpp
index 2e48980da3d..e5d4bc1d0c3 100644
--- a/src/lib/formats/spc1000_cas.cpp
+++ b/src/lib/formats/spc1000_cas.cpp
@@ -20,10 +20,10 @@ STA: This format has not been investigated yet, but is assumed to
IPL: This seems a quickload format containing RAM dump, not a real tape
********************************************************************/
+#include "spc1000_cas.h"
#include <cassert>
-#include "spc1000_cas.h"
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
@@ -31,7 +31,7 @@ IPL: This seems a quickload format containing RAM dump, not a real tape
#define SPC1000_WAV_FREQUENCY 17000
// image size
-static int spc1000_image_size;
+static int spc1000_image_size; // FIXME: global variable prevents multiple instances
static int spc1000_put_samples(int16_t *buffer, int sample_pos, int count, int level)
{
@@ -125,7 +125,7 @@ static int spc1000_cas_calculate_size_in_samples(const uint8_t *bytes, int lengt
// TAP
-static const struct CassetteLegacyWaveFiller spc1000_tap_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller spc1000_tap_legacy_fill_wave =
{
spc1000_tap_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -136,17 +136,17 @@ static const struct CassetteLegacyWaveFiller spc1000_tap_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error spc1000_tap_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error spc1000_tap_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &spc1000_tap_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &spc1000_tap_legacy_fill_wave);
}
static cassette_image::error spc1000_tap_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &spc1000_tap_legacy_fill_wave);
+ return cassette->legacy_construct(&spc1000_tap_legacy_fill_wave);
}
-static const struct CassetteFormat spc1000_tap_cassette_image_format =
+static const cassette_image::Format spc1000_tap_cassette_image_format =
{
"tap",
spc1000_tap_cassette_identify,
@@ -156,7 +156,7 @@ static const struct CassetteFormat spc1000_tap_cassette_image_format =
// CAS
-static const struct CassetteLegacyWaveFiller spc1000_cas_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller spc1000_cas_legacy_fill_wave =
{
spc1000_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -167,17 +167,17 @@ static const struct CassetteLegacyWaveFiller spc1000_cas_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error spc1000_cas_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error spc1000_cas_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &spc1000_cas_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &spc1000_cas_legacy_fill_wave);
}
static cassette_image::error spc1000_cas_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &spc1000_cas_legacy_fill_wave);
+ return cassette->legacy_construct(&spc1000_cas_legacy_fill_wave);
}
-static const struct CassetteFormat spc1000_cas_cassette_image_format =
+static const cassette_image::Format spc1000_cas_cassette_image_format =
{
"cas",
spc1000_cas_cassette_identify,
diff --git a/src/lib/formats/svi_cas.cpp b/src/lib/formats/svi_cas.cpp
index fcb2142c4e3..dfd695dd5ec 100644
--- a/src/lib/formats/svi_cas.cpp
+++ b/src/lib/formats/svi_cas.cpp
@@ -1,9 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Sean Young
-#include <cassert>
-
#include "svi_cas.h"
+#include <cassert>
+
#define CAS_PERIOD_0 (37)
#define CAS_PERIOD_1 (18)
#define CAS_HEADER_PERIODS (1600)
@@ -19,7 +19,7 @@ static const uint8_t CasHeader[17] =
#define SMPLO -32768
#define SMPHI 32767
-static int cas_size;
+static int cas_size; // FIXME: global variable prevents multiple instances
/*******************************************************************
Generate samples for the tape image
@@ -171,7 +171,7 @@ static int svi_cas_to_wav_size(const uint8_t *casdata, int caslen)
}
-static const struct CassetteLegacyWaveFiller svi_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller svi_legacy_fill_wave =
{
svi_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -184,21 +184,21 @@ static const struct CassetteLegacyWaveFiller svi_legacy_fill_wave =
-static cassette_image::error svi_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error svi_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &svi_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &svi_legacy_fill_wave);
}
static cassette_image::error svi_cas_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &svi_legacy_fill_wave);
+ return cassette->legacy_construct(&svi_legacy_fill_wave);
}
-static const struct CassetteFormat svi_cas_format =
+static const cassette_image::Format svi_cas_format =
{
"cas",
svi_cas_identify,
diff --git a/src/lib/formats/thom_cas.cpp b/src/lib/formats/thom_cas.cpp
index a00c2c3234b..0d0cc4fc4eb 100644
--- a/src/lib/formats/thom_cas.cpp
+++ b/src/lib/formats/thom_cas.cpp
@@ -8,12 +8,11 @@
**********************************************************************/
-#include <cmath>
-#include <cassert>
-
-#include "pool.h"
-#include "cassimg.h"
#include "thom_cas.h"
+#include "pool.h"
+
+#include <cassert>
+#include <cmath>
/***************************** configuration **************************/
@@ -86,18 +85,18 @@ static uint8_t* to7_k7_bits;
-static const struct CassetteModulation to7_k7_modulation =
+static const cassette_image::Modulation to7_k7_modulation =
{
- CASSETTE_MODULATION_SQUAREWAVE,
+ cassette_image::MODULATION_SQUAREWAVE,
4000.0, 4500.0, 5000.0,
5500.0, 6300.0, 7500.0
};
-static cassette_image::error to7_k7_identify ( cassette_image *cass, struct CassetteOptions *opts )
+static cassette_image::error to7_k7_identify ( cassette_image *cass, cassette_image::Options *opts )
{
- cassette_image::error e = cassette_modulation_identify( cass, &to7_k7_modulation, opts );
+ cassette_image::error e = cass->modulation_identify( to7_k7_modulation, opts );
return e;
}
@@ -109,7 +108,7 @@ static cassette_image::error to7_k7_load( cassette_image *cass )
static const int8_t square_wave[] = { -128, 127 };
double time = 0.;
#endif
- size_t size = cassette_image_size( cass ), pos = 0;
+ size_t size = cass->image_size( ), pos = 0;
int i, sz, sz2, bitmax = 1024, invalid = 0;
uint8_t in, typ, block[264];
@@ -133,8 +132,8 @@ static cassette_image::error to7_k7_load( cassette_image *cass )
do \
{ \
cassette_image::error err; \
- err = cassette_put_samples( cass, 0, time, (PERIOD), 2, 1, \
- square_wave, CASSETTE_WAVEFORM_8BIT ); \
+ err = cass->put_samples( 0, time, (PERIOD), 2, 1, \
+ square_wave, cassette_image::WAVEFORM_8BIT ); \
if ( err != cassette_image::error::SUCCESS ) \
return err; \
time += (PERIOD); \
@@ -202,7 +201,7 @@ static cassette_image::error to7_k7_load( cassette_image *cass )
} while (0)
/* check format */
- cassette_image_read( cass, block, 0, 64 );
+ cass->image_read( block, 0, 64 );
for ( i = 3; ; i++ )
{
if ( ( i >= size ) || ( i >= 64 ) )
@@ -227,7 +226,7 @@ static cassette_image::error to7_k7_load( cassette_image *cass )
/* skip to first 0xff filler */
for ( sz = 0; pos < size; pos++, sz++ )
{
- cassette_image_read( cass, &in, pos, 1 );
+ cass->image_read( &in, pos, 1 );
if ( in == 0xff )
break;
}
@@ -241,7 +240,7 @@ static cassette_image::error to7_k7_load( cassette_image *cass )
/* skip 0xff filler */
for ( sz = 0; pos < size; pos++, sz++ )
{
- cassette_image_read( cass, &in, pos, 1 );
+ cass->image_read( &in, pos, 1 );
/* actually, we are bit laxist and treat as 0xff bytes with at least
5 bits out of 8 set to 1
*/
@@ -257,7 +256,7 @@ static cassette_image::error to7_k7_load( cassette_image *cass )
pos -= sz;
break;
}
- cassette_image_read( cass, block, pos, 4 );
+ cass->image_read( block, pos, 4 );
typ = block[2];
sz2 = block[3]+1;
if ( block[0] != 0x01 || block[1] != 0x3c || ( typ != 0x00 && typ != 0x01 && typ != 0xff ) )
@@ -268,7 +267,7 @@ static cassette_image::error to7_k7_load( cassette_image *cass )
pos += 4;
/* get block */
- cassette_image_read( cass, block+4, pos, sz2 );
+ cass->image_read( block+4, pos, sz2 );
pos += sz2;
/* 1-filler and 0xff-filler */
@@ -323,17 +322,17 @@ static cassette_image::error to7_k7_load( cassette_image *cass )
/* put block */
for (; pos < size; pos++ )
{
- cassette_image_read( cass, &in, pos, 1 );
+ cass->image_read( &in, pos, 1 );
for ( sz = 0; pos < size && in == 0xff; sz++ )
{
pos++;
- cassette_image_read( cass, &in, pos, 1 );
+ cass->image_read( &in, pos, 1 );
}
if ( invalid < 10 && sz > 4 && in == 0x01 && pos + 4 <= size )
{
uint8_t in1,in2;
- cassette_image_read( cass, &in1, pos+1, 1 );
- cassette_image_read( cass, &in2, pos+2, 1 );
+ cass->image_read( &in1, pos+1, 1 );
+ cass->image_read( &in2, pos+2, 1 );
if ( (in1 == 0x3c) && ((in2 == 0x00) || (in2 == 0x01) ) )
{
/* seems we have a regular block hidden in raw data => rebounce */
@@ -365,7 +364,7 @@ static cassette_image::error to7_k7_load( cassette_image *cass )
-static const struct CassetteFormat to7_k7 =
+static const cassette_image::Format to7_k7 =
{ "k7", to7_k7_identify, to7_k7_load, nullptr /* no save */ };
@@ -375,9 +374,9 @@ static const struct CassetteFormat to7_k7 =
static cassette_image::error to7_wav_identify ( cassette_image *cass,
- struct CassetteOptions *opts )
+ cassette_image::Options *opts )
{
- cassette_image::error e = wavfile_format.identify( cass, opts );
+ cassette_image::error e = cassette_image::wavfile_format.identify( cass, opts );
return e;
}
@@ -385,9 +384,7 @@ static cassette_image::error to7_wav_identify ( cassette_image *cass,
static cassette_image::error to7_wav_load ( cassette_image *cass )
{
- cassette_image::error e = wavfile_format.load( cass );
- struct CassetteInfo info;
- double len;
+ cassette_image::error e = cassette_image::wavfile_format.load( cass );
if ( to7_k7_bits )
{
@@ -398,9 +395,9 @@ static cassette_image::error to7_wav_load ( cassette_image *cass )
if ( e != cassette_image::error::SUCCESS )
return e;
- cassette_get_info( cass, &info );
+ cassette_image::Info info = cass->get_info( );
- len = (double) info.sample_count / info.sample_frequency;
+ double len = (double) info.sample_count / info.sample_frequency;
PRINT (( "to7_wav_load: loading cassette, length %imn %is, %i Hz, %i bps, %i bits\n",
(int) len / 60, (int) len % 60,
@@ -412,17 +409,17 @@ static cassette_image::error to7_wav_load ( cassette_image *cass )
-static cassette_image::error to7_wav_save ( cassette_image *cass, const struct CassetteInfo *info )
+static cassette_image::error to7_wav_save ( cassette_image *cass, const cassette_image::Info *info )
{
int len = info->sample_count / info->sample_frequency;
PRINT (( "to7_wav_save: saving cassette, length %imn %is, %i Hz, %i bps\n", len / 60, len % 60, info->sample_frequency, info->bits_per_sample ));
- return wavfile_format.save( cass, info );
+ return cassette_image::wavfile_format.save( cass, info );
}
/* overloaded wav: dump info */
-static const struct CassetteFormat to7_wav =
+static const cassette_image::Format to7_wav =
{ "wav", to7_wav_identify, to7_wav_load, to7_wav_save };
@@ -432,7 +429,7 @@ static const struct CassetteFormat to7_wav =
static cassette_image::error mo5_k5_identify ( cassette_image *cass,
- struct CassetteOptions *opts )
+ cassette_image::Options *opts )
{
opts -> bits_per_sample = 8;
opts -> channels = 1;
@@ -464,7 +461,7 @@ static cassette_image::error mo5_k5_identify ( cassette_image *cass,
static cassette_image::error mo5_k5_load( cassette_image *cass )
{
- size_t size = cassette_image_size( cass ), pos = 0;
+ size_t size = cass->image_size( ), pos = 0;
int i, sz, sz2, hbit = 0;
uint8_t in, in2, in3, typ, block[264], sum;
int invalid = 0, hbitsize = 0, dcmoto = 0;
@@ -476,7 +473,7 @@ static cassette_image::error mo5_k5_load( cassette_image *cass )
#define K5_PUT_HBIT \
do \
{ \
- cassette_put_sample ( cass, 0, hbitsize * MO5_HBIT_LENGTH, MO5_HBIT_LENGTH, (hbit ? 1 : -1) << 30 ); \
+ cass->put_sample ( 0, hbitsize * MO5_HBIT_LENGTH, MO5_HBIT_LENGTH, (hbit ? 1 : -1) << 30 ); \
hbitsize++; \
} while ( 0 )
@@ -534,7 +531,7 @@ static cassette_image::error mo5_k5_load( cassette_image *cass )
} while (0)
/* check format */
- cassette_image_read( cass, block, 0, 64 );
+ cass->image_read( block, 0, 64 );
for ( i = 3; ; i++ )
{
if ( ( i >= size ) || ( i >= 64 ) )
@@ -556,7 +553,7 @@ static cassette_image::error mo5_k5_load( cassette_image *cass )
}
}
- cassette_image_read( cass, block, pos, 6 );
+ cass->image_read( block, pos, 6 );
if ( ! memcmp( block, "DCMOTO", 6 ) || ! memcmp( block, "DCMO5", 5 ) || ! memcmp( block, "DCMO6", 5 ) )
dcmoto = 1;
@@ -567,7 +564,7 @@ static cassette_image::error mo5_k5_load( cassette_image *cass )
/* skip DCMOTO header*/
if ( dcmoto )
{
- cassette_image_read( cass, block, pos, 6 );
+ cass->image_read( block, pos, 6 );
if ( ! memcmp( block, "DCMOTO", 6 ) )
{
LOG (( "mo5_k5_load: DCMOTO signature found at off=$%x\n", (int)pos ));
@@ -583,7 +580,7 @@ static cassette_image::error mo5_k5_load( cassette_image *cass )
/* skip 0x01 filler */
for ( sz = 0; pos < size; pos++, sz++ )
{
- cassette_image_read( cass, &in, pos, 1 );
+ cass->image_read( &in, pos, 1 );
if ( in != 0x01 )
break;
}
@@ -594,7 +591,7 @@ static cassette_image::error mo5_k5_load( cassette_image *cass )
pos -= sz;
break;
}
- cassette_image_read( cass, block, pos, 4 );
+ cass->image_read( block, pos, 4 );
typ = block[2];
sz2 = (uint8_t) (block[3]-1);
if ( block[0] != 0x3c || block[1] != 0x5a || ( typ != 0x00 && typ != 0x01 && typ != 0xff ) || pos+sz2 > size )
@@ -605,7 +602,7 @@ static cassette_image::error mo5_k5_load( cassette_image *cass )
pos += 4;
/* get block */
- cassette_image_read( cass, block+4, pos, sz2 );
+ cass->image_read( block+4, pos, sz2 );
pos += sz2;
/* 0-fillers and 0x01-fillers */
@@ -665,33 +662,33 @@ static cassette_image::error mo5_k5_load( cassette_image *cass )
LOG (( "mo5_k5_load: trailing trash off=$%x size=%i hbitstart=%i\n", (int) pos, (int) (size-pos), hbitsize ));
for ( ; pos < size; pos++ )
{
- cassette_image_read( cass, &in, pos, 1 );
+ cass->image_read( &in, pos, 1 );
if ( dcmoto && in=='D' )
{
/* skip DCMOTO header*/
- cassette_image_read( cass, block, pos, 6 );
+ cass->image_read( block, pos, 6 );
if ( ! memcmp( block, "DCMOTO", 6 ) )
{
LOG (( "mo5_k5_load: DCMOTO signature found at off=$%x\n", (int)pos ));
pos += 6;
- cassette_image_read( cass, &in, pos, 1 );
+ cass->image_read( &in, pos, 1 );
}
else if ( ! memcmp( block, "DCMO", 4 ) )
{
LOG (( "mo5_k5_load: DCMO* signature found at off=$%x\n", (int)pos ));
pos += 5;
- cassette_image_read( cass, &in, pos, 1 );
+ cass->image_read( &in, pos, 1 );
}
}
for ( sz = 0; pos < size && in == 0x01; sz++ )
{
pos++;
- cassette_image_read( cass, &in, pos, 1 );
+ cass->image_read( &in, pos, 1 );
}
if ( sz > 6 )
{
- cassette_image_read( cass, &in2, pos+1, 1 );
- cassette_image_read( cass, &in3, pos+2, 1 );
+ cass->image_read( &in2, pos+1, 1 );
+ cass->image_read( &in3, pos+2, 1 );
if ( invalid < 10 && in == 0x3c && in2 == 0x5a && (in3 == 0x00 || in3 == 0x01 || in3 == 0xff ) )
{
/* regular block found */
@@ -729,7 +726,7 @@ static cassette_image::error mo5_k5_load( cassette_image *cass )
-static const struct CassetteFormat mo5_k5 =
+static const cassette_image::Format mo5_k5 =
{ "k5,k7", mo5_k5_identify, mo5_k5_load, nullptr /* no save */ };
@@ -738,9 +735,9 @@ static const struct CassetteFormat mo5_k5 =
static cassette_image::error mo5_wav_identify ( cassette_image *cass,
- struct CassetteOptions *opts )
+ cassette_image::Options *opts )
{
- cassette_image::error e = wavfile_format.identify( cass, opts );
+ cassette_image::error e = cassette_image::wavfile_format.identify( cass, opts );
return e;
}
@@ -748,13 +745,11 @@ static cassette_image::error mo5_wav_identify ( cassette_image *cass,
static cassette_image::error mo5_wav_load ( cassette_image *cass )
{
- cassette_image::error e = wavfile_format.load( cass );
- struct CassetteInfo info;
- int len;
+ cassette_image::error e = cassette_image::wavfile_format.load( cass );
if ( e == cassette_image::error::SUCCESS )
{
- cassette_get_info( cass, &info );
- len = info.sample_count / info.sample_frequency;
+ cassette_image::Info info = cass->get_info( );
+ int len = info.sample_count / info.sample_frequency;
PRINT (( "mo5_wav_load: loading cassette, length %imn %is, %i Hz, %i bps\n", len / 60, len % 60, info.sample_frequency, info.bits_per_sample ));
}
return e;
@@ -762,17 +757,17 @@ static cassette_image::error mo5_wav_load ( cassette_image *cass )
-static cassette_image::error mo5_wav_save ( cassette_image *cass, const struct CassetteInfo *info )
+static cassette_image::error mo5_wav_save ( cassette_image *cass, const cassette_image::Info *info )
{
int len = info->sample_count / info->sample_frequency;
PRINT (( "mo5_wav_save: saving cassette, length %imn %is, %i Hz, %i bps\n", len / 60, len % 60, info->sample_frequency, info->bits_per_sample ));
- return wavfile_format.save( cass, info );
+ return cassette_image::wavfile_format.save( cass, info );
}
/* overloaded wav: dump info */
-static const struct CassetteFormat mo5_wav =
+static const cassette_image::Format mo5_wav =
{ "wav", mo5_wav_identify, mo5_wav_load, mo5_wav_save };
@@ -780,9 +775,9 @@ static const struct CassetteFormat mo5_wav =
/********************* formats ************************/
-const struct CassetteFormat *const to7_cassette_formats[] =
+const cassette_image::Format *const to7_cassette_formats[] =
{ &to7_wav, &to7_k7, nullptr };
-const struct CassetteFormat *const mo5_cassette_formats[] =
+const cassette_image::Format *const mo5_cassette_formats[] =
{ &mo5_wav, &mo5_k5, nullptr };
diff --git a/src/lib/formats/trs_cas.cpp b/src/lib/formats/trs_cas.cpp
index 582abf8869c..7556c392427 100644
--- a/src/lib/formats/trs_cas.cpp
+++ b/src/lib/formats/trs_cas.cpp
@@ -5,17 +5,17 @@
Support for TRS80 .cas cassette images
********************************************************************/
+#include "formats/trs_cas.h"
#include <cassert>
-#include "formats/trs_cas.h"
#define SILENCE 0
#define SMPLO -32768
#define SMPHI 32767
-static int cas_size;
+static int cas_size; // FIXME: global variable prevents mutliple instances
/*******************************************************************
@@ -99,7 +99,7 @@ static int trs80l2_cas_to_wav_size(const uint8_t *casdata, int caslen)
return trs80l2_handle_cas( nullptr, casdata );
}
-static const struct CassetteLegacyWaveFiller trs80l2_cas_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller trs80l2_cas_legacy_fill_wave =
{
trs80l2_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -111,19 +111,19 @@ static const struct CassetteLegacyWaveFiller trs80l2_cas_legacy_fill_wave =
};
-static cassette_image::error trs80l2_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error trs80l2_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &trs80l2_cas_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &trs80l2_cas_legacy_fill_wave);
}
static cassette_image::error trs80l2_cas_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &trs80l2_cas_legacy_fill_wave);
+ return cassette->legacy_construct(&trs80l2_cas_legacy_fill_wave);
}
-static const struct CassetteFormat trs80l2_cas_format =
+static const cassette_image::Format trs80l2_cas_format =
{
"cas",
trs80l2_cas_identify,
diff --git a/src/lib/formats/tvc_cas.cpp b/src/lib/formats/tvc_cas.cpp
index 3cea37cc1bf..e6d05451d9d 100644
--- a/src/lib/formats/tvc_cas.cpp
+++ b/src/lib/formats/tvc_cas.cpp
@@ -7,10 +7,10 @@
http://tvc.homeserver.hu/html/konvertformatum.html
********************************************************************/
+#include "tvc_cas.h"
#include <cassert>
-#include "tvc_cas.h"
#define TVC64_BIT0_FREQ 1812
#define TVC64_BIT1_FREQ 2577
@@ -24,7 +24,7 @@
static void tvc64_emit_level(cassette_image *cass, double &time, int freq, int level)
{
double period = 1.0 / freq;
- cassette_put_sample(cass, 0, time, period, level * WAVE_AMPLITUDE);
+ cass->put_sample(0, time, period, level * WAVE_AMPLITUDE);
time += period;
}
@@ -89,7 +89,7 @@ static cassette_image::error tvc64_cassette_load(cassette_image *cassette)
double time = 0.0;
uint8_t header[TVC64_HEADER_BYTES];
- cassette_image_read(cassette, header, 0, TVC64_HEADER_BYTES);
+ cassette->image_read(header, 0, TVC64_HEADER_BYTES);
uint16_t cas_size = (header[0x83]<<8) | header[0x82];
// tape header
@@ -172,7 +172,7 @@ static cassette_image::error tvc64_cassette_load(cassette_image *cassette)
// sector data
int sector_size = (i == sector_num) ? (cas_size % 256) : 256;
for (int z=0; z < sector_size; z++)
- cassette_image_read(cassette, &tmp_buff[buff_idx++], TVC64_HEADER_BYTES + i*256 + z, 1);
+ cassette->image_read(&tmp_buff[buff_idx++], TVC64_HEADER_BYTES + i*256 + z, 1);
if (i == sector_num || ((i+1) == sector_num && (cas_size % 256 ) == 0))
tmp_buff[buff_idx++] = 0xff; // last sector
@@ -200,10 +200,10 @@ static cassette_image::error tvc64_cassette_load(cassette_image *cassette)
return cassette_image::error::SUCCESS;
}
-static cassette_image::error tvc64_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error tvc64_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
uint8_t byte;
- cassette_image_read(cassette, &byte, 0, 1);
+ cassette->image_read(&byte, 0, 1);
if (byte == 0x11)
{
@@ -216,7 +216,7 @@ static cassette_image::error tvc64_cassette_identify(cassette_image *cassette, s
return cassette_image::error::INVALID_IMAGE;
}
-static const struct CassetteFormat tvc64_cassette_image_format =
+static const cassette_image::Format tvc64_cassette_image_format =
{
"cas",
tvc64_cassette_identify,
diff --git a/src/lib/formats/tzx_cas.cpp b/src/lib/formats/tzx_cas.cpp
index e1ced8175f0..1804e89b1b6 100644
--- a/src/lib/formats/tzx_cas.cpp
+++ b/src/lib/formats/tzx_cas.cpp
@@ -52,7 +52,7 @@ static const uint8_t TZX_HEADER[8] = { 'Z','X','T','a','p','e','!',0x1a };
Initialized by tzx_cas_get_wave_size, used (and cleaned up) by tzx_cas_fill_wave
*/
-static int16_t wave_data = 0;
+static int16_t wave_data = 0; // FIXME: global variables prevent multiple instances
static int block_count = 0;
static uint8_t** blocks = nullptr;
static float t_scale = 1; /* for scaling T-states to the 4MHz CPC */
@@ -831,7 +831,7 @@ static int tap_cas_fill_wave( int16_t *buffer, int length, uint8_t *bytes )
return size;
}
-static const struct CassetteLegacyWaveFiller tzx_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller tzx_legacy_fill_wave =
{
tzx_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -842,7 +842,7 @@ static const struct CassetteLegacyWaveFiller tzx_legacy_fill_wave =
0 /* trailer_samples */
};
-static const struct CassetteLegacyWaveFiller tap_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller tap_legacy_fill_wave =
{
tap_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -853,7 +853,7 @@ static const struct CassetteLegacyWaveFiller tap_legacy_fill_wave =
0 /* trailer_samples */
};
-static const struct CassetteLegacyWaveFiller cdt_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller cdt_legacy_fill_wave =
{
cdt_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -864,24 +864,24 @@ static const struct CassetteLegacyWaveFiller cdt_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error tzx_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts )
+static cassette_image::error tzx_cassette_identify( cassette_image *cassette, cassette_image::Options *opts )
{
- return cassette_legacy_identify(cassette, opts, &tzx_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &tzx_legacy_fill_wave);
}
-static cassette_image::error tap_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts )
+static cassette_image::error tap_cassette_identify( cassette_image *cassette, cassette_image::Options *opts )
{
- return cassette_legacy_identify(cassette, opts, &tap_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &tap_legacy_fill_wave);
}
-static cassette_image::error cdt_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts )
+static cassette_image::error cdt_cassette_identify( cassette_image *cassette, cassette_image::Options *opts )
{
- return cassette_legacy_identify(cassette, opts, &cdt_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &cdt_legacy_fill_wave);
}
static cassette_image::error tzx_cassette_load( cassette_image *cassette )
{
- cassette_image::error err = cassette_legacy_construct(cassette, &tzx_legacy_fill_wave);
+ cassette_image::error err = cassette->legacy_construct(&tzx_legacy_fill_wave);
free(blocks);
blocks = nullptr;
return err;
@@ -889,18 +889,18 @@ static cassette_image::error tzx_cassette_load( cassette_image *cassette )
static cassette_image::error tap_cassette_load( cassette_image *cassette )
{
- return cassette_legacy_construct(cassette, &tap_legacy_fill_wave);
+ return cassette->legacy_construct(&tap_legacy_fill_wave);
}
static cassette_image::error cdt_cassette_load( cassette_image *cassette )
{
- cassette_image::error err = cassette_legacy_construct(cassette, &cdt_legacy_fill_wave);
+ cassette_image::error err = cassette->legacy_construct(&cdt_legacy_fill_wave);
free(blocks);
blocks = nullptr;
return err;
}
-const struct CassetteFormat tzx_cassette_format =
+const cassette_image::Format tzx_cassette_format =
{
"tzx",
tzx_cassette_identify,
@@ -908,7 +908,7 @@ const struct CassetteFormat tzx_cassette_format =
nullptr
};
-static const struct CassetteFormat tap_cassette_format =
+static const cassette_image::Format tap_cassette_format =
{
"tap,blk",
tap_cassette_identify,
@@ -916,7 +916,7 @@ static const struct CassetteFormat tap_cassette_format =
nullptr
};
-static const struct CassetteFormat cdt_cassette_format =
+static const cassette_image::Format cdt_cassette_format =
{
"cdt",
cdt_cassette_identify,
diff --git a/src/lib/formats/tzx_cas.h b/src/lib/formats/tzx_cas.h
index 2410ea57523..b7e620b1683 100644
--- a/src/lib/formats/tzx_cas.h
+++ b/src/lib/formats/tzx_cas.h
@@ -13,7 +13,7 @@
#include "cassimg.h"
-extern const struct CassetteFormat tzx_cassette_format;
+extern const cassette_image::Format tzx_cassette_format;
CASSETTE_FORMATLIST_EXTERN(tzx_cassette_formats);
CASSETTE_FORMATLIST_EXTERN(cdt_cassette_formats);
diff --git a/src/lib/formats/uef_cas.cpp b/src/lib/formats/uef_cas.cpp
index d19eb9b2e47..1b4fb1bc271 100644
--- a/src/lib/formats/uef_cas.cpp
+++ b/src/lib/formats/uef_cas.cpp
@@ -17,13 +17,13 @@ the size of memory to alloc for the decoding.
Not nice, but it works...
*/
-
-#include <cstring>
-#include <cmath>
-#include <cassert>
+#include "uef_cas.h"
#include <zlib.h>
-#include "uef_cas.h"
+
+#include <cassert>
+#include <cmath>
+#include <cstring>
#define UEF_WAV_FREQUENCY 4800
@@ -334,7 +334,7 @@ static int uef_cas_fill_wave( int16_t *buffer, int length, uint8_t *bytes )
return p - buffer;
}
-static const struct CassetteLegacyWaveFiller uef_legacy_fill_wave = {
+static const cassette_image::LegacyWaveFiller uef_legacy_fill_wave = {
uef_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
0, /* chunk_samples */
@@ -344,21 +344,21 @@ static const struct CassetteLegacyWaveFiller uef_legacy_fill_wave = {
0 /* trailer_samples */
};
-static cassette_image::error uef_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) {
+static cassette_image::error uef_cassette_identify( cassette_image *cassette, cassette_image::Options *opts ) {
uint8_t header[10];
- cassette_image_read(cassette, header, 0, sizeof(header));
+ cassette->image_read(header, 0, sizeof(header));
if (memcmp(&header[0], GZ_HEADER, sizeof(GZ_HEADER)) && memcmp(&header[0], UEF_HEADER, sizeof(UEF_HEADER))) {
return cassette_image::error::INVALID_IMAGE;
}
- return cassette_legacy_identify( cassette, opts, &uef_legacy_fill_wave );
+ return cassette->legacy_identify( opts, &uef_legacy_fill_wave );
}
static cassette_image::error uef_cassette_load( cassette_image *cassette ) {
- return cassette_legacy_construct( cassette, &uef_legacy_fill_wave );
+ return cassette->legacy_construct( &uef_legacy_fill_wave );
}
-const struct CassetteFormat uef_cassette_format = {
+const cassette_image::Format uef_cassette_format = {
"uef",
uef_cassette_identify,
uef_cassette_load,
diff --git a/src/lib/formats/uef_cas.h b/src/lib/formats/uef_cas.h
index 73aa2fe8ae2..f6bcff94ca1 100644
--- a/src/lib/formats/uef_cas.h
+++ b/src/lib/formats/uef_cas.h
@@ -12,7 +12,7 @@
#include "cassimg.h"
-extern const struct CassetteFormat uef_cassette_format;
+extern const cassette_image::Format uef_cassette_format;
CASSETTE_FORMATLIST_EXTERN(uef_cassette_formats);
diff --git a/src/lib/formats/vg5k_cas.cpp b/src/lib/formats/vg5k_cas.cpp
index 97d7421f622..f73049299b1 100644
--- a/src/lib/formats/vg5k_cas.cpp
+++ b/src/lib/formats/vg5k_cas.cpp
@@ -5,17 +5,17 @@
Support for VG-5000 .k7 cassette images
********************************************************************/
-#include <cassert>
-
#include "vg5k_cas.h"
+#include <cassert>
+
#define SMPLO -32768
#define SILENCE 0
#define SMPHI 32767
-static int k7_size;
+static int k7_size; // FIXME: global variable prevents multiple instances
/*******************************************************************
Generate one high-low cycle of sample data
@@ -200,7 +200,7 @@ static int vg5k_k7_to_wav_size(const uint8_t *casdata, int caslen)
}
-static const struct CassetteLegacyWaveFiller vg5k_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller vg5k_legacy_fill_wave =
{
vg5k_k7_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -211,19 +211,19 @@ static const struct CassetteLegacyWaveFiller vg5k_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error vg5k_k7_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error vg5k_k7_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &vg5k_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &vg5k_legacy_fill_wave);
}
static cassette_image::error vg5k_k7_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &vg5k_legacy_fill_wave);
+ return cassette->legacy_construct(&vg5k_legacy_fill_wave);
}
-static const struct CassetteFormat vg5k_k7_format =
+static const cassette_image::Format vg5k_k7_format =
{
"k7",
vg5k_k7_identify,
@@ -234,5 +234,5 @@ static const struct CassetteFormat vg5k_k7_format =
CASSETTE_FORMATLIST_START(vg5k_cassette_formats)
CASSETTE_FORMAT(vg5k_k7_format)
- CASSETTE_FORMAT(wavfile_format)
+ CASSETTE_FORMAT(cassette_image::wavfile_format)
CASSETTE_FORMATLIST_END
diff --git a/src/lib/formats/vt_cas.cpp b/src/lib/formats/vt_cas.cpp
index a8c30f8d25f..735ec067d7b 100644
--- a/src/lib/formats/vt_cas.cpp
+++ b/src/lib/formats/vt_cas.cpp
@@ -1,9 +1,9 @@
// license:GPL-2.0+
// copyright-holders:Juergen Buchmueller
-#include <cassert>
-
#include "formats/vt_cas.h"
+#include <cassert>
+
/*********************************************************************
vtech 1/2 agnostic
*********************************************************************/
@@ -97,28 +97,28 @@ static int vtech1_cassette_fill_wave(int16_t *buffer, int length, uint8_t *code)
return generic_fill_wave(buffer, length, code, V1_BITSAMPLES, V1_BYTESAMPLES, V1_LO, vtech1_fill_wave_byte);
}
-static const struct CassetteLegacyWaveFiller vtech1_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller vtech1_legacy_fill_wave =
{
- vtech1_cassette_fill_wave, /* fill_wave */
- 1, /* chunk_size */
- V1_BYTESAMPLES, /* chunk_samples */
- nullptr, /* chunk_sample_calc */
- 600*V1_BITSAMPLES, /* sample_frequency */
- 600*V1_BITSAMPLES, /* header_samples */
- 600*V1_BITSAMPLES /* trailer_samples */
+ vtech1_cassette_fill_wave, // fill_wave
+ 1, // chunk_size
+ V1_BYTESAMPLES, // chunk_samples
+ nullptr, // chunk_sample_calc
+ 600*V1_BITSAMPLES, // sample_frequency
+ 600*V1_BITSAMPLES, // header_samples
+ 600*V1_BITSAMPLES // trailer_samples
};
-static cassette_image::error vtech1_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error vtech1_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &vtech1_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &vtech1_legacy_fill_wave);
}
static cassette_image::error vtech1_cas_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &vtech1_legacy_fill_wave);
+ return cassette->legacy_construct(&vtech1_legacy_fill_wave);
}
-static const struct CassetteFormat vtech1_cas_format =
+static const cassette_image::Format vtech1_cas_format =
{
"cas",
vtech1_cas_identify,
@@ -192,7 +192,7 @@ static int vtech2_cassette_fill_wave(int16_t *buffer, int length, uint8_t *code)
return generic_fill_wave(buffer, length, code, VT2_BITSAMPLES, VT2_BYTESAMPLES, VT2_LO, vtech2_fill_wave_byte);
}
-static const struct CassetteLegacyWaveFiller vtech2_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller vtech2_legacy_fill_wave =
{
vtech2_cassette_fill_wave, /* fill_wave */
1, /* chunk_size */
@@ -203,17 +203,17 @@ static const struct CassetteLegacyWaveFiller vtech2_legacy_fill_wave =
600*VT2_BITSAMPLES /* trailer_samples */
};
-static cassette_image::error vtech2_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error vtech2_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &vtech2_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &vtech2_legacy_fill_wave);
}
static cassette_image::error vtech2_cas_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &vtech2_legacy_fill_wave);
+ return cassette->legacy_construct(&vtech2_legacy_fill_wave);
}
-static const struct CassetteFormat vtech2_cas_format =
+static const cassette_image::Format vtech2_cas_format =
{
"cas",
vtech2_cas_identify,
diff --git a/src/lib/formats/wavfile.cpp b/src/lib/formats/wavfile.cpp
index 1408984079c..74976ef997e 100644
--- a/src/lib/formats/wavfile.cpp
+++ b/src/lib/formats/wavfile.cpp
@@ -8,12 +8,11 @@
*********************************************************************/
+#include "wavfile.h"
+
#include <cstdio>
#include <cassert>
-#include "wavfile.h"
-#include "cassimg.h"
-
static const char magic1[4] = { 'R', 'I', 'F', 'F' };
static const char magic2[4] = { 'W', 'A', 'V', 'E' };
static const char format_tag_id[4] = { 'f', 'm', 't', ' ' };
@@ -57,7 +56,7 @@ static void put_leuint16(void *ptr, uint16_t value)
-static cassette_image::error wavfile_process(cassette_image *cassette, struct CassetteOptions *opts,
+static cassette_image::error wavfile_process(cassette_image *cassette, cassette_image::Options *opts,
bool read_waveform)
{
uint8_t file_header[12];
@@ -76,7 +75,7 @@ static cassette_image::error wavfile_process(cassette_image *cassette, struct Ca
int waveform_flags = 0;
/* read header */
- cassette_image_read(cassette, file_header, 0, sizeof(file_header));
+ cassette->image_read(file_header, 0, sizeof(file_header));
offset = sizeof(file_header);
/* check magic numbers */
@@ -87,13 +86,13 @@ static cassette_image::error wavfile_process(cassette_image *cassette, struct Ca
/* read and sanity check size */
stated_size = get_leuint32(&file_header[4]) + 8;
- file_size = cassette_image_size(cassette);
+ file_size = cassette->image_size();
if (stated_size > file_size)
stated_size = (uint32_t) file_size;
while(offset < stated_size)
{
- cassette_image_read(cassette, tag_header, offset, sizeof(tag_header));
+ cassette->image_read(tag_header, offset, sizeof(tag_header));
tag_size = get_leuint32(&tag_header[4]);
offset += sizeof(tag_header);
@@ -104,7 +103,7 @@ static cassette_image::error wavfile_process(cassette_image *cassette, struct Ca
return cassette_image::error::INVALID_IMAGE;
format_specified = true;
- cassette_image_read(cassette, format_tag, offset, sizeof(format_tag));
+ cassette->image_read(format_tag, offset, sizeof(format_tag));
format_type = get_leuint16(&format_tag[0]);
opts->channels = get_leuint16(&format_tag[2]);
@@ -121,13 +120,13 @@ static cassette_image::error wavfile_process(cassette_image *cassette, struct Ca
switch(opts->bits_per_sample)
{
case 8:
- waveform_flags = CASSETTE_WAVEFORM_8BIT | CASSETTE_WAVEFORM_UNSIGNED; // 8-bits wav are stored unsigned
+ waveform_flags = cassette_image::WAVEFORM_8BIT | cassette_image::WAVEFORM_UNSIGNED; // 8-bits wav are stored unsigned
break;
case 16:
- waveform_flags = CASSETTE_WAVEFORM_16BITLE;
+ waveform_flags = cassette_image::WAVEFORM_16BITLE;
break;
case 32:
- waveform_flags = CASSETTE_WAVEFORM_32BITLE;
+ waveform_flags = cassette_image::WAVEFORM_32BITLE;
break;
default:
return cassette_image::error::INVALID_IMAGE;
@@ -142,7 +141,7 @@ static cassette_image::error wavfile_process(cassette_image *cassette, struct Ca
if (read_waveform)
{
tag_samples = tag_size / (opts->bits_per_sample / 8) / opts->channels;
- cassette_read_samples(cassette, opts->channels, 0.0, tag_samples / ((double) opts->sample_frequency),
+ cassette->read_samples(opts->channels, 0.0, tag_samples / ((double) opts->sample_frequency),
tag_samples, offset, waveform_flags);
}
}
@@ -158,7 +157,7 @@ static cassette_image::error wavfile_process(cassette_image *cassette, struct Ca
-static cassette_image::error wavfile_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error wavfile_identify(cassette_image *cassette, cassette_image::Options *opts)
{
return wavfile_process(cassette, opts, false);
}
@@ -167,14 +166,14 @@ static cassette_image::error wavfile_identify(cassette_image *cassette, struct C
static cassette_image::error wavfile_load(cassette_image *cassette)
{
- struct CassetteOptions opts;
+ cassette_image::Options opts;
memset(&opts, 0, sizeof(opts));
return wavfile_process(cassette, &opts, true);
}
-static cassette_image::error wavfile_save(cassette_image *cassette, const struct CassetteInfo *info)
+static cassette_image::error wavfile_save(cassette_image *cassette, const cassette_image::Info *info)
{
cassette_image::error err;
uint8_t consolidated_header[12 + 8 + 16 + 8];
@@ -187,7 +186,7 @@ static cassette_image::error wavfile_save(cassette_image *cassette, const struct
uint16_t bits_per_sample;
uint32_t data_size;
size_t bytes_per_sample = 2;
- int waveform_flags = CASSETTE_WAVEFORM_16BITLE;
+ int waveform_flags = cassette_image::WAVEFORM_16BITLE;
uint16_t block_align;
bits_per_sample = (uint16_t) (bytes_per_sample * 8);
@@ -216,10 +215,10 @@ static cassette_image::error wavfile_save(cassette_image *cassette, const struct
put_leuint32(&data_tag_header[4], data_size);
/* write consolidated header */
- cassette_image_write(cassette, consolidated_header, 0, sizeof(consolidated_header));
+ cassette->image_write(consolidated_header, 0, sizeof(consolidated_header));
/* write out the actual data */
- err = cassette_write_samples(cassette, info->channels, 0.0, info->sample_count
+ err = cassette->write_samples(info->channels, 0.0, info->sample_count
/ (double) info->sample_frequency, info->sample_count, sizeof(consolidated_header),
waveform_flags);
if (err != cassette_image::error::SUCCESS)
@@ -230,7 +229,7 @@ static cassette_image::error wavfile_save(cassette_image *cassette, const struct
-const struct CassetteFormat wavfile_format =
+const cassette_image::Format cassette_image::wavfile_format =
{
"wav",
wavfile_identify,
@@ -264,7 +263,7 @@ void wavfile_testload(const char *fname)
if (!f)
return;
- if (cassette_open(f, &stdio_ioprocs, &wavfile_format, CASSETTE_FLAG_READONLY, &cassette))
+ if (cassette_open(f, &stdio_ioprocs, &wavfile_format, cassette_image::FLAG_READONLY, &cassette))
{
fclose(f);
return;
diff --git a/src/lib/formats/wavfile.h b/src/lib/formats/wavfile.h
index 0f48b8378b0..397d502a0ec 100644
--- a/src/lib/formats/wavfile.h
+++ b/src/lib/formats/wavfile.h
@@ -14,6 +14,4 @@
#include "cassimg.h"
-extern const struct CassetteFormat wavfile_format;
-
#endif // MAME_FORMATS_WAVFILE_H
diff --git a/src/lib/formats/x07_cas.cpp b/src/lib/formats/x07_cas.cpp
index 131693f2da1..182a1303cd8 100644
--- a/src/lib/formats/x07_cas.cpp
+++ b/src/lib/formats/x07_cas.cpp
@@ -6,10 +6,10 @@
********************************************************************/
-#include <cassert>
-
#include "x07_cas.h"
+#include <cassert>
+
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
@@ -19,7 +19,7 @@
#define X07_HEADER_BYTES 16
// image size
-static int x07_image_size;
+static int x07_image_size; // FIXME: global variable prevents multiple instances
static int x07_put_samples(int16_t *buffer, int sample_pos, int count, int level)
{
@@ -140,7 +140,7 @@ static int x07_cassette_calculate_size_in_samples(const uint8_t *bytes, int leng
return x07_handle_cassette(nullptr, bytes);
}
-static const struct CassetteLegacyWaveFiller x07_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller x07_legacy_fill_wave =
{
x07_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -151,17 +151,17 @@ static const struct CassetteLegacyWaveFiller x07_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error x07_cassette_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error x07_cassette_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &x07_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &x07_legacy_fill_wave);
}
static cassette_image::error x07_cassette_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &x07_legacy_fill_wave);
+ return cassette->legacy_construct(&x07_legacy_fill_wave);
}
-static const struct CassetteFormat x07_cassette_image_format =
+static const cassette_image::Format x07_cassette_image_format =
{
"k7,lst,cas",
x07_cassette_identify,
diff --git a/src/lib/formats/x1_tap.cpp b/src/lib/formats/x1_tap.cpp
index 88c962bf53b..cbd261f6610 100644
--- a/src/lib/formats/x1_tap.cpp
+++ b/src/lib/formats/x1_tap.cpp
@@ -20,15 +20,15 @@
* 0x00: Sampling rate (4 bytes)
*
*/
+#include "x1_tap.h"
#include <cassert>
-#include "x1_tap.h"
#define WAVE_HIGH 0x5a9e
#define WAVE_LOW -0x5a9e
-static int cas_size;
+static int cas_size; // FIXME: global variables prevent multiple instances
static int samplerate;
static int new_format;
@@ -103,7 +103,7 @@ static int x1_cas_fill_wave(int16_t *buffer, int sample_count, uint8_t *bytes)
return x1_handle_tap(buffer,bytes);
}
-static const struct CassetteLegacyWaveFiller x1_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller x1_legacy_fill_wave =
{
x1_cas_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -114,20 +114,20 @@ static const struct CassetteLegacyWaveFiller x1_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error x1_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error x1_cas_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &x1_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &x1_legacy_fill_wave);
}
static cassette_image::error x1_cas_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &x1_legacy_fill_wave);
+ return cassette->legacy_construct(&x1_legacy_fill_wave);
}
-static const struct CassetteFormat x1_cassette_format = {
+static const cassette_image::Format x1_cassette_format = {
"tap",
x1_cas_identify,
x1_cas_load,
diff --git a/src/lib/formats/zx81_p.cpp b/src/lib/formats/zx81_p.cpp
index 709bdccfc4c..186815507fe 100644
--- a/src/lib/formats/zx81_p.cpp
+++ b/src/lib/formats/zx81_p.cpp
@@ -31,11 +31,11 @@ medium transfer rate is approx. 307 bps (38 bytes/sec) for files that contain
*****************************************************************************/
-#include <cassert>
-
#include "zx81_p.h"
#include "tzx_cas.h"
+#include <cassert>
+
#define WAVEENTRY_LOW -32768
#define WAVEENTRY_HIGH 32767
@@ -56,7 +56,7 @@ medium transfer rate is approx. 307 bps (38 bytes/sec) for files that contain
#define ZX81_DATA_LENGTH_OFFSET 0x0b
#define ZX80_DATA_LENGTH_OFFSET 0x04
-static uint8_t zx_file_name[128];
+static uint8_t zx_file_name[128]; // FIXME: global variables prevent multiple instances
static uint16_t real_data_length = 0;
static uint8_t zx_file_name_length = 0;
@@ -64,9 +64,7 @@ static uint8_t zx_file_name_length = 0;
static int16_t *zx81_emit_level(int16_t *p, int count, int level)
{
- int i;
-
- for (i=0; i<count; i++) *(p++) = level;
+ for (int i=0; i<count; i++) *(p++) = level;
return p;
}
@@ -196,7 +194,7 @@ static int zx81_cassette_fill_wave(int16_t *buffer, int length, uint8_t *bytes)
return p - buffer;
}
-static const struct CassetteLegacyWaveFiller zx81_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller zx81_legacy_fill_wave =
{
zx81_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -207,9 +205,9 @@ static const struct CassetteLegacyWaveFiller zx81_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error zx81_p_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error zx81_p_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &zx81_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &zx81_legacy_fill_wave);
}
static cassette_image::error zx81_p_load(cassette_image *cassette)
@@ -219,10 +217,10 @@ static cassette_image::error zx81_p_load(cassette_image *cassette)
Hardcoding this to "cassette".
*/
zx81_fill_file_name ("cassette" /*image_basename_noext(device_list_find_by_tag( Machine->config->m_devicelist, CASSETTE, "cassette" ))*/ );
- return cassette_legacy_construct(cassette, &zx81_legacy_fill_wave);
+ return cassette->legacy_construct(&zx81_legacy_fill_wave);
}
-static const struct CassetteFormat zx81_p_image_format =
+static const cassette_image::Format zx81_p_image_format =
{
"p,81",
zx81_p_identify,
@@ -269,7 +267,7 @@ static int zx80_cassette_fill_wave(int16_t *buffer, int length, uint8_t *bytes)
return p - buffer;
}
-static const struct CassetteLegacyWaveFiller zx80_legacy_fill_wave =
+static const cassette_image::LegacyWaveFiller zx80_legacy_fill_wave =
{
zx80_cassette_fill_wave, /* fill_wave */
-1, /* chunk_size */
@@ -280,17 +278,17 @@ static const struct CassetteLegacyWaveFiller zx80_legacy_fill_wave =
0 /* trailer_samples */
};
-static cassette_image::error zx80_o_identify(cassette_image *cassette, struct CassetteOptions *opts)
+static cassette_image::error zx80_o_identify(cassette_image *cassette, cassette_image::Options *opts)
{
- return cassette_legacy_identify(cassette, opts, &zx80_legacy_fill_wave);
+ return cassette->legacy_identify(opts, &zx80_legacy_fill_wave);
}
static cassette_image::error zx80_o_load(cassette_image *cassette)
{
- return cassette_legacy_construct(cassette, &zx80_legacy_fill_wave);
+ return cassette->legacy_construct(&zx80_legacy_fill_wave);
}
-static const struct CassetteFormat zx80_o_image_format =
+static const cassette_image::Format zx80_o_image_format =
{
"o,80",
zx80_o_identify,
diff --git a/src/lib/netlist/analog/nlid_fourterm.h b/src/lib/netlist/analog/nlid_fourterm.h
index 02ca5a9563b..8656cf7e32f 100644
--- a/src/lib/netlist/analog/nlid_fourterm.h
+++ b/src/lib/netlist/analog/nlid_fourterm.h
@@ -39,16 +39,20 @@ namespace analog {
NETLIB_CONSTRUCTOR_EX(VCCS, nl_fptype ri = nlconst::magic(1e9))
, m_G(*this, "G", nlconst::one())
, m_RI(*this, "RI", ri)
- , m_OP(*this, "OP", &m_IP, NETLIB_DELEGATE(termhandler))
- , m_ON(*this, "ON", &m_IP, NETLIB_DELEGATE(termhandler))
- , m_IP(*this, "IP", &m_IN, NETLIB_DELEGATE(termhandler)) // <= this should be NULL and terminal be filtered out prior to solving...
- , m_IN(*this, "IN", &m_IP, NETLIB_DELEGATE(termhandler)) // <= this should be NULL and terminal be filtered out prior to solving...
+ , m_OP(*this, "OP", &m_IP, {&m_ON, &m_IN}, NETLIB_DELEGATE(termhandler))
+ , m_ON(*this, "ON", &m_IP, {&m_OP, &m_IN}, NETLIB_DELEGATE(termhandler))
+ , m_IP(*this, "IP", &m_IN, {&m_OP, &m_ON}, NETLIB_DELEGATE(termhandler))
+ , m_IN(*this, "IN", &m_IP, {&m_OP, &m_ON}, NETLIB_DELEGATE(termhandler))
, m_OP1(*this, "_OP1", &m_IN, NETLIB_DELEGATE(termhandler))
, m_ON1(*this, "_ON1", &m_IN, NETLIB_DELEGATE(termhandler))
+ //, m_IPx(*this, "_IPx", &m_OP, NETLIB_DELEGATE(termhandler)) // <= this should be NULL and terminal be filtered out prior to solving...
+ //, m_INx(*this, "_INx", &m_ON, NETLIB_DELEGATE(termhandler)) // <= this should be NULL and terminal be filtered out prior to solving...
, m_gfac(nlconst::one())
{
connect(m_OP, m_OP1);
connect(m_ON, m_ON1);
+ //connect(m_IP, m_IPx);
+ //connect(m_IN, m_INx);
}
NETLIB_RESETI();
@@ -82,6 +86,9 @@ namespace analog {
terminal_t m_OP1;
terminal_t m_ON1;
+ //terminal_t m_IPx;
+ //terminal_t m_INx;
+
private:
nl_fptype m_gfac;
};
diff --git a/src/lib/netlist/analog/nlid_twoterm.h b/src/lib/netlist/analog/nlid_twoterm.h
index fbf7b24b502..615bb7e19b3 100644
--- a/src/lib/netlist/analog/nlid_twoterm.h
+++ b/src/lib/netlist/analog/nlid_twoterm.h
@@ -54,7 +54,7 @@ namespace analog
// -----------------------------------------------------------------------------
template <class C>
- inline core_device_t &bselect(bool b, C &d1, core_device_t &d2)
+ static inline core_device_t &bselect(bool b, C &d1, core_device_t &d2)
{
auto *h = dynamic_cast<core_device_t *>(&d1);
return b ? *h : d2;
diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj b/src/lib/netlist/buildVS/netlistlib.vcxproj
index 543d7680f29..1344d71ba50 100755
--- a/src/lib/netlist/buildVS/netlistlib.vcxproj
+++ b/src/lib/netlist/buildVS/netlistlib.vcxproj
@@ -114,10 +114,13 @@
<ClCompile Include="..\analog\nlid_fourterm.cpp" />
<ClCompile Include="..\analog\nlid_twoterm.cpp" />
<ClCompile Include="..\devices\net_lib.cpp" />
- <ClCompile Include="..\devices\nld_2102A.cpp" />
+ <ClCompile Include="..\devices\nld_2102a.cpp" />
<ClCompile Include="..\devices\nld_4006.cpp" />
<ClCompile Include="..\devices\nld_4017.cpp" />
+ <ClCompile Include="..\devices\nld_4029.cpp" />
+ <ClCompile Include="..\devices\nld_4042.cpp" />
<ClCompile Include="..\devices\nld_4053.cpp" />
+ <ClCompile Include="..\devices\nld_4076.cpp" />
<ClCompile Include="..\devices\nld_74125.cpp" />
<ClCompile Include="..\devices\nld_74163.cpp" />
<ClCompile Include="..\devices\nld_74377.cpp" />
@@ -157,8 +160,8 @@
<ClCompile Include="..\devices\nld_7490.cpp" />
<ClCompile Include="..\devices\nld_7493.cpp" />
<ClCompile Include="..\devices\nld_74ls629.cpp" />
- <ClCompile Include="..\devices\nld_82S115.cpp" />
- <ClCompile Include="..\devices\nld_82S16.cpp" />
+ <ClCompile Include="..\devices\nld_82s115.cpp" />
+ <ClCompile Include="..\devices\nld_82s16.cpp" />
<ClCompile Include="..\devices\nld_9310.cpp" />
<ClCompile Include="..\devices\nld_9316.cpp" />
<ClCompile Include="..\devices\nld_9322.cpp" />
@@ -176,7 +179,9 @@
<ClCompile Include="..\devices\nlid_truthtable.cpp" />
<ClCompile Include="..\generated\nlm_modules_lib.cpp" />
<ClCompile Include="..\generated\static_solvers.cpp" />
- <ClCompile Include="..\macro\modules\nlmod_RTEST.cpp" />
+ <ClCompile Include="..\macro\modules\nlmod_icl8038_dip.cpp" />
+ <ClCompile Include="..\macro\modules\nlmod_ne556_dip.cpp" />
+ <ClCompile Include="..\macro\modules\nlmod_rtest.cpp" />
<ClCompile Include="..\macro\nlm_base_lib.cpp" />
<ClCompile Include="..\macro\nlm_cd4xxx_lib.cpp" />
<ClCompile Include="..\macro\nlm_opamp_lib.cpp" />
diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters
index f858a2b9932..68df009f9ec 100755
--- a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters
+++ b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters
@@ -87,9 +87,6 @@
<ClCompile Include="..\devices\nld_7483.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\devices\nld_82S115.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\devices\nld_4013.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -129,9 +126,6 @@
<ClCompile Include="..\devices\nld_74153.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\devices\nld_82S16.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\devices\nld_74123.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -189,9 +183,6 @@
<ClCompile Include="..\devices\nld_74174.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\devices\nld_2102A.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\devices\nld_4316.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -291,7 +282,31 @@
<ClCompile Include="..\generated\nlm_modules_lib.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\macro\modules\nlmod_RTEST.cpp">
+ <ClCompile Include="..\devices\nld_4042.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\devices\nld_4076.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\devices\nld_4029.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\devices\nld_2102a.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\devices\nld_82s16.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\devices\nld_82s115.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\macro\modules\nlmod_icl8038_dip.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\macro\modules\nlmod_ne556_dip.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\macro\modules\nlmod_rtest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
diff --git a/src/lib/netlist/core/analog.h b/src/lib/netlist/core/analog.h
index 4bc986f48fc..d6f217210c4 100644
--- a/src/lib/netlist/core/analog.h
+++ b/src/lib/netlist/core/analog.h
@@ -61,6 +61,9 @@ namespace netlist
/// @param otherterm pointer to the sibling terminal
terminal_t(core_device_t &dev, const pstring &aname, terminal_t *otherterm, nldelegate delegate);
+ terminal_t(core_device_t &dev, const pstring &aname, terminal_t *otherterm,
+ const std::array<terminal_t *, 2> &splitterterms, nldelegate delegate);
+
/// \brief Returns voltage of connected net
///
/// @return voltage of net this terminal is connected to
diff --git a/src/lib/netlist/core/base_objects.h b/src/lib/netlist/core/base_objects.h
index 140fde1149e..edde9fa0f0f 100644
--- a/src/lib/netlist/core/base_objects.h
+++ b/src/lib/netlist/core/base_objects.h
@@ -239,7 +239,7 @@ namespace netlist
void set_net(net_t *anet) noexcept { m_net = anet; }
void clear_net() noexcept { m_net = nullptr; }
- bool has_net() const noexcept { return (m_net != nullptr); }
+ constexpr bool has_net() const noexcept { return (m_net != nullptr); }
net_t & net() const noexcept { return *m_net;}
@@ -251,8 +251,8 @@ namespace netlist
bool is_analog_input() const noexcept;
bool is_analog_output() const noexcept;
- bool is_state(state_e astate) const noexcept { return (m_state == astate); }
- state_e terminal_state() const noexcept { return m_state; }
+ constexpr bool is_state(state_e astate) const noexcept { return (m_state == astate); }
+ constexpr const state_e &terminal_state() const noexcept { return m_state; }
void set_state(state_e astate) noexcept { m_state = astate; }
void reset() noexcept { set_state(is_type(terminal_type::OUTPUT) ? STATE_OUT : STATE_INP_ACTIVE); }
@@ -265,12 +265,12 @@ namespace netlist
state_var_sig m_Q;
#else
- void set_copied_input(netlist_sig_t val) const noexcept { plib::unused_var(val); } // NOLINT: static means more message elsewhere
+ void set_copied_input(const netlist_sig_t &val) const noexcept { plib::unused_var(val); } // NOLINT: static means more message elsewhere
#endif
void set_delegate(const nldelegate &delegate) noexcept { m_delegate = delegate; }
const nldelegate &delegate() const noexcept { return m_delegate; }
- inline void run_delegate() noexcept { return m_delegate(); }
+ void run_delegate() const noexcept { return m_delegate(); }
private:
nldelegate m_delegate;
net_t * m_net;
diff --git a/src/lib/netlist/core/core_device.h b/src/lib/netlist/core/core_device.h
index 2e511ce6c9b..edfe25b6ec0 100644
--- a/src/lib/netlist/core/core_device.h
+++ b/src/lib/netlist/core/core_device.h
@@ -31,23 +31,27 @@ namespace netlist
void do_inc_active() noexcept
{
- if (m_hint_deactivate)
+ gsl_Expects(m_active_outputs >= 0);
+
+ if (m_activate && m_hint_deactivate)
{
if (++m_active_outputs == 1)
{
if (m_stats)
m_stats->m_stat_inc_active.inc();
- inc_active();
+ m_activate(true);//inc_active();
}
}
}
void do_dec_active() noexcept
{
- if (m_hint_deactivate)
+ gsl_Expects(m_active_outputs >= 1);
+
+ if (m_activate && m_hint_deactivate)
if (--m_active_outputs == 0)
{
- dec_active();
+ m_activate(false); //dec_active();
}
}
@@ -74,9 +78,9 @@ namespace netlist
}
protected:
+ using activate_delegate = plib::pmfp<void, bool>;
- virtual void inc_active() noexcept { }
- virtual void dec_active() noexcept { }
+ activate_delegate m_activate;
log_type & log();
diff --git a/src/lib/netlist/core/exec.h b/src/lib/netlist/core/exec.h
index 307baa6b0f2..50c718e3da6 100644
--- a/src/lib/netlist/core/exec.h
+++ b/src/lib/netlist/core/exec.h
@@ -33,15 +33,13 @@ namespace netlist
// run functions
- netlist_time_ext time() const noexcept { return m_time; }
+ const netlist_time_ext &time() const noexcept { return m_time; }
void process_queue(netlist_time_ext delta) noexcept;
void abort_current_queue_slice() noexcept
{
- if (!NL_USE_QUEUE_STATS || !m_use_stats)
- m_queue.retime<false>(detail::queue_t::entry_t(m_time, nullptr));
- else
- m_queue.retime<true>(detail::queue_t::entry_t(m_time, nullptr));
+ qremove(nullptr);
+ qpush(m_time, nullptr);
}
const detail::queue_t &queue() const noexcept { return m_queue; }
@@ -49,19 +47,27 @@ namespace netlist
template<typename... Args>
void qpush(Args&&...args) noexcept
{
- if (!NL_USE_QUEUE_STATS || !m_use_stats)
+#if (!NL_USE_QUEUE_STATS)
+ m_queue.emplace<false>(std::forward<Args>(args)...); // NOLINT(performance-move-const-arg)
+#else
+ if (!m_use_stats)
m_queue.emplace<false>(std::forward<Args>(args)...); // NOLINT(performance-move-const-arg)
else
m_queue.emplace<true>(std::forward<Args>(args)...); // NOLINT(performance-move-const-arg)
+#endif
}
template <class R>
void qremove(const R &elem) noexcept
{
- if (!NL_USE_QUEUE_STATS || !m_use_stats)
+#if (!NL_USE_QUEUE_STATS)
+ m_queue.remove<false>(elem);
+#else
+ if (!m_use_stats)
m_queue.remove<false>(elem);
else
m_queue.remove<true>(elem);
+#endif
}
// Control functions
@@ -87,9 +93,8 @@ namespace netlist
const log_type &log() const noexcept { return m_state.log(); }
void print_stats() const;
- bool use_stats() const { return m_use_stats; }
- bool stats_enabled() const noexcept { return m_use_stats; }
+ constexpr bool stats_enabled() const noexcept { return m_use_stats; }
void enable_stats(bool val) noexcept { m_use_stats = val; }
private:
@@ -107,8 +112,8 @@ namespace netlist
//PALIGNAS_CACHELINE()
//PALIGNAS(16)
- detail::queue_t m_queue;
bool m_use_stats;
+ detail::queue_t m_queue;
// performance
plib::pperftime_t<true> m_stat_mainloop;
plib::pperfcount_t<true> m_perf_out_processed;
diff --git a/src/lib/netlist/core/logic.h b/src/lib/netlist/core/logic.h
index c8ff979cc65..7bbcf5811d7 100644
--- a/src/lib/netlist/core/logic.h
+++ b/src/lib/netlist/core/logic.h
@@ -36,7 +36,7 @@ namespace netlist
{
return plib::downcast<logic_net_t &>(core_terminal_t::net());
}
- const logic_net_t & net() const noexcept
+ const logic_net_t & net() const noexcept
{
return plib::downcast<const logic_net_t &>(core_terminal_t::net());
}
@@ -52,9 +52,9 @@ namespace netlist
logic_input_t(device_t &dev, const pstring &aname,
nldelegate delegate);
- inline netlist_sig_t operator()() const noexcept
+ const netlist_sig_t &operator()() const noexcept
{
- nl_assert(terminal_state() != STATE_INP_PASSIVE);
+ gsl_Expects(terminal_state() != STATE_INP_PASSIVE);
#if NL_USE_COPY_INSTEAD_OF_REFERENCE
return m_Q;
#else
@@ -120,12 +120,14 @@ namespace netlist
void initial(netlist_sig_t val) noexcept;
- inline void push(const netlist_sig_t &newQ, const netlist_time &delay) noexcept
+ void push(const netlist_sig_t &newQ, const netlist_time &delay) noexcept
{
+ gsl_Expects(delay >= netlist_time::zero());
+
m_my_net.set_Q_and_push(newQ, delay); // take the shortcut
}
- inline void set_Q_time(const netlist_sig_t &newQ, const netlist_time_ext &at) noexcept
+ void set_Q_time(const netlist_sig_t &newQ, const netlist_time_ext &at) noexcept
{
m_my_net.set_Q_time(newQ, at); // take the shortcut
}
diff --git a/src/lib/netlist/core/netlist_state.h b/src/lib/netlist/core/netlist_state.h
index 137f264ddfd..fd0a1449217 100644
--- a/src/lib/netlist/core/netlist_state.h
+++ b/src/lib/netlist/core/netlist_state.h
@@ -76,7 +76,7 @@ namespace netlist
/// \return vector with pointers to devices
template<class C>
- inline std::vector<C *> get_device_list() const
+ std::vector<C *> get_device_list() const
{
std::vector<C *> tmp;
for (const auto &d : m_devices)
@@ -112,13 +112,13 @@ namespace netlist
template<typename O, typename C>
void save(O &owner, C &state, const pstring &module, const pstring &stname)
{
- this->run_state_manager().save_item(static_cast<void *>(&owner), state, module + "." + stname);
+ this->run_state_manager().save_item(plib::void_ptr_cast(&owner), state, module + "." + stname);
}
template<typename O, typename C>
void save(O &owner, C *state, const pstring &module, const pstring &stname, const std::size_t count)
{
- this->run_state_manager().save_state_ptr(static_cast<void *>(&owner), module + "." + stname, plib::state_manager_t::dtype<C>(), count, state);
+ this->run_state_manager().save_state_ptr(plib::void_ptr_cast(&owner), module + "." + stname, plib::state_manager_t::dtype<C>(), count, state);
}
// FIXME: only used by queue_t save state
@@ -217,24 +217,6 @@ namespace netlist
device_arena &pool() noexcept { return m_pool; }
const device_arena &pool() const noexcept { return m_pool; }
- /// \brief set extended validation mode.
- ///
- /// The extended validation mode is not intended for running.
- /// The intention is to identify power pins which are not properly
- /// connected. The downside is that this mode creates a netlist which
- /// is different (and not able to run).
- ///
- /// Extended validation is supported by nltool validate option.
- ///
- /// \param val Boolean value enabling/disabling extended validation mode
- void set_extended_validation(bool val) { m_extended_validation = val; }
-
- /// \brief State of extended validation mode.
- ///
- /// \returns boolean value indicating if extended validation mode is
- /// turned on.
- bool is_extended_validation() const { return m_extended_validation; }
-
struct stats_info
{
const detail::queue_t &m_queue;// performance
@@ -254,6 +236,11 @@ namespace netlist
///
void free_setup_resources();
+ std::vector<detail::core_terminal_t *> &core_terms(const detail::net_t &net) noexcept
+ {
+ return m_core_terms[&net];
+ }
+
private:
device_arena m_pool; // must be deleted last!
@@ -263,7 +250,7 @@ namespace netlist
plib::state_manager_t m_state;
log_type m_log;
- // FIXME: should only be available during device construcion
+ // FIXME: should only be available during device construction
host_arena::unique_ptr<setup_t> m_setup;
nets_collection_type m_nets;
@@ -271,8 +258,8 @@ namespace netlist
devices_collection_type m_devices;
// sole use is to manage lifetime of family objects
family_collection_type m_family_cache;
- bool m_extended_validation;
-
+ // all terms for a net
+ std::unordered_map<const detail::net_t *, std::vector<detail::core_terminal_t *>> m_core_terms;
// dummy version
int m_dummy_version;
};
diff --git a/src/lib/netlist/core/nets.h b/src/lib/netlist/core/nets.h
index db28687e5d0..7062f1572aa 100644
--- a/src/lib/netlist/core/nets.h
+++ b/src/lib/netlist/core/nets.h
@@ -17,6 +17,12 @@
#include "../plib/plists.h"
#include "../plib/pstring.h"
+// Enable the setting below to avoid queue pushes were at execution
+// no action will be taken. This is academically cleaner, but slower than
+// allowing this to happen and filter it during during "process".
+
+#define AVOID_NOOP_QUEUE_PUSHES (0)
+
namespace netlist
{
@@ -61,49 +67,80 @@ namespace netlist
void push_to_queue(const netlist_time &delay) noexcept
{
- if (has_connections())
- {
- if (!!is_queued())
- exec().qremove(this);
-
- const auto nst(exec().time() + delay);
- m_next_scheduled_time = nst;
-
- if (!m_list_active.empty())
- {
- m_in_queue = queue_status::QUEUED;
- exec().qpush(nst, this);
- }
+ if (!!is_queued())
+ exec().qremove(this);
+
+ m_next_scheduled_time = exec().time() + delay;
+#if (AVOID_NOOP_QUEUE_PUSHES)
+ m_in_queue = (m_list_active.empty() ? queue_status::DELAYED_DUE_TO_INACTIVE
+ : (m_new_Q != m_cur_Q ? queue_status::QUEUED : queue_status::DELIVERED));
+ if (m_in_queue == queue_status::QUEUED)
+ exec().qpush(m_next_scheduled_time, this);
else
- {
- m_in_queue = queue_status::DELAYED_DUE_TO_INACTIVE;
update_inputs();
- }
- }
+#else
+ m_in_queue = m_list_active.empty() ? queue_status::DELAYED_DUE_TO_INACTIVE : queue_status::QUEUED;
+ if (m_in_queue == queue_status::QUEUED)
+ exec().qpush(m_next_scheduled_time, this);
+ else
+ update_inputs();
+#endif
}
- NVCC_CONSTEXPR bool is_queued() const noexcept { return m_in_queue == queue_status::QUEUED; }
+ constexpr bool is_queued() const noexcept { return m_in_queue == queue_status::QUEUED; }
+
+ // -----------------------------------------------------------------------------
+ // Very hot
+ // -----------------------------------------------------------------------------
template <bool KEEP_STATS>
- inline void update_devs() noexcept
+ void update_devs() noexcept
{
- nl_assert(this->is_rail_net());
+ gsl_Expects(this->is_rail_net());
m_in_queue = queue_status::DELIVERED; // mark as taken ...
- if (m_new_Q ^ m_cur_Q)
+
+ const netlist_sig_t new_Q(m_new_Q);
+ const netlist_sig_t cur_Q(m_cur_Q);
+#if (!AVOID_NOOP_QUEUE_PUSHES)
+ if (new_Q ^ cur_Q)
+#endif
{
- process<KEEP_STATS>((m_new_Q << core_terminal_t::INP_LH_SHIFT)
- | (m_cur_Q << core_terminal_t::INP_HL_SHIFT), m_new_Q);
+ const auto mask = (new_Q << core_terminal_t::INP_LH_SHIFT)
+ | (cur_Q << core_terminal_t::INP_HL_SHIFT);
+ m_cur_Q = new_Q;
+
+ if (!KEEP_STATS)
+ {
+ for (auto &p : m_list_active)
+ {
+ p.set_copied_input(new_Q);
+ if ((p.terminal_state() & mask) != 0)
+ p.run_delegate();
+ }
+ }
+ else
+ {
+ for (auto & p : m_list_active)
+ {
+ p.set_copied_input(new_Q);
+ auto *stats(p.device().stats());
+ stats->m_stat_call_count.inc();
+ if ((p.terminal_state() & mask))
+ {
+ auto g(stats->m_stat_total_time.guard());
+ p.run_delegate();
+ }
+ }
+ }
}
}
- netlist_time_ext next_scheduled_time() const noexcept { return m_next_scheduled_time; }
+ constexpr const netlist_time_ext &next_scheduled_time() const noexcept { return m_next_scheduled_time; }
void set_next_scheduled_time(netlist_time_ext ntime) noexcept { m_next_scheduled_time = ntime; }
- NVCC_CONSTEXPR bool is_rail_net() const noexcept { return !(m_railterminal == nullptr); }
+ bool is_rail_net() const noexcept { return !(m_railterminal == nullptr); }
core_terminal_t & railterminal() const noexcept { return *m_railterminal; }
- bool has_connections() const noexcept { return !m_core_terms.empty(); }
-
void add_to_active_list(core_terminal_t &term) noexcept
{
if (!m_list_active.empty())
@@ -117,7 +154,12 @@ namespace netlist
railterminal().device().do_inc_active();
if (m_in_queue == queue_status::DELAYED_DUE_TO_INACTIVE)
{
+#if (AVOID_NOOP_QUEUE_PUSHES)
+ if (m_next_scheduled_time > exec().time()
+ && (m_cur_Q != m_new_Q))
+#else
if (m_next_scheduled_time > exec().time())
+#endif
{
m_in_queue = queue_status::QUEUED; // pending
exec().qpush(m_next_scheduled_time, this);
@@ -139,7 +181,16 @@ namespace netlist
gsl_Expects(!m_list_active.empty());
m_list_active.remove(&term);
if (m_list_active.empty())
+ {
+#if (AVOID_NOOP_QUEUE_PUSHES)
+ if (!!is_queued())
+ {
+ exec().qremove(this);
+ m_in_queue = queue_status::DELAYED_DUE_TO_INACTIVE;
+ }
+#endif
railterminal().device().do_dec_active();
+ }
}
// -----------------------------------------------------------------------------
@@ -151,7 +202,7 @@ namespace netlist
void rebuild_list(); // rebuild m_list after a load
- std::vector<core_terminal_t *> &core_terms() noexcept { return m_core_terms; }
+ //std::vector<core_terminal_t *> &core_terms() noexcept { return state().m_core_terms[this]; }
void update_inputs() noexcept
{
@@ -165,7 +216,7 @@ namespace netlist
protected:
// only used for logic nets
- NVCC_CONSTEXPR netlist_sig_t Q() const noexcept { return m_cur_Q; }
+ constexpr const netlist_sig_t &Q() const noexcept { return m_cur_Q; }
// only used for logic nets
void initial(netlist_sig_t val) noexcept
@@ -175,8 +226,10 @@ namespace netlist
}
// only used for logic nets
- inline void set_Q_and_push(const netlist_sig_t &newQ, const netlist_time &delay) noexcept
+ void set_Q_and_push(const netlist_sig_t &newQ, const netlist_time &delay) noexcept
{
+ gsl_Expects(delay >= netlist_time::zero());
+
if (newQ != m_new_Q)
{
m_new_Q = newQ;
@@ -185,8 +238,10 @@ namespace netlist
}
// only used for logic nets
- inline void set_Q_time(const netlist_sig_t &newQ, const netlist_time_ext &at) noexcept
+ void set_Q_time(const netlist_sig_t &newQ, const netlist_time_ext &at) noexcept
{
+ gsl_Expects(at >= netlist_time_ext::zero());
+
if (newQ != m_new_Q)
{
m_in_queue = queue_status::DELAYED_DUE_TO_INACTIVE;
@@ -205,45 +260,12 @@ namespace netlist
state_var<netlist_sig_t> m_new_Q;
state_var<netlist_sig_t> m_cur_Q;
state_var<queue_status> m_in_queue;
+ plib::linkedlist_t<core_terminal_t> m_list_active;
state_var<netlist_time_ext> m_next_scheduled_time;
core_terminal_t * m_railterminal;
- plib::linkedlist_t<core_terminal_t> m_list_active;
- std::vector<core_terminal_t *> m_core_terms; // save post-start m_list ...
-
- // -----------------------------------------------------------------------------
- // Very hot
- // -----------------------------------------------------------------------------
-
- template <bool KEEP_STATS, typename T, typename S>
- void process(T mask, const S &sig) noexcept
- {
- m_cur_Q = sig;
+ //std::vector<core_terminal_t *> m_core_terms; // save post-start m_list ...
- if (KEEP_STATS)
- {
- for (auto & p : m_list_active)
- {
- p.set_copied_input(sig);
- auto *stats(p.device().stats());
- stats->m_stat_call_count.inc();
- if ((p.terminal_state() & mask))
- {
- auto g(stats->m_stat_total_time.guard());
- p.run_delegate();
- }
- }
- }
- else
- {
- for (auto &p : m_list_active)
- {
- p.set_copied_input(sig);
- if ((p.terminal_state() & mask) != 0)
- p.run_delegate();
- }
- }
- }
};
} // namespace detail
@@ -255,10 +277,10 @@ namespace netlist
void reset() noexcept override;
- nl_fptype Q_Analog() const noexcept { return m_cur_Analog; }
+ const nl_fptype &Q_Analog() const noexcept { return m_cur_Analog; }
void set_Q_Analog(nl_fptype v) noexcept { m_cur_Analog = v; }
// used by solver code ...
- nl_fptype *Q_Analog_state_ptr() noexcept { return &m_cur_Analog(); }
+ nl_fptype *Q_Analog_state_ptr() noexcept { return *m_cur_Analog; }
//FIXME: needed by current solver code
solver::matrix_solver_t *solver() const noexcept { return m_solver; }
diff --git a/src/lib/netlist/core/object_array.h b/src/lib/netlist/core/object_array.h
index 0079d819c3e..f8b811482fc 100644
--- a/src/lib/netlist/core/object_array.h
+++ b/src/lib/netlist/core/object_array.h
@@ -133,7 +133,7 @@ namespace netlist
private:
template <std::size_t P>
- inline constexpr value_type e() const { return (*this)[P](); }
+ constexpr const value_type &e() const { return (*this)[P](); }
};
template<std::size_t N>
@@ -144,7 +144,7 @@ namespace netlist
using base_type::base_type;
template <typename T>
- inline void push(const T &v, const netlist_time &t)
+ void push(const T &v, const netlist_time &t)
{
if (N >= 1) (*this)[0].push((v >> 0) & 1, t);
if (N >= 2) (*this)[1].push((v >> 1) & 1, t);
@@ -197,7 +197,7 @@ namespace netlist
using base_type::base_type;
template <typename T>
- inline void push(const T &v, const netlist_time &t)
+ void push(const T &v, const netlist_time &t)
{
if (N >= 1) (*this)[0].push((v >> 0) & 1, t);
if (N >= 2) (*this)[1].push((v >> 1) & 1, t);
diff --git a/src/lib/netlist/core/param.h b/src/lib/netlist/core/param.h
index 2007d1f844d..dbabef073e7 100644
--- a/src/lib/netlist/core/param.h
+++ b/src/lib/netlist/core/param.h
@@ -79,8 +79,8 @@ namespace netlist
param_num_t(core_device_t &device, const pstring &name, T val) noexcept(false);
- T operator()() const noexcept { return m_param; }
- operator T() const noexcept { return m_param; }
+ constexpr const T &operator()() const noexcept { return m_param; }
+ constexpr operator const T& () const noexcept { return m_param; }
void set(const T &param) noexcept { set_and_update_param(m_param, param); }
diff --git a/src/lib/netlist/core/queue.h b/src/lib/netlist/core/queue.h
index 7e38c3f0ef9..350329ed3f1 100644
--- a/src/lib/netlist/core/queue.h
+++ b/src/lib/netlist/core/queue.h
@@ -21,12 +21,13 @@
#include <unordered_map>
#include <utility>
#include <vector>
+#include <queue>
namespace netlist
{
namespace detail {
// Use timed_queue_heap to use stdc++ heap functions instead of linear processing.
- // This slows down processing by about 25% on a Kaby Lake.
+ // This slows down processing by about 35% on a Kaby Lake.
// template <class T, bool TS>
// using timed_queue = plib::timed_queue_heap<T, TS>;
diff --git a/src/lib/netlist/core/setup.h b/src/lib/netlist/core/setup.h
index 8b8a49dbc34..1c8fc5742f9 100644
--- a/src/lib/netlist/core/setup.h
+++ b/src/lib/netlist/core/setup.h
@@ -144,13 +144,21 @@ namespace netlist
pstring get_initial_param_val(const pstring &name, const pstring &def) const;
void register_term(detail::core_terminal_t &term);
- void register_term(terminal_t &term, terminal_t &other_term);
+ void register_term(terminal_t &term, terminal_t *other_term, const std::array<terminal_t *, 2> &splitter_terms);
- // called from net_splitter
+ // called from matrix_solver_t::get_connected_net
+ // returns the terminal being part of a two terminal device.
terminal_t *get_connected_terminal(const terminal_t &term) const noexcept
{
auto ret(m_connected_terminals.find(&term));
- return (ret != m_connected_terminals.end()) ? ret->second : nullptr;
+ return (ret != m_connected_terminals.end()) ? ret->second[0] : nullptr;
+ }
+
+ // called from net_splitter
+ const std::array<terminal_t *, 4> *get_connected_terminals(const terminal_t &term) const noexcept
+ {
+ auto ret(m_connected_terminals.find(&term));
+ return (ret != m_connected_terminals.end()) ? &ret->second : nullptr;
}
// get family -> truthtable
@@ -223,7 +231,9 @@ namespace netlist
// FIXME: can be cleared before run
std::unordered_map<pstring, detail::core_terminal_t *> m_terminals;
- std::unordered_map<const terminal_t *, terminal_t *> m_connected_terminals;
+ // FIXME: Limited to 3 additional terminals
+ std::unordered_map<const terminal_t *,
+ std::array<terminal_t *, 4>> m_connected_terminals;
std::unordered_map<pstring, param_ref_t> m_params;
std::unordered_map<const detail::core_terminal_t *,
devices::nld_base_proxy *> m_proxies;
@@ -294,8 +304,9 @@ namespace netlist
{
public:
- explicit source_pattern_t(const pstring &pat)
+ explicit source_pattern_t(const pstring &pat, bool force_lowercase)
: m_pattern(pat)
+ , m_force_lowercase(force_lowercase)
{
}
@@ -304,6 +315,7 @@ namespace netlist
private:
pstring m_pattern;
+ bool m_force_lowercase;
};
class source_mem_t : public source_netlist_t
diff --git a/src/lib/netlist/core/state_var.h b/src/lib/netlist/core/state_var.h
index 55db73c1ac2..5839de26748 100644
--- a/src/lib/netlist/core/state_var.h
+++ b/src/lib/netlist/core/state_var.h
@@ -61,7 +61,8 @@ namespace netlist
//! Assignment operator to assign value of type T.
constexpr state_var &operator=(const T &rhs) noexcept { m_value = rhs; return *this; }
//! Assignment move operator to assign value of type T.
- constexpr state_var &operator=(T &&rhs) noexcept { std::swap(m_value, rhs); return *this; }
+ //constexpr state_var &operator=(T &&rhs) noexcept { std::swap(m_value, rhs); return *this; }
+ constexpr state_var &operator=(T &&rhs) noexcept { m_value = std::move(rhs); return *this; }
//! Return non-const value of state variable.
constexpr operator T & () noexcept { return m_value; }
//! Return const value of state variable.
@@ -78,6 +79,10 @@ namespace netlist
constexpr T * operator->() noexcept { return &m_value; }
//! Access state variable by const ->.
constexpr const T * operator->() const noexcept{ return &m_value; }
+ //! Access state variable by *.
+ constexpr T * operator *() noexcept { return &m_value; }
+ //! Access state variable by const *.
+ constexpr const T * operator *() const noexcept{ return &m_value; }
private:
T m_value;
diff --git a/src/lib/netlist/devices/nld_2102A.cpp b/src/lib/netlist/devices/nld_2102a.cpp
index 91c7c6b7ee0..91c7c6b7ee0 100644..100755
--- a/src/lib/netlist/devices/nld_2102A.cpp
+++ b/src/lib/netlist/devices/nld_2102a.cpp
diff --git a/src/lib/netlist/devices/nld_4029.cpp b/src/lib/netlist/devices/nld_4029.cpp
new file mode 100644
index 00000000000..4582746bf24
--- /dev/null
+++ b/src/lib/netlist/devices/nld_4029.cpp
@@ -0,0 +1,272 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud, Jonathan Gevaryahu
+/*
+ * nld_4029.cpp
+ *
+ * CD4029BM/CD4029BC Presettable Binary/Decade Up/Down Counter
+ *
+ * +--------------+
+ * PE |1 ++ 16| VDD
+ * Q4 |2 15| CLK
+ * J4 |3 14| Q3
+ * J1 |4 4029 13| J3
+ * CI |5 12| J2
+ * Q1 |6 11| Q2
+ * CO |7 10| U/D
+ * VSS |8 9| B/D
+ * +--------------+
+ *
+ * Counter Sequences:
+ *
+ * B/D high (Binary), U/D high (Up)
+ * +-------++----+----+----+----+----++-------+
+ * | COUNT || Q4 | Q3 | Q2 | Q1 | CO || NEXT |
+ * +=======++====+====+====+====+====++=======+
+ * | 0 || 0 | 0 | 0 | 0 | 1 || 1 |
+ * | 1 || 0 | 0 | 0 | 1 | 1 || 2 |
+ * | 2 || 0 | 0 | 1 | 0 | 1 || 3 |
+ * | 3 || 0 | 0 | 1 | 1 | 1 || 4 |
+ * | 4 || 0 | 1 | 0 | 0 | 1 || 5 |
+ * | 5 || 0 | 1 | 0 | 1 | 1 || 6 |
+ * | 6 || 0 | 1 | 1 | 0 | 1 || 7 |
+ * | 7 || 0 | 1 | 1 | 1 | 1 || 8 |
+ * | 8 || 1 | 0 | 0 | 0 | 1 || 9 |
+ * | 9 || 1 | 0 | 0 | 1 | 1 || A |
+ * | A || 1 | 0 | 1 | 0 | 1 || B |
+ * | B || 1 | 0 | 1 | 1 | 1 || C |
+ * | C || 1 | 1 | 0 | 0 | 1 || D |
+ * | D || 1 | 1 | 0 | 1 | 1 || E |
+ * | E || 1 | 1 | 1 | 0 | 1 || F |
+ * | F || 1 | 1 | 1 | 1 |0|CI|| 0 |
+ * | 0 || 0 | 0 | 0 | 0 | 1 || 1 |
+ * +-------++----+----+----+----+----++-------+
+ *
+ * B/D high (Binary), U/D low (Down)
+ * +-------++----+----+----+----+----++-------+
+ * | COUNT || Q4 | Q3 | Q2 | Q1 | CO || NEXT |
+ * +=======++====+====+====+====+====++=======+
+ * | F || 1 | 1 | 1 | 1 | 1 || E |
+ * | E || 1 | 1 | 1 | 0 | 1 || D |
+ * | D || 1 | 1 | 0 | 1 | 1 || C |
+ * | C || 1 | 1 | 0 | 0 | 1 || B |
+ * | B || 1 | 0 | 1 | 1 | 1 || A |
+ * | A || 1 | 0 | 1 | 0 | 1 || 9 |
+ * | 9 || 1 | 0 | 0 | 1 | 1 || 8 |
+ * | 8 || 1 | 0 | 0 | 0 | 1 || 7 |
+ * | 7 || 0 | 1 | 1 | 1 | 1 || 6 |
+ * | 6 || 0 | 1 | 1 | 0 | 1 || 5 |
+ * | 5 || 0 | 1 | 0 | 1 | 1 || 4 |
+ * | 4 || 0 | 1 | 0 | 0 | 1 || 3 |
+ * | 3 || 0 | 0 | 1 | 1 | 1 || 2 |
+ * | 2 || 0 | 0 | 1 | 0 | 1 || 1 |
+ * | 1 || 0 | 0 | 0 | 1 | 1 || 0 |
+ * | 0 || 0 | 0 | 0 | 0 |0|CI|| F |
+ * | F || 1 | 1 | 1 | 1 | 1 || E |
+ * +-------++----+----+----+----+----++-------+
+ *
+ * B/D low (Decimal), U/D high (Up)
+ * +-------++----+----+----+----+----++-------+
+ * | COUNT || Q4 | Q3 | Q2 | Q1 | CO || NEXT |
+ * +=======++====+====+====+====+====++=======+
+ * | 0 || 0 | 0 | 0 | 0 | 1 || 1 |
+ * | 1 || 0 | 0 | 0 | 1 | 1 || 2 |
+ * | 2 || 0 | 0 | 1 | 0 | 1 || 3 |
+ * | 3 || 0 | 0 | 1 | 1 | 1 || 4 |
+ * | 4 || 0 | 1 | 0 | 0 | 1 || 5 |
+ * | 5 || 0 | 1 | 0 | 1 | 1 || 6 |
+ * | 6 || 0 | 1 | 1 | 0 | 1 || 7 |
+ * | 7 || 0 | 1 | 1 | 1 | 1 || 8 |
+ * | 8 || 1 | 0 | 0 | 0 | 1 || 9 |
+ * | 9 || 1 | 0 | 0 | 1 |0|CI|| 0 |
+ * | A || 1 | 0 | 1 | 0 | 1 || B |
+ * | B || 1 | 0 | 1 | 1 |0|CI|| 6 |
+ * | C || 1 | 1 | 0 | 0 | 1 || D |
+ * | D || 1 | 1 | 0 | 1 |0|CI|| 4 |
+ * | E || 1 | 1 | 1 | 0 | 1 || F |
+ * | F || 1 | 1 | 1 | 1 |0|CI|| 2 |
+ * | 0 || 0 | 0 | 0 | 0 | 1 || 1 |
+ * +-------++----+----+----+----+----++-------+
+ *
+ * B/D low (Decimal), U/D low (Down)
+ * +-------++----+----+----+----+----++-------+
+ * | COUNT || Q4 | Q3 | Q2 | Q1 | CO || NEXT |
+ * +=======++====+====+====+====+====++=======+
+ * | F || 1 | 1 | 1 | 1 | 1 || E |
+ * | E || 1 | 1 | 1 | 0 | 1 || D |
+ * | D || 1 | 1 | 0 | 1 | 1 || C |
+ * | C || 1 | 1 | 0 | 0 | 1 || B |
+ * | B || 1 | 0 | 1 | 1 | 1 || A |
+ * | A || 1 | 0 | 1 | 0 | 1 || 9 |
+ * | 9 || 1 | 0 | 0 | 1 | 1 || 8 |
+ * | 8 || 1 | 0 | 0 | 0 | 1 || 7 |
+ * | 7 || 0 | 1 | 1 | 1 | 1 || 6 |
+ * | 6 || 0 | 1 | 1 | 0 | 1 || 5 |
+ * | 5 || 0 | 1 | 0 | 1 | 1 || 4 |
+ * | 4 || 0 | 1 | 0 | 0 | 1 || 3 |
+ * | 3 || 0 | 0 | 1 | 1 | 1 || 2 |
+ * | 2 || 0 | 0 | 1 | 0 | 1 || 1 |
+ * | 1 || 0 | 0 | 0 | 1 | 1 || 0 |
+ * | 0 || 0 | 0 | 0 | 0 |0|CI|| 9 |
+ * | 9 || 1 | 0 | 0 | 1 | 1 || 8 |
+ * +-------++----+----+----+----+----++-------+
+ *
+ * Note that in all cases where Carry-out is generating a non-1 signal (0 | Carry-in),
+ * this signal is asynchronous, so if carry-in changes the carry-out value will
+ * change immediately.
+ *
+ *
+ * Preset/Carry in function table
+ * +-----+-----+-----++----+----+----+----+
+ * | PE | CLK | CI || Q1 | Q2 | Q3 | Q4 |
+ * +=====+=====+=====++====+====+====+====+
+ * | 1 | X | X || J1 | J2 | J3 | J4 |
+ * | 0 | X | 1 || Q1 | Q2 | Q3 | Q4 |
+ * | 0 | ./` | 0 || COUNT |
+ * +-----+-----+-----++----+----+----+----+
+ *
+ * Naming conventions follow National Semiconductor datasheet
+ *
+ */
+
+#include "nl_base.h"
+
+namespace netlist
+{
+namespace devices
+{
+
+ NETLIB_OBJECT(CD4029)
+ {
+ NETLIB_CONSTRUCTOR_MODEL(CD4029, "CD4XXX")
+ , m_PE(*this, "PE", NETLIB_DELEGATE(inputs))
+ , m_J(*this, {"J1", "J2", "J3", "J4"}, NETLIB_DELEGATE(inputs))
+ , m_CI(*this, "CI", NETLIB_DELEGATE(inputs))
+ , m_UD(*this, "UD", NETLIB_DELEGATE(inputs))
+ , m_BD(*this, "BD", NETLIB_DELEGATE(inputs))
+ , m_CLK(*this, "CLK", NETLIB_DELEGATE(clk))
+ , m_clk_old(*this, "m_clk_old", false)
+ , m_Q(*this, {"Q1", "Q2", "Q3", "Q4"})
+ , m_CO(*this, "CO", false)
+ , m_cnt(*this, "m_cnt", 0)
+ , m_power_pins(*this)
+ {
+ }
+
+ private:
+ NETLIB_HANDLERI(inputs) // pe causes an asynchronous counter load on level so has to be handled separately; if pe is high, then J changing will asynchronously change the Q state. changing J in this state does affect CO as well; CI will affect CO asynchronously if there is currently a carry
+ {
+ if (m_PE())
+ {
+ m_cnt = m_J()&0xf;
+ }
+ m_Q.push(m_cnt, NLTIME_FROM_NS(200));
+ // figure out CO
+ if (!m_UD()) // downward is the same for binary and decimal
+ {
+ m_CO.push(m_cnt||m_CI(),NLTIME_FROM_NS(320));
+ }
+ else // upward mode differs
+ {
+ if (!m_BD()) // decimal mode
+ {
+ m_CO.push((m_cnt<8)||(~m_cnt&1)||m_CI(),NLTIME_FROM_NS(320));
+ }
+ else // binary mode
+ {
+ m_CO.push((m_cnt!=0xf)||m_CI(),NLTIME_FROM_NS(320));
+ }
+ }
+ }
+
+ NETLIB_HANDLERI(clk)
+ {
+ // clocking only happens if m_clk_old was low, m_CLK is high, m_PE is NOT high, and m_CI is NOT high.
+ if (!m_PE() && !m_CI() && !m_clk_old && m_CLK())
+ {
+ if (m_BD()) // binary
+ {
+ m_cnt += (m_UD() ? 1 : -1);
+ m_cnt &= 0xf;
+ }
+ else // decimal
+ {
+ if (m_UD()) // upward
+ {
+ switch(m_cnt)
+ {
+ case 0: case 1: case 2: case 3:
+ case 4: case 5: case 6: case 7:
+ case 8: case 0xa: case 0xc: case 0xe:
+ m_cnt++;
+ break;
+ case 9:
+ m_cnt = 0;
+ break;
+ case 0xb:
+ m_cnt = 6;
+ break;
+ case 0xd:
+ m_cnt = 4;
+ break;
+ case 0xf:
+ m_cnt = 2;
+ break;
+ }
+ }
+ else // downward
+ {
+ if (m_cnt>0)
+ {
+ m_cnt--;
+ }
+ else // m_cnt == 0
+ {
+ m_cnt = 9;
+ }
+ }
+ }
+ }
+ m_clk_old = m_CLK();
+ m_Q.push(m_cnt, NLTIME_FROM_NS(200));
+ // figure out CO
+ if (!m_UD()) // downward is the same for binary and decimal
+ {
+ m_CO.push(m_cnt||m_CI(),NLTIME_FROM_NS(320));
+ }
+ else // upward mode differs
+ {
+ if (!m_BD()) // decimal mode
+ {
+ m_CO.push((m_cnt<8)||(~m_cnt&1)||m_CI(),NLTIME_FROM_NS(320));
+ }
+ else // binary mode
+ {
+ m_CO.push((m_cnt!=0xf)||m_CI(),NLTIME_FROM_NS(320));
+ }
+ }
+ }
+
+ NETLIB_RESETI()
+ {
+ m_cnt = 0;
+ m_clk_old = false;
+ }
+
+ logic_input_t m_PE;
+ object_array_t<logic_input_t, 4> m_J;
+ logic_input_t m_CI;
+ logic_input_t m_UD;
+ logic_input_t m_BD;
+ logic_input_t m_CLK;
+
+ state_var<netlist_sig_t> m_clk_old;
+ object_array_t<logic_output_t, 4> m_Q;
+ logic_output_t m_CO;
+ state_var_u8 m_cnt;
+ nld_power_pins m_power_pins;
+ };
+
+ NETLIB_DEVICE_IMPL(CD4029, "CD4029", "+PE,+J1,+J2,+J3,+J4,+CI,+UD,+BD,+CLK,@VCC,@GND")
+
+} // namespace devices
+} // namespace netlist
diff --git a/src/lib/netlist/devices/nld_4042.cpp b/src/lib/netlist/devices/nld_4042.cpp
new file mode 100644
index 00000000000..a000d2e8af8
--- /dev/null
+++ b/src/lib/netlist/devices/nld_4042.cpp
@@ -0,0 +1,120 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud, Jonathan Gevaryahu
+/*
+ * nld_4042.cpp
+ *
+ * CD4042BM/CD4042BC Quad Clocked D Latch
+ *
+ * +--------------+
+ * Q4 |1 ++ 16| VDD
+ * Q1 |2 15| Q4Q
+ * Q1Q |3 14| D4
+ * D1 |4 4042 13| D3
+ * CLK |5 12| Q3Q
+ * POL |6 11| Q3
+ * D2 |7 10| Q2
+ * VSS |8 9| Q2Q
+ * +--------------+
+ *
+ *
+ * Function table
+ * +-----+-----+----++----+-----+
+ * | POL | CLK | Dx || Qx | QQx |
+ * +=====+=====+====++====+=====+
+ * | 0 | 0 | X || Qx | /Qx |
+ * | 0 | 1 | D || D | /D |
+ * | 1 | 1 | X || Qx | /Qx |
+ * | 1 | 0 | D || D | /D |
+ * +-----+-----+----++----+-----+
+ * Note that since this is a level triggered transparent latch,
+ * as long as POL ^ CLK == true, the latch is transparent, and
+ * if D changes Q and QQ(/Q) will instantly change.
+ *
+ * Naming conventions follow National Semiconductor datasheet
+ *
+ * National Semiconductor Datasheet: http://pdf.datasheetcatalog.com/datasheet/nationalsemiconductor/DS005966.PDF
+ * TI Datasheet: https://www.ti.com/lit/ds/symlink/cd4042b.pdf
+ */
+
+#include "nl_base.h"
+
+namespace netlist
+{
+namespace devices
+{
+
+
+ NETLIB_OBJECT(CD4042)
+ {
+ NETLIB_CONSTRUCTOR_MODEL(CD4042, "CD4XXX")
+ , m_D(*this, {"D1", "D2", "D3", "D4"}, NETLIB_DELEGATE(inputs))
+ , m_POL(*this, "POL", NETLIB_DELEGATE(clk))
+ , m_CLK(*this, "CLK", NETLIB_DELEGATE(clk))
+ , m_Q(*this, {"Q1", "Q2", "Q3", "Q4"})
+ , m_QQ(*this, {"Q1Q", "Q2Q", "Q3Q", "Q4Q"})
+ , m_latch(*this, "m_latch", 0)
+ , m_tpdq(*this, "m_tpd", netlist_time::from_nsec(175))
+ , m_tpdqq(*this, "m_tpd", netlist_time::from_nsec(150))
+ , m_tpcq(*this, "m_tpc", netlist_time::from_nsec(250))
+ , m_tpcqq(*this, "m_tpc", netlist_time::from_nsec(250))
+ , m_power_pins(*this, NETLIB_DELEGATE(vdd_vss))
+ {
+ }
+
+ private:
+ NETLIB_HANDLERI(clk)
+ {
+ if (m_POL() ^ m_CLK()) // are we in transparent mode? if so latch the data and push it.
+ {
+ m_latch = m_D()&0xf;
+ m_Q.push(m_latch&0xf, m_tpcq);
+ m_QQ.push((~m_latch)&0xf, m_tpcqq);
+ }
+ // if not, the data inputs are ignored and just do nothing
+ }
+
+ NETLIB_HANDLERI(inputs)
+ {
+ if ((m_POL() ^ m_CLK())&&(m_latch != (m_D()&0xf))) // are we in transparent mode? if so latch the data and push it. only do this if the data actually changed
+ {
+ m_latch = m_D()&0xf;
+ m_Q.push(m_latch&0xf, m_tpdq);
+ m_QQ.push((~m_latch)&0xf, m_tpdqq);
+ }
+ }
+
+ NETLIB_HANDLERI(vdd_vss)
+ {
+ auto d = m_power_pins.VCC()() - m_power_pins.GND()();
+ if (d > 0.1) // avoid unrealistic values
+ {
+ m_tpdq = netlist_time::from_nsec(gsl::narrow_cast<unsigned>(894.0 / d - 6.0));
+ m_tpdqq = netlist_time::from_nsec(gsl::narrow_cast<unsigned>(750.0 / d + 0.0));
+ m_tpcq = netlist_time::from_nsec(gsl::narrow_cast<unsigned>(1327.0 / d - 18.8));
+ m_tpcqq = netlist_time::from_nsec(gsl::narrow_cast<unsigned>(1234.5 / d + 0.8));
+ }
+ }
+
+ NETLIB_RESETI()
+ {
+ m_latch = 0;
+ }
+
+ object_array_t<logic_input_t, 4> m_D;
+ logic_input_t m_POL;
+ logic_input_t m_CLK;
+
+ object_array_t<logic_output_t, 4> m_Q;
+ object_array_t<logic_output_t, 4> m_QQ;
+ state_var_u8 m_latch;
+ state_var<netlist_time> m_tpdq; // propagation time for data alone when in transparent mode, Q
+ state_var<netlist_time> m_tpdqq; // propagation time for data alone when in transparent mode, /Q
+ state_var<netlist_time> m_tpcq; // propagation time for data vs CLK, Q
+ state_var<netlist_time> m_tpcqq; // propagation time for data vs CLK, /Q
+ nld_power_pins m_power_pins;
+ };
+
+ NETLIB_DEVICE_IMPL(CD4042, "CD4042", "+D1,+D2,+D3,+D4,+POL,+CLK,@VCC,@GND")
+
+} // namespace devices
+} // namespace netlist
diff --git a/src/lib/netlist/devices/nld_4076.cpp b/src/lib/netlist/devices/nld_4076.cpp
new file mode 100644
index 00000000000..a69d02e2d54
--- /dev/null
+++ b/src/lib/netlist/devices/nld_4076.cpp
@@ -0,0 +1,132 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud, Jonathan Gevaryahu
+/*
+ * nld_4076.cpp
+ *
+ * CD4076BM/CD4076BC TRI-STATE(R) Quad D Flip-Flop
+ *
+ * +--------------+
+ * OD1 |1 ++ 16| VDD
+ * OD2 |2 15| CLR
+ * OA |3 14| IA
+ * OB |4 4076 13| IB
+ * OC |5 12| IC
+ * OD |6 11| ID
+ * CLK |7 10| ID2
+ * VSS |8 9| ID1
+ * +--------------+
+ *
+ *
+ * Function table for ID1/2 pins
+ * +-----+-----+-----+----+-----++-----+
+ * | ID1 | ID2 | CLR | Ix | CLK || iOx |
+ * +=====+=====+=====+====+=====++=====+
+ * | X | X | 0 | X | 0 || iOx |
+ * | X | X | 0 | X | 1 || iOx |
+ * | 1 | X | 0 | X | 0>1 || iOx |
+ * | X | 1 | 0 | X | 0>1 || iOx |
+ * | 0 | 0 | 0 | 0 | 0>1 || 0 |
+ * | 0 | 0 | 0 | 1 | 0>1 || 1 |
+ * | X | X | 1 | X | X || 0 |
+ * +-----+-----+-----+----+-----++-----+
+ * Note: iOX is an internal signal, the output of each D-latch
+ *
+ * Function table for OD1/2 pins vs output of the internal D-latches
+ * +-----+-----+-----++-----+
+ * | OD1 | OD2 | iOx || Ox |
+ * +=====+=====+=====++=====+
+ * | 1 | X | X || Z |
+ * | X | 1 | X || Z |
+ * | 0 | 0 | 0 || 0 |
+ * | 0 | 0 | 1 || 1 |
+ * +-----+-----+-----++-----+
+ *
+ * Naming conventions follow National Semiconductor datasheet
+ * http://www.bitsavers.org/components/national/_dataBooks/1981_Natonal_CMOS_Databook.pdf 5-186 (pdf page 567)
+ *
+ * TODO: the 74C173 is 100% identical to this CMOS part.
+ */
+
+#include "nl_base.h"
+
+namespace netlist
+{
+namespace devices
+{
+
+
+ NETLIB_OBJECT(CD4076)
+ {
+ NETLIB_CONSTRUCTOR_MODEL(CD4076, "CD4XXX")
+ , m_I(*this, {"IA", "IB", "IC", "ID"}, NETLIB_DELEGATE(id)) // if the d-pins change absolutely nothing happens, as they are clock-latched.
+ , m_ID1(*this, "ID1", NETLIB_DELEGATE(id))
+ , m_ID2(*this, "ID2", NETLIB_DELEGATE(id))
+ , m_enable_in(*this, "m_enable_in", true)
+ , m_CLK(*this, "CLK", NETLIB_DELEGATE(clk))
+ , m_clk_old(*this, "m_clk_old", 0)
+ , m_OD1(*this, "OD1", NETLIB_DELEGATE(od)) // if the OD pins change nothing about the internal state changes directly, but the outputs can change from driven to tri-state or vice-versa
+ , m_OD2(*this, "OD2", NETLIB_DELEGATE(od)) // ""
+ , m_enable_out(*this, "m_enable_out", true)
+ , m_O(*this, {"OA", "OB", "OC", "OD"})
+ , m_latch(*this, "m_latch", 0)
+ , m_power_pins(*this)
+ {
+ }
+
+ private:
+ NETLIB_HANDLERI(id)
+ {
+ m_enable_in = (!(m_ID1() || m_ID2()));
+ }
+
+ NETLIB_HANDLERI(clk)
+ {
+ if ((!m_clk_old) && m_CLK() && m_enable_in) // clock rising edge and input is enabled; otherwise the latch just re-latches its own value
+ {
+ m_latch = m_I()&0xf;
+ }
+ m_clk_old = m_CLK();
+ // update the pin output state
+ for (std::size_t i=0; i<4; i++)
+ {
+ m_O.set_tristate(m_enable_out, NLTIME_FROM_NS(170), NLTIME_FROM_NS(170));
+ m_O[i].push((m_latch >> i) & 1, NLTIME_FROM_NS(220));
+ }
+ }
+
+ NETLIB_HANDLERI(od)
+ {
+ m_enable_out = (!(m_OD1() || m_OD2()));
+ // update the pin output state
+ for (std::size_t i=0; i<4; i++)
+ {
+ m_O.set_tristate(m_enable_out, NLTIME_FROM_NS(170), NLTIME_FROM_NS(170));
+ m_O[i].push((m_latch >> i) & 1, NLTIME_FROM_NS(220));
+ }
+ }
+
+ NETLIB_RESETI()
+ {
+ m_latch = 0;
+ m_enable_in = true;
+ m_enable_out = true;
+ }
+
+ object_array_t<logic_input_t, 4> m_I;
+ logic_input_t m_ID1;
+ logic_input_t m_ID2;
+ state_var<bool> m_enable_in;
+ logic_input_t m_CLK;
+ state_var<netlist_sig_t> m_clk_old;
+ logic_input_t m_OD1;
+ logic_input_t m_OD2;
+ state_var<bool> m_enable_out;
+ object_array_t<logic_output_t, 4> m_O;
+ state_var_u8 m_latch;
+ nld_power_pins m_power_pins;
+ };
+
+ NETLIB_DEVICE_IMPL(CD4076, "CD4076", "+I1,+I2,+I3,+I4,+ID1,+ID2,+OD1,+OD2,@VCC,@GND")
+
+} // namespace devices
+} // namespace netlist
diff --git a/src/lib/netlist/devices/nld_7448.cpp b/src/lib/netlist/devices/nld_7448.cpp
index 992caf9d814..f4acbc432bd 100644
--- a/src/lib/netlist/devices/nld_7448.cpp
+++ b/src/lib/netlist/devices/nld_7448.cpp
@@ -54,7 +54,7 @@ namespace netlist
private:
void update_outputs(unsigned v) noexcept
{
- nl_assert(v<16);
+ gsl_Expects(v<16);
if (v != m_state)
{
// max transfer time is 100 NS */
diff --git a/src/lib/netlist/devices/nld_7493.cpp b/src/lib/netlist/devices/nld_7493.cpp
index c52418f8d2e..54d44dc1fea 100644
--- a/src/lib/netlist/devices/nld_7493.cpp
+++ b/src/lib/netlist/devices/nld_7493.cpp
@@ -62,22 +62,19 @@ namespace netlist
namespace devices
{
- static constexpr const netlist_time out_delay = NLTIME_FROM_NS(18);
- static constexpr const netlist_time out_delay2 = NLTIME_FROM_NS(36);
- static constexpr const netlist_time out_delay3 = NLTIME_FROM_NS(54);
+ static constexpr std::array<netlist_time, 3> out_delay { NLTIME_FROM_NS(18), NLTIME_FROM_NS(36), NLTIME_FROM_NS(54) };
NETLIB_OBJECT(7493)
{
NETLIB_CONSTRUCTOR(7493)
- , m_R1(*this, "R1", NETLIB_DELEGATE(inputs))
- , m_R2(*this, "R2", NETLIB_DELEGATE(inputs))
- , m_a(*this, "_m_a", 0)
- , m_bcd(*this, "_m_b", 0)
- , m_r(*this, "_m_r", 0)
, m_CLKA(*this, "CLKA", NETLIB_DELEGATE(updA))
, m_CLKB(*this, "CLKB", NETLIB_DELEGATE(updB))
, m_QA(*this, "QA")
, m_QB(*this, {"QB", "QC", "QD"})
+ , m_a(*this, "m_a", 0)
+ , m_bcd(*this, "m_b", 0)
+ , m_R1(*this, "R1", NETLIB_DELEGATE(inputs))
+ , m_R2(*this, "R2", NETLIB_DELEGATE(inputs))
, m_power_pins(*this)
{
}
@@ -110,30 +107,27 @@ namespace netlist
NETLIB_HANDLERI(updA)
{
m_a ^= 1;
- m_QA.push(m_a, out_delay);
+ m_QA.push(m_a, out_delay[0]);
}
NETLIB_HANDLERI(updB)
{
const auto cnt(++m_bcd &= 0x07);
-
- m_QB[2].push((cnt >> 2) & 1, out_delay3);
- m_QB[1].push((cnt >> 1) & 1, out_delay2);
- m_QB[0].push(cnt & 1, out_delay);
+ m_QB.push(cnt, out_delay);
}
- logic_input_t m_R1;
- logic_input_t m_R2;
-
- state_var_sig m_a;
- state_var_sig m_bcd;
- state_var_sig m_r;
-
logic_input_t m_CLKA;
logic_input_t m_CLKB;
logic_output_t m_QA;
object_array_t<logic_output_t, 3> m_QB;
+
+ state_var<unsigned> m_a;
+ state_var<unsigned> m_bcd;
+
+ logic_input_t m_R1;
+ logic_input_t m_R2;
+
nld_power_pins m_power_pins;
};
diff --git a/src/lib/netlist/devices/nld_82S115.cpp b/src/lib/netlist/devices/nld_82s115.cpp
index f1e49bd9f83..f1e49bd9f83 100644..100755
--- a/src/lib/netlist/devices/nld_82S115.cpp
+++ b/src/lib/netlist/devices/nld_82s115.cpp
diff --git a/src/lib/netlist/devices/nld_82S16.cpp b/src/lib/netlist/devices/nld_82s16.cpp
index 2fc92adfe30..2fc92adfe30 100644..100755
--- a/src/lib/netlist/devices/nld_82S16.cpp
+++ b/src/lib/netlist/devices/nld_82s16.cpp
diff --git a/src/lib/netlist/devices/nld_9316_base.hxx b/src/lib/netlist/devices/nld_9316_base.hxx
index 3e8e977cb87..e0659493cf1 100644
--- a/src/lib/netlist/devices/nld_9316_base.hxx
+++ b/src/lib/netlist/devices/nld_9316_base.hxx
@@ -14,10 +14,10 @@ namespace netlist
{
template <unsigned N>
- static constexpr unsigned rollover(unsigned v) { return v <= N ? v : 0; }
+ static constexpr unsigned rollover(unsigned v) noexcept { return v <= N ? v : 0; }
template <>
- constexpr unsigned rollover<15>(unsigned v) { return v & 15; }
+ constexpr unsigned rollover<15>(unsigned v) noexcept { return v & 15; }
template <typename D>
NETLIB_OBJECT(9316_base)
@@ -25,11 +25,11 @@ namespace netlist
NETLIB_CONSTRUCTOR(9316_base)
, m_CLK(*this, "CLK", NETLIB_DELEGATE(clk))
, m_ENT(*this, "ENT", NETLIB_DELEGATE(other))
- , m_RC(*this, "RC")
, m_LOADQ(*this, "LOADQ", NETLIB_DELEGATE(other))
, m_ENP(*this, "ENP", NETLIB_DELEGATE(other))
, m_CLRQ(*this, "CLRQ", NETLIB_DELEGATE(other))
, m_ABCD(*this, {"A", "B", "C", "D"}, NETLIB_DELEGATE(abcd))
+ , m_RC(*this, "RC")
, m_Q(*this, { "QA", "QB", "QC", "QD" })
, m_cnt(*this, "m_cnt", 0)
, m_abcd(*this, "m_abcd", 0)
@@ -73,15 +73,15 @@ namespace netlist
{
if (!D::ASYNC::value && !m_CLRQ())
{
+ m_Q.push(0, D::tCLR::value(0));
m_cnt = 0;
- m_Q.push(m_cnt, D::tCLR::value(0));
}
else
{
- const auto cnt = (m_loadq ? rollover<D::MAXCNT::value>(m_cnt + 1) : m_abcd);
+ const unsigned cnt(m_loadq ? rollover<D::MAXCNT::value>(m_cnt + 1) : m_abcd);
m_RC.push(m_ent && (cnt == D::MAXCNT::value), D::tRC::value(0));
m_Q.push(cnt, D::tLDCNT::value(0));
- m_cnt = static_cast<unsigned>(cnt);
+ m_cnt = cnt;
}
}
@@ -93,22 +93,22 @@ namespace netlist
logic_input_t m_CLK;
logic_input_t m_ENT;
- logic_output_t m_RC;
-
logic_input_t m_LOADQ;
logic_input_t m_ENP;
logic_input_t m_CLRQ;
object_array_t<logic_input_t, 4> m_ABCD;
+
+ logic_output_t m_RC;
object_array_t<logic_output_t, 4> m_Q;
/* counter state */
state_var<unsigned> m_cnt;
/* cached pins */
state_var<unsigned> m_abcd;
- state_var_sig m_loadq;
- state_var_sig m_ent;
+ state_var<unsigned> m_loadq;
+ state_var<unsigned> m_ent;
nld_power_pins m_power_pins;
};
diff --git a/src/lib/netlist/devices/nld_9321.cpp b/src/lib/netlist/devices/nld_9321.cpp
index 5adffc3a313..29d63b2b3fc 100644
--- a/src/lib/netlist/devices/nld_9321.cpp
+++ b/src/lib/netlist/devices/nld_9321.cpp
@@ -50,7 +50,7 @@ namespace netlist
NETLIB_HANDLERI(e)
{
- m_enable = m_E() ? 0 : 1;
+ m_enable = m_E() ? false : true;
m_o = (m_A[1]() << 1) | m_A[0]();
for (std::size_t i=0; i<4; i++)
m_D[i].push((i == m_o && m_enable) ? 0 : 1, NLTIME_FROM_NS(18));
diff --git a/src/lib/netlist/devices/nld_log.cpp b/src/lib/netlist/devices/nld_log.cpp
index 75a22ddca32..c2a6523f64a 100644
--- a/src/lib/netlist/devices/nld_log.cpp
+++ b/src/lib/netlist/devices/nld_log.cpp
@@ -116,8 +116,8 @@ namespace netlist
netlist_time_ext t;
nl_fptype v;
};
- static const std::size_t BUF_SIZE=16384;
- static const std::size_t BUFFERS=4;
+ static constexpr std::size_t BUF_SIZE=16384;
+ static constexpr std::size_t BUFFERS=4;
analog_input_t m_I;
plib::ofstream m_strm;
plib::putf8_writer m_writer;
diff --git a/src/lib/netlist/devices/nld_roms.cpp b/src/lib/netlist/devices/nld_roms.cpp
index de440b4a8d2..e2e4ba4eb77 100644
--- a/src/lib/netlist/devices/nld_roms.cpp
+++ b/src/lib/netlist/devices/nld_roms.cpp
@@ -41,7 +41,7 @@ namespace netlist
}
private:
- inline NETLIB_HANDLERI(oe1)
+ NETLIB_HANDLERI(oe1)
{
m_enable_lo = m_OE1();
uint8_t o = m_enable_lo ? m_latched_rom : 0;
@@ -52,7 +52,7 @@ namespace netlist
}
}
- inline NETLIB_HANDLERI(oe2)
+ NETLIB_HANDLERI(oe2)
{
m_enable_hi = m_OE2();
uint8_t o = m_enable_hi ? m_latched_rom : 0;
@@ -63,7 +63,7 @@ namespace netlist
}
}
- inline NETLIB_HANDLERI(addr)
+ NETLIB_HANDLERI(addr)
{
if (!m_ARQ())
{
@@ -96,6 +96,72 @@ namespace netlist
nld_power_pins m_power_pins;
};
+ NETLIB_OBJECT(mcm14524_rom)
+ {
+ NETLIB_CONSTRUCTOR_MODEL(mcm14524_rom, "CD4XXX")
+ , m_enabled(*this, "m_enabled", true)
+ , m_latched_rom(*this, "m_latched_rom", 0)
+ , m_A(*this, 1, "A{}", NETLIB_DELEGATE(addr))
+ , m_CLK(*this, "CLK", NETLIB_DELEGATE(addr))
+ , m_clk_old(*this, "m_clk_old", true)
+ , m_EN(*this, "EN", NETLIB_DELEGATE(en))
+ , m_B(*this, 1, "B{}", 0)
+ , m_ROM(*this, "ROM")
+ , m_taccc(*this, "m_taccc", netlist_time::from_nsec(1350))
+ , m_taccen(*this, "m_taccen", netlist_time::from_nsec(245))
+ , m_power_pins(*this, NETLIB_DELEGATE(vdd_vss))
+ {
+ }
+
+ private:
+ NETLIB_HANDLERI(en)
+ {
+ m_enabled = m_EN();
+ uint8_t o = m_enabled ? m_latched_rom : 0; // outputs are forced to 0 by enable going low; this chip does not have tri-state outputs!
+ for (std::size_t i=0; i<4; i++)
+ {
+ m_B[i].push((o >> i) & 1, m_taccen);
+ }
+ }
+
+ NETLIB_HANDLERI(addr)
+ {
+ if (!m_CLK() && m_clk_old) // latch on falling edge
+ {
+ const auto addr = m_A();
+ m_latched_rom = m_ROM[addr];
+ }
+ m_clk_old = m_CLK();
+ uint8_t o = m_enabled ? m_latched_rom : 0; // outputs are forced to 0 by enable going low; this chip does not have tri-state outputs!
+ for (std::size_t i=0; i<4; i++)
+ {
+ m_B[i].push((o >> i) & 1, m_taccc);
+ }
+ }
+
+ NETLIB_HANDLERI(vdd_vss)
+ {
+ auto d = m_power_pins.VCC()() - m_power_pins.GND()();
+ if (d > 0.1) // avoid unrealistic values
+ {
+ m_taccc = netlist_time::from_nsec(gsl::narrow_cast<unsigned>(7615.5 / d - 181));
+ m_taccen = netlist_time::from_nsec(gsl::narrow_cast<unsigned>(1292.5 / d - 14.6));
+ }
+ }
+
+ state_var<bool> m_enabled;
+ state_var<uint8_t> m_latched_rom;
+ object_array_t<logic_input_t, 8> m_A;
+ logic_input_t m_CLK;
+ state_var<bool> m_clk_old;
+ logic_input_t m_EN;
+ object_array_t<tristate_output_t, 4> m_B;
+ param_rom_t<uint8_t, 8, 4> m_ROM;
+ state_var<netlist_time> m_taccc; // propagation time for data vs CLK
+ state_var<netlist_time> m_taccen; // propagation time for data vs /EN
+ nld_power_pins m_power_pins;
+ };
+
template <typename D>
NETLIB_OBJECT(generic_prom)
{
@@ -119,7 +185,7 @@ namespace netlist
private:
template <std::size_t N>
- inline NETLIB_HANDLERI(ce)
+ NETLIB_HANDLERI(ce)
{
using cet = typename D::chip_enable_time;
m_enabled = (m_CEQ() == D::chip_enable_mask::value);
@@ -148,7 +214,6 @@ namespace netlist
}
- inline
NETLIB_HANDLERI(addr)
{
if (m_enabled)
@@ -230,12 +295,14 @@ namespace netlist
using NETLIB_NAME(74S287) = NETLIB_NAME(generic_prom)<desc_74S287>; // 1024 bits, 32x32, used as 256x4
using NETLIB_NAME(2716) = NETLIB_NAME(generic_prom)<desc_2716>; // CE2Q = OE, CE1Q = CE
using NETLIB_NAME(MK28000) = NETLIB_NAME(mk28000_prom); // 16384 bits, either 2048x8 or 4096x4, determined by OE1/OE2 use
+ using NETLIB_NAME(MCM14524) = NETLIB_NAME(mcm14524_rom); // 1024 bits, 256x4, latched address
NETLIB_DEVICE_IMPL(82S126, "PROM_82S126", "+CE1Q,+CE2Q,+A0,+A1,+A2,+A3,+A4,+A5,+A6,+A7,@VCC,@GND")
NETLIB_DEVICE_IMPL(74S287, "PROM_74S287", "+CE1Q,+CE2Q,+A0,+A1,+A2,+A3,+A4,+A5,+A6,+A7,@VCC,@GND")
NETLIB_DEVICE_IMPL(82S123, "PROM_82S123", "+CEQ,+A0,+A1,+A2,+A3,+A4,@VCC,@GND")
NETLIB_DEVICE_IMPL(2716, "EPROM_2716", "+CE2Q,+CE1Q,+A0,+A1,+A2,+A3,+A4,+A5,+A6,+A7,+A8,+A9,+A10,@VCC,@GND")
NETLIB_DEVICE_IMPL(MK28000, "PROM_MK28000", "+OE1,+OE2,+ARQ,+A1,+A2,+A3,+A4,+A5,+A6,+A7,+A8,+A9,+A10,+A11,@VCC,@GND")
+ NETLIB_DEVICE_IMPL(MCM14524, "ROM_MCM14524", "+EN,+CLK,+A0,+A1,+A2,+A3,+A4,+A5,+A6,+A7,@VCC,@GND")
} //namespace devices
} // namespace netlist
diff --git a/src/lib/netlist/devices/nld_system.cpp b/src/lib/netlist/devices/nld_system.cpp
index c3f4cd5d270..36ae9bc6e35 100644
--- a/src/lib/netlist/devices/nld_system.cpp
+++ b/src/lib/netlist/devices/nld_system.cpp
@@ -62,7 +62,7 @@ namespace devices
NETLIB_RESETI()
{
m_cnt = 0;
- m_off = netlist_time::from_fp<decltype(m_offset())>(m_offset());
+ m_off = netlist_time::from_fp<param_fp_t::value_type>(m_offset());
m_feedback.set_delegate(NETLIB_DELEGATE(first));
}
//NETLIB_UPDATE_PARAMI();
diff --git a/src/lib/netlist/devices/nlid_proxy.cpp b/src/lib/netlist/devices/nlid_proxy.cpp
index 51eb0fbf5cd..e8cc27fc987 100644
--- a/src/lib/netlist/devices/nlid_proxy.cpp
+++ b/src/lib/netlist/devices/nlid_proxy.cpp
@@ -21,7 +21,7 @@ namespace netlist
// nld_base_proxy
// -----------------------------------------------------------------------------
- static const std::array<std::pair<const char *, const char *>, 3> power_syms = {{ {"VCC", "VEE"}, {"VCC", "GND"}, {"VDD", "VSS"}}};
+ static constexpr std::array<std::pair<const char *, const char *>, 3> power_syms = {{ {"VCC", "VEE"}, {"VCC", "GND"}, {"VDD", "VSS"}}};
nld_base_proxy::nld_base_proxy(netlist_state_t &anetlist, const pstring &name,
const logic_t *inout_proxied)
@@ -124,19 +124,9 @@ namespace netlist
{
register_subalias("Q", "RN.1");
- log().verbose("D/A Proxy: Found power terminals on device {1}", out_proxied->device().name());
- if (anetlist.is_extended_validation())
- {
- // During validation, don't connect to terminals found
- // This will cause terminals not connected to a rail net to
- // fail connection stage.
- connect(m_RN.N(), m_RP.P());
- }
- else
- {
- connect(m_RN.N(), *m_tn);
- connect(m_RP.P(), *m_tp);
- }
+ connect(m_RN.N(), *m_tn);
+ connect(m_RP.P(), *m_tp);
+
connect(m_RN.P(), m_RP.N());
}
diff --git a/src/lib/netlist/devices/nlid_system.h b/src/lib/netlist/devices/nlid_system.h
index 0e2857a3508..c1c44e764e1 100644
--- a/src/lib/netlist/devices/nlid_system.h
+++ b/src/lib/netlist/devices/nlid_system.h
@@ -196,10 +196,10 @@ namespace devices
/// Consider the following mixing stage
///
/// R1
- /// S1 >-----1RRRR2---------+
+ /// I1 >-----1RRRR2---------+
/// |
/// R2 |
- /// S2 >-----1RRRR2---------+----------> Out
+ /// I2 >-----1RRRR2---------+----------> Out
/// |
/// R
/// R3 R
@@ -207,45 +207,37 @@ namespace devices
/// |
/// GND
///
- /// With OPTIMIZE_FRONTIER(R2.2, R3, R2) this becomes:
+ /// With OPTIMIZE_FRONTIER(R2.1, R2, RX) where RX is the impedance of the
+ /// output connected to I2 this becomes:
///
/// R1
- /// S1 >-----1RRRR2--------------------------------+
+ /// I1 >-----1RRRR2--------------------------------+
/// |
- /// ########################## |
- /// R2 # R2 # |
- /// S2 >-----1RRRR2-----+-->AnIn AnOut>--RRRR------+----------> Out
- /// # | # |
- /// # R # R
- /// # R R3 # R3 R
- /// # R # R
- /// # | # |
- /// # GND Frontier # GND
- /// # #
- /// ##########################
+ /// ########################## |
+ /// # RX # R2 |
+ /// I2 >----->--+-AnIn AnOut>--RRRR--->---1RRRR2---+----------> Out
+ /// # | # |
+ /// # R # R
+ /// # R R2 # R3 R
+ /// # R # R
+ /// # | # |
+ /// # GND Frontier # GND
+ /// # #
+ /// ##########################
///
/// As a result, provided there are no other connections between the parts
/// generating S1 and S2 the "S2 part" will now have a separate solver.
///
- /// The size (aka number of nets) of the solver for S1 will be smaller.
- /// The size of the solver for S2 and the rest of the circuit will be smaller
+ /// The size (aka number of nets) of the solver for I1 will be smaller.
+ /// The size of the solver for I2 and the rest of the circuit will be smaller
/// as well.
///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
NETLIB_OBJECT(frontier)
{
NETLIB_CONSTRUCTOR(frontier)
- , m_RIN(*this, "m_RIN", NETLIB_DELEGATE(input))
- , m_ROUT(*this, "m_ROUT", NETLIB_DELEGATE(input))
+ , m_RIN(*this, "m_RIN", NETLIB_DELEGATE(input)) // FIXME: does not look right
+ , m_ROUT(*this, "m_ROUT", NETLIB_DELEGATE(input)) // FIXME: does not look right
, m_I(*this, "_I", NETLIB_DELEGATE(input))
, m_Q(*this, "_Q")
, m_p_RIN(*this, "RIN", nlconst::magic(1.0e6))
@@ -264,6 +256,7 @@ namespace devices
private:
NETLIB_RESETI()
{
+ //printf("%s: in %f out %f\n", name().c_str(), m_p_RIN(), m_p_ROUT());
m_RIN.set_G_V_I(plib::reciprocal(m_p_RIN()),0,0);
m_ROUT.set_G_V_I(plib::reciprocal(m_p_ROUT()),0,0);
}
@@ -566,7 +559,7 @@ namespace devices
private:
NETLIB_HANDLERI(input)
{
- nl_fptype val = m_dis.var()(m_mt.var());
+ nl_fptype val = m_dis()(m_mt());
m_T.change_state([this, val]()
{
m_T.set_G_V_I(plib::reciprocal(m_RI()), val, nlconst::zero());
diff --git a/src/lib/netlist/devices/nlid_truthtable.cpp b/src/lib/netlist/devices/nlid_truthtable.cpp
index 8b5e3a937c2..db2471a704e 100644
--- a/src/lib/netlist/devices/nlid_truthtable.cpp
+++ b/src/lib/netlist/devices/nlid_truthtable.cpp
@@ -52,6 +52,8 @@ namespace devices
/* FIXME: the family should provide the names of the power-terminals! */
, m_power_pins(*this)
{
+ m_activate = activate_delegate(& NETLIB_NAME(truthtable_t) :: incdec_active, this);
+ set_hint_deactivate(true);
init(desc);
}
@@ -73,7 +75,7 @@ namespace devices
#endif
}
for (auto &q : m_Q)
- if (q.has_net() && q.net().has_connections())
+ if (q.has_net() && !exec().nlstate().core_terms(q.net()).empty())
active_outputs++;
set_active_outputs(active_outputs);
}
@@ -100,16 +102,18 @@ namespace devices
}
#endif
- void inc_active() noexcept override
+ void incdec_active(bool a) noexcept
{
- process<false>();
- }
-
- void dec_active() noexcept override
- {
- for (std::size_t i = 0; i< m_NI; i++)
- m_I[i].inactivate();
- m_ign = (1<<m_NI)-1;
+ if (a)
+ {
+ process<false>();
+ }
+ else
+ {
+ for (std::size_t i = 0; i< m_NI; i++)
+ m_I[i].inactivate();
+ m_ign = (1<<m_NI)-1;
+ }
}
template<bool doOUT>
@@ -371,8 +375,6 @@ namespace devices
template<std::size_t m_NI, std::size_t m_NO>
void NETLIB_NAME(truthtable_t)<m_NI, m_NO>::init(const std::vector<pstring> &desc)
{
- set_hint_deactivate(true);
-
pstring header = desc[0];
std::vector<pstring> io(plib::psplit(header,'|'));
diff --git a/src/lib/netlist/examples/2N6027.cpp b/src/lib/netlist/examples/2n6027.cpp
index bfad3c065ec..bfad3c065ec 100644
--- a/src/lib/netlist/examples/2N6027.cpp
+++ b/src/lib/netlist/examples/2n6027.cpp
diff --git a/src/lib/netlist/examples/LM3900_test.cpp b/src/lib/netlist/examples/lm3900_test.cpp
index a48a2cd8a78..a48a2cd8a78 100644
--- a/src/lib/netlist/examples/LM3900_test.cpp
+++ b/src/lib/netlist/examples/lm3900_test.cpp
diff --git a/src/lib/netlist/generated/lib_entries.hxx b/src/lib/netlist/generated/lib_entries.hxx
index da6ad55a0a3..debc626fd47 100755
--- a/src/lib/netlist/generated/lib_entries.hxx
+++ b/src/lib/netlist/generated/lib_entries.hxx
@@ -60,14 +60,18 @@ LIB_ENTRY(CD4017)
LIB_ENTRY(CD4020)
LIB_ENTRY(CD4022)
LIB_ENTRY(CD4024)
+LIB_ENTRY(CD4029)
+LIB_ENTRY(CD4042)
LIB_ENTRY(CD4053_GATE)
LIB_ENTRY(CD4066_GATE)
+LIB_ENTRY(CD4076)
LIB_ENTRY(CD4316_GATE)
LIB_ENTRY(CS)
LIB_ENTRY(D)
LIB_ENTRY(L)
LIB_ENTRY(LVCCS)
LIB_ENTRY(MC1455P)
+LIB_ENTRY(MCM14524)
LIB_ENTRY(MK28000)
LIB_ENTRY(MM5837)
LIB_ENTRY(MOSFET)
diff --git a/src/lib/netlist/generated/nld_devinc.h b/src/lib/netlist/generated/nld_devinc.h
index f5b14563db8..53a496be2d8 100755
--- a/src/lib/netlist/generated/nld_devinc.h
+++ b/src/lib/netlist/generated/nld_devinc.h
@@ -103,7 +103,7 @@
NET_REGISTER_DEVEXT(CS, __VA_ARGS__)
// ---------------------------------------------------------------------
-// Source: ../devices/nld_2102A.cpp
+// Source: ../devices/nld_2102a.cpp
// ---------------------------------------------------------------------
// usage : RAM_2102A(name, CEQ, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, RWQ, DI)
@@ -154,6 +154,24 @@
NET_REGISTER_DEVEXT(CD4024, __VA_ARGS__)
// ---------------------------------------------------------------------
+// Source: ../devices/nld_4029.cpp
+// ---------------------------------------------------------------------
+
+// usage : CD4029(name, PE, J1, J2, J3, J4, CI, UD, BD, CLK)
+// auto connect: VCC, GND
+#define CD4029(...) \
+ NET_REGISTER_DEVEXT(CD4029, __VA_ARGS__)
+
+// ---------------------------------------------------------------------
+// Source: ../devices/nld_4042.cpp
+// ---------------------------------------------------------------------
+
+// usage : CD4042(name, D1, D2, D3, D4, POL, CLK)
+// auto connect: VCC, GND
+#define CD4042(...) \
+ NET_REGISTER_DEVEXT(CD4042, __VA_ARGS__)
+
+// ---------------------------------------------------------------------
// Source: ../devices/nld_4053.cpp
// ---------------------------------------------------------------------
@@ -170,6 +188,15 @@
NET_REGISTER_DEVEXT(CD4066_GATE, __VA_ARGS__)
// ---------------------------------------------------------------------
+// Source: ../devices/nld_4076.cpp
+// ---------------------------------------------------------------------
+
+// usage : CD4076(name, I1, I2, I3, I4, ID1, ID2, OD1, OD2)
+// auto connect: VCC, GND
+#define CD4076(...) \
+ NET_REGISTER_DEVEXT(CD4076, __VA_ARGS__)
+
+// ---------------------------------------------------------------------
// Source: ../devices/nld_4316.cpp
// ---------------------------------------------------------------------
@@ -493,7 +520,7 @@
NET_REGISTER_DEVEXT(TTL_8277, __VA_ARGS__)
// ---------------------------------------------------------------------
-// Source: ../devices/nld_82S115.cpp
+// Source: ../devices/nld_82s115.cpp
// ---------------------------------------------------------------------
// usage : PROM_82S115(name, CE1Q, CE2, A0, A1, A2, A3, A4, A5, A6, A7, A8, STROBE)
@@ -502,7 +529,7 @@
NET_REGISTER_DEVEXT(PROM_82S115, __VA_ARGS__)
// ---------------------------------------------------------------------
-// Source: ../devices/nld_82S16.cpp
+// Source: ../devices/nld_82s16.cpp
// ---------------------------------------------------------------------
// usage : TTL_82S16(name, )
@@ -652,6 +679,11 @@
#define PROM_MK28000(...) \
NET_REGISTER_DEVEXT(PROM_MK28000, __VA_ARGS__)
+// usage : ROM_MCM14524(name, EN, CLK, A0, A1, A2, A3, A4, A5, A6, A7)
+// auto connect: VCC, GND
+#define ROM_MCM14524(...) \
+ NET_REGISTER_DEVEXT(ROM_MCM14524, __VA_ARGS__)
+
// ---------------------------------------------------------------------
// Source: ../devices/nld_schmitt.cpp
// ---------------------------------------------------------------------
@@ -769,6 +801,14 @@
#define CD4011_GATE(...) \
NET_REGISTER_DEVEXT(CD4011_GATE, __VA_ARGS__)
+// usage : CD4030_GATE(name, )
+#define CD4030_GATE(...) \
+ NET_REGISTER_DEVEXT(CD4030_GATE, __VA_ARGS__)
+
+// usage : CD4049_GATE(name, )
+#define CD4049_GATE(...) \
+ NET_REGISTER_DEVEXT(CD4049_GATE, __VA_ARGS__)
+
// usage : CD4069_GATE(name, )
#define CD4069_GATE(...) \
NET_REGISTER_DEVEXT(CD4069_GATE, __VA_ARGS__)
@@ -777,6 +817,14 @@
#define CD4070_GATE(...) \
NET_REGISTER_DEVEXT(CD4070_GATE, __VA_ARGS__)
+// usage : CD4071_GATE(name, )
+#define CD4071_GATE(...) \
+ NET_REGISTER_DEVEXT(CD4071_GATE, __VA_ARGS__)
+
+// usage : CD4081_GATE(name, )
+#define CD4081_GATE(...) \
+ NET_REGISTER_DEVEXT(CD4081_GATE, __VA_ARGS__)
+
// usage : CD4001_DIP(name, )
#define CD4001_DIP(...) \
NET_REGISTER_DEVEXT(CD4001_DIP, __VA_ARGS__)
@@ -785,6 +833,14 @@
#define CD4011_DIP(...) \
NET_REGISTER_DEVEXT(CD4011_DIP, __VA_ARGS__)
+// usage : CD4030_DIP(name, )
+#define CD4030_DIP(...) \
+ NET_REGISTER_DEVEXT(CD4030_DIP, __VA_ARGS__)
+
+// usage : CD4049_DIP(name, )
+#define CD4049_DIP(...) \
+ NET_REGISTER_DEVEXT(CD4049_DIP, __VA_ARGS__)
+
// usage : CD4069_DIP(name, )
#define CD4069_DIP(...) \
NET_REGISTER_DEVEXT(CD4069_DIP, __VA_ARGS__)
@@ -793,6 +849,14 @@
#define CD4070_DIP(...) \
NET_REGISTER_DEVEXT(CD4070_DIP, __VA_ARGS__)
+// usage : CD4071_DIP(name, )
+#define CD4071_DIP(...) \
+ NET_REGISTER_DEVEXT(CD4071_DIP, __VA_ARGS__)
+
+// usage : CD4081_DIP(name, )
+#define CD4081_DIP(...) \
+ NET_REGISTER_DEVEXT(CD4081_DIP, __VA_ARGS__)
+
// usage : CD4006_DIP(name, )
#define CD4006_DIP(...) \
NET_REGISTER_DEVEXT(CD4006_DIP, __VA_ARGS__)
@@ -817,6 +881,14 @@
#define CD4024_DIP(...) \
NET_REGISTER_DEVEXT(CD4024_DIP, __VA_ARGS__)
+// usage : CD4029_DIP(name, )
+#define CD4029_DIP(...) \
+ NET_REGISTER_DEVEXT(CD4029_DIP, __VA_ARGS__)
+
+// usage : CD4042_DIP(name, )
+#define CD4042_DIP(...) \
+ NET_REGISTER_DEVEXT(CD4042_DIP, __VA_ARGS__)
+
// usage : CD4053_DIP(name, )
#define CD4053_DIP(...) \
NET_REGISTER_DEVEXT(CD4053_DIP, __VA_ARGS__)
@@ -829,6 +901,10 @@
#define CD4016_DIP(...) \
NET_REGISTER_DEVEXT(CD4016_DIP, __VA_ARGS__)
+// usage : CD4076_DIP(name, )
+#define CD4076_DIP(...) \
+ NET_REGISTER_DEVEXT(CD4076_DIP, __VA_ARGS__)
+
// usage : CD4316_DIP(name, )
#define CD4316_DIP(...) \
NET_REGISTER_DEVEXT(CD4316_DIP, __VA_ARGS__)
@@ -893,6 +969,10 @@
#define LM324_DIP(...) \
NET_REGISTER_DEVEXT(LM324_DIP, __VA_ARGS__)
+// usage : LM348_DIP(name, )
+#define LM348_DIP(...) \
+ NET_REGISTER_DEVEXT(LM348_DIP, __VA_ARGS__)
+
// usage : LM358_DIP(name, )
#define LM358_DIP(...) \
NET_REGISTER_DEVEXT(LM358_DIP, __VA_ARGS__)
@@ -989,6 +1069,10 @@
#define PROM_MK28000_DIP(...) \
NET_REGISTER_DEVEXT(PROM_MK28000_DIP, __VA_ARGS__)
+// usage : ROM_MCM14524_DIP(name, )
+#define ROM_MCM14524_DIP(...) \
+ NET_REGISTER_DEVEXT(ROM_MCM14524_DIP, __VA_ARGS__)
+
// usage : RAM_2102A_DIP(name, )
#define RAM_2102A_DIP(...) \
NET_REGISTER_DEVEXT(RAM_2102A_DIP, __VA_ARGS__)
diff --git a/src/lib/netlist/generated/nlm_modules_lib.cpp b/src/lib/netlist/generated/nlm_modules_lib.cpp
index 7f91075ac40..7162c84023d 100755
--- a/src/lib/netlist/generated/nlm_modules_lib.cpp
+++ b/src/lib/netlist/generated/nlm_modules_lib.cpp
@@ -1,7 +1,7 @@
// license:CC0
// copyright-holders:Couriersud
-// File programmatically created Sun Sep 13 20:49:39 2020
+// File programmatically created Wed Sep 30 11:02:38 2020
#include "devices/net_lib.h"
diff --git a/src/lib/netlist/generated/static_solvers.cpp b/src/lib/netlist/generated/static_solvers.cpp
index 367af35bbb9..ce58a075fa7 100644
--- a/src/lib/netlist/generated/static_solvers.cpp
+++ b/src/lib/netlist/generated/static_solvers.cpp
@@ -393,6 +393,1021 @@ static void nl_gcr_1250f340dea396ae_22_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// astrob
+static void nl_gcr_13833bf8c127deaa_154_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ double m_A75(0.0);
+ double m_A76(0.0);
+ double m_A77(0.0);
+ double m_A78(0.0);
+ double m_A79(0.0);
+ double m_A80(0.0);
+ double m_A81(0.0);
+ double m_A82(0.0);
+ double m_A83(0.0);
+ double m_A84(0.0);
+ double m_A85(0.0);
+ double m_A86(0.0);
+ double m_A87(0.0);
+ double m_A88(0.0);
+ double m_A89(0.0);
+ double m_A90(0.0);
+ double m_A91(0.0);
+ double m_A92(0.0);
+ double m_A93(0.0);
+ double m_A94(0.0);
+ double m_A95(0.0);
+ double m_A96(0.0);
+ double m_A97(0.0);
+ double m_A98(0.0);
+ double m_A99(0.0);
+ double m_A100(0.0);
+ double m_A101(0.0);
+ double m_A102(0.0);
+ double m_A103(0.0);
+ double m_A104(0.0);
+ double m_A105(0.0);
+ double m_A106(0.0);
+ double m_A107(0.0);
+ double m_A108(0.0);
+ double m_A109(0.0);
+ double m_A110(0.0);
+ double m_A111(0.0);
+ double m_A112(0.0);
+ double m_A113(0.0);
+ double m_A114(0.0);
+ double m_A115(0.0);
+ double m_A116(0.0);
+ double m_A117(0.0);
+ double m_A118(0.0);
+ double m_A119(0.0);
+ double m_A120(0.0);
+ double m_A121(0.0);
+ double m_A122(0.0);
+ double m_A123(0.0);
+ double m_A124(0.0);
+ double m_A125(0.0);
+ double m_A126(0.0);
+ double m_A127(0.0);
+ double m_A128(0.0);
+ double m_A129(0.0);
+ double m_A130(0.0);
+ double m_A131(0.0);
+ double m_A132(0.0);
+ double m_A133(0.0);
+ double m_A134(0.0);
+ double m_A135(0.0);
+ double m_A136(0.0);
+ double m_A137(0.0);
+ double m_A138(0.0);
+ double m_A139(0.0);
+ double m_A140(0.0);
+ double m_A141(0.0);
+ double m_A142(0.0);
+ double m_A143(0.0);
+ double m_A144(0.0);
+ double m_A145(0.0);
+ double m_A146(0.0);
+ double m_A147(0.0);
+ double m_A148(0.0);
+ double m_A149(0.0);
+ double m_A150(0.0);
+ double m_A151(0.0);
+ double m_A152(0.0);
+ double m_A153(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 -= go[1] * *cnV[1];
+ m_A2 += gt[2];
+ m_A2 += gt[3];
+ m_A3 += go[2];
+ double RHS1 = Idr[2];
+ RHS1 += Idr[3];
+ RHS1 -= go[3] * *cnV[3];
+ m_A4 += gt[4];
+ m_A4 += gt[5];
+ m_A5 += go[4];
+ double RHS2 = Idr[4];
+ RHS2 += Idr[5];
+ RHS2 -= go[5] * *cnV[5];
+ m_A6 += gt[6];
+ m_A6 += gt[7];
+ m_A7 += go[6];
+ double RHS3 = Idr[6];
+ RHS3 += Idr[7];
+ RHS3 -= go[7] * *cnV[7];
+ m_A8 += gt[8];
+ m_A8 += gt[9];
+ m_A9 += go[8];
+ m_A10 += go[9];
+ double RHS4 = Idr[8];
+ RHS4 += Idr[9];
+ m_A11 += gt[10];
+ m_A11 += gt[11];
+ m_A11 += gt[12];
+ m_A12 += go[10];
+ double RHS5 = Idr[10];
+ RHS5 += Idr[11];
+ RHS5 += Idr[12];
+ RHS5 -= go[11] * *cnV[11];
+ RHS5 -= go[12] * *cnV[12];
+ m_A13 += gt[13];
+ m_A13 += gt[14];
+ m_A13 += gt[15];
+ m_A13 += gt[16];
+ m_A14 += go[13];
+ m_A14 += go[14];
+ m_A15 += go[15];
+ double RHS6 = Idr[13];
+ RHS6 += Idr[14];
+ RHS6 += Idr[15];
+ RHS6 += Idr[16];
+ RHS6 -= go[16] * *cnV[16];
+ m_A16 += gt[17];
+ m_A16 += gt[18];
+ m_A16 += gt[19];
+ m_A16 += gt[20];
+ m_A16 += gt[21];
+ m_A16 += gt[22];
+ m_A18 += go[17];
+ m_A17 += go[18];
+ double RHS7 = Idr[17];
+ RHS7 += Idr[18];
+ RHS7 += Idr[19];
+ RHS7 += Idr[20];
+ RHS7 += Idr[21];
+ RHS7 += Idr[22];
+ RHS7 -= go[19] * *cnV[19];
+ RHS7 -= go[20] * *cnV[20];
+ RHS7 -= go[21] * *cnV[21];
+ RHS7 -= go[22] * *cnV[22];
+ m_A19 += gt[23];
+ m_A19 += gt[24];
+ m_A19 += gt[25];
+ m_A20 += go[23];
+ double RHS8 = Idr[23];
+ RHS8 += Idr[24];
+ RHS8 += Idr[25];
+ RHS8 -= go[24] * *cnV[24];
+ RHS8 -= go[25] * *cnV[25];
+ m_A21 += gt[26];
+ m_A21 += gt[27];
+ m_A21 += gt[28];
+ m_A22 += go[26];
+ double RHS9 = Idr[26];
+ RHS9 += Idr[27];
+ RHS9 += Idr[28];
+ RHS9 -= go[27] * *cnV[27];
+ RHS9 -= go[28] * *cnV[28];
+ m_A23 += gt[29];
+ m_A23 += gt[30];
+ m_A23 += gt[31];
+ m_A24 += go[29];
+ double RHS10 = Idr[29];
+ RHS10 += Idr[30];
+ RHS10 += Idr[31];
+ RHS10 -= go[30] * *cnV[30];
+ RHS10 -= go[31] * *cnV[31];
+ m_A25 += gt[32];
+ m_A25 += gt[33];
+ m_A25 += gt[34];
+ m_A26 += go[32];
+ double RHS11 = Idr[32];
+ RHS11 += Idr[33];
+ RHS11 += Idr[34];
+ RHS11 -= go[33] * *cnV[33];
+ RHS11 -= go[34] * *cnV[34];
+ m_A27 += gt[35];
+ m_A27 += gt[36];
+ m_A27 += gt[37];
+ m_A28 += go[35];
+ double RHS12 = Idr[35];
+ RHS12 += Idr[36];
+ RHS12 += Idr[37];
+ RHS12 -= go[36] * *cnV[36];
+ RHS12 -= go[37] * *cnV[37];
+ m_A29 += gt[38];
+ m_A29 += gt[39];
+ m_A30 += go[38];
+ double RHS13 = Idr[38];
+ RHS13 += Idr[39];
+ RHS13 -= go[39] * *cnV[39];
+ m_A31 += gt[40];
+ m_A31 += gt[41];
+ m_A31 += gt[42];
+ m_A32 += go[40];
+ double RHS14 = Idr[40];
+ RHS14 += Idr[41];
+ RHS14 += Idr[42];
+ RHS14 -= go[41] * *cnV[41];
+ RHS14 -= go[42] * *cnV[42];
+ m_A33 += gt[43];
+ m_A33 += gt[44];
+ m_A34 += go[43];
+ double RHS15 = Idr[43];
+ RHS15 += Idr[44];
+ RHS15 -= go[44] * *cnV[44];
+ m_A35 += gt[45];
+ m_A35 += gt[46];
+ m_A36 += go[45];
+ double RHS16 = Idr[45];
+ RHS16 += Idr[46];
+ RHS16 -= go[46] * *cnV[46];
+ m_A37 += gt[47];
+ m_A37 += gt[48];
+ m_A38 += go[47];
+ double RHS17 = Idr[47];
+ RHS17 += Idr[48];
+ RHS17 -= go[48] * *cnV[48];
+ m_A39 += gt[49];
+ m_A39 += gt[50];
+ m_A40 += go[49];
+ double RHS18 = Idr[49];
+ RHS18 += Idr[50];
+ RHS18 -= go[50] * *cnV[50];
+ m_A41 += gt[51];
+ m_A41 += gt[52];
+ m_A42 += go[51];
+ double RHS19 = Idr[51];
+ RHS19 += Idr[52];
+ RHS19 -= go[52] * *cnV[52];
+ m_A43 += gt[53];
+ m_A43 += gt[54];
+ m_A44 += go[53];
+ double RHS20 = Idr[53];
+ RHS20 += Idr[54];
+ RHS20 -= go[54] * *cnV[54];
+ m_A45 += gt[55];
+ m_A45 += gt[56];
+ m_A45 += gt[57];
+ m_A45 += gt[58];
+ m_A45 += gt[59];
+ m_A46 += go[55];
+ m_A48 += go[56];
+ m_A47 += go[57];
+ double RHS21 = Idr[55];
+ RHS21 += Idr[56];
+ RHS21 += Idr[57];
+ RHS21 += Idr[58];
+ RHS21 += Idr[59];
+ RHS21 -= go[58] * *cnV[58];
+ RHS21 -= go[59] * *cnV[59];
+ m_A49 += gt[60];
+ m_A49 += gt[61];
+ m_A49 += gt[62];
+ m_A50 += go[60];
+ double RHS22 = Idr[60];
+ RHS22 += Idr[61];
+ RHS22 += Idr[62];
+ RHS22 -= go[61] * *cnV[61];
+ RHS22 -= go[62] * *cnV[62];
+ m_A51 += gt[63];
+ m_A51 += gt[64];
+ m_A52 += go[63];
+ double RHS23 = Idr[63];
+ RHS23 += Idr[64];
+ RHS23 -= go[64] * *cnV[64];
+ m_A55 += gt[65];
+ m_A55 += gt[66];
+ m_A55 += gt[67];
+ m_A55 += gt[68];
+ m_A54 += go[65];
+ m_A53 += go[66];
+ double RHS24 = Idr[65];
+ RHS24 += Idr[66];
+ RHS24 += Idr[67];
+ RHS24 += Idr[68];
+ RHS24 -= go[67] * *cnV[67];
+ RHS24 -= go[68] * *cnV[68];
+ m_A57 += gt[69];
+ m_A57 += gt[70];
+ m_A58 += go[69];
+ double RHS25 = Idr[69];
+ RHS25 += Idr[70];
+ RHS25 -= go[70] * *cnV[70];
+ m_A59 += gt[71];
+ m_A59 += gt[72];
+ m_A59 += gt[73];
+ m_A60 += go[71];
+ double RHS26 = Idr[71];
+ RHS26 += Idr[72];
+ RHS26 += Idr[73];
+ RHS26 -= go[72] * *cnV[72];
+ RHS26 -= go[73] * *cnV[73];
+ m_A61 += gt[74];
+ m_A61 += gt[75];
+ m_A61 += gt[76];
+ m_A62 += go[74];
+ double RHS27 = Idr[74];
+ RHS27 += Idr[75];
+ RHS27 += Idr[76];
+ RHS27 -= go[75] * *cnV[75];
+ RHS27 -= go[76] * *cnV[76];
+ m_A63 += gt[77];
+ m_A63 += gt[78];
+ m_A63 += gt[79];
+ m_A64 += go[77];
+ double RHS28 = Idr[77];
+ RHS28 += Idr[78];
+ RHS28 += Idr[79];
+ RHS28 -= go[78] * *cnV[78];
+ RHS28 -= go[79] * *cnV[79];
+ m_A65 += gt[80];
+ m_A65 += gt[81];
+ m_A67 += go[80];
+ m_A66 += go[81];
+ double RHS29 = Idr[80];
+ RHS29 += Idr[81];
+ m_A68 += gt[82];
+ m_A68 += gt[83];
+ m_A70 += go[82];
+ m_A69 += go[83];
+ double RHS30 = Idr[82];
+ RHS30 += Idr[83];
+ m_A71 += gt[84];
+ m_A71 += gt[85];
+ m_A73 += go[84];
+ m_A72 += go[85];
+ double RHS31 = Idr[84];
+ RHS31 += Idr[85];
+ m_A77 += gt[86];
+ m_A77 += gt[87];
+ m_A77 += gt[88];
+ m_A77 += gt[89];
+ m_A77 += gt[90];
+ m_A77 += gt[91];
+ m_A77 += gt[92];
+ m_A74 += go[86];
+ m_A75 += go[87];
+ m_A75 += go[88];
+ m_A78 += go[89];
+ m_A78 += go[90];
+ double RHS32 = Idr[86];
+ RHS32 += Idr[87];
+ RHS32 += Idr[88];
+ RHS32 += Idr[89];
+ RHS32 += Idr[90];
+ RHS32 += Idr[91];
+ RHS32 += Idr[92];
+ RHS32 -= go[91] * *cnV[91];
+ RHS32 -= go[92] * *cnV[92];
+ m_A83 += gt[93];
+ m_A83 += gt[94];
+ m_A83 += gt[95];
+ m_A83 += gt[96];
+ m_A83 += gt[97];
+ m_A83 += gt[98];
+ m_A83 += gt[99];
+ m_A83 += gt[100];
+ m_A83 += gt[101];
+ m_A85 += go[93];
+ m_A85 += go[94];
+ m_A84 += go[95];
+ m_A84 += go[96];
+ m_A82 += go[97];
+ m_A81 += go[98];
+ m_A80 += go[99];
+ m_A79 += go[100];
+ double RHS33 = Idr[93];
+ RHS33 += Idr[94];
+ RHS33 += Idr[95];
+ RHS33 += Idr[96];
+ RHS33 += Idr[97];
+ RHS33 += Idr[98];
+ RHS33 += Idr[99];
+ RHS33 += Idr[100];
+ RHS33 += Idr[101];
+ RHS33 -= go[101] * *cnV[101];
+ m_A92 += gt[102];
+ m_A92 += gt[103];
+ m_A92 += gt[104];
+ m_A92 += gt[105];
+ m_A92 += gt[106];
+ m_A92 += gt[107];
+ m_A91 += go[102];
+ m_A90 += go[103];
+ m_A89 += go[104];
+ m_A88 += go[105];
+ m_A87 += go[106];
+ m_A86 += go[107];
+ double RHS34 = Idr[102];
+ RHS34 += Idr[103];
+ RHS34 += Idr[104];
+ RHS34 += Idr[105];
+ RHS34 += Idr[106];
+ RHS34 += Idr[107];
+ m_A95 += gt[108];
+ m_A95 += gt[109];
+ m_A95 += gt[110];
+ m_A95 += gt[111];
+ m_A95 += gt[112];
+ m_A95 += gt[113];
+ m_A95 += gt[114];
+ m_A97 += go[108];
+ m_A94 += go[109];
+ double RHS35 = Idr[108];
+ RHS35 += Idr[109];
+ RHS35 += Idr[110];
+ RHS35 += Idr[111];
+ RHS35 += Idr[112];
+ RHS35 += Idr[113];
+ RHS35 += Idr[114];
+ RHS35 -= go[110] * *cnV[110];
+ RHS35 -= go[111] * *cnV[111];
+ RHS35 -= go[112] * *cnV[112];
+ RHS35 -= go[113] * *cnV[113];
+ RHS35 -= go[114] * *cnV[114];
+ m_A99 += gt[115];
+ m_A99 += gt[116];
+ m_A98 += go[115];
+ m_A100 += go[116];
+ double RHS36 = Idr[115];
+ RHS36 += Idr[116];
+ m_A107 += gt[117];
+ m_A107 += gt[118];
+ m_A107 += gt[119];
+ m_A107 += gt[120];
+ m_A107 += gt[121];
+ m_A107 += gt[122];
+ m_A106 += go[117];
+ m_A105 += go[118];
+ m_A104 += go[119];
+ m_A103 += go[120];
+ m_A102 += go[121];
+ m_A101 += go[122];
+ double RHS37 = Idr[117];
+ RHS37 += Idr[118];
+ RHS37 += Idr[119];
+ RHS37 += Idr[120];
+ RHS37 += Idr[121];
+ RHS37 += Idr[122];
+ m_A112 += gt[123];
+ m_A112 += gt[124];
+ m_A112 += gt[125];
+ m_A112 += gt[126];
+ m_A112 += gt[127];
+ m_A111 += go[123];
+ m_A110 += go[124];
+ m_A109 += go[125];
+ double RHS38 = Idr[123];
+ RHS38 += Idr[124];
+ RHS38 += Idr[125];
+ RHS38 += Idr[126];
+ RHS38 += Idr[127];
+ RHS38 -= go[126] * *cnV[126];
+ RHS38 -= go[127] * *cnV[127];
+ m_A118 += gt[128];
+ m_A118 += gt[129];
+ m_A118 += gt[130];
+ m_A118 += gt[131];
+ m_A118 += gt[132];
+ m_A118 += gt[133];
+ m_A118 += gt[134];
+ m_A118 += gt[135];
+ m_A118 += gt[136];
+ m_A119 += go[128];
+ m_A115 += go[129];
+ m_A114 += go[130];
+ m_A116 += go[131];
+ m_A116 += go[132];
+ m_A117 += go[133];
+ m_A117 += go[134];
+ double RHS39 = Idr[128];
+ RHS39 += Idr[129];
+ RHS39 += Idr[130];
+ RHS39 += Idr[131];
+ RHS39 += Idr[132];
+ RHS39 += Idr[133];
+ RHS39 += Idr[134];
+ RHS39 += Idr[135];
+ RHS39 += Idr[136];
+ RHS39 -= go[135] * *cnV[135];
+ RHS39 -= go[136] * *cnV[136];
+ m_A121 += gt[137];
+ m_A121 += gt[138];
+ m_A120 += go[137];
+ m_A122 += go[138];
+ double RHS40 = Idr[137];
+ RHS40 += Idr[138];
+ m_A127 += gt[139];
+ m_A127 += gt[140];
+ m_A127 += gt[141];
+ m_A127 += gt[142];
+ m_A127 += gt[143];
+ m_A126 += go[139];
+ m_A125 += go[140];
+ m_A124 += go[141];
+ m_A123 += go[142];
+ m_A128 += go[143];
+ double RHS41 = Idr[139];
+ RHS41 += Idr[140];
+ RHS41 += Idr[141];
+ RHS41 += Idr[142];
+ RHS41 += Idr[143];
+ m_A134 += gt[144];
+ m_A134 += gt[145];
+ m_A134 += gt[146];
+ m_A134 += gt[147];
+ m_A134 += gt[148];
+ m_A134 += gt[149];
+ m_A130 += go[144];
+ m_A129 += go[145];
+ m_A133 += go[146];
+ m_A131 += go[147];
+ m_A131 += go[148];
+ double RHS42 = Idr[144];
+ RHS42 += Idr[145];
+ RHS42 += Idr[146];
+ RHS42 += Idr[147];
+ RHS42 += Idr[148];
+ RHS42 += Idr[149];
+ RHS42 -= go[149] * *cnV[149];
+ m_A137 += gt[150];
+ m_A137 += gt[151];
+ m_A136 += go[150];
+ m_A138 += go[151];
+ double RHS43 = Idr[150];
+ RHS43 += Idr[151];
+ m_A153 += gt[152];
+ m_A153 += gt[153];
+ m_A153 += gt[154];
+ m_A153 += gt[155];
+ m_A153 += gt[156];
+ m_A153 += gt[157];
+ m_A153 += gt[158];
+ m_A153 += gt[159];
+ m_A152 += go[152];
+ m_A140 += go[153];
+ m_A141 += go[154];
+ m_A142 += go[155];
+ m_A149 += go[156];
+ m_A145 += go[157];
+ m_A150 += go[158];
+ m_A139 += go[159];
+ double RHS44 = Idr[152];
+ RHS44 += Idr[153];
+ RHS44 += Idr[154];
+ RHS44 += Idr[155];
+ RHS44 += Idr[156];
+ RHS44 += Idr[157];
+ RHS44 += Idr[158];
+ RHS44 += Idr[159];
+ const double f0 = 1.0 / m_A0;
+ const double f0_33 = -f0 * m_A79;
+ m_A83 += m_A1 * f0_33;
+ RHS33 += f0_33 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_33 = -f1 * m_A80;
+ m_A83 += m_A3 * f1_33;
+ RHS33 += f1_33 * RHS1;
+ const double f2 = 1.0 / m_A4;
+ const double f2_33 = -f2 * m_A81;
+ m_A83 += m_A5 * f2_33;
+ RHS33 += f2_33 * RHS2;
+ const double f3 = 1.0 / m_A6;
+ const double f3_33 = -f3 * m_A82;
+ m_A83 += m_A7 * f3_33;
+ RHS33 += f3_33 * RHS3;
+ const double f4 = 1.0 / m_A8;
+ const double f4_24 = -f4 * m_A53;
+ m_A55 += m_A9 * f4_24;
+ m_A56 += m_A10 * f4_24;
+ RHS24 += f4_24 * RHS4;
+ const double f4_32 = -f4 * m_A74;
+ m_A76 += m_A9 * f4_32;
+ m_A77 += m_A10 * f4_32;
+ RHS32 += f4_32 * RHS4;
+ const double f5 = 1.0 / m_A11;
+ const double f5_24 = -f5 * m_A54;
+ m_A55 += m_A12 * f5_24;
+ RHS24 += f5_24 * RHS5;
+ const double f6 = 1.0 / m_A13;
+ const double f6_32 = -f6 * m_A75;
+ m_A77 += m_A14 * f6_32;
+ m_A78 += m_A15 * f6_32;
+ RHS32 += f6_32 * RHS6;
+ const double f6_39 = -f6 * m_A114;
+ m_A116 += m_A14 * f6_39;
+ m_A118 += m_A15 * f6_39;
+ RHS39 += f6_39 * RHS6;
+ const double f7 = 1.0 / m_A16;
+ const double f7_35 = -f7 * m_A94;
+ m_A96 += m_A17 * f7_35;
+ m_A97 += m_A18 * f7_35;
+ RHS35 += f7_35 * RHS7;
+ const double f7_39 = -f7 * m_A115;
+ m_A118 += m_A17 * f7_39;
+ m_A119 += m_A18 * f7_39;
+ RHS39 += f7_39 * RHS7;
+ const double f7_42 = -f7 * m_A129;
+ m_A133 += m_A17 * f7_42;
+ m_A134 += m_A18 * f7_42;
+ RHS42 += f7_42 * RHS7;
+ const double f8 = 1.0 / m_A19;
+ const double f8_37 = -f8 * m_A101;
+ m_A107 += m_A20 * f8_37;
+ RHS37 += f8_37 * RHS8;
+ const double f9 = 1.0 / m_A21;
+ const double f9_37 = -f9 * m_A102;
+ m_A107 += m_A22 * f9_37;
+ RHS37 += f9_37 * RHS9;
+ const double f10 = 1.0 / m_A23;
+ const double f10_37 = -f10 * m_A103;
+ m_A107 += m_A24 * f10_37;
+ RHS37 += f10_37 * RHS10;
+ const double f11 = 1.0 / m_A25;
+ const double f11_37 = -f11 * m_A104;
+ m_A107 += m_A26 * f11_37;
+ RHS37 += f11_37 * RHS11;
+ const double f12 = 1.0 / m_A27;
+ const double f12_37 = -f12 * m_A105;
+ m_A107 += m_A28 * f12_37;
+ RHS37 += f12_37 * RHS12;
+ const double f13 = 1.0 / m_A29;
+ const double f13_38 = -f13 * m_A109;
+ m_A112 += m_A30 * f13_38;
+ RHS38 += f13_38 * RHS13;
+ const double f14 = 1.0 / m_A31;
+ const double f14_34 = -f14 * m_A86;
+ m_A92 += m_A32 * f14_34;
+ RHS34 += f14_34 * RHS14;
+ const double f15 = 1.0 / m_A33;
+ const double f15_41 = -f15 * m_A123;
+ m_A127 += m_A34 * f15_41;
+ RHS41 += f15_41 * RHS15;
+ const double f16 = 1.0 / m_A35;
+ const double f16_36 = -f16 * m_A98;
+ m_A99 += m_A36 * f16_36;
+ RHS36 += f16_36 * RHS16;
+ const double f17 = 1.0 / m_A37;
+ const double f17_40 = -f17 * m_A120;
+ m_A121 += m_A38 * f17_40;
+ RHS40 += f17_40 * RHS17;
+ const double f18 = 1.0 / m_A39;
+ const double f18_41 = -f18 * m_A124;
+ m_A127 += m_A40 * f18_41;
+ RHS41 += f18_41 * RHS18;
+ const double f19 = 1.0 / m_A41;
+ const double f19_41 = -f19 * m_A125;
+ m_A127 += m_A42 * f19_41;
+ RHS41 += f19_41 * RHS19;
+ const double f20 = 1.0 / m_A43;
+ const double f20_41 = -f20 * m_A126;
+ m_A127 += m_A44 * f20_41;
+ RHS41 += f20_41 * RHS20;
+ const double f21 = 1.0 / m_A45;
+ const double f21_42 = -f21 * m_A130;
+ m_A132 += m_A46 * f21_42;
+ m_A134 += m_A47 * f21_42;
+ m_A135 += m_A48 * f21_42;
+ RHS42 += f21_42 * RHS21;
+ const double f21_44 = -f21 * m_A139;
+ m_A144 += m_A46 * f21_44;
+ m_A151 += m_A47 * f21_44;
+ m_A153 += m_A48 * f21_44;
+ RHS44 += f21_44 * RHS21;
+ const double f22 = 1.0 / m_A49;
+ const double f22_34 = -f22 * m_A87;
+ m_A92 += m_A50 * f22_34;
+ RHS34 += f22_34 * RHS22;
+ const double f23 = 1.0 / m_A51;
+ const double f23_43 = -f23 * m_A136;
+ m_A137 += m_A52 * f23_43;
+ RHS43 += f23_43 * RHS23;
+ const double f24 = 1.0 / m_A55;
+ const double f24_32 = -f24 * m_A76;
+ m_A77 += m_A56 * f24_32;
+ RHS32 += f24_32 * RHS24;
+ const double f25 = 1.0 / m_A57;
+ const double f25_38 = -f25 * m_A110;
+ m_A112 += m_A58 * f25_38;
+ RHS38 += f25_38 * RHS25;
+ const double f26 = 1.0 / m_A59;
+ const double f26_34 = -f26 * m_A88;
+ m_A92 += m_A60 * f26_34;
+ RHS34 += f26_34 * RHS26;
+ const double f27 = 1.0 / m_A61;
+ const double f27_34 = -f27 * m_A89;
+ m_A92 += m_A62 * f27_34;
+ RHS34 += f27_34 * RHS27;
+ const double f28 = 1.0 / m_A63;
+ const double f28_34 = -f28 * m_A90;
+ m_A92 += m_A64 * f28_34;
+ RHS34 += f28_34 * RHS28;
+ const double f29 = 1.0 / m_A65;
+ const double f29_34 = -f29 * m_A91;
+ m_A92 += m_A66 * f29_34;
+ m_A93 += m_A67 * f29_34;
+ RHS34 += f29_34 * RHS29;
+ const double f29_44 = -f29 * m_A140;
+ m_A143 += m_A66 * f29_44;
+ m_A153 += m_A67 * f29_44;
+ RHS44 += f29_44 * RHS29;
+ const double f30 = 1.0 / m_A68;
+ const double f30_37 = -f30 * m_A106;
+ m_A107 += m_A69 * f30_37;
+ m_A108 += m_A70 * f30_37;
+ RHS37 += f30_37 * RHS30;
+ const double f30_44 = -f30 * m_A141;
+ m_A146 += m_A69 * f30_44;
+ m_A153 += m_A70 * f30_44;
+ RHS44 += f30_44 * RHS30;
+ const double f31 = 1.0 / m_A71;
+ const double f31_38 = -f31 * m_A111;
+ m_A112 += m_A72 * f31_38;
+ m_A113 += m_A73 * f31_38;
+ RHS38 += f31_38 * RHS31;
+ const double f31_44 = -f31 * m_A142;
+ m_A147 += m_A72 * f31_44;
+ m_A153 += m_A73 * f31_44;
+ RHS44 += f31_44 * RHS31;
+ const double f32 = 1.0 / m_A77;
+ const double f32_39 = -f32 * m_A116;
+ m_A118 += m_A78 * f32_39;
+ RHS39 += f32_39 * RHS32;
+ const double f33 = 1.0 / m_A83;
+ const double f33_39 = -f33 * m_A117;
+ m_A118 += m_A84 * f33_39;
+ m_A119 += m_A85 * f33_39;
+ RHS39 += f33_39 * RHS33;
+ const double f33_42 = -f33 * m_A131;
+ m_A133 += m_A84 * f33_42;
+ m_A134 += m_A85 * f33_42;
+ RHS42 += f33_42 * RHS33;
+ const double f34 = 1.0 / m_A92;
+ const double f34_44 = -f34 * m_A143;
+ m_A153 += m_A93 * f34_44;
+ RHS44 += f34_44 * RHS34;
+ const double f35 = 1.0 / m_A95;
+ const double f35_42 = -f35 * m_A132;
+ m_A133 += m_A96 * f35_42;
+ m_A134 += m_A97 * f35_42;
+ RHS42 += f35_42 * RHS35;
+ const double f35_44 = -f35 * m_A144;
+ m_A148 += m_A96 * f35_44;
+ m_A151 += m_A97 * f35_44;
+ RHS44 += f35_44 * RHS35;
+ const double f36 = 1.0 / m_A99;
+ const double f36_44 = -f36 * m_A145;
+ m_A153 += m_A100 * f36_44;
+ RHS44 += f36_44 * RHS36;
+ const double f37 = 1.0 / m_A107;
+ const double f37_44 = -f37 * m_A146;
+ m_A153 += m_A108 * f37_44;
+ RHS44 += f37_44 * RHS37;
+ const double f38 = 1.0 / m_A112;
+ const double f38_44 = -f38 * m_A147;
+ m_A153 += m_A113 * f38_44;
+ RHS44 += f38_44 * RHS38;
+ const double f39 = 1.0 / m_A118;
+ const double f39_42 = -f39 * m_A133;
+ m_A134 += m_A119 * f39_42;
+ RHS42 += f39_42 * RHS39;
+ const double f39_44 = -f39 * m_A148;
+ m_A151 += m_A119 * f39_44;
+ RHS44 += f39_44 * RHS39;
+ const double f40 = 1.0 / m_A121;
+ const double f40_44 = -f40 * m_A149;
+ m_A153 += m_A122 * f40_44;
+ RHS44 += f40_44 * RHS40;
+ const double f41 = 1.0 / m_A127;
+ const double f41_44 = -f41 * m_A150;
+ m_A153 += m_A128 * f41_44;
+ RHS44 += f41_44 * RHS41;
+ const double f42 = 1.0 / m_A134;
+ const double f42_44 = -f42 * m_A151;
+ m_A153 += m_A135 * f42_44;
+ RHS44 += f42_44 * RHS42;
+ const double f43 = 1.0 / m_A137;
+ const double f43_44 = -f43 * m_A152;
+ m_A153 += m_A138 * f43_44;
+ RHS44 += f43_44 * RHS43;
+ V[44] = RHS44 / m_A153;
+ double tmp43 = 0.0;
+ tmp43 += m_A138 * V[44];
+ V[43] = (RHS43 - tmp43) / m_A137;
+ double tmp42 = 0.0;
+ tmp42 += m_A135 * V[44];
+ V[42] = (RHS42 - tmp42) / m_A134;
+ double tmp41 = 0.0;
+ tmp41 += m_A128 * V[44];
+ V[41] = (RHS41 - tmp41) / m_A127;
+ double tmp40 = 0.0;
+ tmp40 += m_A122 * V[44];
+ V[40] = (RHS40 - tmp40) / m_A121;
+ double tmp39 = 0.0;
+ tmp39 += m_A119 * V[42];
+ V[39] = (RHS39 - tmp39) / m_A118;
+ double tmp38 = 0.0;
+ tmp38 += m_A113 * V[44];
+ V[38] = (RHS38 - tmp38) / m_A112;
+ double tmp37 = 0.0;
+ tmp37 += m_A108 * V[44];
+ V[37] = (RHS37 - tmp37) / m_A107;
+ double tmp36 = 0.0;
+ tmp36 += m_A100 * V[44];
+ V[36] = (RHS36 - tmp36) / m_A99;
+ double tmp35 = 0.0;
+ tmp35 += m_A96 * V[39];
+ tmp35 += m_A97 * V[42];
+ V[35] = (RHS35 - tmp35) / m_A95;
+ double tmp34 = 0.0;
+ tmp34 += m_A93 * V[44];
+ V[34] = (RHS34 - tmp34) / m_A92;
+ double tmp33 = 0.0;
+ tmp33 += m_A84 * V[39];
+ tmp33 += m_A85 * V[42];
+ V[33] = (RHS33 - tmp33) / m_A83;
+ double tmp32 = 0.0;
+ tmp32 += m_A78 * V[39];
+ V[32] = (RHS32 - tmp32) / m_A77;
+ double tmp31 = 0.0;
+ tmp31 += m_A72 * V[38];
+ tmp31 += m_A73 * V[44];
+ V[31] = (RHS31 - tmp31) / m_A71;
+ double tmp30 = 0.0;
+ tmp30 += m_A69 * V[37];
+ tmp30 += m_A70 * V[44];
+ V[30] = (RHS30 - tmp30) / m_A68;
+ double tmp29 = 0.0;
+ tmp29 += m_A66 * V[34];
+ tmp29 += m_A67 * V[44];
+ V[29] = (RHS29 - tmp29) / m_A65;
+ double tmp28 = 0.0;
+ tmp28 += m_A64 * V[34];
+ V[28] = (RHS28 - tmp28) / m_A63;
+ double tmp27 = 0.0;
+ tmp27 += m_A62 * V[34];
+ V[27] = (RHS27 - tmp27) / m_A61;
+ double tmp26 = 0.0;
+ tmp26 += m_A60 * V[34];
+ V[26] = (RHS26 - tmp26) / m_A59;
+ double tmp25 = 0.0;
+ tmp25 += m_A58 * V[38];
+ V[25] = (RHS25 - tmp25) / m_A57;
+ double tmp24 = 0.0;
+ tmp24 += m_A56 * V[32];
+ V[24] = (RHS24 - tmp24) / m_A55;
+ double tmp23 = 0.0;
+ tmp23 += m_A52 * V[43];
+ V[23] = (RHS23 - tmp23) / m_A51;
+ double tmp22 = 0.0;
+ tmp22 += m_A50 * V[34];
+ V[22] = (RHS22 - tmp22) / m_A49;
+ double tmp21 = 0.0;
+ tmp21 += m_A46 * V[35];
+ tmp21 += m_A47 * V[42];
+ tmp21 += m_A48 * V[44];
+ V[21] = (RHS21 - tmp21) / m_A45;
+ double tmp20 = 0.0;
+ tmp20 += m_A44 * V[41];
+ V[20] = (RHS20 - tmp20) / m_A43;
+ double tmp19 = 0.0;
+ tmp19 += m_A42 * V[41];
+ V[19] = (RHS19 - tmp19) / m_A41;
+ double tmp18 = 0.0;
+ tmp18 += m_A40 * V[41];
+ V[18] = (RHS18 - tmp18) / m_A39;
+ double tmp17 = 0.0;
+ tmp17 += m_A38 * V[40];
+ V[17] = (RHS17 - tmp17) / m_A37;
+ double tmp16 = 0.0;
+ tmp16 += m_A36 * V[36];
+ V[16] = (RHS16 - tmp16) / m_A35;
+ double tmp15 = 0.0;
+ tmp15 += m_A34 * V[41];
+ V[15] = (RHS15 - tmp15) / m_A33;
+ double tmp14 = 0.0;
+ tmp14 += m_A32 * V[34];
+ V[14] = (RHS14 - tmp14) / m_A31;
+ double tmp13 = 0.0;
+ tmp13 += m_A30 * V[38];
+ V[13] = (RHS13 - tmp13) / m_A29;
+ double tmp12 = 0.0;
+ tmp12 += m_A28 * V[37];
+ V[12] = (RHS12 - tmp12) / m_A27;
+ double tmp11 = 0.0;
+ tmp11 += m_A26 * V[37];
+ V[11] = (RHS11 - tmp11) / m_A25;
+ double tmp10 = 0.0;
+ tmp10 += m_A24 * V[37];
+ V[10] = (RHS10 - tmp10) / m_A23;
+ double tmp9 = 0.0;
+ tmp9 += m_A22 * V[37];
+ V[9] = (RHS9 - tmp9) / m_A21;
+ double tmp8 = 0.0;
+ tmp8 += m_A20 * V[37];
+ V[8] = (RHS8 - tmp8) / m_A19;
+ double tmp7 = 0.0;
+ tmp7 += m_A17 * V[39];
+ tmp7 += m_A18 * V[42];
+ V[7] = (RHS7 - tmp7) / m_A16;
+ double tmp6 = 0.0;
+ tmp6 += m_A14 * V[32];
+ tmp6 += m_A15 * V[39];
+ V[6] = (RHS6 - tmp6) / m_A13;
+ double tmp5 = 0.0;
+ tmp5 += m_A12 * V[24];
+ V[5] = (RHS5 - tmp5) / m_A11;
+ double tmp4 = 0.0;
+ tmp4 += m_A9 * V[24];
+ tmp4 += m_A10 * V[32];
+ V[4] = (RHS4 - tmp4) / m_A8;
+ double tmp3 = 0.0;
+ tmp3 += m_A7 * V[33];
+ V[3] = (RHS3 - tmp3) / m_A6;
+ double tmp2 = 0.0;
+ tmp2 += m_A5 * V[33];
+ V[2] = (RHS2 - tmp2) / m_A4;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[33];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[33];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// pongf
static void nl_gcr_13e7b5ac1a260dbf_10_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -1369,74 +2384,6 @@ static void nl_gcr_15e8f6fb021de0f9_28_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
-// armora
-static void nl_gcr_1692de755a535408_9_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
-
-{
-
- plib::unused_var(cnV);
- double m_A0(0.0);
- double m_A1(0.0);
- double m_A2(0.0);
- double m_A3(0.0);
- double m_A4(0.0);
- double m_A5(0.0);
- double m_A6(0.0);
- double m_A7(0.0);
- double m_A8(0.0);
- m_A0 += gt[0];
- m_A0 += gt[1];
- m_A0 += gt[2];
- m_A2 += go[0];
- m_A1 += go[1];
- m_A1 += go[2];
- double RHS0 = Idr[0];
- RHS0 += Idr[1];
- RHS0 += Idr[2];
- m_A4 += gt[3];
- m_A4 += gt[4];
- m_A4 += gt[5];
- m_A4 += gt[6];
- m_A5 += go[3];
- m_A5 += go[4];
- m_A3 += go[5];
- m_A3 += go[6];
- double RHS1 = Idr[3];
- RHS1 += Idr[4];
- RHS1 += Idr[5];
- RHS1 += Idr[6];
- m_A8 += gt[7];
- m_A8 += gt[8];
- m_A8 += gt[9];
- m_A7 += go[7];
- m_A7 += go[8];
- m_A6 += go[9];
- double RHS2 = Idr[7];
- RHS2 += Idr[8];
- RHS2 += Idr[9];
- const double f0 = 1.0 / m_A0;
- const double f0_1 = -f0 * m_A3;
- m_A4 += m_A1 * f0_1;
- m_A5 += m_A2 * f0_1;
- RHS1 += f0_1 * RHS0;
- const double f0_2 = -f0 * m_A6;
- m_A7 += m_A1 * f0_2;
- m_A8 += m_A2 * f0_2;
- RHS2 += f0_2 * RHS0;
- const double f1 = 1.0 / m_A4;
- const double f1_2 = -f1 * m_A7;
- m_A8 += m_A5 * f1_2;
- RHS2 += f1_2 * RHS1;
- V[2] = RHS2 / m_A8;
- double tmp1 = 0.0;
- tmp1 += m_A5 * V[2];
- V[1] = (RHS1 - tmp1) / m_A4;
- double tmp0 = 0.0;
- tmp0 += m_A1 * V[1];
- tmp0 += m_A2 * V[2];
- V[0] = (RHS0 - tmp0) / m_A0;
-}
-
// dpatrol
static void nl_gcr_18f4d9160b51d613_20_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -2092,6 +3039,246 @@ static void nl_gcr_1fad5cda2646cf42_30_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_1fec893028a7b809_34_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 -= go[1] * *cnV[1];
+ m_A2 += gt[2];
+ m_A2 += gt[3];
+ m_A3 += go[2];
+ double RHS1 = Idr[2];
+ RHS1 += Idr[3];
+ RHS1 -= go[3] * *cnV[3];
+ m_A4 += gt[4];
+ m_A4 += gt[5];
+ m_A5 += go[4];
+ double RHS2 = Idr[4];
+ RHS2 += Idr[5];
+ RHS2 -= go[5] * *cnV[5];
+ m_A6 += gt[6];
+ m_A6 += gt[7];
+ m_A7 += go[6];
+ double RHS3 = Idr[6];
+ RHS3 += Idr[7];
+ RHS3 -= go[7] * *cnV[7];
+ m_A8 += gt[8];
+ m_A8 += gt[9];
+ m_A9 += go[8];
+ double RHS4 = Idr[8];
+ RHS4 += Idr[9];
+ RHS4 -= go[9] * *cnV[9];
+ m_A10 += gt[10];
+ m_A10 += gt[11];
+ m_A11 += go[10];
+ double RHS5 = Idr[10];
+ RHS5 += Idr[11];
+ RHS5 -= go[11] * *cnV[11];
+ m_A12 += gt[12];
+ m_A12 += gt[13];
+ m_A13 += go[12];
+ double RHS6 = Idr[12];
+ RHS6 += Idr[13];
+ RHS6 -= go[13] * *cnV[13];
+ m_A14 += gt[14];
+ m_A14 += gt[15];
+ m_A15 += go[14];
+ double RHS7 = Idr[14];
+ RHS7 += Idr[15];
+ RHS7 -= go[15] * *cnV[15];
+ m_A16 += gt[16];
+ m_A16 += gt[17];
+ m_A17 += go[16];
+ double RHS8 = Idr[16];
+ RHS8 += Idr[17];
+ RHS8 -= go[17] * *cnV[17];
+ m_A18 += gt[18];
+ m_A18 += gt[19];
+ m_A18 += gt[20];
+ m_A18 += gt[21];
+ m_A18 += gt[22];
+ m_A18 += gt[23];
+ m_A18 += gt[24];
+ m_A19 += go[18];
+ double RHS9 = Idr[18];
+ RHS9 += Idr[19];
+ RHS9 += Idr[20];
+ RHS9 += Idr[21];
+ RHS9 += Idr[22];
+ RHS9 += Idr[23];
+ RHS9 += Idr[24];
+ RHS9 -= go[19] * *cnV[19];
+ RHS9 -= go[20] * *cnV[20];
+ RHS9 -= go[21] * *cnV[21];
+ RHS9 -= go[22] * *cnV[22];
+ RHS9 -= go[23] * *cnV[23];
+ RHS9 -= go[24] * *cnV[24];
+ m_A28 += gt[25];
+ m_A28 += gt[26];
+ m_A28 += gt[27];
+ m_A28 += gt[28];
+ m_A28 += gt[29];
+ m_A28 += gt[30];
+ m_A28 += gt[31];
+ m_A28 += gt[32];
+ m_A28 += gt[33];
+ m_A28 += gt[34];
+ m_A29 += go[25];
+ m_A27 += go[26];
+ m_A26 += go[27];
+ m_A25 += go[28];
+ m_A24 += go[29];
+ m_A23 += go[30];
+ m_A22 += go[31];
+ m_A21 += go[32];
+ m_A20 += go[33];
+ double RHS10 = Idr[25];
+ RHS10 += Idr[26];
+ RHS10 += Idr[27];
+ RHS10 += Idr[28];
+ RHS10 += Idr[29];
+ RHS10 += Idr[30];
+ RHS10 += Idr[31];
+ RHS10 += Idr[32];
+ RHS10 += Idr[33];
+ RHS10 += Idr[34];
+ RHS10 -= go[34] * *cnV[34];
+ m_A33 += gt[35];
+ m_A33 += gt[36];
+ m_A33 += gt[37];
+ m_A33 += gt[38];
+ m_A33 += gt[39];
+ m_A31 += go[35];
+ m_A30 += go[36];
+ m_A32 += go[37];
+ double RHS11 = Idr[35];
+ RHS11 += Idr[36];
+ RHS11 += Idr[37];
+ RHS11 += Idr[38];
+ RHS11 += Idr[39];
+ RHS11 -= go[38] * *cnV[38];
+ RHS11 -= go[39] * *cnV[39];
+ const double f0 = 1.0 / m_A0;
+ const double f0_10 = -f0 * m_A20;
+ m_A28 += m_A1 * f0_10;
+ RHS10 += f0_10 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_10 = -f1 * m_A21;
+ m_A28 += m_A3 * f1_10;
+ RHS10 += f1_10 * RHS1;
+ const double f2 = 1.0 / m_A4;
+ const double f2_11 = -f2 * m_A30;
+ m_A33 += m_A5 * f2_11;
+ RHS11 += f2_11 * RHS2;
+ const double f3 = 1.0 / m_A6;
+ const double f3_10 = -f3 * m_A22;
+ m_A28 += m_A7 * f3_10;
+ RHS10 += f3_10 * RHS3;
+ const double f4 = 1.0 / m_A8;
+ const double f4_10 = -f4 * m_A23;
+ m_A28 += m_A9 * f4_10;
+ RHS10 += f4_10 * RHS4;
+ const double f5 = 1.0 / m_A10;
+ const double f5_10 = -f5 * m_A24;
+ m_A28 += m_A11 * f5_10;
+ RHS10 += f5_10 * RHS5;
+ const double f6 = 1.0 / m_A12;
+ const double f6_10 = -f6 * m_A25;
+ m_A28 += m_A13 * f6_10;
+ RHS10 += f6_10 * RHS6;
+ const double f7 = 1.0 / m_A14;
+ const double f7_10 = -f7 * m_A26;
+ m_A28 += m_A15 * f7_10;
+ RHS10 += f7_10 * RHS7;
+ const double f8 = 1.0 / m_A16;
+ const double f8_10 = -f8 * m_A27;
+ m_A28 += m_A17 * f8_10;
+ RHS10 += f8_10 * RHS8;
+ const double f9 = 1.0 / m_A18;
+ const double f9_11 = -f9 * m_A31;
+ m_A32 += m_A19 * f9_11;
+ RHS11 += f9_11 * RHS9;
+ const double f10 = 1.0 / m_A28;
+ const double f10_11 = -f10 * m_A32;
+ m_A33 += m_A29 * f10_11;
+ RHS11 += f10_11 * RHS10;
+ V[11] = RHS11 / m_A33;
+ double tmp10 = 0.0;
+ tmp10 += m_A29 * V[11];
+ V[10] = (RHS10 - tmp10) / m_A28;
+ double tmp9 = 0.0;
+ tmp9 += m_A19 * V[10];
+ V[9] = (RHS9 - tmp9) / m_A18;
+ double tmp8 = 0.0;
+ tmp8 += m_A17 * V[10];
+ V[8] = (RHS8 - tmp8) / m_A16;
+ double tmp7 = 0.0;
+ tmp7 += m_A15 * V[10];
+ V[7] = (RHS7 - tmp7) / m_A14;
+ double tmp6 = 0.0;
+ tmp6 += m_A13 * V[10];
+ V[6] = (RHS6 - tmp6) / m_A12;
+ double tmp5 = 0.0;
+ tmp5 += m_A11 * V[10];
+ V[5] = (RHS5 - tmp5) / m_A10;
+ double tmp4 = 0.0;
+ tmp4 += m_A9 * V[10];
+ V[4] = (RHS4 - tmp4) / m_A8;
+ double tmp3 = 0.0;
+ tmp3 += m_A7 * V[10];
+ V[3] = (RHS3 - tmp3) / m_A6;
+ double tmp2 = 0.0;
+ tmp2 += m_A5 * V[11];
+ V[2] = (RHS2 - tmp2) / m_A4;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[10];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[10];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// sspeedr
static void nl_gcr_2294220d3c91e762_176_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -3198,6 +4385,718 @@ static void nl_gcr_2294220d3c91e762_176_double_double(double * __restrict V, con
V[0] = (RHS0 - tmp0) / m_A0;
}
+// headon
+static void nl_gcr_24023c8529f6bdb3_97_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ double m_A75(0.0);
+ double m_A76(0.0);
+ double m_A77(0.0);
+ double m_A78(0.0);
+ double m_A79(0.0);
+ double m_A80(0.0);
+ double m_A81(0.0);
+ double m_A82(0.0);
+ double m_A83(0.0);
+ double m_A84(0.0);
+ double m_A85(0.0);
+ double m_A86(0.0);
+ double m_A87(0.0);
+ double m_A88(0.0);
+ double m_A89(0.0);
+ double m_A90(0.0);
+ double m_A91(0.0);
+ double m_A92(0.0);
+ double m_A93(0.0);
+ double m_A94(0.0);
+ double m_A95(0.0);
+ double m_A96(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A2 += gt[6];
+ m_A2 += gt[7];
+ m_A2 += gt[8];
+ m_A2 += gt[9];
+ m_A3 += go[3];
+ m_A3 += go[4];
+ m_A3 += go[5];
+ m_A4 += go[6];
+ m_A4 += go[7];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 += Idr[6];
+ RHS1 += Idr[7];
+ RHS1 += Idr[8];
+ RHS1 += Idr[9];
+ RHS1 -= go[8] * *cnV[8];
+ RHS1 -= go[9] * *cnV[9];
+ m_A5 += gt[10];
+ m_A5 += gt[11];
+ m_A6 += go[10];
+ double RHS2 = Idr[10];
+ RHS2 += Idr[11];
+ RHS2 -= go[11] * *cnV[11];
+ m_A7 += gt[12];
+ m_A7 += gt[13];
+ m_A8 += go[12];
+ double RHS3 = Idr[12];
+ RHS3 += Idr[13];
+ RHS3 -= go[13] * *cnV[13];
+ m_A9 += gt[14];
+ m_A9 += gt[15];
+ m_A9 += gt[16];
+ m_A9 += gt[17];
+ m_A9 += gt[18];
+ m_A11 += go[14];
+ m_A10 += go[15];
+ m_A12 += go[16];
+ m_A12 += go[17];
+ double RHS4 = Idr[14];
+ RHS4 += Idr[15];
+ RHS4 += Idr[16];
+ RHS4 += Idr[17];
+ RHS4 += Idr[18];
+ RHS4 -= go[18] * *cnV[18];
+ m_A13 += gt[19];
+ m_A13 += gt[20];
+ m_A13 += gt[21];
+ m_A14 += go[19];
+ double RHS5 = Idr[19];
+ RHS5 += Idr[20];
+ RHS5 += Idr[21];
+ RHS5 -= go[20] * *cnV[20];
+ RHS5 -= go[21] * *cnV[21];
+ m_A15 += gt[22];
+ m_A15 += gt[23];
+ m_A15 += gt[24];
+ m_A15 += gt[25];
+ m_A15 += gt[26];
+ m_A15 += gt[27];
+ m_A15 += gt[28];
+ m_A16 += go[22];
+ m_A16 += go[23];
+ m_A16 += go[24];
+ m_A17 += go[25];
+ m_A17 += go[26];
+ double RHS6 = Idr[22];
+ RHS6 += Idr[23];
+ RHS6 += Idr[24];
+ RHS6 += Idr[25];
+ RHS6 += Idr[26];
+ RHS6 += Idr[27];
+ RHS6 += Idr[28];
+ RHS6 -= go[27] * *cnV[27];
+ RHS6 -= go[28] * *cnV[28];
+ m_A18 += gt[29];
+ m_A18 += gt[30];
+ m_A19 += go[29];
+ double RHS7 = Idr[29];
+ RHS7 += Idr[30];
+ RHS7 -= go[30] * *cnV[30];
+ m_A20 += gt[31];
+ m_A20 += gt[32];
+ m_A21 += go[31];
+ double RHS8 = Idr[31];
+ RHS8 += Idr[32];
+ RHS8 -= go[32] * *cnV[32];
+ m_A22 += gt[33];
+ m_A22 += gt[34];
+ m_A22 += gt[35];
+ m_A23 += go[33];
+ double RHS9 = Idr[33];
+ RHS9 += Idr[34];
+ RHS9 += Idr[35];
+ RHS9 -= go[34] * *cnV[34];
+ RHS9 -= go[35] * *cnV[35];
+ m_A24 += gt[36];
+ m_A24 += gt[37];
+ m_A24 += gt[38];
+ m_A24 += gt[39];
+ m_A24 += gt[40];
+ m_A25 += go[36];
+ m_A26 += go[37];
+ m_A27 += go[38];
+ m_A27 += go[39];
+ double RHS10 = Idr[36];
+ RHS10 += Idr[37];
+ RHS10 += Idr[38];
+ RHS10 += Idr[39];
+ RHS10 += Idr[40];
+ RHS10 -= go[40] * *cnV[40];
+ m_A29 += gt[41];
+ m_A29 += gt[42];
+ m_A29 += gt[43];
+ m_A29 += gt[44];
+ m_A29 += gt[45];
+ m_A29 += gt[46];
+ m_A29 += gt[47];
+ m_A30 += go[41];
+ m_A30 += go[42];
+ m_A30 += go[43];
+ m_A28 += go[44];
+ double RHS11 = Idr[41];
+ RHS11 += Idr[42];
+ RHS11 += Idr[43];
+ RHS11 += Idr[44];
+ RHS11 += Idr[45];
+ RHS11 += Idr[46];
+ RHS11 += Idr[47];
+ RHS11 -= go[45] * *cnV[45];
+ RHS11 -= go[46] * *cnV[46];
+ RHS11 -= go[47] * *cnV[47];
+ m_A31 += gt[48];
+ m_A31 += gt[49];
+ m_A31 += gt[50];
+ m_A31 += gt[51];
+ m_A31 += gt[52];
+ m_A31 += gt[53];
+ m_A32 += go[48];
+ m_A32 += go[49];
+ m_A32 += go[50];
+ m_A33 += go[51];
+ m_A34 += go[52];
+ double RHS12 = Idr[48];
+ RHS12 += Idr[49];
+ RHS12 += Idr[50];
+ RHS12 += Idr[51];
+ RHS12 += Idr[52];
+ RHS12 += Idr[53];
+ RHS12 -= go[53] * *cnV[53];
+ m_A37 += gt[54];
+ m_A37 += gt[55];
+ m_A37 += gt[56];
+ m_A37 += gt[57];
+ m_A37 += gt[58];
+ m_A36 += go[54];
+ m_A35 += go[55];
+ m_A35 += go[56];
+ m_A35 += go[57];
+ m_A39 += go[58];
+ double RHS13 = Idr[54];
+ RHS13 += Idr[55];
+ RHS13 += Idr[56];
+ RHS13 += Idr[57];
+ RHS13 += Idr[58];
+ m_A42 += gt[59];
+ m_A42 += gt[60];
+ m_A42 += gt[61];
+ m_A42 += gt[62];
+ m_A42 += gt[63];
+ m_A42 += gt[64];
+ m_A42 += gt[65];
+ m_A43 += go[59];
+ m_A43 += go[60];
+ m_A43 += go[61];
+ m_A41 += go[62];
+ double RHS14 = Idr[59];
+ RHS14 += Idr[60];
+ RHS14 += Idr[61];
+ RHS14 += Idr[62];
+ RHS14 += Idr[63];
+ RHS14 += Idr[64];
+ RHS14 += Idr[65];
+ RHS14 -= go[63] * *cnV[63];
+ RHS14 -= go[64] * *cnV[64];
+ RHS14 -= go[65] * *cnV[65];
+ m_A47 += gt[66];
+ m_A47 += gt[67];
+ m_A47 += gt[68];
+ m_A47 += gt[69];
+ m_A47 += gt[70];
+ m_A44 += go[66];
+ m_A45 += go[67];
+ m_A49 += go[68];
+ m_A49 += go[69];
+ double RHS15 = Idr[66];
+ RHS15 += Idr[67];
+ RHS15 += Idr[68];
+ RHS15 += Idr[69];
+ RHS15 += Idr[70];
+ RHS15 -= go[70] * *cnV[70];
+ m_A52 += gt[71];
+ m_A52 += gt[72];
+ m_A52 += gt[73];
+ m_A52 += gt[74];
+ m_A52 += gt[75];
+ m_A52 += gt[76];
+ m_A52 += gt[77];
+ m_A51 += go[71];
+ m_A51 += go[72];
+ m_A51 += go[73];
+ m_A50 += go[74];
+ double RHS16 = Idr[71];
+ RHS16 += Idr[72];
+ RHS16 += Idr[73];
+ RHS16 += Idr[74];
+ RHS16 += Idr[75];
+ RHS16 += Idr[76];
+ RHS16 += Idr[77];
+ RHS16 -= go[75] * *cnV[75];
+ RHS16 -= go[76] * *cnV[76];
+ RHS16 -= go[77] * *cnV[77];
+ m_A57 += gt[78];
+ m_A57 += gt[79];
+ m_A57 += gt[80];
+ m_A57 += gt[81];
+ m_A57 += gt[82];
+ m_A55 += go[78];
+ m_A56 += go[79];
+ m_A59 += go[80];
+ m_A59 += go[81];
+ double RHS17 = Idr[78];
+ RHS17 += Idr[79];
+ RHS17 += Idr[80];
+ RHS17 += Idr[81];
+ RHS17 += Idr[82];
+ RHS17 -= go[82] * *cnV[82];
+ m_A64 += gt[83];
+ m_A64 += gt[84];
+ m_A64 += gt[85];
+ m_A64 += gt[86];
+ m_A64 += gt[87];
+ m_A64 += gt[88];
+ m_A64 += gt[89];
+ m_A64 += gt[90];
+ m_A62 += go[83];
+ m_A65 += go[84];
+ m_A60 += go[85];
+ m_A60 += go[86];
+ m_A61 += go[87];
+ m_A61 += go[88];
+ m_A61 += go[89];
+ double RHS18 = Idr[83];
+ RHS18 += Idr[84];
+ RHS18 += Idr[85];
+ RHS18 += Idr[86];
+ RHS18 += Idr[87];
+ RHS18 += Idr[88];
+ RHS18 += Idr[89];
+ RHS18 += Idr[90];
+ RHS18 -= go[90] * *cnV[90];
+ m_A69 += gt[91];
+ m_A69 += gt[92];
+ m_A69 += gt[93];
+ m_A69 += gt[94];
+ m_A69 += gt[95];
+ m_A67 += go[91];
+ m_A66 += go[92];
+ m_A66 += go[93];
+ m_A66 += go[94];
+ m_A71 += go[95];
+ double RHS19 = Idr[91];
+ RHS19 += Idr[92];
+ RHS19 += Idr[93];
+ RHS19 += Idr[94];
+ RHS19 += Idr[95];
+ m_A78 += gt[96];
+ m_A78 += gt[97];
+ m_A78 += gt[98];
+ m_A78 += gt[99];
+ m_A78 += gt[100];
+ m_A78 += gt[101];
+ m_A78 += gt[102];
+ m_A74 += go[96];
+ m_A76 += go[97];
+ m_A76 += go[98];
+ m_A73 += go[99];
+ m_A73 += go[100];
+ m_A72 += go[101];
+ m_A80 += go[102];
+ double RHS20 = Idr[96];
+ RHS20 += Idr[97];
+ RHS20 += Idr[98];
+ RHS20 += Idr[99];
+ RHS20 += Idr[100];
+ RHS20 += Idr[101];
+ RHS20 += Idr[102];
+ m_A89 += gt[103];
+ m_A89 += gt[104];
+ m_A89 += gt[105];
+ m_A89 += gt[106];
+ m_A89 += gt[107];
+ m_A89 += gt[108];
+ m_A89 += gt[109];
+ m_A83 += go[103];
+ m_A85 += go[104];
+ m_A85 += go[105];
+ m_A82 += go[106];
+ m_A82 += go[107];
+ m_A81 += go[108];
+ m_A87 += go[109];
+ double RHS21 = Idr[103];
+ RHS21 += Idr[104];
+ RHS21 += Idr[105];
+ RHS21 += Idr[106];
+ RHS21 += Idr[107];
+ RHS21 += Idr[108];
+ RHS21 += Idr[109];
+ m_A96 += gt[110];
+ m_A96 += gt[111];
+ m_A96 += gt[112];
+ m_A96 += gt[113];
+ m_A96 += gt[114];
+ m_A96 += gt[115];
+ m_A96 += gt[116];
+ m_A96 += gt[117];
+ m_A93 += go[110];
+ m_A94 += go[111];
+ m_A91 += go[112];
+ m_A91 += go[113];
+ m_A92 += go[114];
+ m_A92 += go[115];
+ m_A92 += go[116];
+ double RHS22 = Idr[110];
+ RHS22 += Idr[111];
+ RHS22 += Idr[112];
+ RHS22 += Idr[113];
+ RHS22 += Idr[114];
+ RHS22 += Idr[115];
+ RHS22 += Idr[116];
+ RHS22 += Idr[117];
+ RHS22 -= go[117] * *cnV[117];
+ const double f0 = 1.0 / m_A0;
+ const double f0_11 = -f0 * m_A28;
+ m_A29 += m_A1 * f0_11;
+ RHS11 += f0_11 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_13 = -f1 * m_A35;
+ m_A37 += m_A3 * f1_13;
+ m_A39 += m_A4 * f1_13;
+ RHS13 += f1_13 * RHS1;
+ const double f1_18 = -f1 * m_A60;
+ m_A62 += m_A3 * f1_18;
+ m_A64 += m_A4 * f1_18;
+ RHS18 += f1_18 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_21 = -f2 * m_A81;
+ m_A89 += m_A6 * f2_21;
+ RHS21 += f2_21 * RHS2;
+ const double f3 = 1.0 / m_A7;
+ const double f3_15 = -f3 * m_A44;
+ m_A47 += m_A8 * f3_15;
+ RHS15 += f3_15 * RHS3;
+ const double f4 = 1.0 / m_A9;
+ const double f4_13 = -f4 * m_A36;
+ m_A37 += m_A10 * f4_13;
+ m_A38 += m_A11 * f4_13;
+ m_A40 += m_A12 * f4_13;
+ RHS13 += f4_13 * RHS4;
+ const double f4_15 = -f4 * m_A45;
+ m_A46 += m_A10 * f4_15;
+ m_A47 += m_A11 * f4_15;
+ m_A49 += m_A12 * f4_15;
+ RHS15 += f4_15 * RHS4;
+ const double f4_21 = -f4 * m_A82;
+ m_A84 += m_A10 * f4_21;
+ m_A85 += m_A11 * f4_21;
+ m_A89 += m_A12 * f4_21;
+ RHS21 += f4_21 * RHS4;
+ const double f5 = 1.0 / m_A13;
+ const double f5_14 = -f5 * m_A41;
+ m_A42 += m_A14 * f5_14;
+ RHS14 += f5_14 * RHS5;
+ const double f6 = 1.0 / m_A15;
+ const double f6_19 = -f6 * m_A66;
+ m_A69 += m_A16 * f6_19;
+ m_A71 += m_A17 * f6_19;
+ RHS19 += f6_19 * RHS6;
+ const double f6_22 = -f6 * m_A91;
+ m_A93 += m_A16 * f6_22;
+ m_A96 += m_A17 * f6_22;
+ RHS22 += f6_22 * RHS6;
+ const double f7 = 1.0 / m_A18;
+ const double f7_17 = -f7 * m_A55;
+ m_A57 += m_A19 * f7_17;
+ RHS17 += f7_17 * RHS7;
+ const double f8 = 1.0 / m_A20;
+ const double f8_20 = -f8 * m_A72;
+ m_A78 += m_A21 * f8_20;
+ RHS20 += f8_20 * RHS8;
+ const double f9 = 1.0 / m_A22;
+ const double f9_16 = -f9 * m_A50;
+ m_A52 += m_A23 * f9_16;
+ RHS16 += f9_16 * RHS9;
+ const double f10 = 1.0 / m_A24;
+ const double f10_17 = -f10 * m_A56;
+ m_A57 += m_A25 * f10_17;
+ m_A58 += m_A26 * f10_17;
+ m_A59 += m_A27 * f10_17;
+ RHS17 += f10_17 * RHS10;
+ const double f10_19 = -f10 * m_A67;
+ m_A68 += m_A25 * f10_19;
+ m_A69 += m_A26 * f10_19;
+ m_A70 += m_A27 * f10_19;
+ RHS19 += f10_19 * RHS10;
+ const double f10_20 = -f10 * m_A73;
+ m_A76 += m_A25 * f10_20;
+ m_A77 += m_A26 * f10_20;
+ m_A78 += m_A27 * f10_20;
+ RHS20 += f10_20 * RHS10;
+ const double f11 = 1.0 / m_A29;
+ const double f11_18 = -f11 * m_A61;
+ m_A64 += m_A30 * f11_18;
+ RHS18 += f11_18 * RHS11;
+ const double f12 = 1.0 / m_A31;
+ const double f12_16 = -f12 * m_A51;
+ m_A52 += m_A32 * f12_16;
+ m_A53 += m_A33 * f12_16;
+ m_A54 += m_A34 * f12_16;
+ RHS16 += f12_16 * RHS12;
+ const double f12_20 = -f12 * m_A74;
+ m_A75 += m_A32 * f12_20;
+ m_A78 += m_A33 * f12_20;
+ m_A79 += m_A34 * f12_20;
+ RHS20 += f12_20 * RHS12;
+ const double f12_21 = -f12 * m_A83;
+ m_A86 += m_A32 * f12_21;
+ m_A88 += m_A33 * f12_21;
+ m_A89 += m_A34 * f12_21;
+ RHS21 += f12_21 * RHS12;
+ const double f13 = 1.0 / m_A37;
+ const double f13_15 = -f13 * m_A46;
+ m_A47 += m_A38 * f13_15;
+ m_A48 += m_A39 * f13_15;
+ m_A49 += m_A40 * f13_15;
+ RHS15 += f13_15 * RHS13;
+ const double f13_18 = -f13 * m_A62;
+ m_A63 += m_A38 * f13_18;
+ m_A64 += m_A39 * f13_18;
+ m_A65 += m_A40 * f13_18;
+ RHS18 += f13_18 * RHS13;
+ const double f13_21 = -f13 * m_A84;
+ m_A85 += m_A38 * f13_21;
+ m_A87 += m_A39 * f13_21;
+ m_A89 += m_A40 * f13_21;
+ RHS21 += f13_21 * RHS13;
+ const double f14 = 1.0 / m_A42;
+ const double f14_22 = -f14 * m_A92;
+ m_A96 += m_A43 * f14_22;
+ RHS22 += f14_22 * RHS14;
+ const double f15 = 1.0 / m_A47;
+ const double f15_18 = -f15 * m_A63;
+ m_A64 += m_A48 * f15_18;
+ m_A65 += m_A49 * f15_18;
+ RHS18 += f15_18 * RHS15;
+ const double f15_21 = -f15 * m_A85;
+ m_A87 += m_A48 * f15_21;
+ m_A89 += m_A49 * f15_21;
+ RHS21 += f15_21 * RHS15;
+ const double f16 = 1.0 / m_A52;
+ const double f16_20 = -f16 * m_A75;
+ m_A78 += m_A53 * f16_20;
+ m_A79 += m_A54 * f16_20;
+ RHS20 += f16_20 * RHS16;
+ const double f16_21 = -f16 * m_A86;
+ m_A88 += m_A53 * f16_21;
+ m_A89 += m_A54 * f16_21;
+ RHS21 += f16_21 * RHS16;
+ const double f17 = 1.0 / m_A57;
+ const double f17_19 = -f17 * m_A68;
+ m_A69 += m_A58 * f17_19;
+ m_A70 += m_A59 * f17_19;
+ RHS19 += f17_19 * RHS17;
+ const double f17_20 = -f17 * m_A76;
+ m_A77 += m_A58 * f17_20;
+ m_A78 += m_A59 * f17_20;
+ RHS20 += f17_20 * RHS17;
+ const double f18 = 1.0 / m_A64;
+ const double f18_21 = -f18 * m_A87;
+ m_A89 += m_A65 * f18_21;
+ RHS21 += f18_21 * RHS18;
+ const double f19 = 1.0 / m_A69;
+ const double f19_20 = -f19 * m_A77;
+ m_A78 += m_A70 * f19_20;
+ m_A80 += m_A71 * f19_20;
+ RHS20 += f19_20 * RHS19;
+ const double f19_22 = -f19 * m_A93;
+ m_A94 += m_A70 * f19_22;
+ m_A96 += m_A71 * f19_22;
+ RHS22 += f19_22 * RHS19;
+ const double f20 = 1.0 / m_A78;
+ const double f20_21 = -f20 * m_A88;
+ m_A89 += m_A79 * f20_21;
+ m_A90 += m_A80 * f20_21;
+ RHS21 += f20_21 * RHS20;
+ const double f20_22 = -f20 * m_A94;
+ m_A95 += m_A79 * f20_22;
+ m_A96 += m_A80 * f20_22;
+ RHS22 += f20_22 * RHS20;
+ const double f21 = 1.0 / m_A89;
+ const double f21_22 = -f21 * m_A95;
+ m_A96 += m_A90 * f21_22;
+ RHS22 += f21_22 * RHS21;
+ V[22] = RHS22 / m_A96;
+ double tmp21 = 0.0;
+ tmp21 += m_A90 * V[22];
+ V[21] = (RHS21 - tmp21) / m_A89;
+ double tmp20 = 0.0;
+ tmp20 += m_A79 * V[21];
+ tmp20 += m_A80 * V[22];
+ V[20] = (RHS20 - tmp20) / m_A78;
+ double tmp19 = 0.0;
+ tmp19 += m_A70 * V[20];
+ tmp19 += m_A71 * V[22];
+ V[19] = (RHS19 - tmp19) / m_A69;
+ double tmp18 = 0.0;
+ tmp18 += m_A65 * V[21];
+ V[18] = (RHS18 - tmp18) / m_A64;
+ double tmp17 = 0.0;
+ tmp17 += m_A58 * V[19];
+ tmp17 += m_A59 * V[20];
+ V[17] = (RHS17 - tmp17) / m_A57;
+ double tmp16 = 0.0;
+ tmp16 += m_A53 * V[20];
+ tmp16 += m_A54 * V[21];
+ V[16] = (RHS16 - tmp16) / m_A52;
+ double tmp15 = 0.0;
+ tmp15 += m_A48 * V[18];
+ tmp15 += m_A49 * V[21];
+ V[15] = (RHS15 - tmp15) / m_A47;
+ double tmp14 = 0.0;
+ tmp14 += m_A43 * V[22];
+ V[14] = (RHS14 - tmp14) / m_A42;
+ double tmp13 = 0.0;
+ tmp13 += m_A38 * V[15];
+ tmp13 += m_A39 * V[18];
+ tmp13 += m_A40 * V[21];
+ V[13] = (RHS13 - tmp13) / m_A37;
+ double tmp12 = 0.0;
+ tmp12 += m_A32 * V[16];
+ tmp12 += m_A33 * V[20];
+ tmp12 += m_A34 * V[21];
+ V[12] = (RHS12 - tmp12) / m_A31;
+ double tmp11 = 0.0;
+ tmp11 += m_A30 * V[18];
+ V[11] = (RHS11 - tmp11) / m_A29;
+ double tmp10 = 0.0;
+ tmp10 += m_A25 * V[17];
+ tmp10 += m_A26 * V[19];
+ tmp10 += m_A27 * V[20];
+ V[10] = (RHS10 - tmp10) / m_A24;
+ double tmp9 = 0.0;
+ tmp9 += m_A23 * V[16];
+ V[9] = (RHS9 - tmp9) / m_A22;
+ double tmp8 = 0.0;
+ tmp8 += m_A21 * V[20];
+ V[8] = (RHS8 - tmp8) / m_A20;
+ double tmp7 = 0.0;
+ tmp7 += m_A19 * V[17];
+ V[7] = (RHS7 - tmp7) / m_A18;
+ double tmp6 = 0.0;
+ tmp6 += m_A16 * V[19];
+ tmp6 += m_A17 * V[22];
+ V[6] = (RHS6 - tmp6) / m_A15;
+ double tmp5 = 0.0;
+ tmp5 += m_A14 * V[14];
+ V[5] = (RHS5 - tmp5) / m_A13;
+ double tmp4 = 0.0;
+ tmp4 += m_A10 * V[13];
+ tmp4 += m_A11 * V[15];
+ tmp4 += m_A12 * V[21];
+ V[4] = (RHS4 - tmp4) / m_A9;
+ double tmp3 = 0.0;
+ tmp3 += m_A8 * V[15];
+ V[3] = (RHS3 - tmp3) / m_A7;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[21];
+ V[2] = (RHS2 - tmp2) / m_A5;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[13];
+ tmp1 += m_A4 * V[18];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[11];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// 280zzzap
static void nl_gcr_24643c159711f292_95_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -3851,6 +5750,438 @@ static void nl_gcr_24643c159711f292_95_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// frogs
+static void nl_gcr_263b618097fad01_38_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ m_A2 += go[1];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[2] * *cnV[2];
+ m_A3 += gt[3];
+ m_A3 += gt[4];
+ m_A4 += go[3];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 -= go[4] * *cnV[4];
+ m_A5 += gt[5];
+ m_A5 += gt[6];
+ m_A5 += gt[7];
+ m_A7 += go[5];
+ m_A6 += go[6];
+ double RHS2 = Idr[5];
+ RHS2 += Idr[6];
+ RHS2 += Idr[7];
+ RHS2 -= go[7] * *cnV[7];
+ m_A8 += gt[8];
+ m_A8 += gt[9];
+ m_A8 += gt[10];
+ m_A8 += gt[11];
+ m_A8 += gt[12];
+ m_A8 += gt[13];
+ m_A8 += gt[14];
+ m_A9 += go[8];
+ double RHS3 = Idr[8];
+ RHS3 += Idr[9];
+ RHS3 += Idr[10];
+ RHS3 += Idr[11];
+ RHS3 += Idr[12];
+ RHS3 += Idr[13];
+ RHS3 += Idr[14];
+ RHS3 -= go[9] * *cnV[9];
+ RHS3 -= go[10] * *cnV[10];
+ RHS3 -= go[11] * *cnV[11];
+ RHS3 -= go[12] * *cnV[12];
+ RHS3 -= go[13] * *cnV[13];
+ RHS3 -= go[14] * *cnV[14];
+ m_A10 += gt[15];
+ m_A10 += gt[16];
+ m_A10 += gt[17];
+ m_A11 += go[15];
+ m_A12 += go[16];
+ double RHS4 = Idr[15];
+ RHS4 += Idr[16];
+ RHS4 += Idr[17];
+ RHS4 -= go[17] * *cnV[17];
+ m_A14 += gt[18];
+ m_A14 += gt[19];
+ m_A14 += gt[20];
+ m_A14 += gt[21];
+ m_A16 += go[18];
+ m_A13 += go[19];
+ double RHS5 = Idr[18];
+ RHS5 += Idr[19];
+ RHS5 += Idr[20];
+ RHS5 += Idr[21];
+ RHS5 -= go[20] * *cnV[20];
+ RHS5 -= go[21] * *cnV[21];
+ m_A19 += gt[22];
+ m_A19 += gt[23];
+ m_A19 += gt[24];
+ m_A21 += go[22];
+ m_A17 += go[23];
+ double RHS6 = Idr[22];
+ RHS6 += Idr[23];
+ RHS6 += Idr[24];
+ RHS6 -= go[24] * *cnV[24];
+ m_A24 += gt[25];
+ m_A24 += gt[26];
+ m_A24 += gt[27];
+ m_A24 += gt[28];
+ m_A24 += gt[29];
+ m_A22 += go[25];
+ m_A23 += go[26];
+ m_A25 += go[27];
+ double RHS7 = Idr[25];
+ RHS7 += Idr[26];
+ RHS7 += Idr[27];
+ RHS7 += Idr[28];
+ RHS7 += Idr[29];
+ RHS7 -= go[28] * *cnV[28];
+ RHS7 -= go[29] * *cnV[29];
+ m_A30 += gt[30];
+ m_A30 += gt[31];
+ m_A30 += gt[32];
+ m_A30 += gt[33];
+ m_A30 += gt[34];
+ m_A30 += gt[35];
+ m_A30 += gt[36];
+ m_A27 += go[30];
+ m_A31 += go[31];
+ m_A26 += go[32];
+ m_A28 += go[33];
+ double RHS8 = Idr[30];
+ RHS8 += Idr[31];
+ RHS8 += Idr[32];
+ RHS8 += Idr[33];
+ RHS8 += Idr[34];
+ RHS8 += Idr[35];
+ RHS8 += Idr[36];
+ RHS8 -= go[34] * *cnV[34];
+ RHS8 -= go[35] * *cnV[35];
+ RHS8 -= go[36] * *cnV[36];
+ m_A37 += gt[37];
+ m_A37 += gt[38];
+ m_A37 += gt[39];
+ m_A37 += gt[40];
+ m_A37 += gt[41];
+ m_A35 += go[37];
+ m_A33 += go[38];
+ m_A32 += go[39];
+ m_A36 += go[40];
+ m_A34 += go[41];
+ double RHS9 = Idr[37];
+ RHS9 += Idr[38];
+ RHS9 += Idr[39];
+ RHS9 += Idr[40];
+ RHS9 += Idr[41];
+ const double f0 = 1.0 / m_A0;
+ const double f0_5 = -f0 * m_A13;
+ m_A14 += m_A1 * f0_5;
+ m_A15 += m_A2 * f0_5;
+ RHS5 += f0_5 * RHS0;
+ const double f0_6 = -f0 * m_A17;
+ m_A18 += m_A1 * f0_6;
+ m_A19 += m_A2 * f0_6;
+ RHS6 += f0_6 * RHS0;
+ const double f1 = 1.0 / m_A3;
+ const double f1_8 = -f1 * m_A26;
+ m_A30 += m_A4 * f1_8;
+ RHS8 += f1_8 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_8 = -f2 * m_A27;
+ m_A30 += m_A6 * f2_8;
+ m_A31 += m_A7 * f2_8;
+ RHS8 += f2_8 * RHS2;
+ const double f2_9 = -f2 * m_A32;
+ m_A36 += m_A6 * f2_9;
+ m_A37 += m_A7 * f2_9;
+ RHS9 += f2_9 * RHS2;
+ const double f3 = 1.0 / m_A8;
+ const double f3_7 = -f3 * m_A22;
+ m_A23 += m_A9 * f3_7;
+ RHS7 += f3_7 * RHS3;
+ const double f4 = 1.0 / m_A10;
+ const double f4_7 = -f4 * m_A23;
+ m_A24 += m_A11 * f4_7;
+ m_A25 += m_A12 * f4_7;
+ RHS7 += f4_7 * RHS4;
+ const double f4_9 = -f4 * m_A33;
+ m_A35 += m_A11 * f4_9;
+ m_A37 += m_A12 * f4_9;
+ RHS9 += f4_9 * RHS4;
+ const double f5 = 1.0 / m_A14;
+ const double f5_6 = -f5 * m_A18;
+ m_A19 += m_A15 * f5_6;
+ m_A20 += m_A16 * f5_6;
+ RHS6 += f5_6 * RHS5;
+ const double f5_8 = -f5 * m_A28;
+ m_A29 += m_A15 * f5_8;
+ m_A30 += m_A16 * f5_8;
+ RHS8 += f5_8 * RHS5;
+ const double f6 = 1.0 / m_A19;
+ const double f6_8 = -f6 * m_A29;
+ m_A30 += m_A20 * f6_8;
+ m_A31 += m_A21 * f6_8;
+ RHS8 += f6_8 * RHS6;
+ const double f6_9 = -f6 * m_A34;
+ m_A36 += m_A20 * f6_9;
+ m_A37 += m_A21 * f6_9;
+ RHS9 += f6_9 * RHS6;
+ const double f7 = 1.0 / m_A24;
+ const double f7_9 = -f7 * m_A35;
+ m_A37 += m_A25 * f7_9;
+ RHS9 += f7_9 * RHS7;
+ const double f8 = 1.0 / m_A30;
+ const double f8_9 = -f8 * m_A36;
+ m_A37 += m_A31 * f8_9;
+ RHS9 += f8_9 * RHS8;
+ V[9] = RHS9 / m_A37;
+ double tmp8 = 0.0;
+ tmp8 += m_A31 * V[9];
+ V[8] = (RHS8 - tmp8) / m_A30;
+ double tmp7 = 0.0;
+ tmp7 += m_A25 * V[9];
+ V[7] = (RHS7 - tmp7) / m_A24;
+ double tmp6 = 0.0;
+ tmp6 += m_A20 * V[8];
+ tmp6 += m_A21 * V[9];
+ V[6] = (RHS6 - tmp6) / m_A19;
+ double tmp5 = 0.0;
+ tmp5 += m_A15 * V[6];
+ tmp5 += m_A16 * V[8];
+ V[5] = (RHS5 - tmp5) / m_A14;
+ double tmp4 = 0.0;
+ tmp4 += m_A11 * V[7];
+ tmp4 += m_A12 * V[9];
+ V[4] = (RHS4 - tmp4) / m_A10;
+ double tmp3 = 0.0;
+ tmp3 += m_A9 * V[4];
+ V[3] = (RHS3 - tmp3) / m_A8;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[8];
+ tmp2 += m_A7 * V[9];
+ V[2] = (RHS2 - tmp2) / m_A5;
+ double tmp1 = 0.0;
+ tmp1 += m_A4 * V[8];
+ V[1] = (RHS1 - tmp1) / m_A3;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[5];
+ tmp0 += m_A2 * V[6];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
+// brdrline
+static void nl_gcr_2753fc1815ce0cba_23_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A2 += gt[6];
+ m_A3 += go[3];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 += Idr[6];
+ RHS1 -= go[4] * *cnV[4];
+ RHS1 -= go[5] * *cnV[5];
+ RHS1 -= go[6] * *cnV[6];
+ m_A4 += gt[7];
+ m_A4 += gt[8];
+ m_A4 += gt[9];
+ m_A4 += gt[10];
+ m_A5 += go[7];
+ m_A6 += go[8];
+ double RHS2 = Idr[7];
+ RHS2 += Idr[8];
+ RHS2 += Idr[9];
+ RHS2 += Idr[10];
+ RHS2 -= go[9] * *cnV[9];
+ RHS2 -= go[10] * *cnV[10];
+ m_A8 += gt[11];
+ m_A8 += gt[12];
+ m_A8 += gt[13];
+ m_A8 += gt[14];
+ m_A8 += gt[15];
+ m_A8 += gt[16];
+ m_A8 += gt[17];
+ m_A9 += go[11];
+ m_A7 += go[12];
+ double RHS3 = Idr[11];
+ RHS3 += Idr[12];
+ RHS3 += Idr[13];
+ RHS3 += Idr[14];
+ RHS3 += Idr[15];
+ RHS3 += Idr[16];
+ RHS3 += Idr[17];
+ RHS3 -= go[13] * *cnV[13];
+ RHS3 -= go[14] * *cnV[14];
+ RHS3 -= go[15] * *cnV[15];
+ RHS3 -= go[16] * *cnV[16];
+ RHS3 -= go[17] * *cnV[17];
+ m_A11 += gt[18];
+ m_A11 += gt[19];
+ m_A11 += gt[20];
+ m_A11 += gt[21];
+ m_A13 += go[18];
+ m_A12 += go[19];
+ m_A10 += go[20];
+ double RHS4 = Idr[18];
+ RHS4 += Idr[19];
+ RHS4 += Idr[20];
+ RHS4 += Idr[21];
+ RHS4 -= go[21] * *cnV[21];
+ m_A16 += gt[22];
+ m_A16 += gt[23];
+ m_A16 += gt[24];
+ m_A14 += go[22];
+ m_A15 += go[23];
+ double RHS5 = Idr[22];
+ RHS5 += Idr[23];
+ RHS5 += Idr[24];
+ RHS5 -= go[24] * *cnV[24];
+ m_A22 += gt[25];
+ m_A22 += gt[26];
+ m_A18 += go[25];
+ m_A20 += go[26];
+ double RHS6 = Idr[25];
+ RHS6 += Idr[26];
+ const double f0 = 1.0 / m_A0;
+ const double f0_3 = -f0 * m_A7;
+ m_A9 += m_A1 * f0_3;
+ RHS3 += f0_3 * RHS0;
+ const double f0_4 = -f0 * m_A10;
+ m_A11 += m_A1 * f0_4;
+ RHS4 += f0_4 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_5 = -f1 * m_A14;
+ m_A16 += m_A3 * f1_5;
+ RHS5 += f1_5 * RHS1;
+ const double f2 = 1.0 / m_A4;
+ const double f2_6 = -f2 * m_A18;
+ m_A19 += m_A5 * f2_6;
+ m_A22 += m_A6 * f2_6;
+ RHS6 += f2_6 * RHS2;
+ const double f3 = 1.0 / m_A8;
+ const double f3_6 = -f3 * m_A19;
+ m_A20 += m_A9 * f3_6;
+ RHS6 += f3_6 * RHS3;
+ const double f4 = 1.0 / m_A11;
+ const double f4_5 = -f4 * m_A15;
+ m_A16 += m_A12 * f4_5;
+ m_A17 += m_A13 * f4_5;
+ RHS5 += f4_5 * RHS4;
+ const double f4_6 = -f4 * m_A20;
+ m_A21 += m_A12 * f4_6;
+ m_A22 += m_A13 * f4_6;
+ RHS6 += f4_6 * RHS4;
+ const double f5 = 1.0 / m_A16;
+ const double f5_6 = -f5 * m_A21;
+ m_A22 += m_A17 * f5_6;
+ RHS6 += f5_6 * RHS5;
+ V[6] = RHS6 / m_A22;
+ double tmp5 = 0.0;
+ tmp5 += m_A17 * V[6];
+ V[5] = (RHS5 - tmp5) / m_A16;
+ double tmp4 = 0.0;
+ tmp4 += m_A12 * V[5];
+ tmp4 += m_A13 * V[6];
+ V[4] = (RHS4 - tmp4) / m_A11;
+ double tmp3 = 0.0;
+ tmp3 += m_A9 * V[4];
+ V[3] = (RHS3 - tmp3) / m_A8;
+ double tmp2 = 0.0;
+ tmp2 += m_A5 * V[3];
+ tmp2 += m_A6 * V[6];
+ V[2] = (RHS2 - tmp2) / m_A4;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[5];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[4];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// zac1b11142
static void nl_gcr_287a160e7c36b5b0_96_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -5687,8 +8018,8 @@ static void nl_gcr_2f84bc98d737730b_22_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
-// astrob
-static void nl_gcr_30fc51fe03b164cb_178_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+// brdrline
+static void nl_gcr_30923b54310ae144_8_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
{
@@ -5701,1173 +8032,63 @@ static void nl_gcr_30fc51fe03b164cb_178_double_double(double * __restrict V, con
double m_A5(0.0);
double m_A6(0.0);
double m_A7(0.0);
- double m_A8(0.0);
- double m_A9(0.0);
- double m_A10(0.0);
- double m_A11(0.0);
- double m_A12(0.0);
- double m_A13(0.0);
- double m_A14(0.0);
- double m_A15(0.0);
- double m_A16(0.0);
- double m_A17(0.0);
- double m_A18(0.0);
- double m_A19(0.0);
- double m_A20(0.0);
- double m_A21(0.0);
- double m_A22(0.0);
- double m_A23(0.0);
- double m_A24(0.0);
- double m_A25(0.0);
- double m_A26(0.0);
- double m_A27(0.0);
- double m_A28(0.0);
- double m_A29(0.0);
- double m_A30(0.0);
- double m_A31(0.0);
- double m_A32(0.0);
- double m_A33(0.0);
- double m_A34(0.0);
- double m_A35(0.0);
- double m_A36(0.0);
- double m_A37(0.0);
- double m_A38(0.0);
- double m_A39(0.0);
- double m_A40(0.0);
- double m_A41(0.0);
- double m_A42(0.0);
- double m_A43(0.0);
- double m_A44(0.0);
- double m_A45(0.0);
- double m_A46(0.0);
- double m_A47(0.0);
- double m_A48(0.0);
- double m_A49(0.0);
- double m_A50(0.0);
- double m_A51(0.0);
- double m_A52(0.0);
- double m_A53(0.0);
- double m_A54(0.0);
- double m_A55(0.0);
- double m_A56(0.0);
- double m_A57(0.0);
- double m_A58(0.0);
- double m_A59(0.0);
- double m_A60(0.0);
- double m_A61(0.0);
- double m_A62(0.0);
- double m_A63(0.0);
- double m_A64(0.0);
- double m_A65(0.0);
- double m_A66(0.0);
- double m_A67(0.0);
- double m_A68(0.0);
- double m_A69(0.0);
- double m_A70(0.0);
- double m_A71(0.0);
- double m_A72(0.0);
- double m_A73(0.0);
- double m_A74(0.0);
- double m_A75(0.0);
- double m_A76(0.0);
- double m_A77(0.0);
- double m_A78(0.0);
- double m_A79(0.0);
- double m_A80(0.0);
- double m_A81(0.0);
- double m_A82(0.0);
- double m_A83(0.0);
- double m_A84(0.0);
- double m_A85(0.0);
- double m_A86(0.0);
- double m_A87(0.0);
- double m_A88(0.0);
- double m_A89(0.0);
- double m_A90(0.0);
- double m_A91(0.0);
- double m_A92(0.0);
- double m_A93(0.0);
- double m_A94(0.0);
- double m_A95(0.0);
- double m_A96(0.0);
- double m_A97(0.0);
- double m_A98(0.0);
- double m_A99(0.0);
- double m_A100(0.0);
- double m_A101(0.0);
- double m_A102(0.0);
- double m_A103(0.0);
- double m_A104(0.0);
- double m_A105(0.0);
- double m_A106(0.0);
- double m_A107(0.0);
- double m_A108(0.0);
- double m_A109(0.0);
- double m_A110(0.0);
- double m_A111(0.0);
- double m_A112(0.0);
- double m_A113(0.0);
- double m_A114(0.0);
- double m_A115(0.0);
- double m_A116(0.0);
- double m_A117(0.0);
- double m_A118(0.0);
- double m_A119(0.0);
- double m_A120(0.0);
- double m_A121(0.0);
- double m_A122(0.0);
- double m_A123(0.0);
- double m_A124(0.0);
- double m_A125(0.0);
- double m_A126(0.0);
- double m_A127(0.0);
- double m_A128(0.0);
- double m_A129(0.0);
- double m_A130(0.0);
- double m_A131(0.0);
- double m_A132(0.0);
- double m_A133(0.0);
- double m_A134(0.0);
- double m_A135(0.0);
- double m_A136(0.0);
- double m_A137(0.0);
- double m_A138(0.0);
- double m_A139(0.0);
- double m_A140(0.0);
- double m_A141(0.0);
- double m_A142(0.0);
- double m_A143(0.0);
- double m_A144(0.0);
- double m_A145(0.0);
- double m_A146(0.0);
- double m_A147(0.0);
- double m_A148(0.0);
- double m_A149(0.0);
- double m_A150(0.0);
- double m_A151(0.0);
- double m_A152(0.0);
- double m_A153(0.0);
- double m_A154(0.0);
- double m_A155(0.0);
- double m_A156(0.0);
- double m_A157(0.0);
- double m_A158(0.0);
- double m_A159(0.0);
- double m_A160(0.0);
- double m_A161(0.0);
- double m_A162(0.0);
- double m_A163(0.0);
- double m_A164(0.0);
- double m_A165(0.0);
- double m_A166(0.0);
- double m_A167(0.0);
- double m_A168(0.0);
- double m_A169(0.0);
- double m_A170(0.0);
- double m_A171(0.0);
- double m_A172(0.0);
- double m_A173(0.0);
- double m_A174(0.0);
- double m_A175(0.0);
- double m_A176(0.0);
- double m_A177(0.0);
m_A0 += gt[0];
m_A0 += gt[1];
m_A0 += gt[2];
- m_A0 += gt[3];
- m_A0 += gt[4];
- m_A0 += gt[5];
- m_A0 += gt[6];
m_A1 += go[0];
double RHS0 = Idr[0];
RHS0 += Idr[1];
RHS0 += Idr[2];
- RHS0 += Idr[3];
- RHS0 += Idr[4];
- RHS0 += Idr[5];
- RHS0 += Idr[6];
RHS0 -= go[1] * *cnV[1];
RHS0 -= go[2] * *cnV[2];
- RHS0 -= go[3] * *cnV[3];
- RHS0 -= go[4] * *cnV[4];
- RHS0 -= go[5] * *cnV[5];
- RHS0 -= go[6] * *cnV[6];
- m_A2 += gt[7];
- m_A2 += gt[8];
- m_A2 += gt[9];
- m_A4 += go[7];
- m_A3 += go[8];
- double RHS1 = Idr[7];
- RHS1 += Idr[8];
- RHS1 += Idr[9];
- RHS1 -= go[9] * *cnV[9];
- m_A5 += gt[10];
- m_A5 += gt[11];
- m_A5 += gt[12];
- m_A5 += gt[13];
- m_A5 += gt[14];
- m_A5 += gt[15];
- m_A5 += gt[16];
- m_A6 += go[10];
- double RHS2 = Idr[10];
+ m_A3 += gt[3];
+ m_A3 += gt[4];
+ m_A3 += gt[5];
+ m_A3 += gt[6];
+ m_A4 += go[3];
+ m_A2 += go[4];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 += Idr[6];
+ RHS1 -= go[5] * *cnV[5];
+ RHS1 -= go[6] * *cnV[6];
+ m_A7 += gt[7];
+ m_A7 += gt[8];
+ m_A7 += gt[9];
+ m_A7 += gt[10];
+ m_A7 += gt[11];
+ m_A7 += gt[12];
+ m_A7 += gt[13];
+ m_A5 += go[7];
+ m_A6 += go[8];
+ double RHS2 = Idr[7];
+ RHS2 += Idr[8];
+ RHS2 += Idr[9];
+ RHS2 += Idr[10];
RHS2 += Idr[11];
RHS2 += Idr[12];
RHS2 += Idr[13];
- RHS2 += Idr[14];
- RHS2 += Idr[15];
- RHS2 += Idr[16];
+ RHS2 -= go[9] * *cnV[9];
+ RHS2 -= go[10] * *cnV[10];
RHS2 -= go[11] * *cnV[11];
RHS2 -= go[12] * *cnV[12];
RHS2 -= go[13] * *cnV[13];
- RHS2 -= go[14] * *cnV[14];
- RHS2 -= go[15] * *cnV[15];
- RHS2 -= go[16] * *cnV[16];
- m_A7 += gt[17];
- m_A7 += gt[18];
- m_A7 += gt[19];
- m_A7 += gt[20];
- m_A9 += go[17];
- m_A10 += go[18];
- m_A8 += go[19];
- double RHS3 = Idr[17];
- RHS3 += Idr[18];
- RHS3 += Idr[19];
- RHS3 += Idr[20];
- RHS3 -= go[20] * *cnV[20];
- m_A11 += gt[21];
- m_A11 += gt[22];
- m_A11 += gt[23];
- m_A11 += gt[24];
- m_A12 += go[21];
- m_A12 += go[22];
- m_A13 += go[23];
- double RHS4 = Idr[21];
- RHS4 += Idr[22];
- RHS4 += Idr[23];
- RHS4 += Idr[24];
- RHS4 -= go[24] * *cnV[24];
- m_A14 += gt[25];
- m_A14 += gt[26];
- m_A15 += go[25];
- m_A16 += go[26];
- double RHS5 = Idr[25];
- RHS5 += Idr[26];
- m_A17 += gt[27];
- m_A17 += gt[28];
- m_A17 += gt[29];
- m_A18 += go[27];
- double RHS6 = Idr[27];
- RHS6 += Idr[28];
- RHS6 += Idr[29];
- RHS6 -= go[28] * *cnV[28];
- RHS6 -= go[29] * *cnV[29];
- m_A19 += gt[30];
- m_A19 += gt[31];
- m_A19 += gt[32];
- m_A19 += gt[33];
- m_A19 += gt[34];
- m_A19 += gt[35];
- m_A20 += go[30];
- m_A20 += go[31];
- m_A22 += go[32];
- m_A22 += go[33];
- m_A21 += go[34];
- double RHS7 = Idr[30];
- RHS7 += Idr[31];
- RHS7 += Idr[32];
- RHS7 += Idr[33];
- RHS7 += Idr[34];
- RHS7 += Idr[35];
- RHS7 -= go[35] * *cnV[35];
- m_A23 += gt[36];
- m_A23 += gt[37];
- m_A23 += gt[38];
- m_A23 += gt[39];
- m_A23 += gt[40];
- m_A23 += gt[41];
- m_A24 += go[36];
- m_A25 += go[37];
- double RHS8 = Idr[36];
- RHS8 += Idr[37];
- RHS8 += Idr[38];
- RHS8 += Idr[39];
- RHS8 += Idr[40];
- RHS8 += Idr[41];
- RHS8 -= go[38] * *cnV[38];
- RHS8 -= go[39] * *cnV[39];
- RHS8 -= go[40] * *cnV[40];
- RHS8 -= go[41] * *cnV[41];
- m_A26 += gt[42];
- m_A26 += gt[43];
- m_A26 += gt[44];
- m_A27 += go[42];
- double RHS9 = Idr[42];
- RHS9 += Idr[43];
- RHS9 += Idr[44];
- RHS9 -= go[43] * *cnV[43];
- RHS9 -= go[44] * *cnV[44];
- m_A28 += gt[45];
- m_A28 += gt[46];
- m_A28 += gt[47];
- m_A29 += go[45];
- double RHS10 = Idr[45];
- RHS10 += Idr[46];
- RHS10 += Idr[47];
- RHS10 -= go[46] * *cnV[46];
- RHS10 -= go[47] * *cnV[47];
- m_A30 += gt[48];
- m_A30 += gt[49];
- m_A30 += gt[50];
- m_A31 += go[48];
- double RHS11 = Idr[48];
- RHS11 += Idr[49];
- RHS11 += Idr[50];
- RHS11 -= go[49] * *cnV[49];
- RHS11 -= go[50] * *cnV[50];
- m_A32 += gt[51];
- m_A32 += gt[52];
- m_A32 += gt[53];
- m_A33 += go[51];
- double RHS12 = Idr[51];
- RHS12 += Idr[52];
- RHS12 += Idr[53];
- RHS12 -= go[52] * *cnV[52];
- RHS12 -= go[53] * *cnV[53];
- m_A34 += gt[54];
- m_A34 += gt[55];
- m_A34 += gt[56];
- m_A35 += go[54];
- double RHS13 = Idr[54];
- RHS13 += Idr[55];
- RHS13 += Idr[56];
- RHS13 -= go[55] * *cnV[55];
- RHS13 -= go[56] * *cnV[56];
- m_A36 += gt[57];
- m_A36 += gt[58];
- m_A37 += go[57];
- double RHS14 = Idr[57];
- RHS14 += Idr[58];
- RHS14 -= go[58] * *cnV[58];
- m_A38 += gt[59];
- m_A38 += gt[60];
- m_A38 += gt[61];
- m_A39 += go[59];
- double RHS15 = Idr[59];
- RHS15 += Idr[60];
- RHS15 += Idr[61];
- RHS15 -= go[60] * *cnV[60];
- RHS15 -= go[61] * *cnV[61];
- m_A40 += gt[62];
- m_A40 += gt[63];
- m_A41 += go[62];
- double RHS16 = Idr[62];
- RHS16 += Idr[63];
- RHS16 -= go[63] * *cnV[63];
- m_A42 += gt[64];
- m_A42 += gt[65];
- m_A43 += go[64];
- double RHS17 = Idr[64];
- RHS17 += Idr[65];
- RHS17 -= go[65] * *cnV[65];
- m_A44 += gt[66];
- m_A44 += gt[67];
- m_A45 += go[66];
- double RHS18 = Idr[66];
- RHS18 += Idr[67];
- RHS18 -= go[67] * *cnV[67];
- m_A46 += gt[68];
- m_A46 += gt[69];
- m_A47 += go[68];
- double RHS19 = Idr[68];
- RHS19 += Idr[69];
- RHS19 -= go[69] * *cnV[69];
- m_A48 += gt[70];
- m_A48 += gt[71];
- m_A49 += go[70];
- double RHS20 = Idr[70];
- RHS20 += Idr[71];
- RHS20 -= go[71] * *cnV[71];
- m_A50 += gt[72];
- m_A50 += gt[73];
- m_A51 += go[72];
- double RHS21 = Idr[72];
- RHS21 += Idr[73];
- RHS21 -= go[73] * *cnV[73];
- m_A52 += gt[74];
- m_A52 += gt[75];
- m_A52 += gt[76];
- m_A52 += gt[77];
- m_A52 += gt[78];
- m_A53 += go[74];
- m_A55 += go[75];
- m_A54 += go[76];
- double RHS22 = Idr[74];
- RHS22 += Idr[75];
- RHS22 += Idr[76];
- RHS22 += Idr[77];
- RHS22 += Idr[78];
- RHS22 -= go[77] * *cnV[77];
- RHS22 -= go[78] * *cnV[78];
- m_A56 += gt[79];
- m_A56 += gt[80];
- m_A58 += go[79];
- m_A57 += go[80];
- double RHS23 = Idr[79];
- RHS23 += Idr[80];
- m_A59 += gt[81];
- m_A59 += gt[82];
- m_A60 += go[81];
- double RHS24 = Idr[81];
- RHS24 += Idr[82];
- RHS24 -= go[82] * *cnV[82];
- m_A61 += gt[83];
- m_A61 += gt[84];
- m_A62 += go[83];
- double RHS25 = Idr[83];
- RHS25 += Idr[84];
- RHS25 -= go[84] * *cnV[84];
- m_A63 += gt[85];
- m_A63 += gt[86];
- m_A63 += gt[87];
- m_A64 += go[85];
- double RHS26 = Idr[85];
- RHS26 += Idr[86];
- RHS26 += Idr[87];
- RHS26 -= go[86] * *cnV[86];
- RHS26 -= go[87] * *cnV[87];
- m_A68 += gt[88];
- m_A68 += gt[89];
- m_A68 += gt[90];
- m_A68 += gt[91];
- m_A68 += gt[92];
- m_A65 += go[88];
- m_A67 += go[89];
- m_A66 += go[90];
- double RHS27 = Idr[88];
- RHS27 += Idr[89];
- RHS27 += Idr[90];
- RHS27 += Idr[91];
- RHS27 += Idr[92];
- RHS27 -= go[91] * *cnV[91];
- RHS27 -= go[92] * *cnV[92];
- m_A71 += gt[93];
- m_A71 += gt[94];
- m_A71 += gt[95];
- m_A72 += go[93];
- double RHS28 = Idr[93];
- RHS28 += Idr[94];
- RHS28 += Idr[95];
- RHS28 -= go[94] * *cnV[94];
- RHS28 -= go[95] * *cnV[95];
- m_A73 += gt[96];
- m_A73 += gt[97];
- m_A73 += gt[98];
- m_A74 += go[96];
- double RHS29 = Idr[96];
- RHS29 += Idr[97];
- RHS29 += Idr[98];
- RHS29 -= go[97] * *cnV[97];
- RHS29 -= go[98] * *cnV[98];
- m_A75 += gt[99];
- m_A75 += gt[100];
- m_A75 += gt[101];
- m_A76 += go[99];
- double RHS30 = Idr[99];
- RHS30 += Idr[100];
- RHS30 += Idr[101];
- RHS30 -= go[100] * *cnV[100];
- RHS30 -= go[101] * *cnV[101];
- m_A77 += gt[102];
- m_A77 += gt[103];
- m_A79 += go[102];
- m_A78 += go[103];
- double RHS31 = Idr[102];
- RHS31 += Idr[103];
- m_A80 += gt[104];
- m_A80 += gt[105];
- m_A82 += go[104];
- m_A81 += go[105];
- double RHS32 = Idr[104];
- RHS32 += Idr[105];
- m_A85 += gt[106];
- m_A85 += gt[107];
- m_A85 += gt[108];
- m_A85 += gt[109];
- m_A84 += go[106];
- m_A83 += go[107];
- double RHS33 = Idr[106];
- RHS33 += Idr[107];
- RHS33 += Idr[108];
- RHS33 += Idr[109];
- RHS33 -= go[108] * *cnV[108];
- RHS33 -= go[109] * *cnV[109];
- m_A93 += gt[110];
- m_A93 += gt[111];
- m_A93 += gt[112];
- m_A93 += gt[113];
- m_A93 += gt[114];
- m_A93 += gt[115];
- m_A92 += go[110];
- m_A91 += go[111];
- m_A90 += go[112];
- m_A89 += go[113];
- m_A88 += go[114];
- m_A87 += go[115];
- double RHS34 = Idr[110];
- RHS34 += Idr[111];
- RHS34 += Idr[112];
- RHS34 += Idr[113];
- RHS34 += Idr[114];
- RHS34 += Idr[115];
- m_A97 += gt[116];
- m_A97 += gt[117];
- m_A97 += gt[118];
- m_A98 += go[116];
- m_A95 += go[117];
- double RHS35 = Idr[116];
- RHS35 += Idr[117];
- RHS35 += Idr[118];
- RHS35 -= go[118] * *cnV[118];
- m_A102 += gt[119];
- m_A102 += gt[120];
- m_A102 += gt[121];
- m_A102 += gt[122];
- m_A102 += gt[123];
- m_A102 += gt[124];
- m_A102 += gt[125];
- m_A100 += go[119];
- m_A99 += go[120];
- m_A99 += go[121];
- m_A103 += go[122];
- m_A103 += go[123];
- double RHS36 = Idr[119];
- RHS36 += Idr[120];
- RHS36 += Idr[121];
- RHS36 += Idr[122];
- RHS36 += Idr[123];
- RHS36 += Idr[124];
- RHS36 += Idr[125];
- RHS36 -= go[124] * *cnV[124];
- RHS36 -= go[125] * *cnV[125];
- m_A105 += gt[126];
- m_A105 += gt[127];
- m_A105 += gt[128];
- m_A105 += gt[129];
- m_A105 += gt[130];
- m_A105 += gt[131];
- m_A105 += gt[132];
- m_A106 += go[126];
- m_A104 += go[127];
- double RHS37 = Idr[126];
- RHS37 += Idr[127];
- RHS37 += Idr[128];
- RHS37 += Idr[129];
- RHS37 += Idr[130];
- RHS37 += Idr[131];
- RHS37 += Idr[132];
- RHS37 -= go[128] * *cnV[128];
- RHS37 -= go[129] * *cnV[129];
- RHS37 -= go[130] * *cnV[130];
- RHS37 -= go[131] * *cnV[131];
- RHS37 -= go[132] * *cnV[132];
- m_A109 += gt[133];
- m_A109 += gt[134];
- m_A108 += go[133];
- m_A110 += go[134];
- double RHS38 = Idr[133];
- RHS38 += Idr[134];
- m_A117 += gt[135];
- m_A117 += gt[136];
- m_A117 += gt[137];
- m_A117 += gt[138];
- m_A117 += gt[139];
- m_A117 += gt[140];
- m_A116 += go[135];
- m_A115 += go[136];
- m_A114 += go[137];
- m_A113 += go[138];
- m_A112 += go[139];
- m_A111 += go[140];
- double RHS39 = Idr[135];
- RHS39 += Idr[136];
- RHS39 += Idr[137];
- RHS39 += Idr[138];
- RHS39 += Idr[139];
- RHS39 += Idr[140];
- m_A120 += gt[141];
- m_A120 += gt[142];
- m_A119 += go[141];
- m_A121 += go[142];
- double RHS40 = Idr[141];
- RHS40 += Idr[142];
- m_A126 += gt[143];
- m_A126 += gt[144];
- m_A126 += gt[145];
- m_A126 += gt[146];
- m_A126 += gt[147];
- m_A125 += go[143];
- m_A124 += go[144];
- m_A123 += go[145];
- m_A122 += go[146];
- m_A127 += go[147];
- double RHS41 = Idr[143];
- RHS41 += Idr[144];
- RHS41 += Idr[145];
- RHS41 += Idr[146];
- RHS41 += Idr[147];
- m_A131 += gt[148];
- m_A131 += gt[149];
- m_A131 += gt[150];
- m_A131 += gt[151];
- m_A131 += gt[152];
- m_A130 += go[148];
- m_A129 += go[149];
- m_A128 += go[150];
- double RHS42 = Idr[148];
- RHS42 += Idr[149];
- RHS42 += Idr[150];
- RHS42 += Idr[151];
- RHS42 += Idr[152];
- RHS42 -= go[151] * *cnV[151];
- RHS42 -= go[152] * *cnV[152];
- m_A137 += gt[153];
- m_A137 += gt[154];
- m_A137 += gt[155];
- m_A137 += gt[156];
- m_A137 += gt[157];
- m_A137 += gt[158];
- m_A135 += go[153];
- m_A134 += go[154];
- m_A139 += go[155];
- m_A133 += go[156];
- m_A133 += go[157];
- double RHS43 = Idr[153];
- RHS43 += Idr[154];
- RHS43 += Idr[155];
- RHS43 += Idr[156];
- RHS43 += Idr[157];
- RHS43 += Idr[158];
- RHS43 -= go[158] * *cnV[158];
- m_A148 += gt[159];
- m_A148 += gt[160];
- m_A148 += gt[161];
- m_A148 += gt[162];
- m_A148 += gt[163];
- m_A148 += gt[164];
- m_A148 += gt[165];
- m_A142 += go[159];
- m_A144 += go[160];
- m_A146 += go[161];
- m_A143 += go[162];
- m_A141 += go[163];
- double RHS44 = Idr[159];
- RHS44 += Idr[160];
- RHS44 += Idr[161];
- RHS44 += Idr[162];
- RHS44 += Idr[163];
- RHS44 += Idr[164];
- RHS44 += Idr[165];
- RHS44 -= go[164] * *cnV[164];
- RHS44 -= go[165] * *cnV[165];
- m_A157 += gt[166];
- m_A157 += gt[167];
- m_A157 += gt[168];
- m_A157 += gt[169];
- m_A157 += gt[170];
- m_A157 += gt[171];
- m_A157 += gt[172];
- m_A157 += gt[173];
- m_A157 += gt[174];
- m_A155 += go[166];
- m_A153 += go[167];
- m_A151 += go[168];
- m_A154 += go[169];
- m_A154 += go[170];
- m_A152 += go[171];
- m_A152 += go[172];
- double RHS45 = Idr[166];
- RHS45 += Idr[167];
- RHS45 += Idr[168];
- RHS45 += Idr[169];
- RHS45 += Idr[170];
- RHS45 += Idr[171];
- RHS45 += Idr[172];
- RHS45 += Idr[173];
- RHS45 += Idr[174];
- RHS45 -= go[173] * *cnV[173];
- RHS45 -= go[174] * *cnV[174];
- m_A160 += gt[175];
- m_A160 += gt[176];
- m_A159 += go[175];
- m_A161 += go[176];
- double RHS46 = Idr[175];
- RHS46 += Idr[176];
- m_A177 += gt[177];
- m_A177 += gt[178];
- m_A177 += gt[179];
- m_A177 += gt[180];
- m_A177 += gt[181];
- m_A177 += gt[182];
- m_A177 += gt[183];
- m_A177 += gt[184];
- m_A176 += go[177];
- m_A164 += go[178];
- m_A163 += go[179];
- m_A165 += go[180];
- m_A170 += go[181];
- m_A168 += go[182];
- m_A171 += go[183];
- m_A162 += go[184];
- double RHS47 = Idr[177];
- RHS47 += Idr[178];
- RHS47 += Idr[179];
- RHS47 += Idr[180];
- RHS47 += Idr[181];
- RHS47 += Idr[182];
- RHS47 += Idr[183];
- RHS47 += Idr[184];
const double f0 = 1.0 / m_A0;
- const double f0_27 = -f0 * m_A65;
- m_A66 += m_A1 * f0_27;
- RHS27 += f0_27 * RHS0;
- const double f1 = 1.0 / m_A2;
- const double f1_27 = -f1 * m_A66;
- m_A68 += m_A3 * f1_27;
- m_A70 += m_A4 * f1_27;
- RHS27 += f1_27 * RHS1;
- const double f1_44 = -f1 * m_A141;
- m_A145 += m_A3 * f1_44;
- m_A148 += m_A4 * f1_44;
- RHS44 += f1_44 * RHS1;
- const double f2 = 1.0 / m_A5;
- const double f2_44 = -f2 * m_A142;
- m_A146 += m_A6 * f2_44;
- RHS44 += f2_44 * RHS2;
- const double f3 = 1.0 / m_A7;
- const double f3_27 = -f3 * m_A67;
- m_A68 += m_A8 * f3_27;
- m_A69 += m_A9 * f3_27;
- m_A70 += m_A10 * f3_27;
- RHS27 += f3_27 * RHS3;
- const double f3_35 = -f3 * m_A95;
- m_A96 += m_A8 * f3_35;
- m_A97 += m_A9 * f3_35;
- m_A98 += m_A10 * f3_35;
- RHS35 += f3_35 * RHS3;
- const double f3_44 = -f3 * m_A143;
- m_A145 += m_A8 * f3_44;
- m_A146 += m_A9 * f3_44;
- m_A148 += m_A10 * f3_44;
- RHS44 += f3_44 * RHS3;
- const double f4 = 1.0 / m_A11;
- const double f4_36 = -f4 * m_A99;
- m_A102 += m_A12 * f4_36;
- m_A103 += m_A13 * f4_36;
- RHS36 += f4_36 * RHS4;
- const double f4_45 = -f4 * m_A151;
- m_A154 += m_A12 * f4_45;
- m_A157 += m_A13 * f4_45;
- RHS45 += f4_45 * RHS4;
- const double f5 = 1.0 / m_A14;
- const double f5_33 = -f5 * m_A83;
- m_A85 += m_A15 * f5_33;
- m_A86 += m_A16 * f5_33;
- RHS33 += f5_33 * RHS5;
- const double f5_36 = -f5 * m_A100;
- m_A101 += m_A15 * f5_36;
- m_A102 += m_A16 * f5_36;
- RHS36 += f5_36 * RHS5;
- const double f6 = 1.0 / m_A17;
- const double f6_33 = -f6 * m_A84;
- m_A85 += m_A18 * f6_33;
- RHS33 += f6_33 * RHS6;
- const double f7 = 1.0 / m_A19;
- const double f7_43 = -f7 * m_A133;
- m_A137 += m_A20 * f7_43;
- m_A138 += m_A21 * f7_43;
- m_A139 += m_A22 * f7_43;
- RHS43 += f7_43 * RHS7;
- const double f7_44 = -f7 * m_A144;
- m_A147 += m_A20 * f7_44;
- m_A148 += m_A21 * f7_44;
- m_A149 += m_A22 * f7_44;
- RHS44 += f7_44 * RHS7;
- const double f7_45 = -f7 * m_A152;
- m_A155 += m_A20 * f7_45;
- m_A156 += m_A21 * f7_45;
- m_A157 += m_A22 * f7_45;
- RHS45 += f7_45 * RHS7;
- const double f8 = 1.0 / m_A23;
- const double f8_37 = -f8 * m_A104;
- m_A106 += m_A24 * f8_37;
- m_A107 += m_A25 * f8_37;
- RHS37 += f8_37 * RHS8;
- const double f8_43 = -f8 * m_A134;
- m_A137 += m_A24 * f8_43;
- m_A139 += m_A25 * f8_43;
- RHS43 += f8_43 * RHS8;
- const double f8_45 = -f8 * m_A153;
- m_A155 += m_A24 * f8_45;
- m_A157 += m_A25 * f8_45;
- RHS45 += f8_45 * RHS8;
- const double f9 = 1.0 / m_A26;
- const double f9_34 = -f9 * m_A87;
- m_A93 += m_A27 * f9_34;
- RHS34 += f9_34 * RHS9;
- const double f10 = 1.0 / m_A28;
- const double f10_34 = -f10 * m_A88;
- m_A93 += m_A29 * f10_34;
- RHS34 += f10_34 * RHS10;
- const double f11 = 1.0 / m_A30;
- const double f11_34 = -f11 * m_A89;
- m_A93 += m_A31 * f11_34;
- RHS34 += f11_34 * RHS11;
- const double f12 = 1.0 / m_A32;
- const double f12_34 = -f12 * m_A90;
- m_A93 += m_A33 * f12_34;
- RHS34 += f12_34 * RHS12;
- const double f13 = 1.0 / m_A34;
- const double f13_34 = -f13 * m_A91;
- m_A93 += m_A35 * f13_34;
- RHS34 += f13_34 * RHS13;
- const double f14 = 1.0 / m_A36;
- const double f14_42 = -f14 * m_A128;
- m_A131 += m_A37 * f14_42;
- RHS42 += f14_42 * RHS14;
- const double f15 = 1.0 / m_A38;
- const double f15_39 = -f15 * m_A111;
- m_A117 += m_A39 * f15_39;
- RHS39 += f15_39 * RHS15;
- const double f16 = 1.0 / m_A40;
- const double f16_41 = -f16 * m_A122;
- m_A126 += m_A41 * f16_41;
- RHS41 += f16_41 * RHS16;
- const double f17 = 1.0 / m_A42;
- const double f17_38 = -f17 * m_A108;
- m_A109 += m_A43 * f17_38;
- RHS38 += f17_38 * RHS17;
- const double f18 = 1.0 / m_A44;
- const double f18_40 = -f18 * m_A119;
- m_A120 += m_A45 * f18_40;
- RHS40 += f18_40 * RHS18;
- const double f19 = 1.0 / m_A46;
- const double f19_41 = -f19 * m_A123;
- m_A126 += m_A47 * f19_41;
- RHS41 += f19_41 * RHS19;
- const double f20 = 1.0 / m_A48;
- const double f20_41 = -f20 * m_A124;
- m_A126 += m_A49 * f20_41;
- RHS41 += f20_41 * RHS20;
- const double f21 = 1.0 / m_A50;
- const double f21_41 = -f21 * m_A125;
- m_A126 += m_A51 * f21_41;
- RHS41 += f21_41 * RHS21;
- const double f22 = 1.0 / m_A52;
- const double f22_43 = -f22 * m_A135;
- m_A136 += m_A53 * f22_43;
- m_A137 += m_A54 * f22_43;
- m_A140 += m_A55 * f22_43;
- RHS43 += f22_43 * RHS22;
- const double f22_47 = -f22 * m_A162;
- m_A167 += m_A53 * f22_47;
- m_A173 += m_A54 * f22_47;
- m_A177 += m_A55 * f22_47;
- RHS47 += f22_47 * RHS22;
- const double f23 = 1.0 / m_A56;
- const double f23_34 = -f23 * m_A92;
- m_A93 += m_A57 * f23_34;
- m_A94 += m_A58 * f23_34;
- RHS34 += f23_34 * RHS23;
- const double f23_47 = -f23 * m_A163;
- m_A166 += m_A57 * f23_47;
- m_A177 += m_A58 * f23_47;
- RHS47 += f23_47 * RHS23;
- const double f24 = 1.0 / m_A59;
- const double f24_46 = -f24 * m_A159;
- m_A160 += m_A60 * f24_46;
- RHS46 += f24_46 * RHS24;
- const double f25 = 1.0 / m_A61;
- const double f25_42 = -f25 * m_A129;
- m_A131 += m_A62 * f25_42;
- RHS42 += f25_42 * RHS25;
- const double f26 = 1.0 / m_A63;
- const double f26_39 = -f26 * m_A112;
- m_A117 += m_A64 * f26_39;
- RHS39 += f26_39 * RHS26;
- const double f27 = 1.0 / m_A68;
- const double f27_35 = -f27 * m_A96;
- m_A97 += m_A69 * f27_35;
- m_A98 += m_A70 * f27_35;
- RHS35 += f27_35 * RHS27;
- const double f27_44 = -f27 * m_A145;
- m_A146 += m_A69 * f27_44;
- m_A148 += m_A70 * f27_44;
- RHS44 += f27_44 * RHS27;
- const double f28 = 1.0 / m_A71;
- const double f28_39 = -f28 * m_A113;
- m_A117 += m_A72 * f28_39;
- RHS39 += f28_39 * RHS28;
- const double f29 = 1.0 / m_A73;
- const double f29_39 = -f29 * m_A114;
- m_A117 += m_A74 * f29_39;
- RHS39 += f29_39 * RHS29;
- const double f30 = 1.0 / m_A75;
- const double f30_39 = -f30 * m_A115;
- m_A117 += m_A76 * f30_39;
- RHS39 += f30_39 * RHS30;
- const double f31 = 1.0 / m_A77;
- const double f31_39 = -f31 * m_A116;
- m_A117 += m_A78 * f31_39;
- m_A118 += m_A79 * f31_39;
- RHS39 += f31_39 * RHS31;
- const double f31_47 = -f31 * m_A164;
- m_A169 += m_A78 * f31_47;
- m_A177 += m_A79 * f31_47;
- RHS47 += f31_47 * RHS31;
- const double f32 = 1.0 / m_A80;
- const double f32_42 = -f32 * m_A130;
- m_A131 += m_A81 * f32_42;
- m_A132 += m_A82 * f32_42;
- RHS42 += f32_42 * RHS32;
- const double f32_47 = -f32 * m_A165;
- m_A172 += m_A81 * f32_47;
- m_A177 += m_A82 * f32_47;
- RHS47 += f32_47 * RHS32;
- const double f33 = 1.0 / m_A85;
- const double f33_36 = -f33 * m_A101;
- m_A102 += m_A86 * f33_36;
- RHS36 += f33_36 * RHS33;
- const double f34 = 1.0 / m_A93;
- const double f34_47 = -f34 * m_A166;
- m_A177 += m_A94 * f34_47;
- RHS47 += f34_47 * RHS34;
- const double f35 = 1.0 / m_A97;
- const double f35_44 = -f35 * m_A146;
- m_A148 += m_A98 * f35_44;
- RHS44 += f35_44 * RHS35;
- const double f36 = 1.0 / m_A102;
- const double f36_45 = -f36 * m_A154;
- m_A157 += m_A103 * f36_45;
- RHS45 += f36_45 * RHS36;
- const double f37 = 1.0 / m_A105;
- const double f37_43 = -f37 * m_A136;
- m_A137 += m_A106 * f37_43;
- m_A139 += m_A107 * f37_43;
- RHS43 += f37_43 * RHS37;
- const double f37_47 = -f37 * m_A167;
- m_A173 += m_A106 * f37_47;
- m_A175 += m_A107 * f37_47;
- RHS47 += f37_47 * RHS37;
- const double f38 = 1.0 / m_A109;
- const double f38_47 = -f38 * m_A168;
- m_A177 += m_A110 * f38_47;
- RHS47 += f38_47 * RHS38;
- const double f39 = 1.0 / m_A117;
- const double f39_47 = -f39 * m_A169;
- m_A177 += m_A118 * f39_47;
- RHS47 += f39_47 * RHS39;
- const double f40 = 1.0 / m_A120;
- const double f40_47 = -f40 * m_A170;
- m_A177 += m_A121 * f40_47;
- RHS47 += f40_47 * RHS40;
- const double f41 = 1.0 / m_A126;
- const double f41_47 = -f41 * m_A171;
- m_A177 += m_A127 * f41_47;
- RHS47 += f41_47 * RHS41;
- const double f42 = 1.0 / m_A131;
- const double f42_47 = -f42 * m_A172;
- m_A177 += m_A132 * f42_47;
- RHS47 += f42_47 * RHS42;
- const double f43 = 1.0 / m_A137;
- const double f43_44 = -f43 * m_A147;
- m_A148 += m_A138 * f43_44;
- m_A149 += m_A139 * f43_44;
- m_A150 += m_A140 * f43_44;
- RHS44 += f43_44 * RHS43;
- const double f43_45 = -f43 * m_A155;
- m_A156 += m_A138 * f43_45;
- m_A157 += m_A139 * f43_45;
- m_A158 += m_A140 * f43_45;
- RHS45 += f43_45 * RHS43;
- const double f43_47 = -f43 * m_A173;
- m_A174 += m_A138 * f43_47;
- m_A175 += m_A139 * f43_47;
- m_A177 += m_A140 * f43_47;
- RHS47 += f43_47 * RHS43;
- const double f44 = 1.0 / m_A148;
- const double f44_45 = -f44 * m_A156;
- m_A157 += m_A149 * f44_45;
- m_A158 += m_A150 * f44_45;
- RHS45 += f44_45 * RHS44;
- const double f44_47 = -f44 * m_A174;
- m_A175 += m_A149 * f44_47;
- m_A177 += m_A150 * f44_47;
- RHS47 += f44_47 * RHS44;
- const double f45 = 1.0 / m_A157;
- const double f45_47 = -f45 * m_A175;
- m_A177 += m_A158 * f45_47;
- RHS47 += f45_47 * RHS45;
- const double f46 = 1.0 / m_A160;
- const double f46_47 = -f46 * m_A176;
- m_A177 += m_A161 * f46_47;
- RHS47 += f46_47 * RHS46;
- V[47] = RHS47 / m_A177;
- double tmp46 = 0.0;
- tmp46 += m_A161 * V[47];
- V[46] = (RHS46 - tmp46) / m_A160;
- double tmp45 = 0.0;
- tmp45 += m_A158 * V[47];
- V[45] = (RHS45 - tmp45) / m_A157;
- double tmp44 = 0.0;
- tmp44 += m_A149 * V[45];
- tmp44 += m_A150 * V[47];
- V[44] = (RHS44 - tmp44) / m_A148;
- double tmp43 = 0.0;
- tmp43 += m_A138 * V[44];
- tmp43 += m_A139 * V[45];
- tmp43 += m_A140 * V[47];
- V[43] = (RHS43 - tmp43) / m_A137;
- double tmp42 = 0.0;
- tmp42 += m_A132 * V[47];
- V[42] = (RHS42 - tmp42) / m_A131;
- double tmp41 = 0.0;
- tmp41 += m_A127 * V[47];
- V[41] = (RHS41 - tmp41) / m_A126;
- double tmp40 = 0.0;
- tmp40 += m_A121 * V[47];
- V[40] = (RHS40 - tmp40) / m_A120;
- double tmp39 = 0.0;
- tmp39 += m_A118 * V[47];
- V[39] = (RHS39 - tmp39) / m_A117;
- double tmp38 = 0.0;
- tmp38 += m_A110 * V[47];
- V[38] = (RHS38 - tmp38) / m_A109;
- double tmp37 = 0.0;
- tmp37 += m_A106 * V[43];
- tmp37 += m_A107 * V[45];
- V[37] = (RHS37 - tmp37) / m_A105;
- double tmp36 = 0.0;
- tmp36 += m_A103 * V[45];
- V[36] = (RHS36 - tmp36) / m_A102;
- double tmp35 = 0.0;
- tmp35 += m_A98 * V[44];
- V[35] = (RHS35 - tmp35) / m_A97;
- double tmp34 = 0.0;
- tmp34 += m_A94 * V[47];
- V[34] = (RHS34 - tmp34) / m_A93;
- double tmp33 = 0.0;
- tmp33 += m_A86 * V[36];
- V[33] = (RHS33 - tmp33) / m_A85;
- double tmp32 = 0.0;
- tmp32 += m_A81 * V[42];
- tmp32 += m_A82 * V[47];
- V[32] = (RHS32 - tmp32) / m_A80;
- double tmp31 = 0.0;
- tmp31 += m_A78 * V[39];
- tmp31 += m_A79 * V[47];
- V[31] = (RHS31 - tmp31) / m_A77;
- double tmp30 = 0.0;
- tmp30 += m_A76 * V[39];
- V[30] = (RHS30 - tmp30) / m_A75;
- double tmp29 = 0.0;
- tmp29 += m_A74 * V[39];
- V[29] = (RHS29 - tmp29) / m_A73;
- double tmp28 = 0.0;
- tmp28 += m_A72 * V[39];
- V[28] = (RHS28 - tmp28) / m_A71;
- double tmp27 = 0.0;
- tmp27 += m_A69 * V[35];
- tmp27 += m_A70 * V[44];
- V[27] = (RHS27 - tmp27) / m_A68;
- double tmp26 = 0.0;
- tmp26 += m_A64 * V[39];
- V[26] = (RHS26 - tmp26) / m_A63;
- double tmp25 = 0.0;
- tmp25 += m_A62 * V[42];
- V[25] = (RHS25 - tmp25) / m_A61;
- double tmp24 = 0.0;
- tmp24 += m_A60 * V[46];
- V[24] = (RHS24 - tmp24) / m_A59;
- double tmp23 = 0.0;
- tmp23 += m_A57 * V[34];
- tmp23 += m_A58 * V[47];
- V[23] = (RHS23 - tmp23) / m_A56;
- double tmp22 = 0.0;
- tmp22 += m_A53 * V[37];
- tmp22 += m_A54 * V[43];
- tmp22 += m_A55 * V[47];
- V[22] = (RHS22 - tmp22) / m_A52;
- double tmp21 = 0.0;
- tmp21 += m_A51 * V[41];
- V[21] = (RHS21 - tmp21) / m_A50;
- double tmp20 = 0.0;
- tmp20 += m_A49 * V[41];
- V[20] = (RHS20 - tmp20) / m_A48;
- double tmp19 = 0.0;
- tmp19 += m_A47 * V[41];
- V[19] = (RHS19 - tmp19) / m_A46;
- double tmp18 = 0.0;
- tmp18 += m_A45 * V[40];
- V[18] = (RHS18 - tmp18) / m_A44;
- double tmp17 = 0.0;
- tmp17 += m_A43 * V[38];
- V[17] = (RHS17 - tmp17) / m_A42;
- double tmp16 = 0.0;
- tmp16 += m_A41 * V[41];
- V[16] = (RHS16 - tmp16) / m_A40;
- double tmp15 = 0.0;
- tmp15 += m_A39 * V[39];
- V[15] = (RHS15 - tmp15) / m_A38;
- double tmp14 = 0.0;
- tmp14 += m_A37 * V[42];
- V[14] = (RHS14 - tmp14) / m_A36;
- double tmp13 = 0.0;
- tmp13 += m_A35 * V[34];
- V[13] = (RHS13 - tmp13) / m_A34;
- double tmp12 = 0.0;
- tmp12 += m_A33 * V[34];
- V[12] = (RHS12 - tmp12) / m_A32;
- double tmp11 = 0.0;
- tmp11 += m_A31 * V[34];
- V[11] = (RHS11 - tmp11) / m_A30;
- double tmp10 = 0.0;
- tmp10 += m_A29 * V[34];
- V[10] = (RHS10 - tmp10) / m_A28;
- double tmp9 = 0.0;
- tmp9 += m_A27 * V[34];
- V[9] = (RHS9 - tmp9) / m_A26;
- double tmp8 = 0.0;
- tmp8 += m_A24 * V[43];
- tmp8 += m_A25 * V[45];
- V[8] = (RHS8 - tmp8) / m_A23;
- double tmp7 = 0.0;
- tmp7 += m_A20 * V[43];
- tmp7 += m_A21 * V[44];
- tmp7 += m_A22 * V[45];
- V[7] = (RHS7 - tmp7) / m_A19;
- double tmp6 = 0.0;
- tmp6 += m_A18 * V[33];
- V[6] = (RHS6 - tmp6) / m_A17;
- double tmp5 = 0.0;
- tmp5 += m_A15 * V[33];
- tmp5 += m_A16 * V[36];
- V[5] = (RHS5 - tmp5) / m_A14;
- double tmp4 = 0.0;
- tmp4 += m_A12 * V[36];
- tmp4 += m_A13 * V[45];
- V[4] = (RHS4 - tmp4) / m_A11;
- double tmp3 = 0.0;
- tmp3 += m_A8 * V[27];
- tmp3 += m_A9 * V[35];
- tmp3 += m_A10 * V[44];
- V[3] = (RHS3 - tmp3) / m_A7;
- double tmp2 = 0.0;
- tmp2 += m_A6 * V[35];
- V[2] = (RHS2 - tmp2) / m_A5;
+ const double f0_1 = -f0 * m_A2;
+ m_A3 += m_A1 * f0_1;
+ RHS1 += f0_1 * RHS0;
+ const double f0_2 = -f0 * m_A5;
+ m_A6 += m_A1 * f0_2;
+ RHS2 += f0_2 * RHS0;
+ const double f1 = 1.0 / m_A3;
+ const double f1_2 = -f1 * m_A6;
+ m_A7 += m_A4 * f1_2;
+ RHS2 += f1_2 * RHS1;
+ V[2] = RHS2 / m_A7;
double tmp1 = 0.0;
- tmp1 += m_A3 * V[27];
- tmp1 += m_A4 * V[44];
- V[1] = (RHS1 - tmp1) / m_A2;
+ tmp1 += m_A4 * V[2];
+ V[1] = (RHS1 - tmp1) / m_A3;
double tmp0 = 0.0;
tmp0 += m_A1 * V[1];
V[0] = (RHS0 - tmp0) / m_A0;
@@ -9295,6 +10516,575 @@ static void nl_gcr_34e910fc1896999f_76_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_3c79fd354e01fa8c_89_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ double m_A75(0.0);
+ double m_A76(0.0);
+ double m_A77(0.0);
+ double m_A78(0.0);
+ double m_A79(0.0);
+ double m_A80(0.0);
+ double m_A81(0.0);
+ double m_A82(0.0);
+ double m_A83(0.0);
+ double m_A84(0.0);
+ double m_A85(0.0);
+ double m_A86(0.0);
+ double m_A87(0.0);
+ double m_A88(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A2 += gt[6];
+ m_A3 += go[3];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 += Idr[6];
+ RHS1 -= go[4] * *cnV[4];
+ RHS1 -= go[5] * *cnV[5];
+ RHS1 -= go[6] * *cnV[6];
+ m_A4 += gt[7];
+ m_A4 += gt[8];
+ m_A4 += gt[9];
+ m_A4 += gt[10];
+ m_A6 += go[7];
+ m_A7 += go[8];
+ m_A5 += go[9];
+ double RHS2 = Idr[7];
+ RHS2 += Idr[8];
+ RHS2 += Idr[9];
+ RHS2 += Idr[10];
+ RHS2 -= go[10] * *cnV[10];
+ m_A8 += gt[11];
+ m_A8 += gt[12];
+ m_A8 += gt[13];
+ m_A8 += gt[14];
+ m_A8 += gt[15];
+ m_A11 += go[11];
+ m_A10 += go[12];
+ m_A9 += go[13];
+ double RHS3 = Idr[11];
+ RHS3 += Idr[12];
+ RHS3 += Idr[13];
+ RHS3 += Idr[14];
+ RHS3 += Idr[15];
+ RHS3 -= go[14] * *cnV[14];
+ RHS3 -= go[15] * *cnV[15];
+ m_A12 += gt[16];
+ m_A12 += gt[17];
+ m_A12 += gt[18];
+ m_A13 += go[16];
+ double RHS4 = Idr[16];
+ RHS4 += Idr[17];
+ RHS4 += Idr[18];
+ RHS4 -= go[17] * *cnV[17];
+ RHS4 -= go[18] * *cnV[18];
+ m_A14 += gt[19];
+ m_A14 += gt[20];
+ m_A14 += gt[21];
+ m_A14 += gt[22];
+ m_A15 += go[19];
+ double RHS5 = Idr[19];
+ RHS5 += Idr[20];
+ RHS5 += Idr[21];
+ RHS5 += Idr[22];
+ RHS5 -= go[20] * *cnV[20];
+ RHS5 -= go[21] * *cnV[21];
+ RHS5 -= go[22] * *cnV[22];
+ m_A16 += gt[23];
+ m_A16 += gt[24];
+ m_A16 += gt[25];
+ m_A16 += gt[26];
+ m_A16 += gt[27];
+ m_A16 += gt[28];
+ m_A17 += go[23];
+ m_A19 += go[24];
+ m_A20 += go[25];
+ m_A18 += go[26];
+ double RHS6 = Idr[23];
+ RHS6 += Idr[24];
+ RHS6 += Idr[25];
+ RHS6 += Idr[26];
+ RHS6 += Idr[27];
+ RHS6 += Idr[28];
+ RHS6 -= go[27] * *cnV[27];
+ RHS6 -= go[28] * *cnV[28];
+ m_A21 += gt[29];
+ m_A21 += gt[30];
+ m_A21 += gt[31];
+ m_A21 += gt[32];
+ m_A21 += gt[33];
+ m_A22 += go[29];
+ m_A24 += go[30];
+ m_A23 += go[31];
+ double RHS7 = Idr[29];
+ RHS7 += Idr[30];
+ RHS7 += Idr[31];
+ RHS7 += Idr[32];
+ RHS7 += Idr[33];
+ RHS7 -= go[32] * *cnV[32];
+ RHS7 -= go[33] * *cnV[33];
+ m_A27 += gt[34];
+ m_A27 += gt[35];
+ m_A27 += gt[36];
+ m_A26 += go[34];
+ m_A25 += go[35];
+ double RHS8 = Idr[34];
+ RHS8 += Idr[35];
+ RHS8 += Idr[36];
+ RHS8 -= go[36] * *cnV[36];
+ m_A32 += gt[37];
+ m_A32 += gt[38];
+ m_A32 += gt[39];
+ m_A30 += go[37];
+ double RHS9 = Idr[37];
+ RHS9 += Idr[38];
+ RHS9 += Idr[39];
+ RHS9 -= go[38] * *cnV[38];
+ RHS9 -= go[39] * *cnV[39];
+ m_A38 += gt[40];
+ m_A38 += gt[41];
+ m_A34 += go[40];
+ m_A35 += go[41];
+ double RHS10 = Idr[40];
+ RHS10 += Idr[41];
+ m_A42 += gt[42];
+ m_A42 += gt[43];
+ m_A42 += gt[44];
+ m_A42 += gt[45];
+ m_A42 += gt[46];
+ m_A42 += gt[47];
+ m_A42 += gt[48];
+ m_A41 += go[42];
+ m_A43 += go[43];
+ double RHS11 = Idr[42];
+ RHS11 += Idr[43];
+ RHS11 += Idr[44];
+ RHS11 += Idr[45];
+ RHS11 += Idr[46];
+ RHS11 += Idr[47];
+ RHS11 += Idr[48];
+ RHS11 -= go[44] * *cnV[44];
+ RHS11 -= go[45] * *cnV[45];
+ RHS11 -= go[46] * *cnV[46];
+ RHS11 -= go[47] * *cnV[47];
+ RHS11 -= go[48] * *cnV[48];
+ m_A49 += gt[49];
+ m_A49 += gt[50];
+ m_A49 += gt[51];
+ m_A45 += go[49];
+ m_A46 += go[50];
+ m_A44 += go[51];
+ double RHS12 = Idr[49];
+ RHS12 += Idr[50];
+ RHS12 += Idr[51];
+ m_A53 += gt[52];
+ m_A53 += gt[53];
+ m_A53 += gt[54];
+ m_A53 += gt[55];
+ m_A53 += gt[56];
+ m_A53 += gt[57];
+ m_A53 += gt[58];
+ m_A54 += go[52];
+ m_A55 += go[53];
+ double RHS13 = Idr[52];
+ RHS13 += Idr[53];
+ RHS13 += Idr[54];
+ RHS13 += Idr[55];
+ RHS13 += Idr[56];
+ RHS13 += Idr[57];
+ RHS13 += Idr[58];
+ RHS13 -= go[54] * *cnV[54];
+ RHS13 -= go[55] * *cnV[55];
+ RHS13 -= go[56] * *cnV[56];
+ RHS13 -= go[57] * *cnV[57];
+ RHS13 -= go[58] * *cnV[58];
+ m_A57 += gt[59];
+ m_A57 += gt[60];
+ m_A57 += gt[61];
+ m_A58 += go[59];
+ m_A56 += go[60];
+ double RHS14 = Idr[59];
+ RHS14 += Idr[60];
+ RHS14 += Idr[61];
+ RHS14 -= go[61] * *cnV[61];
+ m_A62 += gt[62];
+ m_A62 += gt[63];
+ m_A60 += go[62];
+ m_A59 += go[63];
+ double RHS15 = Idr[62];
+ RHS15 += Idr[63];
+ m_A68 += gt[64];
+ m_A68 += gt[65];
+ m_A68 += gt[66];
+ m_A70 += go[64];
+ m_A65 += go[65];
+ double RHS16 = Idr[64];
+ RHS16 += Idr[65];
+ RHS16 += Idr[66];
+ RHS16 -= go[66] * *cnV[66];
+ m_A77 += gt[67];
+ m_A77 += gt[68];
+ m_A77 += gt[69];
+ m_A77 += gt[70];
+ m_A77 += gt[71];
+ m_A77 += gt[72];
+ m_A77 += gt[73];
+ m_A73 += go[67];
+ m_A71 += go[68];
+ double RHS17 = Idr[67];
+ RHS17 += Idr[68];
+ RHS17 += Idr[69];
+ RHS17 += Idr[70];
+ RHS17 += Idr[71];
+ RHS17 += Idr[72];
+ RHS17 += Idr[73];
+ RHS17 -= go[69] * *cnV[69];
+ RHS17 -= go[70] * *cnV[70];
+ RHS17 -= go[71] * *cnV[71];
+ RHS17 -= go[72] * *cnV[72];
+ RHS17 -= go[73] * *cnV[73];
+ m_A88 += gt[74];
+ m_A88 += gt[75];
+ m_A88 += gt[76];
+ m_A88 += gt[77];
+ m_A86 += go[74];
+ m_A84 += go[75];
+ m_A79 += go[76];
+ m_A80 += go[77];
+ double RHS18 = Idr[74];
+ RHS18 += Idr[75];
+ RHS18 += Idr[76];
+ RHS18 += Idr[77];
+ const double f0 = 1.0 / m_A0;
+ const double f0_15 = -f0 * m_A59;
+ m_A62 += m_A1 * f0_15;
+ RHS15 += f0_15 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_8 = -f1 * m_A25;
+ m_A27 += m_A3 * f1_8;
+ RHS8 += f1_8 * RHS1;
+ const double f2 = 1.0 / m_A4;
+ const double f2_8 = -f2 * m_A26;
+ m_A27 += m_A5 * f2_8;
+ m_A28 += m_A6 * f2_8;
+ m_A29 += m_A7 * f2_8;
+ RHS8 += f2_8 * RHS2;
+ const double f2_9 = -f2 * m_A30;
+ m_A31 += m_A5 * f2_9;
+ m_A32 += m_A6 * f2_9;
+ m_A33 += m_A7 * f2_9;
+ RHS9 += f2_9 * RHS2;
+ const double f2_10 = -f2 * m_A34;
+ m_A36 += m_A5 * f2_10;
+ m_A37 += m_A6 * f2_10;
+ m_A38 += m_A7 * f2_10;
+ RHS10 += f2_10 * RHS2;
+ const double f2_17 = -f2 * m_A71;
+ m_A72 += m_A5 * f2_17;
+ m_A73 += m_A6 * f2_17;
+ m_A74 += m_A7 * f2_17;
+ RHS17 += f2_17 * RHS2;
+ const double f3 = 1.0 / m_A8;
+ const double f3_10 = -f3 * m_A35;
+ m_A38 += m_A9 * f3_10;
+ m_A39 += m_A10 * f3_10;
+ m_A40 += m_A11 * f3_10;
+ RHS10 += f3_10 * RHS3;
+ const double f3_12 = -f3 * m_A44;
+ m_A47 += m_A9 * f3_12;
+ m_A49 += m_A10 * f3_12;
+ m_A51 += m_A11 * f3_12;
+ RHS12 += f3_12 * RHS3;
+ const double f4 = 1.0 / m_A12;
+ const double f4_11 = -f4 * m_A41;
+ m_A43 += m_A13 * f4_11;
+ RHS11 += f4_11 * RHS4;
+ const double f4_12 = -f4 * m_A45;
+ m_A49 += m_A13 * f4_12;
+ RHS12 += f4_12 * RHS4;
+ const double f5 = 1.0 / m_A14;
+ const double f5_14 = -f5 * m_A56;
+ m_A57 += m_A15 * f5_14;
+ RHS14 += f5_14 * RHS5;
+ const double f6 = 1.0 / m_A16;
+ const double f6_12 = -f6 * m_A46;
+ m_A48 += m_A17 * f6_12;
+ m_A49 += m_A18 * f6_12;
+ m_A50 += m_A19 * f6_12;
+ m_A52 += m_A20 * f6_12;
+ RHS12 += f6_12 * RHS6;
+ const double f6_16 = -f6 * m_A65;
+ m_A66 += m_A17 * f6_16;
+ m_A67 += m_A18 * f6_16;
+ m_A68 += m_A19 * f6_16;
+ m_A70 += m_A20 * f6_16;
+ RHS16 += f6_16 * RHS6;
+ const double f6_18 = -f6 * m_A79;
+ m_A81 += m_A17 * f6_18;
+ m_A82 += m_A18 * f6_18;
+ m_A86 += m_A19 * f6_18;
+ m_A88 += m_A20 * f6_18;
+ RHS18 += f6_18 * RHS6;
+ const double f7 = 1.0 / m_A21;
+ const double f7_15 = -f7 * m_A60;
+ m_A61 += m_A22 * f7_15;
+ m_A62 += m_A23 * f7_15;
+ m_A64 += m_A24 * f7_15;
+ RHS15 += f7_15 * RHS7;
+ const double f7_18 = -f7 * m_A80;
+ m_A83 += m_A22 * f7_18;
+ m_A85 += m_A23 * f7_18;
+ m_A88 += m_A24 * f7_18;
+ RHS18 += f7_18 * RHS7;
+ const double f8 = 1.0 / m_A27;
+ const double f8_9 = -f8 * m_A31;
+ m_A32 += m_A28 * f8_9;
+ m_A33 += m_A29 * f8_9;
+ RHS9 += f8_9 * RHS8;
+ const double f8_10 = -f8 * m_A36;
+ m_A37 += m_A28 * f8_10;
+ m_A38 += m_A29 * f8_10;
+ RHS10 += f8_10 * RHS8;
+ const double f8_17 = -f8 * m_A72;
+ m_A73 += m_A28 * f8_17;
+ m_A74 += m_A29 * f8_17;
+ RHS17 += f8_17 * RHS8;
+ const double f9 = 1.0 / m_A32;
+ const double f9_10 = -f9 * m_A37;
+ m_A38 += m_A33 * f9_10;
+ RHS10 += f9_10 * RHS9;
+ const double f9_17 = -f9 * m_A73;
+ m_A74 += m_A33 * f9_17;
+ RHS17 += f9_17 * RHS9;
+ const double f10 = 1.0 / m_A38;
+ const double f10_12 = -f10 * m_A47;
+ m_A49 += m_A39 * f10_12;
+ m_A51 += m_A40 * f10_12;
+ RHS12 += f10_12 * RHS10;
+ const double f10_17 = -f10 * m_A74;
+ m_A75 += m_A39 * f10_17;
+ m_A77 += m_A40 * f10_17;
+ RHS17 += f10_17 * RHS10;
+ const double f11 = 1.0 / m_A42;
+ const double f11_12 = -f11 * m_A48;
+ m_A49 += m_A43 * f11_12;
+ RHS12 += f11_12 * RHS11;
+ const double f11_16 = -f11 * m_A66;
+ m_A67 += m_A43 * f11_16;
+ RHS16 += f11_16 * RHS11;
+ const double f11_18 = -f11 * m_A81;
+ m_A82 += m_A43 * f11_18;
+ RHS18 += f11_18 * RHS11;
+ const double f12 = 1.0 / m_A49;
+ const double f12_16 = -f12 * m_A67;
+ m_A68 += m_A50 * f12_16;
+ m_A69 += m_A51 * f12_16;
+ m_A70 += m_A52 * f12_16;
+ RHS16 += f12_16 * RHS12;
+ const double f12_17 = -f12 * m_A75;
+ m_A76 += m_A50 * f12_17;
+ m_A77 += m_A51 * f12_17;
+ m_A78 += m_A52 * f12_17;
+ RHS17 += f12_17 * RHS12;
+ const double f12_18 = -f12 * m_A82;
+ m_A86 += m_A50 * f12_18;
+ m_A87 += m_A51 * f12_18;
+ m_A88 += m_A52 * f12_18;
+ RHS18 += f12_18 * RHS12;
+ const double f13 = 1.0 / m_A53;
+ const double f13_15 = -f13 * m_A61;
+ m_A63 += m_A54 * f13_15;
+ m_A64 += m_A55 * f13_15;
+ RHS15 += f13_15 * RHS13;
+ const double f13_18 = -f13 * m_A83;
+ m_A86 += m_A54 * f13_18;
+ m_A88 += m_A55 * f13_18;
+ RHS18 += f13_18 * RHS13;
+ const double f14 = 1.0 / m_A57;
+ const double f14_18 = -f14 * m_A84;
+ m_A88 += m_A58 * f14_18;
+ RHS18 += f14_18 * RHS14;
+ const double f15 = 1.0 / m_A62;
+ const double f15_18 = -f15 * m_A85;
+ m_A86 += m_A63 * f15_18;
+ m_A88 += m_A64 * f15_18;
+ RHS18 += f15_18 * RHS15;
+ const double f16 = 1.0 / m_A68;
+ const double f16_17 = -f16 * m_A76;
+ m_A77 += m_A69 * f16_17;
+ m_A78 += m_A70 * f16_17;
+ RHS17 += f16_17 * RHS16;
+ const double f16_18 = -f16 * m_A86;
+ m_A87 += m_A69 * f16_18;
+ m_A88 += m_A70 * f16_18;
+ RHS18 += f16_18 * RHS16;
+ const double f17 = 1.0 / m_A77;
+ const double f17_18 = -f17 * m_A87;
+ m_A88 += m_A78 * f17_18;
+ RHS18 += f17_18 * RHS17;
+ V[18] = RHS18 / m_A88;
+ double tmp17 = 0.0;
+ tmp17 += m_A78 * V[18];
+ V[17] = (RHS17 - tmp17) / m_A77;
+ double tmp16 = 0.0;
+ tmp16 += m_A69 * V[17];
+ tmp16 += m_A70 * V[18];
+ V[16] = (RHS16 - tmp16) / m_A68;
+ double tmp15 = 0.0;
+ tmp15 += m_A63 * V[16];
+ tmp15 += m_A64 * V[18];
+ V[15] = (RHS15 - tmp15) / m_A62;
+ double tmp14 = 0.0;
+ tmp14 += m_A58 * V[18];
+ V[14] = (RHS14 - tmp14) / m_A57;
+ double tmp13 = 0.0;
+ tmp13 += m_A54 * V[16];
+ tmp13 += m_A55 * V[18];
+ V[13] = (RHS13 - tmp13) / m_A53;
+ double tmp12 = 0.0;
+ tmp12 += m_A50 * V[16];
+ tmp12 += m_A51 * V[17];
+ tmp12 += m_A52 * V[18];
+ V[12] = (RHS12 - tmp12) / m_A49;
+ double tmp11 = 0.0;
+ tmp11 += m_A43 * V[12];
+ V[11] = (RHS11 - tmp11) / m_A42;
+ double tmp10 = 0.0;
+ tmp10 += m_A39 * V[12];
+ tmp10 += m_A40 * V[17];
+ V[10] = (RHS10 - tmp10) / m_A38;
+ double tmp9 = 0.0;
+ tmp9 += m_A33 * V[10];
+ V[9] = (RHS9 - tmp9) / m_A32;
+ double tmp8 = 0.0;
+ tmp8 += m_A28 * V[9];
+ tmp8 += m_A29 * V[10];
+ V[8] = (RHS8 - tmp8) / m_A27;
+ double tmp7 = 0.0;
+ tmp7 += m_A22 * V[13];
+ tmp7 += m_A23 * V[15];
+ tmp7 += m_A24 * V[18];
+ V[7] = (RHS7 - tmp7) / m_A21;
+ double tmp6 = 0.0;
+ tmp6 += m_A17 * V[11];
+ tmp6 += m_A18 * V[12];
+ tmp6 += m_A19 * V[16];
+ tmp6 += m_A20 * V[18];
+ V[6] = (RHS6 - tmp6) / m_A16;
+ double tmp5 = 0.0;
+ tmp5 += m_A15 * V[14];
+ V[5] = (RHS5 - tmp5) / m_A14;
+ double tmp4 = 0.0;
+ tmp4 += m_A13 * V[12];
+ V[4] = (RHS4 - tmp4) / m_A12;
+ double tmp3 = 0.0;
+ tmp3 += m_A9 * V[10];
+ tmp3 += m_A10 * V[12];
+ tmp3 += m_A11 * V[17];
+ V[3] = (RHS3 - tmp3) / m_A8;
+ double tmp2 = 0.0;
+ tmp2 += m_A5 * V[8];
+ tmp2 += m_A6 * V[9];
+ tmp2 += m_A7 * V[10];
+ V[2] = (RHS2 - tmp2) / m_A4;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[8];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[15];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// sspeedr
static void nl_gcr_3e833834e5ce5aee_13_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -12934,6 +14724,514 @@ static void nl_gcr_4334c95878d1be92_399_double_double(double * __restrict V, con
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_437326911721091_77_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ double m_A75(0.0);
+ double m_A76(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 -= go[1] * *cnV[1];
+ m_A2 += gt[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A2 += gt[6];
+ m_A4 += go[2];
+ m_A5 += go[3];
+ m_A3 += go[4];
+ double RHS1 = Idr[2];
+ RHS1 += Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 += Idr[6];
+ RHS1 -= go[5] * *cnV[5];
+ RHS1 -= go[6] * *cnV[6];
+ m_A6 += gt[7];
+ m_A6 += gt[8];
+ m_A6 += gt[9];
+ m_A7 += go[7];
+ double RHS2 = Idr[7];
+ RHS2 += Idr[8];
+ RHS2 += Idr[9];
+ RHS2 -= go[8] * *cnV[8];
+ RHS2 -= go[9] * *cnV[9];
+ m_A8 += gt[10];
+ m_A8 += gt[11];
+ m_A10 += go[10];
+ m_A9 += go[11];
+ double RHS3 = Idr[10];
+ RHS3 += Idr[11];
+ m_A11 += gt[12];
+ m_A11 += gt[13];
+ m_A11 += gt[14];
+ m_A11 += gt[15];
+ m_A12 += go[12];
+ double RHS4 = Idr[12];
+ RHS4 += Idr[13];
+ RHS4 += Idr[14];
+ RHS4 += Idr[15];
+ RHS4 -= go[13] * *cnV[13];
+ RHS4 -= go[14] * *cnV[14];
+ RHS4 -= go[15] * *cnV[15];
+ m_A13 += gt[16];
+ m_A13 += gt[17];
+ m_A13 += gt[18];
+ m_A13 += gt[19];
+ m_A13 += gt[20];
+ m_A16 += go[16];
+ m_A15 += go[17];
+ m_A14 += go[18];
+ double RHS5 = Idr[16];
+ RHS5 += Idr[17];
+ RHS5 += Idr[18];
+ RHS5 += Idr[19];
+ RHS5 += Idr[20];
+ RHS5 -= go[19] * *cnV[19];
+ RHS5 -= go[20] * *cnV[20];
+ m_A17 += gt[21];
+ m_A17 += gt[22];
+ m_A17 += gt[23];
+ m_A18 += go[21];
+ double RHS6 = Idr[21];
+ RHS6 += Idr[22];
+ RHS6 += Idr[23];
+ RHS6 -= go[22] * *cnV[22];
+ RHS6 -= go[23] * *cnV[23];
+ m_A19 += gt[24];
+ m_A19 += gt[25];
+ m_A19 += gt[26];
+ m_A19 += gt[27];
+ m_A20 += go[24];
+ double RHS7 = Idr[24];
+ RHS7 += Idr[25];
+ RHS7 += Idr[26];
+ RHS7 += Idr[27];
+ RHS7 -= go[25] * *cnV[25];
+ RHS7 -= go[26] * *cnV[26];
+ RHS7 -= go[27] * *cnV[27];
+ m_A23 += gt[28];
+ m_A23 += gt[29];
+ m_A23 += gt[30];
+ m_A21 += go[28];
+ m_A22 += go[29];
+ double RHS8 = Idr[28];
+ RHS8 += Idr[29];
+ RHS8 += Idr[30];
+ RHS8 -= go[30] * *cnV[30];
+ m_A28 += gt[31];
+ m_A28 += gt[32];
+ m_A28 += gt[33];
+ m_A28 += gt[34];
+ m_A28 += gt[35];
+ m_A28 += gt[36];
+ m_A28 += gt[37];
+ m_A29 += go[31];
+ m_A26 += go[32];
+ double RHS9 = Idr[31];
+ RHS9 += Idr[32];
+ RHS9 += Idr[33];
+ RHS9 += Idr[34];
+ RHS9 += Idr[35];
+ RHS9 += Idr[36];
+ RHS9 += Idr[37];
+ RHS9 -= go[33] * *cnV[33];
+ RHS9 -= go[34] * *cnV[34];
+ RHS9 -= go[35] * *cnV[35];
+ RHS9 -= go[36] * *cnV[36];
+ RHS9 -= go[37] * *cnV[37];
+ m_A31 += gt[38];
+ m_A31 += gt[39];
+ m_A31 += gt[40];
+ m_A31 += gt[41];
+ m_A31 += gt[42];
+ m_A31 += gt[43];
+ m_A31 += gt[44];
+ m_A32 += go[38];
+ m_A30 += go[39];
+ double RHS10 = Idr[38];
+ RHS10 += Idr[39];
+ RHS10 += Idr[40];
+ RHS10 += Idr[41];
+ RHS10 += Idr[42];
+ RHS10 += Idr[43];
+ RHS10 += Idr[44];
+ RHS10 -= go[40] * *cnV[40];
+ RHS10 -= go[41] * *cnV[41];
+ RHS10 -= go[42] * *cnV[42];
+ RHS10 -= go[43] * *cnV[43];
+ RHS10 -= go[44] * *cnV[44];
+ m_A35 += gt[45];
+ m_A35 += gt[46];
+ m_A35 += gt[47];
+ m_A35 += gt[48];
+ m_A36 += go[45];
+ m_A34 += go[46];
+ m_A33 += go[47];
+ double RHS11 = Idr[45];
+ RHS11 += Idr[46];
+ RHS11 += Idr[47];
+ RHS11 += Idr[48];
+ RHS11 -= go[48] * *cnV[48];
+ m_A42 += gt[49];
+ m_A42 += gt[50];
+ m_A42 += gt[51];
+ m_A39 += go[49];
+ m_A45 += go[50];
+ m_A38 += go[51];
+ double RHS12 = Idr[49];
+ RHS12 += Idr[50];
+ RHS12 += Idr[51];
+ m_A48 += gt[52];
+ m_A48 += gt[53];
+ m_A46 += go[52];
+ m_A51 += go[53];
+ double RHS13 = Idr[52];
+ RHS13 += Idr[53];
+ m_A53 += gt[54];
+ m_A53 += gt[55];
+ m_A53 += gt[56];
+ m_A53 += gt[57];
+ m_A53 += gt[58];
+ m_A53 += gt[59];
+ m_A53 += gt[60];
+ m_A54 += go[54];
+ m_A52 += go[55];
+ double RHS14 = Idr[54];
+ RHS14 += Idr[55];
+ RHS14 += Idr[56];
+ RHS14 += Idr[57];
+ RHS14 += Idr[58];
+ RHS14 += Idr[59];
+ RHS14 += Idr[60];
+ RHS14 -= go[56] * *cnV[56];
+ RHS14 -= go[57] * *cnV[57];
+ RHS14 -= go[58] * *cnV[58];
+ RHS14 -= go[59] * *cnV[59];
+ RHS14 -= go[60] * *cnV[60];
+ m_A56 += gt[61];
+ m_A56 += gt[62];
+ m_A56 += gt[63];
+ m_A55 += go[61];
+ m_A57 += go[62];
+ double RHS15 = Idr[61];
+ RHS15 += Idr[62];
+ RHS15 += Idr[63];
+ RHS15 -= go[63] * *cnV[63];
+ m_A60 += gt[64];
+ m_A60 += gt[65];
+ m_A60 += gt[66];
+ m_A58 += go[64];
+ m_A59 += go[65];
+ double RHS16 = Idr[64];
+ RHS16 += Idr[65];
+ RHS16 += Idr[66];
+ RHS16 -= go[66] * *cnV[66];
+ m_A69 += gt[67];
+ m_A69 += gt[68];
+ m_A69 += gt[69];
+ m_A69 += gt[70];
+ m_A69 += gt[71];
+ m_A63 += go[67];
+ m_A62 += go[68];
+ m_A65 += go[69];
+ double RHS17 = Idr[67];
+ RHS17 += Idr[68];
+ RHS17 += Idr[69];
+ RHS17 += Idr[70];
+ RHS17 += Idr[71];
+ RHS17 -= go[70] * *cnV[70];
+ RHS17 -= go[71] * *cnV[71];
+ m_A76 += gt[72];
+ m_A76 += gt[73];
+ m_A76 += gt[74];
+ m_A76 += gt[75];
+ m_A74 += go[72];
+ m_A72 += go[73];
+ m_A71 += go[74];
+ double RHS18 = Idr[72];
+ RHS18 += Idr[73];
+ RHS18 += Idr[74];
+ RHS18 += Idr[75];
+ RHS18 -= go[75] * *cnV[75];
+ const double f0 = 1.0 / m_A0;
+ const double f0_8 = -f0 * m_A21;
+ m_A23 += m_A1 * f0_8;
+ RHS8 += f0_8 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_8 = -f1 * m_A22;
+ m_A23 += m_A3 * f1_8;
+ m_A24 += m_A4 * f1_8;
+ m_A25 += m_A5 * f1_8;
+ RHS8 += f1_8 * RHS1;
+ const double f1_9 = -f1 * m_A26;
+ m_A27 += m_A3 * f1_9;
+ m_A28 += m_A4 * f1_9;
+ m_A29 += m_A5 * f1_9;
+ RHS9 += f1_9 * RHS1;
+ const double f1_12 = -f1 * m_A38;
+ m_A40 += m_A3 * f1_12;
+ m_A41 += m_A4 * f1_12;
+ m_A42 += m_A5 * f1_12;
+ RHS12 += f1_12 * RHS1;
+ const double f2 = 1.0 / m_A6;
+ const double f2_10 = -f2 * m_A30;
+ m_A32 += m_A7 * f2_10;
+ RHS10 += f2_10 * RHS2;
+ const double f2_11 = -f2 * m_A33;
+ m_A35 += m_A7 * f2_11;
+ RHS11 += f2_11 * RHS2;
+ const double f3 = 1.0 / m_A8;
+ const double f3_11 = -f3 * m_A34;
+ m_A35 += m_A9 * f3_11;
+ m_A37 += m_A10 * f3_11;
+ RHS11 += f3_11 * RHS3;
+ const double f3_17 = -f3 * m_A62;
+ m_A64 += m_A9 * f3_17;
+ m_A69 += m_A10 * f3_17;
+ RHS17 += f3_17 * RHS3;
+ const double f4 = 1.0 / m_A11;
+ const double f4_16 = -f4 * m_A58;
+ m_A60 += m_A12 * f4_16;
+ RHS16 += f4_16 * RHS4;
+ const double f5 = 1.0 / m_A13;
+ const double f5_12 = -f5 * m_A39;
+ m_A42 += m_A14 * f5_12;
+ m_A43 += m_A15 * f5_12;
+ m_A44 += m_A16 * f5_12;
+ RHS12 += f5_12 * RHS5;
+ const double f5_13 = -f5 * m_A46;
+ m_A47 += m_A14 * f5_13;
+ m_A48 += m_A15 * f5_13;
+ m_A49 += m_A16 * f5_13;
+ RHS13 += f5_13 * RHS5;
+ const double f6 = 1.0 / m_A17;
+ const double f6_14 = -f6 * m_A52;
+ m_A54 += m_A18 * f6_14;
+ RHS14 += f6_14 * RHS6;
+ const double f6_18 = -f6 * m_A71;
+ m_A76 += m_A18 * f6_18;
+ RHS18 += f6_18 * RHS6;
+ const double f7 = 1.0 / m_A19;
+ const double f7_15 = -f7 * m_A55;
+ m_A56 += m_A20 * f7_15;
+ RHS15 += f7_15 * RHS7;
+ const double f8 = 1.0 / m_A23;
+ const double f8_9 = -f8 * m_A27;
+ m_A28 += m_A24 * f8_9;
+ m_A29 += m_A25 * f8_9;
+ RHS9 += f8_9 * RHS8;
+ const double f8_12 = -f8 * m_A40;
+ m_A41 += m_A24 * f8_12;
+ m_A42 += m_A25 * f8_12;
+ RHS12 += f8_12 * RHS8;
+ const double f9 = 1.0 / m_A28;
+ const double f9_12 = -f9 * m_A41;
+ m_A42 += m_A29 * f9_12;
+ RHS12 += f9_12 * RHS9;
+ const double f10 = 1.0 / m_A31;
+ const double f10_17 = -f10 * m_A63;
+ m_A64 += m_A32 * f10_17;
+ RHS17 += f10_17 * RHS10;
+ const double f11 = 1.0 / m_A35;
+ const double f11_16 = -f11 * m_A59;
+ m_A60 += m_A36 * f11_16;
+ m_A61 += m_A37 * f11_16;
+ RHS16 += f11_16 * RHS11;
+ const double f11_17 = -f11 * m_A64;
+ m_A68 += m_A36 * f11_17;
+ m_A69 += m_A37 * f11_17;
+ RHS17 += f11_17 * RHS11;
+ const double f12 = 1.0 / m_A42;
+ const double f12_13 = -f12 * m_A47;
+ m_A48 += m_A43 * f12_13;
+ m_A49 += m_A44 * f12_13;
+ m_A50 += m_A45 * f12_13;
+ RHS13 += f12_13 * RHS12;
+ const double f12_17 = -f12 * m_A65;
+ m_A66 += m_A43 * f12_17;
+ m_A67 += m_A44 * f12_17;
+ m_A69 += m_A45 * f12_17;
+ RHS17 += f12_17 * RHS12;
+ const double f13 = 1.0 / m_A48;
+ const double f13_17 = -f13 * m_A66;
+ m_A67 += m_A49 * f13_17;
+ m_A69 += m_A50 * f13_17;
+ m_A70 += m_A51 * f13_17;
+ RHS17 += f13_17 * RHS13;
+ const double f13_18 = -f13 * m_A72;
+ m_A73 += m_A49 * f13_18;
+ m_A75 += m_A50 * f13_18;
+ m_A76 += m_A51 * f13_18;
+ RHS18 += f13_18 * RHS13;
+ const double f14 = 1.0 / m_A53;
+ const double f14_17 = -f14 * m_A67;
+ m_A70 += m_A54 * f14_17;
+ RHS17 += f14_17 * RHS14;
+ const double f14_18 = -f14 * m_A73;
+ m_A76 += m_A54 * f14_18;
+ RHS18 += f14_18 * RHS14;
+ const double f15 = 1.0 / m_A56;
+ const double f15_18 = -f15 * m_A74;
+ m_A76 += m_A57 * f15_18;
+ RHS18 += f15_18 * RHS15;
+ const double f16 = 1.0 / m_A60;
+ const double f16_17 = -f16 * m_A68;
+ m_A69 += m_A61 * f16_17;
+ RHS17 += f16_17 * RHS16;
+ const double f17 = 1.0 / m_A69;
+ const double f17_18 = -f17 * m_A75;
+ m_A76 += m_A70 * f17_18;
+ RHS18 += f17_18 * RHS17;
+ V[18] = RHS18 / m_A76;
+ double tmp17 = 0.0;
+ tmp17 += m_A70 * V[18];
+ V[17] = (RHS17 - tmp17) / m_A69;
+ double tmp16 = 0.0;
+ tmp16 += m_A61 * V[17];
+ V[16] = (RHS16 - tmp16) / m_A60;
+ double tmp15 = 0.0;
+ tmp15 += m_A57 * V[18];
+ V[15] = (RHS15 - tmp15) / m_A56;
+ double tmp14 = 0.0;
+ tmp14 += m_A54 * V[18];
+ V[14] = (RHS14 - tmp14) / m_A53;
+ double tmp13 = 0.0;
+ tmp13 += m_A49 * V[14];
+ tmp13 += m_A50 * V[17];
+ tmp13 += m_A51 * V[18];
+ V[13] = (RHS13 - tmp13) / m_A48;
+ double tmp12 = 0.0;
+ tmp12 += m_A43 * V[13];
+ tmp12 += m_A44 * V[14];
+ tmp12 += m_A45 * V[17];
+ V[12] = (RHS12 - tmp12) / m_A42;
+ double tmp11 = 0.0;
+ tmp11 += m_A36 * V[16];
+ tmp11 += m_A37 * V[17];
+ V[11] = (RHS11 - tmp11) / m_A35;
+ double tmp10 = 0.0;
+ tmp10 += m_A32 * V[11];
+ V[10] = (RHS10 - tmp10) / m_A31;
+ double tmp9 = 0.0;
+ tmp9 += m_A29 * V[12];
+ V[9] = (RHS9 - tmp9) / m_A28;
+ double tmp8 = 0.0;
+ tmp8 += m_A24 * V[9];
+ tmp8 += m_A25 * V[12];
+ V[8] = (RHS8 - tmp8) / m_A23;
+ double tmp7 = 0.0;
+ tmp7 += m_A20 * V[15];
+ V[7] = (RHS7 - tmp7) / m_A19;
+ double tmp6 = 0.0;
+ tmp6 += m_A18 * V[18];
+ V[6] = (RHS6 - tmp6) / m_A17;
+ double tmp5 = 0.0;
+ tmp5 += m_A14 * V[12];
+ tmp5 += m_A15 * V[13];
+ tmp5 += m_A16 * V[14];
+ V[5] = (RHS5 - tmp5) / m_A13;
+ double tmp4 = 0.0;
+ tmp4 += m_A12 * V[16];
+ V[4] = (RHS4 - tmp4) / m_A11;
+ double tmp3 = 0.0;
+ tmp3 += m_A9 * V[11];
+ tmp3 += m_A10 * V[17];
+ V[3] = (RHS3 - tmp3) / m_A8;
+ double tmp2 = 0.0;
+ tmp2 += m_A7 * V[11];
+ V[2] = (RHS2 - tmp2) / m_A6;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[8];
+ tmp1 += m_A4 * V[9];
+ tmp1 += m_A5 * V[12];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[8];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// kidniki
static void nl_gcr_43f7ff9bc651cc7a_198_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -14306,6 +16604,550 @@ static void nl_gcr_491f95430bfdfd05_19_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// frogs
+static void nl_gcr_494f233b1a947be1_88_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ double m_A75(0.0);
+ double m_A76(0.0);
+ double m_A77(0.0);
+ double m_A78(0.0);
+ double m_A79(0.0);
+ double m_A80(0.0);
+ double m_A81(0.0);
+ double m_A82(0.0);
+ double m_A83(0.0);
+ double m_A84(0.0);
+ double m_A85(0.0);
+ double m_A86(0.0);
+ double m_A87(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A0 += gt[3];
+ m_A0 += gt[4];
+ m_A1 += go[0];
+ m_A1 += go[1];
+ m_A2 += go[2];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 += Idr[3];
+ RHS0 += Idr[4];
+ RHS0 -= go[3] * *cnV[3];
+ RHS0 -= go[4] * *cnV[4];
+ m_A3 += gt[5];
+ m_A3 += gt[6];
+ m_A3 += gt[7];
+ m_A3 += gt[8];
+ m_A5 += go[5];
+ m_A4 += go[6];
+ double RHS1 = Idr[5];
+ RHS1 += Idr[6];
+ RHS1 += Idr[7];
+ RHS1 += Idr[8];
+ RHS1 -= go[7] * *cnV[7];
+ RHS1 -= go[8] * *cnV[8];
+ m_A6 += gt[9];
+ m_A6 += gt[10];
+ m_A7 += go[9];
+ double RHS2 = Idr[9];
+ RHS2 += Idr[10];
+ RHS2 -= go[10] * *cnV[10];
+ m_A8 += gt[11];
+ m_A8 += gt[12];
+ m_A8 += gt[13];
+ m_A10 += go[11];
+ m_A9 += go[12];
+ double RHS3 = Idr[11];
+ RHS3 += Idr[12];
+ RHS3 += Idr[13];
+ RHS3 -= go[13] * *cnV[13];
+ m_A11 += gt[14];
+ m_A11 += gt[15];
+ m_A13 += go[14];
+ m_A12 += go[15];
+ double RHS4 = Idr[14];
+ RHS4 += Idr[15];
+ m_A14 += gt[16];
+ m_A14 += gt[17];
+ m_A15 += go[16];
+ m_A16 += go[17];
+ double RHS5 = Idr[16];
+ RHS5 += Idr[17];
+ m_A17 += gt[18];
+ m_A17 += gt[19];
+ m_A17 += gt[20];
+ m_A20 += go[18];
+ m_A18 += go[19];
+ m_A19 += go[20];
+ double RHS6 = Idr[18];
+ RHS6 += Idr[19];
+ RHS6 += Idr[20];
+ m_A21 += gt[21];
+ m_A21 += gt[22];
+ m_A23 += go[21];
+ m_A22 += go[22];
+ double RHS7 = Idr[21];
+ RHS7 += Idr[22];
+ m_A24 += gt[23];
+ m_A24 += gt[24];
+ m_A24 += gt[25];
+ m_A24 += gt[26];
+ m_A24 += gt[27];
+ m_A24 += gt[28];
+ m_A24 += gt[29];
+ m_A25 += go[23];
+ double RHS8 = Idr[23];
+ RHS8 += Idr[24];
+ RHS8 += Idr[25];
+ RHS8 += Idr[26];
+ RHS8 += Idr[27];
+ RHS8 += Idr[28];
+ RHS8 += Idr[29];
+ RHS8 -= go[24] * *cnV[24];
+ RHS8 -= go[25] * *cnV[25];
+ RHS8 -= go[26] * *cnV[26];
+ RHS8 -= go[27] * *cnV[27];
+ RHS8 -= go[28] * *cnV[28];
+ RHS8 -= go[29] * *cnV[29];
+ m_A28 += gt[30];
+ m_A28 += gt[31];
+ m_A28 += gt[32];
+ m_A28 += gt[33];
+ m_A27 += go[30];
+ m_A26 += go[31];
+ m_A26 += go[32];
+ double RHS9 = Idr[30];
+ RHS9 += Idr[31];
+ RHS9 += Idr[32];
+ RHS9 += Idr[33];
+ RHS9 -= go[33] * *cnV[33];
+ m_A33 += gt[34];
+ m_A33 += gt[35];
+ m_A31 += go[34];
+ double RHS10 = Idr[34];
+ RHS10 += Idr[35];
+ RHS10 -= go[35] * *cnV[35];
+ m_A39 += gt[36];
+ m_A39 += gt[37];
+ m_A39 += gt[38];
+ m_A36 += go[36];
+ m_A35 += go[37];
+ double RHS11 = Idr[36];
+ RHS11 += Idr[37];
+ RHS11 += Idr[38];
+ RHS11 -= go[38] * *cnV[38];
+ m_A43 += gt[39];
+ m_A43 += gt[40];
+ m_A43 += gt[41];
+ m_A44 += go[39];
+ m_A42 += go[40];
+ m_A41 += go[41];
+ double RHS12 = Idr[39];
+ RHS12 += Idr[40];
+ RHS12 += Idr[41];
+ m_A47 += gt[42];
+ m_A47 += gt[43];
+ m_A47 += gt[44];
+ m_A47 += gt[45];
+ m_A47 += gt[46];
+ m_A47 += gt[47];
+ m_A47 += gt[48];
+ m_A48 += go[42];
+ m_A45 += go[43];
+ double RHS13 = Idr[42];
+ RHS13 += Idr[43];
+ RHS13 += Idr[44];
+ RHS13 += Idr[45];
+ RHS13 += Idr[46];
+ RHS13 += Idr[47];
+ RHS13 += Idr[48];
+ RHS13 -= go[44] * *cnV[44];
+ RHS13 -= go[45] * *cnV[45];
+ RHS13 -= go[46] * *cnV[46];
+ RHS13 -= go[47] * *cnV[47];
+ RHS13 -= go[48] * *cnV[48];
+ m_A51 += gt[49];
+ m_A51 += gt[50];
+ m_A51 += gt[51];
+ m_A50 += go[49];
+ m_A49 += go[50];
+ double RHS14 = Idr[49];
+ RHS14 += Idr[50];
+ RHS14 += Idr[51];
+ RHS14 -= go[51] * *cnV[51];
+ m_A59 += gt[52];
+ m_A59 += gt[53];
+ m_A59 += gt[54];
+ m_A59 += gt[55];
+ m_A59 += gt[56];
+ m_A56 += go[52];
+ m_A55 += go[53];
+ double RHS15 = Idr[52];
+ RHS15 += Idr[53];
+ RHS15 += Idr[54];
+ RHS15 += Idr[55];
+ RHS15 += Idr[56];
+ RHS15 -= go[54] * *cnV[54];
+ RHS15 -= go[55] * *cnV[55];
+ RHS15 -= go[56] * *cnV[56];
+ m_A66 += gt[57];
+ m_A66 += gt[58];
+ m_A66 += gt[59];
+ m_A63 += go[57];
+ m_A62 += go[58];
+ double RHS16 = Idr[57];
+ RHS16 += Idr[58];
+ RHS16 += Idr[59];
+ RHS16 -= go[59] * *cnV[59];
+ m_A71 += gt[60];
+ m_A71 += gt[61];
+ m_A71 += gt[62];
+ m_A73 += go[60];
+ m_A69 += go[61];
+ double RHS17 = Idr[60];
+ RHS17 += Idr[61];
+ RHS17 += Idr[62];
+ RHS17 -= go[62] * *cnV[62];
+ m_A82 += gt[63];
+ m_A82 += gt[64];
+ m_A82 += gt[65];
+ m_A82 += gt[66];
+ m_A82 += gt[67];
+ m_A82 += gt[68];
+ m_A77 += go[63];
+ m_A75 += go[64];
+ m_A74 += go[65];
+ m_A76 += go[66];
+ double RHS18 = Idr[63];
+ RHS18 += Idr[64];
+ RHS18 += Idr[65];
+ RHS18 += Idr[66];
+ RHS18 += Idr[67];
+ RHS18 += Idr[68];
+ RHS18 -= go[67] * *cnV[67];
+ RHS18 -= go[68] * *cnV[68];
+ m_A87 += gt[69];
+ m_A87 += gt[70];
+ m_A87 += gt[71];
+ m_A87 += gt[72];
+ m_A84 += go[69];
+ m_A85 += go[70];
+ double RHS19 = Idr[69];
+ RHS19 += Idr[70];
+ RHS19 += Idr[71];
+ RHS19 += Idr[72];
+ RHS19 -= go[71] * *cnV[71];
+ RHS19 -= go[72] * *cnV[72];
+ const double f0 = 1.0 / m_A0;
+ const double f0_9 = -f0 * m_A26;
+ m_A28 += m_A1 * f0_9;
+ m_A30 += m_A2 * f0_9;
+ RHS9 += f0_9 * RHS0;
+ const double f0_11 = -f0 * m_A35;
+ m_A37 += m_A1 * f0_11;
+ m_A39 += m_A2 * f0_11;
+ RHS11 += f0_11 * RHS0;
+ const double f1 = 1.0 / m_A3;
+ const double f1_9 = -f1 * m_A27;
+ m_A28 += m_A4 * f1_9;
+ m_A29 += m_A5 * f1_9;
+ RHS9 += f1_9 * RHS1;
+ const double f1_10 = -f1 * m_A31;
+ m_A32 += m_A4 * f1_10;
+ m_A33 += m_A5 * f1_10;
+ RHS10 += f1_10 * RHS1;
+ const double f2 = 1.0 / m_A6;
+ const double f2_12 = -f2 * m_A41;
+ m_A43 += m_A7 * f2_12;
+ RHS12 += f2_12 * RHS2;
+ const double f3 = 1.0 / m_A8;
+ const double f3_12 = -f3 * m_A42;
+ m_A43 += m_A9 * f3_12;
+ m_A44 += m_A10 * f3_12;
+ RHS12 += f3_12 * RHS3;
+ const double f3_13 = -f3 * m_A45;
+ m_A46 += m_A9 * f3_13;
+ m_A48 += m_A10 * f3_13;
+ RHS13 += f3_13 * RHS3;
+ const double f3_18 = -f3 * m_A74;
+ m_A76 += m_A9 * f3_18;
+ m_A82 += m_A10 * f3_18;
+ RHS18 += f3_18 * RHS3;
+ const double f4 = 1.0 / m_A11;
+ const double f4_11 = -f4 * m_A36;
+ m_A39 += m_A12 * f4_11;
+ m_A40 += m_A13 * f4_11;
+ RHS11 += f4_11 * RHS4;
+ const double f4_15 = -f4 * m_A55;
+ m_A57 += m_A12 * f4_15;
+ m_A59 += m_A13 * f4_15;
+ RHS15 += f4_15 * RHS4;
+ const double f5 = 1.0 / m_A14;
+ const double f5_14 = -f5 * m_A49;
+ m_A51 += m_A15 * f5_14;
+ m_A54 += m_A16 * f5_14;
+ RHS14 += f5_14 * RHS5;
+ const double f5_18 = -f5 * m_A75;
+ m_A78 += m_A15 * f5_18;
+ m_A82 += m_A16 * f5_18;
+ RHS18 += f5_18 * RHS5;
+ const double f6 = 1.0 / m_A17;
+ const double f6_14 = -f6 * m_A50;
+ m_A51 += m_A18 * f6_14;
+ m_A52 += m_A19 * f6_14;
+ m_A53 += m_A20 * f6_14;
+ RHS14 += f6_14 * RHS6;
+ const double f6_15 = -f6 * m_A56;
+ m_A58 += m_A18 * f6_15;
+ m_A59 += m_A19 * f6_15;
+ m_A60 += m_A20 * f6_15;
+ RHS15 += f6_15 * RHS6;
+ const double f6_16 = -f6 * m_A62;
+ m_A64 += m_A18 * f6_16;
+ m_A65 += m_A19 * f6_16;
+ m_A66 += m_A20 * f6_16;
+ RHS16 += f6_16 * RHS6;
+ const double f7 = 1.0 / m_A21;
+ const double f7_16 = -f7 * m_A63;
+ m_A66 += m_A22 * f7_16;
+ m_A67 += m_A23 * f7_16;
+ RHS16 += f7_16 * RHS7;
+ const double f7_17 = -f7 * m_A69;
+ m_A70 += m_A22 * f7_17;
+ m_A71 += m_A23 * f7_17;
+ RHS17 += f7_17 * RHS7;
+ const double f8 = 1.0 / m_A24;
+ const double f8_19 = -f8 * m_A84;
+ m_A85 += m_A25 * f8_19;
+ RHS19 += f8_19 * RHS8;
+ const double f9 = 1.0 / m_A28;
+ const double f9_10 = -f9 * m_A32;
+ m_A33 += m_A29 * f9_10;
+ m_A34 += m_A30 * f9_10;
+ RHS10 += f9_10 * RHS9;
+ const double f9_11 = -f9 * m_A37;
+ m_A38 += m_A29 * f9_11;
+ m_A39 += m_A30 * f9_11;
+ RHS11 += f9_11 * RHS9;
+ const double f10 = 1.0 / m_A33;
+ const double f10_11 = -f10 * m_A38;
+ m_A39 += m_A34 * f10_11;
+ RHS11 += f10_11 * RHS10;
+ const double f11 = 1.0 / m_A39;
+ const double f11_15 = -f11 * m_A57;
+ m_A59 += m_A40 * f11_15;
+ RHS15 += f11_15 * RHS11;
+ const double f12 = 1.0 / m_A43;
+ const double f12_13 = -f12 * m_A46;
+ m_A48 += m_A44 * f12_13;
+ RHS13 += f12_13 * RHS12;
+ const double f12_18 = -f12 * m_A76;
+ m_A82 += m_A44 * f12_18;
+ RHS18 += f12_18 * RHS12;
+ const double f13 = 1.0 / m_A47;
+ const double f13_18 = -f13 * m_A77;
+ m_A82 += m_A48 * f13_18;
+ RHS18 += f13_18 * RHS13;
+ const double f14 = 1.0 / m_A51;
+ const double f14_15 = -f14 * m_A58;
+ m_A59 += m_A52 * f14_15;
+ m_A60 += m_A53 * f14_15;
+ m_A61 += m_A54 * f14_15;
+ RHS15 += f14_15 * RHS14;
+ const double f14_16 = -f14 * m_A64;
+ m_A65 += m_A52 * f14_16;
+ m_A66 += m_A53 * f14_16;
+ m_A68 += m_A54 * f14_16;
+ RHS16 += f14_16 * RHS14;
+ const double f14_18 = -f14 * m_A78;
+ m_A79 += m_A52 * f14_18;
+ m_A80 += m_A53 * f14_18;
+ m_A82 += m_A54 * f14_18;
+ RHS18 += f14_18 * RHS14;
+ const double f15 = 1.0 / m_A59;
+ const double f15_16 = -f15 * m_A65;
+ m_A66 += m_A60 * f15_16;
+ m_A68 += m_A61 * f15_16;
+ RHS16 += f15_16 * RHS15;
+ const double f15_18 = -f15 * m_A79;
+ m_A80 += m_A60 * f15_18;
+ m_A82 += m_A61 * f15_18;
+ RHS18 += f15_18 * RHS15;
+ const double f16 = 1.0 / m_A66;
+ const double f16_17 = -f16 * m_A70;
+ m_A71 += m_A67 * f16_17;
+ m_A72 += m_A68 * f16_17;
+ RHS17 += f16_17 * RHS16;
+ const double f16_18 = -f16 * m_A80;
+ m_A81 += m_A67 * f16_18;
+ m_A82 += m_A68 * f16_18;
+ RHS18 += f16_18 * RHS16;
+ const double f17 = 1.0 / m_A71;
+ const double f17_18 = -f17 * m_A81;
+ m_A82 += m_A72 * f17_18;
+ m_A83 += m_A73 * f17_18;
+ RHS18 += f17_18 * RHS17;
+ const double f17_19 = -f17 * m_A85;
+ m_A86 += m_A72 * f17_19;
+ m_A87 += m_A73 * f17_19;
+ RHS19 += f17_19 * RHS17;
+ const double f18 = 1.0 / m_A82;
+ const double f18_19 = -f18 * m_A86;
+ m_A87 += m_A83 * f18_19;
+ RHS19 += f18_19 * RHS18;
+ V[19] = RHS19 / m_A87;
+ double tmp18 = 0.0;
+ tmp18 += m_A83 * V[19];
+ V[18] = (RHS18 - tmp18) / m_A82;
+ double tmp17 = 0.0;
+ tmp17 += m_A72 * V[18];
+ tmp17 += m_A73 * V[19];
+ V[17] = (RHS17 - tmp17) / m_A71;
+ double tmp16 = 0.0;
+ tmp16 += m_A67 * V[17];
+ tmp16 += m_A68 * V[18];
+ V[16] = (RHS16 - tmp16) / m_A66;
+ double tmp15 = 0.0;
+ tmp15 += m_A60 * V[16];
+ tmp15 += m_A61 * V[18];
+ V[15] = (RHS15 - tmp15) / m_A59;
+ double tmp14 = 0.0;
+ tmp14 += m_A52 * V[15];
+ tmp14 += m_A53 * V[16];
+ tmp14 += m_A54 * V[18];
+ V[14] = (RHS14 - tmp14) / m_A51;
+ double tmp13 = 0.0;
+ tmp13 += m_A48 * V[18];
+ V[13] = (RHS13 - tmp13) / m_A47;
+ double tmp12 = 0.0;
+ tmp12 += m_A44 * V[18];
+ V[12] = (RHS12 - tmp12) / m_A43;
+ double tmp11 = 0.0;
+ tmp11 += m_A40 * V[15];
+ V[11] = (RHS11 - tmp11) / m_A39;
+ double tmp10 = 0.0;
+ tmp10 += m_A34 * V[11];
+ V[10] = (RHS10 - tmp10) / m_A33;
+ double tmp9 = 0.0;
+ tmp9 += m_A29 * V[10];
+ tmp9 += m_A30 * V[11];
+ V[9] = (RHS9 - tmp9) / m_A28;
+ double tmp8 = 0.0;
+ tmp8 += m_A25 * V[17];
+ V[8] = (RHS8 - tmp8) / m_A24;
+ double tmp7 = 0.0;
+ tmp7 += m_A22 * V[16];
+ tmp7 += m_A23 * V[17];
+ V[7] = (RHS7 - tmp7) / m_A21;
+ double tmp6 = 0.0;
+ tmp6 += m_A18 * V[14];
+ tmp6 += m_A19 * V[15];
+ tmp6 += m_A20 * V[16];
+ V[6] = (RHS6 - tmp6) / m_A17;
+ double tmp5 = 0.0;
+ tmp5 += m_A15 * V[14];
+ tmp5 += m_A16 * V[18];
+ V[5] = (RHS5 - tmp5) / m_A14;
+ double tmp4 = 0.0;
+ tmp4 += m_A12 * V[11];
+ tmp4 += m_A13 * V[15];
+ V[4] = (RHS4 - tmp4) / m_A11;
+ double tmp3 = 0.0;
+ tmp3 += m_A9 * V[12];
+ tmp3 += m_A10 * V[18];
+ V[3] = (RHS3 - tmp3) / m_A8;
+ double tmp2 = 0.0;
+ tmp2 += m_A7 * V[12];
+ V[2] = (RHS2 - tmp2) / m_A6;
+ double tmp1 = 0.0;
+ tmp1 += m_A4 * V[9];
+ tmp1 += m_A5 * V[10];
+ V[1] = (RHS1 - tmp1) / m_A3;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[9];
+ tmp0 += m_A2 * V[11];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// sspeedr
static void nl_gcr_4a8e2b707bbac8a6_95_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -18279,7 +21121,102 @@ static void nl_gcr_546396f65ce48700_12_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
-// dpatrol
+// brdrline
+static void nl_gcr_576f391d0418cb76_13_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A3 += go[3];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 -= go[4] * *cnV[4];
+ RHS1 -= go[5] * *cnV[5];
+ m_A4 += gt[6];
+ m_A4 += gt[7];
+ m_A4 += gt[8];
+ m_A5 += go[6];
+ double RHS2 = Idr[6];
+ RHS2 += Idr[7];
+ RHS2 += Idr[8];
+ RHS2 -= go[7] * *cnV[7];
+ RHS2 -= go[8] * *cnV[8];
+ m_A6 += gt[9];
+ m_A7 += go[9];
+ double RHS3 = Idr[9];
+ m_A12 += gt[10];
+ m_A12 += gt[11];
+ m_A12 += gt[12];
+ m_A12 += gt[13];
+ m_A12 += gt[14];
+ m_A11 += go[10];
+ m_A10 += go[11];
+ m_A9 += go[12];
+ m_A8 += go[13];
+ double RHS4 = Idr[10];
+ RHS4 += Idr[11];
+ RHS4 += Idr[12];
+ RHS4 += Idr[13];
+ RHS4 += Idr[14];
+ RHS4 -= go[14] * *cnV[14];
+ const double f0 = 1.0 / m_A0;
+ const double f0_4 = -f0 * m_A8;
+ m_A12 += m_A1 * f0_4;
+ RHS4 += f0_4 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_4 = -f1 * m_A9;
+ m_A12 += m_A3 * f1_4;
+ RHS4 += f1_4 * RHS1;
+ const double f2 = 1.0 / m_A4;
+ const double f2_4 = -f2 * m_A10;
+ m_A12 += m_A5 * f2_4;
+ RHS4 += f2_4 * RHS2;
+ const double f3 = 1.0 / m_A6;
+ const double f3_4 = -f3 * m_A11;
+ m_A12 += m_A7 * f3_4;
+ RHS4 += f3_4 * RHS3;
+ V[4] = RHS4 / m_A12;
+ double tmp3 = 0.0;
+ tmp3 += m_A7 * V[4];
+ V[3] = (RHS3 - tmp3) / m_A6;
+ double tmp2 = 0.0;
+ tmp2 += m_A5 * V[4];
+ V[2] = (RHS2 - tmp2) / m_A4;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[4];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[4];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
+// brdrline
static void nl_gcr_59cb6bf7cb9d17dc_7_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
{
@@ -20656,6 +23593,221 @@ static void nl_gcr_6041272373b8603c_178_double_double(double * __restrict V, con
V[0] = (RHS0 - tmp0) / m_A0;
}
+// astrob
+static void nl_gcr_62464664b1c5aa1e_27_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A0 += gt[3];
+ m_A0 += gt[4];
+ m_A0 += gt[5];
+ m_A0 += gt[6];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 += Idr[3];
+ RHS0 += Idr[4];
+ RHS0 += Idr[5];
+ RHS0 += Idr[6];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ RHS0 -= go[3] * *cnV[3];
+ RHS0 -= go[4] * *cnV[4];
+ RHS0 -= go[5] * *cnV[5];
+ RHS0 -= go[6] * *cnV[6];
+ m_A2 += gt[7];
+ m_A2 += gt[8];
+ m_A2 += gt[9];
+ m_A4 += go[7];
+ m_A3 += go[8];
+ double RHS1 = Idr[7];
+ RHS1 += Idr[8];
+ RHS1 += Idr[9];
+ RHS1 -= go[9] * *cnV[9];
+ m_A5 += gt[10];
+ m_A5 += gt[11];
+ m_A5 += gt[12];
+ m_A5 += gt[13];
+ m_A5 += gt[14];
+ m_A5 += gt[15];
+ m_A5 += gt[16];
+ m_A6 += go[10];
+ double RHS2 = Idr[10];
+ RHS2 += Idr[11];
+ RHS2 += Idr[12];
+ RHS2 += Idr[13];
+ RHS2 += Idr[14];
+ RHS2 += Idr[15];
+ RHS2 += Idr[16];
+ RHS2 -= go[11] * *cnV[11];
+ RHS2 -= go[12] * *cnV[12];
+ RHS2 -= go[13] * *cnV[13];
+ RHS2 -= go[14] * *cnV[14];
+ RHS2 -= go[15] * *cnV[15];
+ RHS2 -= go[16] * *cnV[16];
+ m_A7 += gt[17];
+ m_A7 += gt[18];
+ m_A7 += gt[19];
+ m_A7 += gt[20];
+ m_A9 += go[17];
+ m_A10 += go[18];
+ m_A8 += go[19];
+ double RHS3 = Idr[17];
+ RHS3 += Idr[18];
+ RHS3 += Idr[19];
+ RHS3 += Idr[20];
+ RHS3 -= go[20] * *cnV[20];
+ m_A14 += gt[21];
+ m_A14 += gt[22];
+ m_A14 += gt[23];
+ m_A14 += gt[24];
+ m_A14 += gt[25];
+ m_A11 += go[21];
+ m_A13 += go[22];
+ m_A12 += go[23];
+ double RHS4 = Idr[21];
+ RHS4 += Idr[22];
+ RHS4 += Idr[23];
+ RHS4 += Idr[24];
+ RHS4 += Idr[25];
+ RHS4 -= go[24] * *cnV[24];
+ RHS4 -= go[25] * *cnV[25];
+ m_A19 += gt[26];
+ m_A19 += gt[27];
+ m_A19 += gt[28];
+ m_A20 += go[26];
+ m_A17 += go[27];
+ double RHS5 = Idr[26];
+ RHS5 += Idr[27];
+ RHS5 += Idr[28];
+ RHS5 -= go[28] * *cnV[28];
+ m_A26 += gt[29];
+ m_A26 += gt[30];
+ m_A26 += gt[31];
+ m_A26 += gt[32];
+ m_A26 += gt[33];
+ m_A26 += gt[34];
+ m_A26 += gt[35];
+ m_A26 += gt[36];
+ m_A22 += go[29];
+ m_A25 += go[30];
+ m_A23 += go[31];
+ m_A21 += go[32];
+ double RHS6 = Idr[29];
+ RHS6 += Idr[30];
+ RHS6 += Idr[31];
+ RHS6 += Idr[32];
+ RHS6 += Idr[33];
+ RHS6 += Idr[34];
+ RHS6 += Idr[35];
+ RHS6 += Idr[36];
+ RHS6 -= go[33] * *cnV[33];
+ RHS6 -= go[34] * *cnV[34];
+ RHS6 -= go[35] * *cnV[35];
+ RHS6 -= go[36] * *cnV[36];
+ const double f0 = 1.0 / m_A0;
+ const double f0_4 = -f0 * m_A11;
+ m_A12 += m_A1 * f0_4;
+ RHS4 += f0_4 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_4 = -f1 * m_A12;
+ m_A14 += m_A3 * f1_4;
+ m_A16 += m_A4 * f1_4;
+ RHS4 += f1_4 * RHS1;
+ const double f1_6 = -f1 * m_A21;
+ m_A24 += m_A3 * f1_6;
+ m_A26 += m_A4 * f1_6;
+ RHS6 += f1_6 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_6 = -f2 * m_A22;
+ m_A25 += m_A6 * f2_6;
+ RHS6 += f2_6 * RHS2;
+ const double f3 = 1.0 / m_A7;
+ const double f3_4 = -f3 * m_A13;
+ m_A14 += m_A8 * f3_4;
+ m_A15 += m_A9 * f3_4;
+ m_A16 += m_A10 * f3_4;
+ RHS4 += f3_4 * RHS3;
+ const double f3_5 = -f3 * m_A17;
+ m_A18 += m_A8 * f3_5;
+ m_A19 += m_A9 * f3_5;
+ m_A20 += m_A10 * f3_5;
+ RHS5 += f3_5 * RHS3;
+ const double f3_6 = -f3 * m_A23;
+ m_A24 += m_A8 * f3_6;
+ m_A25 += m_A9 * f3_6;
+ m_A26 += m_A10 * f3_6;
+ RHS6 += f3_6 * RHS3;
+ const double f4 = 1.0 / m_A14;
+ const double f4_5 = -f4 * m_A18;
+ m_A19 += m_A15 * f4_5;
+ m_A20 += m_A16 * f4_5;
+ RHS5 += f4_5 * RHS4;
+ const double f4_6 = -f4 * m_A24;
+ m_A25 += m_A15 * f4_6;
+ m_A26 += m_A16 * f4_6;
+ RHS6 += f4_6 * RHS4;
+ const double f5 = 1.0 / m_A19;
+ const double f5_6 = -f5 * m_A25;
+ m_A26 += m_A20 * f5_6;
+ RHS6 += f5_6 * RHS5;
+ V[6] = RHS6 / m_A26;
+ double tmp5 = 0.0;
+ tmp5 += m_A20 * V[6];
+ V[5] = (RHS5 - tmp5) / m_A19;
+ double tmp4 = 0.0;
+ tmp4 += m_A15 * V[5];
+ tmp4 += m_A16 * V[6];
+ V[4] = (RHS4 - tmp4) / m_A14;
+ double tmp3 = 0.0;
+ tmp3 += m_A8 * V[4];
+ tmp3 += m_A9 * V[5];
+ tmp3 += m_A10 * V[6];
+ V[3] = (RHS3 - tmp3) / m_A7;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[5];
+ V[2] = (RHS2 - tmp2) / m_A5;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[4];
+ tmp1 += m_A4 * V[6];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[1];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// solarq
static void nl_gcr_62612f71055b8fd4_303_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -28820,6 +31972,757 @@ static void nl_gcr_743595e64cee0a5e_112_double_double(double * __restrict V, con
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_75400df5d559a266_75_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A3 += go[3];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 -= go[4] * *cnV[4];
+ RHS1 -= go[5] * *cnV[5];
+ m_A4 += gt[6];
+ m_A4 += gt[7];
+ m_A4 += gt[8];
+ m_A4 += gt[9];
+ m_A5 += go[6];
+ double RHS2 = Idr[6];
+ RHS2 += Idr[7];
+ RHS2 += Idr[8];
+ RHS2 += Idr[9];
+ RHS2 -= go[7] * *cnV[7];
+ RHS2 -= go[8] * *cnV[8];
+ RHS2 -= go[9] * *cnV[9];
+ m_A6 += gt[10];
+ m_A6 += gt[11];
+ m_A8 += go[10];
+ m_A7 += go[11];
+ double RHS3 = Idr[10];
+ RHS3 += Idr[11];
+ m_A9 += gt[12];
+ m_A9 += gt[13];
+ m_A9 += gt[14];
+ m_A10 += go[12];
+ double RHS4 = Idr[12];
+ RHS4 += Idr[13];
+ RHS4 += Idr[14];
+ RHS4 -= go[13] * *cnV[13];
+ RHS4 -= go[14] * *cnV[14];
+ m_A11 += gt[15];
+ m_A11 += gt[16];
+ m_A11 += gt[17];
+ m_A11 += gt[18];
+ m_A11 += gt[19];
+ m_A11 += gt[20];
+ m_A12 += go[15];
+ m_A15 += go[16];
+ m_A14 += go[17];
+ m_A13 += go[18];
+ double RHS5 = Idr[15];
+ RHS5 += Idr[16];
+ RHS5 += Idr[17];
+ RHS5 += Idr[18];
+ RHS5 += Idr[19];
+ RHS5 += Idr[20];
+ RHS5 -= go[19] * *cnV[19];
+ RHS5 -= go[20] * *cnV[20];
+ m_A16 += gt[21];
+ m_A16 += gt[22];
+ m_A16 += gt[23];
+ m_A16 += gt[24];
+ m_A16 += gt[25];
+ m_A16 += gt[26];
+ m_A16 += gt[27];
+ m_A18 += go[21];
+ m_A17 += go[22];
+ double RHS6 = Idr[21];
+ RHS6 += Idr[22];
+ RHS6 += Idr[23];
+ RHS6 += Idr[24];
+ RHS6 += Idr[25];
+ RHS6 += Idr[26];
+ RHS6 += Idr[27];
+ RHS6 -= go[23] * *cnV[23];
+ RHS6 -= go[24] * *cnV[24];
+ RHS6 -= go[25] * *cnV[25];
+ RHS6 -= go[26] * *cnV[26];
+ RHS6 -= go[27] * *cnV[27];
+ m_A19 += gt[28];
+ m_A19 += gt[29];
+ m_A19 += gt[30];
+ m_A19 += gt[31];
+ m_A20 += go[28];
+ double RHS7 = Idr[28];
+ RHS7 += Idr[29];
+ RHS7 += Idr[30];
+ RHS7 += Idr[31];
+ RHS7 -= go[29] * *cnV[29];
+ RHS7 -= go[30] * *cnV[30];
+ RHS7 -= go[31] * *cnV[31];
+ m_A22 += gt[32];
+ m_A22 += gt[33];
+ m_A22 += gt[34];
+ m_A22 += gt[35];
+ m_A22 += gt[36];
+ m_A22 += gt[37];
+ m_A22 += gt[38];
+ m_A23 += go[32];
+ m_A21 += go[33];
+ double RHS8 = Idr[32];
+ RHS8 += Idr[33];
+ RHS8 += Idr[34];
+ RHS8 += Idr[35];
+ RHS8 += Idr[36];
+ RHS8 += Idr[37];
+ RHS8 += Idr[38];
+ RHS8 -= go[34] * *cnV[34];
+ RHS8 -= go[35] * *cnV[35];
+ RHS8 -= go[36] * *cnV[36];
+ RHS8 -= go[37] * *cnV[37];
+ RHS8 -= go[38] * *cnV[38];
+ m_A25 += gt[39];
+ m_A25 += gt[40];
+ m_A25 += gt[41];
+ m_A24 += go[39];
+ m_A26 += go[40];
+ double RHS9 = Idr[39];
+ RHS9 += Idr[40];
+ RHS9 += Idr[41];
+ RHS9 -= go[41] * *cnV[41];
+ m_A28 += gt[42];
+ m_A28 += gt[43];
+ m_A28 += gt[44];
+ m_A28 += gt[45];
+ m_A28 += gt[46];
+ m_A28 += gt[47];
+ m_A28 += gt[48];
+ m_A29 += go[42];
+ m_A27 += go[43];
+ double RHS10 = Idr[42];
+ RHS10 += Idr[43];
+ RHS10 += Idr[44];
+ RHS10 += Idr[45];
+ RHS10 += Idr[46];
+ RHS10 += Idr[47];
+ RHS10 += Idr[48];
+ RHS10 -= go[44] * *cnV[44];
+ RHS10 -= go[45] * *cnV[45];
+ RHS10 -= go[46] * *cnV[46];
+ RHS10 -= go[47] * *cnV[47];
+ RHS10 -= go[48] * *cnV[48];
+ m_A33 += gt[49];
+ m_A33 += gt[50];
+ m_A33 += gt[51];
+ m_A31 += go[49];
+ m_A30 += go[50];
+ m_A35 += go[51];
+ double RHS11 = Idr[49];
+ RHS11 += Idr[50];
+ RHS11 += Idr[51];
+ m_A40 += gt[52];
+ m_A40 += gt[53];
+ m_A40 += gt[54];
+ m_A42 += go[52];
+ m_A37 += go[53];
+ double RHS12 = Idr[52];
+ RHS12 += Idr[53];
+ RHS12 += Idr[54];
+ RHS12 -= go[54] * *cnV[54];
+ m_A44 += gt[55];
+ m_A44 += gt[56];
+ m_A45 += go[55];
+ m_A43 += go[56];
+ double RHS13 = Idr[55];
+ RHS13 += Idr[56];
+ m_A47 += gt[57];
+ m_A47 += gt[58];
+ m_A47 += gt[59];
+ m_A46 += go[57];
+ m_A48 += go[58];
+ double RHS14 = Idr[57];
+ RHS14 += Idr[58];
+ RHS14 += Idr[59];
+ RHS14 -= go[59] * *cnV[59];
+ m_A52 += gt[60];
+ m_A52 += gt[61];
+ m_A52 += gt[62];
+ m_A52 += gt[63];
+ m_A51 += go[60];
+ m_A50 += go[61];
+ m_A49 += go[62];
+ double RHS15 = Idr[60];
+ RHS15 += Idr[61];
+ RHS15 += Idr[62];
+ RHS15 += Idr[63];
+ RHS15 -= go[63] * *cnV[63];
+ m_A59 += gt[64];
+ m_A59 += gt[65];
+ m_A59 += gt[66];
+ m_A59 += gt[67];
+ m_A59 += gt[68];
+ m_A55 += go[64];
+ m_A56 += go[65];
+ m_A54 += go[66];
+ double RHS16 = Idr[64];
+ RHS16 += Idr[65];
+ RHS16 += Idr[66];
+ RHS16 += Idr[67];
+ RHS16 += Idr[68];
+ RHS16 -= go[67] * *cnV[67];
+ RHS16 -= go[68] * *cnV[68];
+ m_A65 += gt[69];
+ m_A65 += gt[70];
+ m_A65 += gt[71];
+ m_A65 += gt[72];
+ m_A65 += gt[73];
+ m_A61 += go[69];
+ m_A66 += go[70];
+ m_A63 += go[71];
+ double RHS17 = Idr[69];
+ RHS17 += Idr[70];
+ RHS17 += Idr[71];
+ RHS17 += Idr[72];
+ RHS17 += Idr[73];
+ RHS17 -= go[72] * *cnV[72];
+ RHS17 -= go[73] * *cnV[73];
+ m_A74 += gt[74];
+ m_A74 += gt[75];
+ m_A74 += gt[76];
+ m_A74 += gt[77];
+ m_A73 += go[74];
+ m_A71 += go[75];
+ m_A70 += go[76];
+ m_A67 += go[77];
+ double RHS18 = Idr[74];
+ RHS18 += Idr[75];
+ RHS18 += Idr[76];
+ RHS18 += Idr[77];
+ const double f0 = 1.0 / m_A0;
+ const double f0_13 = -f0 * m_A43;
+ m_A44 += m_A1 * f0_13;
+ RHS13 += f0_13 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_8 = -f1 * m_A21;
+ m_A23 += m_A3 * f1_8;
+ RHS8 += f1_8 * RHS1;
+ const double f1_15 = -f1 * m_A49;
+ m_A52 += m_A3 * f1_15;
+ RHS15 += f1_15 * RHS1;
+ const double f2 = 1.0 / m_A4;
+ const double f2_9 = -f2 * m_A24;
+ m_A25 += m_A5 * f2_9;
+ RHS9 += f2_9 * RHS2;
+ const double f3 = 1.0 / m_A6;
+ const double f3_15 = -f3 * m_A50;
+ m_A52 += m_A7 * f3_15;
+ m_A53 += m_A8 * f3_15;
+ RHS15 += f3_15 * RHS3;
+ const double f3_16 = -f3 * m_A54;
+ m_A58 += m_A7 * f3_16;
+ m_A59 += m_A8 * f3_16;
+ RHS16 += f3_16 * RHS3;
+ const double f4 = 1.0 / m_A9;
+ const double f4_10 = -f4 * m_A27;
+ m_A29 += m_A10 * f4_10;
+ RHS10 += f4_10 * RHS4;
+ const double f4_11 = -f4 * m_A30;
+ m_A33 += m_A10 * f4_11;
+ RHS11 += f4_11 * RHS4;
+ const double f5 = 1.0 / m_A11;
+ const double f5_11 = -f5 * m_A31;
+ m_A32 += m_A12 * f5_11;
+ m_A33 += m_A13 * f5_11;
+ m_A34 += m_A14 * f5_11;
+ m_A36 += m_A15 * f5_11;
+ RHS11 += f5_11 * RHS5;
+ const double f5_12 = -f5 * m_A37;
+ m_A38 += m_A12 * f5_12;
+ m_A39 += m_A13 * f5_12;
+ m_A40 += m_A14 * f5_12;
+ m_A42 += m_A15 * f5_12;
+ RHS12 += f5_12 * RHS5;
+ const double f5_18 = -f5 * m_A67;
+ m_A68 += m_A12 * f5_18;
+ m_A69 += m_A13 * f5_18;
+ m_A70 += m_A14 * f5_18;
+ m_A74 += m_A15 * f5_18;
+ RHS18 += f5_18 * RHS5;
+ const double f6 = 1.0 / m_A16;
+ const double f6_17 = -f6 * m_A61;
+ m_A62 += m_A17 * f6_17;
+ m_A66 += m_A18 * f6_17;
+ RHS17 += f6_17 * RHS6;
+ const double f7 = 1.0 / m_A19;
+ const double f7_14 = -f7 * m_A46;
+ m_A47 += m_A20 * f7_14;
+ RHS14 += f7_14 * RHS7;
+ const double f8 = 1.0 / m_A22;
+ const double f8_16 = -f8 * m_A55;
+ m_A58 += m_A23 * f8_16;
+ RHS16 += f8_16 * RHS8;
+ const double f9 = 1.0 / m_A25;
+ const double f9_15 = -f9 * m_A51;
+ m_A52 += m_A26 * f9_15;
+ RHS15 += f9_15 * RHS9;
+ const double f10 = 1.0 / m_A28;
+ const double f10_11 = -f10 * m_A32;
+ m_A33 += m_A29 * f10_11;
+ RHS11 += f10_11 * RHS10;
+ const double f10_12 = -f10 * m_A38;
+ m_A39 += m_A29 * f10_12;
+ RHS12 += f10_12 * RHS10;
+ const double f10_18 = -f10 * m_A68;
+ m_A69 += m_A29 * f10_18;
+ RHS18 += f10_18 * RHS10;
+ const double f11 = 1.0 / m_A33;
+ const double f11_12 = -f11 * m_A39;
+ m_A40 += m_A34 * f11_12;
+ m_A41 += m_A35 * f11_12;
+ m_A42 += m_A36 * f11_12;
+ RHS12 += f11_12 * RHS11;
+ const double f11_16 = -f11 * m_A56;
+ m_A57 += m_A34 * f11_16;
+ m_A59 += m_A35 * f11_16;
+ m_A60 += m_A36 * f11_16;
+ RHS16 += f11_16 * RHS11;
+ const double f11_18 = -f11 * m_A69;
+ m_A70 += m_A34 * f11_18;
+ m_A72 += m_A35 * f11_18;
+ m_A74 += m_A36 * f11_18;
+ RHS18 += f11_18 * RHS11;
+ const double f12 = 1.0 / m_A40;
+ const double f12_16 = -f12 * m_A57;
+ m_A59 += m_A41 * f12_16;
+ m_A60 += m_A42 * f12_16;
+ RHS16 += f12_16 * RHS12;
+ const double f12_17 = -f12 * m_A62;
+ m_A64 += m_A41 * f12_17;
+ m_A66 += m_A42 * f12_17;
+ RHS17 += f12_17 * RHS12;
+ const double f12_18 = -f12 * m_A70;
+ m_A72 += m_A41 * f12_18;
+ m_A74 += m_A42 * f12_18;
+ RHS18 += f12_18 * RHS12;
+ const double f13 = 1.0 / m_A44;
+ const double f13_17 = -f13 * m_A63;
+ m_A65 += m_A45 * f13_17;
+ RHS17 += f13_17 * RHS13;
+ const double f14 = 1.0 / m_A47;
+ const double f14_18 = -f14 * m_A71;
+ m_A74 += m_A48 * f14_18;
+ RHS18 += f14_18 * RHS14;
+ const double f15 = 1.0 / m_A52;
+ const double f15_16 = -f15 * m_A58;
+ m_A59 += m_A53 * f15_16;
+ RHS16 += f15_16 * RHS15;
+ const double f16 = 1.0 / m_A59;
+ const double f16_17 = -f16 * m_A64;
+ m_A66 += m_A60 * f16_17;
+ RHS17 += f16_17 * RHS16;
+ const double f16_18 = -f16 * m_A72;
+ m_A74 += m_A60 * f16_18;
+ RHS18 += f16_18 * RHS16;
+ const double f17 = 1.0 / m_A65;
+ const double f17_18 = -f17 * m_A73;
+ m_A74 += m_A66 * f17_18;
+ RHS18 += f17_18 * RHS17;
+ V[18] = RHS18 / m_A74;
+ double tmp17 = 0.0;
+ tmp17 += m_A66 * V[18];
+ V[17] = (RHS17 - tmp17) / m_A65;
+ double tmp16 = 0.0;
+ tmp16 += m_A60 * V[18];
+ V[16] = (RHS16 - tmp16) / m_A59;
+ double tmp15 = 0.0;
+ tmp15 += m_A53 * V[16];
+ V[15] = (RHS15 - tmp15) / m_A52;
+ double tmp14 = 0.0;
+ tmp14 += m_A48 * V[18];
+ V[14] = (RHS14 - tmp14) / m_A47;
+ double tmp13 = 0.0;
+ tmp13 += m_A45 * V[17];
+ V[13] = (RHS13 - tmp13) / m_A44;
+ double tmp12 = 0.0;
+ tmp12 += m_A41 * V[16];
+ tmp12 += m_A42 * V[18];
+ V[12] = (RHS12 - tmp12) / m_A40;
+ double tmp11 = 0.0;
+ tmp11 += m_A34 * V[12];
+ tmp11 += m_A35 * V[16];
+ tmp11 += m_A36 * V[18];
+ V[11] = (RHS11 - tmp11) / m_A33;
+ double tmp10 = 0.0;
+ tmp10 += m_A29 * V[11];
+ V[10] = (RHS10 - tmp10) / m_A28;
+ double tmp9 = 0.0;
+ tmp9 += m_A26 * V[15];
+ V[9] = (RHS9 - tmp9) / m_A25;
+ double tmp8 = 0.0;
+ tmp8 += m_A23 * V[15];
+ V[8] = (RHS8 - tmp8) / m_A22;
+ double tmp7 = 0.0;
+ tmp7 += m_A20 * V[14];
+ V[7] = (RHS7 - tmp7) / m_A19;
+ double tmp6 = 0.0;
+ tmp6 += m_A17 * V[12];
+ tmp6 += m_A18 * V[18];
+ V[6] = (RHS6 - tmp6) / m_A16;
+ double tmp5 = 0.0;
+ tmp5 += m_A12 * V[10];
+ tmp5 += m_A13 * V[11];
+ tmp5 += m_A14 * V[12];
+ tmp5 += m_A15 * V[18];
+ V[5] = (RHS5 - tmp5) / m_A11;
+ double tmp4 = 0.0;
+ tmp4 += m_A10 * V[11];
+ V[4] = (RHS4 - tmp4) / m_A9;
+ double tmp3 = 0.0;
+ tmp3 += m_A7 * V[15];
+ tmp3 += m_A8 * V[16];
+ V[3] = (RHS3 - tmp3) / m_A6;
+ double tmp2 = 0.0;
+ tmp2 += m_A5 * V[9];
+ V[2] = (RHS2 - tmp2) / m_A4;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[15];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[13];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
+// frogs
+static void nl_gcr_75852e71cc632a65_33_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 -= go[1] * *cnV[1];
+ m_A2 += gt[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A4 += go[2];
+ m_A3 += go[3];
+ double RHS1 = Idr[2];
+ RHS1 += Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 -= go[4] * *cnV[4];
+ RHS1 -= go[5] * *cnV[5];
+ m_A5 += gt[6];
+ m_A5 += gt[7];
+ m_A5 += gt[8];
+ m_A7 += go[6];
+ m_A6 += go[7];
+ double RHS2 = Idr[6];
+ RHS2 += Idr[7];
+ RHS2 += Idr[8];
+ RHS2 -= go[8] * *cnV[8];
+ m_A8 += gt[9];
+ m_A8 += gt[10];
+ m_A8 += gt[11];
+ m_A8 += gt[12];
+ m_A8 += gt[13];
+ m_A8 += gt[14];
+ m_A8 += gt[15];
+ m_A9 += go[9];
+ double RHS3 = Idr[9];
+ RHS3 += Idr[10];
+ RHS3 += Idr[11];
+ RHS3 += Idr[12];
+ RHS3 += Idr[13];
+ RHS3 += Idr[14];
+ RHS3 += Idr[15];
+ RHS3 -= go[10] * *cnV[10];
+ RHS3 -= go[11] * *cnV[11];
+ RHS3 -= go[12] * *cnV[12];
+ RHS3 -= go[13] * *cnV[13];
+ RHS3 -= go[14] * *cnV[14];
+ RHS3 -= go[15] * *cnV[15];
+ m_A10 += gt[16];
+ m_A10 += gt[17];
+ m_A10 += gt[18];
+ m_A11 += go[16];
+ m_A12 += go[17];
+ double RHS4 = Idr[16];
+ RHS4 += Idr[17];
+ RHS4 += Idr[18];
+ RHS4 -= go[18] * *cnV[18];
+ m_A14 += gt[19];
+ m_A14 += gt[20];
+ m_A14 += gt[21];
+ m_A16 += go[19];
+ m_A13 += go[20];
+ double RHS5 = Idr[19];
+ RHS5 += Idr[20];
+ RHS5 += Idr[21];
+ RHS5 -= go[21] * *cnV[21];
+ m_A21 += gt[22];
+ m_A21 += gt[23];
+ m_A21 += gt[24];
+ m_A21 += gt[25];
+ m_A21 += gt[26];
+ m_A21 += gt[27];
+ m_A21 += gt[28];
+ m_A21 += gt[29];
+ m_A19 += go[22];
+ m_A22 += go[23];
+ m_A18 += go[24];
+ m_A17 += go[25];
+ double RHS6 = Idr[22];
+ RHS6 += Idr[23];
+ RHS6 += Idr[24];
+ RHS6 += Idr[25];
+ RHS6 += Idr[26];
+ RHS6 += Idr[27];
+ RHS6 += Idr[28];
+ RHS6 += Idr[29];
+ RHS6 -= go[26] * *cnV[26];
+ RHS6 -= go[27] * *cnV[27];
+ RHS6 -= go[28] * *cnV[28];
+ RHS6 -= go[29] * *cnV[29];
+ m_A25 += gt[30];
+ m_A25 += gt[31];
+ m_A25 += gt[32];
+ m_A25 += gt[33];
+ m_A25 += gt[34];
+ m_A23 += go[30];
+ m_A24 += go[31];
+ m_A26 += go[32];
+ double RHS7 = Idr[30];
+ RHS7 += Idr[31];
+ RHS7 += Idr[32];
+ RHS7 += Idr[33];
+ RHS7 += Idr[34];
+ RHS7 -= go[33] * *cnV[33];
+ RHS7 -= go[34] * *cnV[34];
+ m_A32 += gt[35];
+ m_A32 += gt[36];
+ m_A32 += gt[37];
+ m_A32 += gt[38];
+ m_A32 += gt[39];
+ m_A31 += go[35];
+ m_A28 += go[36];
+ m_A27 += go[37];
+ m_A30 += go[38];
+ m_A29 += go[39];
+ double RHS8 = Idr[35];
+ RHS8 += Idr[36];
+ RHS8 += Idr[37];
+ RHS8 += Idr[38];
+ RHS8 += Idr[39];
+ const double f0 = 1.0 / m_A0;
+ const double f0_6 = -f0 * m_A17;
+ m_A21 += m_A1 * f0_6;
+ RHS6 += f0_6 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_5 = -f1 * m_A13;
+ m_A14 += m_A3 * f1_5;
+ m_A15 += m_A4 * f1_5;
+ RHS5 += f1_5 * RHS1;
+ const double f1_6 = -f1 * m_A18;
+ m_A20 += m_A3 * f1_6;
+ m_A21 += m_A4 * f1_6;
+ RHS6 += f1_6 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_6 = -f2 * m_A19;
+ m_A21 += m_A6 * f2_6;
+ m_A22 += m_A7 * f2_6;
+ RHS6 += f2_6 * RHS2;
+ const double f2_8 = -f2 * m_A27;
+ m_A30 += m_A6 * f2_8;
+ m_A32 += m_A7 * f2_8;
+ RHS8 += f2_8 * RHS2;
+ const double f3 = 1.0 / m_A8;
+ const double f3_7 = -f3 * m_A23;
+ m_A24 += m_A9 * f3_7;
+ RHS7 += f3_7 * RHS3;
+ const double f4 = 1.0 / m_A10;
+ const double f4_7 = -f4 * m_A24;
+ m_A25 += m_A11 * f4_7;
+ m_A26 += m_A12 * f4_7;
+ RHS7 += f4_7 * RHS4;
+ const double f4_8 = -f4 * m_A28;
+ m_A31 += m_A11 * f4_8;
+ m_A32 += m_A12 * f4_8;
+ RHS8 += f4_8 * RHS4;
+ const double f5 = 1.0 / m_A14;
+ const double f5_6 = -f5 * m_A20;
+ m_A21 += m_A15 * f5_6;
+ m_A22 += m_A16 * f5_6;
+ RHS6 += f5_6 * RHS5;
+ const double f5_8 = -f5 * m_A29;
+ m_A30 += m_A15 * f5_8;
+ m_A32 += m_A16 * f5_8;
+ RHS8 += f5_8 * RHS5;
+ const double f6 = 1.0 / m_A21;
+ const double f6_8 = -f6 * m_A30;
+ m_A32 += m_A22 * f6_8;
+ RHS8 += f6_8 * RHS6;
+ const double f7 = 1.0 / m_A25;
+ const double f7_8 = -f7 * m_A31;
+ m_A32 += m_A26 * f7_8;
+ RHS8 += f7_8 * RHS7;
+ V[8] = RHS8 / m_A32;
+ double tmp7 = 0.0;
+ tmp7 += m_A26 * V[8];
+ V[7] = (RHS7 - tmp7) / m_A25;
+ double tmp6 = 0.0;
+ tmp6 += m_A22 * V[8];
+ V[6] = (RHS6 - tmp6) / m_A21;
+ double tmp5 = 0.0;
+ tmp5 += m_A15 * V[6];
+ tmp5 += m_A16 * V[8];
+ V[5] = (RHS5 - tmp5) / m_A14;
+ double tmp4 = 0.0;
+ tmp4 += m_A11 * V[7];
+ tmp4 += m_A12 * V[8];
+ V[4] = (RHS4 - tmp4) / m_A10;
+ double tmp3 = 0.0;
+ tmp3 += m_A9 * V[4];
+ V[3] = (RHS3 - tmp3) / m_A8;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[6];
+ tmp2 += m_A7 * V[8];
+ V[2] = (RHS2 - tmp2) / m_A5;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[5];
+ tmp1 += m_A4 * V[6];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[6];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// ripoff
static void nl_gcr_76c9e236353caed1_35_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -30817,6 +34720,89 @@ static void nl_gcr_80b4b1e5cc58d303_29_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// frogs
+static void nl_gcr_815733e3f2e05029_9_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A0 += gt[3];
+ m_A0 += gt[4];
+ m_A2 += go[0];
+ m_A1 += go[1];
+ m_A1 += go[2];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 += Idr[3];
+ RHS0 += Idr[4];
+ RHS0 -= go[3] * *cnV[3];
+ RHS0 -= go[4] * *cnV[4];
+ m_A4 += gt[5];
+ m_A4 += gt[6];
+ m_A4 += gt[7];
+ m_A4 += gt[8];
+ m_A4 += gt[9];
+ m_A4 += gt[10];
+ m_A5 += go[5];
+ m_A5 += go[6];
+ m_A3 += go[7];
+ m_A3 += go[8];
+ double RHS1 = Idr[5];
+ RHS1 += Idr[6];
+ RHS1 += Idr[7];
+ RHS1 += Idr[8];
+ RHS1 += Idr[9];
+ RHS1 += Idr[10];
+ RHS1 -= go[9] * *cnV[9];
+ RHS1 -= go[10] * *cnV[10];
+ m_A8 += gt[11];
+ m_A8 += gt[12];
+ m_A8 += gt[13];
+ m_A8 += gt[14];
+ m_A7 += go[11];
+ m_A7 += go[12];
+ m_A6 += go[13];
+ double RHS2 = Idr[11];
+ RHS2 += Idr[12];
+ RHS2 += Idr[13];
+ RHS2 += Idr[14];
+ RHS2 -= go[14] * *cnV[14];
+ const double f0 = 1.0 / m_A0;
+ const double f0_1 = -f0 * m_A3;
+ m_A4 += m_A1 * f0_1;
+ m_A5 += m_A2 * f0_1;
+ RHS1 += f0_1 * RHS0;
+ const double f0_2 = -f0 * m_A6;
+ m_A7 += m_A1 * f0_2;
+ m_A8 += m_A2 * f0_2;
+ RHS2 += f0_2 * RHS0;
+ const double f1 = 1.0 / m_A4;
+ const double f1_2 = -f1 * m_A7;
+ m_A8 += m_A5 * f1_2;
+ RHS2 += f1_2 * RHS1;
+ V[2] = RHS2 / m_A8;
+ double tmp1 = 0.0;
+ tmp1 += m_A5 * V[2];
+ V[1] = (RHS1 - tmp1) / m_A4;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[1];
+ tmp0 += m_A2 * V[2];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// elim
static void nl_gcr_81f40a54af2ca202_10_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -30902,6 +34888,75 @@ static void nl_gcr_81f40a54af2ca202_10_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// frogs
+static void nl_gcr_84425fea9033e75d_7_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A2 += gt[6];
+ m_A3 += go[3];
+ m_A3 += go[4];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 += Idr[6];
+ RHS1 -= go[5] * *cnV[5];
+ RHS1 -= go[6] * *cnV[6];
+ m_A6 += gt[7];
+ m_A6 += gt[8];
+ m_A6 += gt[9];
+ m_A6 += gt[10];
+ m_A6 += gt[11];
+ m_A6 += gt[12];
+ m_A5 += go[7];
+ m_A5 += go[8];
+ m_A4 += go[9];
+ double RHS2 = Idr[7];
+ RHS2 += Idr[8];
+ RHS2 += Idr[9];
+ RHS2 += Idr[10];
+ RHS2 += Idr[11];
+ RHS2 += Idr[12];
+ RHS2 -= go[10] * *cnV[10];
+ RHS2 -= go[11] * *cnV[11];
+ RHS2 -= go[12] * *cnV[12];
+ const double f0 = 1.0 / m_A0;
+ const double f0_2 = -f0 * m_A4;
+ m_A6 += m_A1 * f0_2;
+ RHS2 += f0_2 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_2 = -f1 * m_A5;
+ m_A6 += m_A3 * f1_2;
+ RHS2 += f1_2 * RHS1;
+ V[2] = RHS2 / m_A6;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[2];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[2];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// sundance
static void nl_gcr_8446e63d7842f6a6_70_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -41554,6 +45609,1130 @@ static void nl_gcr_aa07266ef5d420d1_11_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_aa68b74ffdea9bd8_47_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 -= go[1] * *cnV[1];
+ m_A2 += gt[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A2 += gt[6];
+ m_A2 += gt[7];
+ m_A2 += gt[8];
+ m_A3 += go[2];
+ double RHS1 = Idr[2];
+ RHS1 += Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 += Idr[6];
+ RHS1 += Idr[7];
+ RHS1 += Idr[8];
+ RHS1 -= go[3] * *cnV[3];
+ RHS1 -= go[4] * *cnV[4];
+ RHS1 -= go[5] * *cnV[5];
+ RHS1 -= go[6] * *cnV[6];
+ RHS1 -= go[7] * *cnV[7];
+ RHS1 -= go[8] * *cnV[8];
+ m_A4 += gt[9];
+ m_A4 += gt[10];
+ m_A4 += gt[11];
+ m_A6 += go[9];
+ m_A5 += go[10];
+ double RHS2 = Idr[9];
+ RHS2 += Idr[10];
+ RHS2 += Idr[11];
+ RHS2 -= go[11] * *cnV[11];
+ m_A7 += gt[12];
+ m_A7 += gt[13];
+ m_A7 += gt[14];
+ m_A8 += go[12];
+ m_A9 += go[13];
+ double RHS3 = Idr[12];
+ RHS3 += Idr[13];
+ RHS3 += Idr[14];
+ RHS3 -= go[14] * *cnV[14];
+ m_A10 += gt[15];
+ m_A10 += gt[16];
+ m_A10 += gt[17];
+ m_A10 += gt[18];
+ m_A10 += gt[19];
+ m_A10 += gt[20];
+ m_A13 += go[15];
+ m_A12 += go[16];
+ m_A11 += go[17];
+ m_A14 += go[18];
+ double RHS4 = Idr[15];
+ RHS4 += Idr[16];
+ RHS4 += Idr[17];
+ RHS4 += Idr[18];
+ RHS4 += Idr[19];
+ RHS4 += Idr[20];
+ RHS4 -= go[19] * *cnV[19];
+ RHS4 -= go[20] * *cnV[20];
+ m_A17 += gt[21];
+ m_A17 += gt[22];
+ m_A16 += go[21];
+ m_A15 += go[22];
+ double RHS5 = Idr[21];
+ RHS5 += Idr[22];
+ m_A21 += gt[23];
+ m_A21 += gt[24];
+ m_A21 += gt[25];
+ m_A20 += go[23];
+ m_A19 += go[24];
+ double RHS6 = Idr[23];
+ RHS6 += Idr[24];
+ RHS6 += Idr[25];
+ RHS6 -= go[25] * *cnV[25];
+ m_A28 += gt[26];
+ m_A28 += gt[27];
+ m_A28 += gt[28];
+ m_A28 += gt[29];
+ m_A28 += gt[30];
+ m_A25 += go[26];
+ m_A29 += go[27];
+ m_A26 += go[28];
+ double RHS7 = Idr[26];
+ RHS7 += Idr[27];
+ RHS7 += Idr[28];
+ RHS7 += Idr[29];
+ RHS7 += Idr[30];
+ RHS7 -= go[29] * *cnV[29];
+ RHS7 -= go[30] * *cnV[30];
+ m_A32 += gt[31];
+ m_A32 += gt[32];
+ m_A32 += gt[33];
+ m_A30 += go[31];
+ double RHS8 = Idr[31];
+ RHS8 += Idr[32];
+ RHS8 += Idr[33];
+ RHS8 -= go[32] * *cnV[32];
+ RHS8 -= go[33] * *cnV[33];
+ m_A38 += gt[34];
+ m_A38 += gt[35];
+ m_A38 += gt[36];
+ m_A38 += gt[37];
+ m_A38 += gt[38];
+ m_A38 += gt[39];
+ m_A38 += gt[40];
+ m_A36 += go[34];
+ m_A35 += go[35];
+ double RHS9 = Idr[34];
+ RHS9 += Idr[35];
+ RHS9 += Idr[36];
+ RHS9 += Idr[37];
+ RHS9 += Idr[38];
+ RHS9 += Idr[39];
+ RHS9 += Idr[40];
+ RHS9 -= go[36] * *cnV[36];
+ RHS9 -= go[37] * *cnV[37];
+ RHS9 -= go[38] * *cnV[38];
+ RHS9 -= go[39] * *cnV[39];
+ RHS9 -= go[40] * *cnV[40];
+ m_A46 += gt[41];
+ m_A46 += gt[42];
+ m_A46 += gt[43];
+ m_A41 += go[41];
+ m_A40 += go[42];
+ m_A43 += go[43];
+ double RHS10 = Idr[41];
+ RHS10 += Idr[42];
+ RHS10 += Idr[43];
+ const double f0 = 1.0 / m_A0;
+ const double f0_5 = -f0 * m_A15;
+ m_A17 += m_A1 * f0_5;
+ RHS5 += f0_5 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_7 = -f1 * m_A25;
+ m_A26 += m_A3 * f1_7;
+ RHS7 += f1_7 * RHS1;
+ const double f2 = 1.0 / m_A4;
+ const double f2_5 = -f2 * m_A16;
+ m_A17 += m_A5 * f2_5;
+ m_A18 += m_A6 * f2_5;
+ RHS5 += f2_5 * RHS2;
+ const double f2_7 = -f2 * m_A26;
+ m_A27 += m_A5 * f2_7;
+ m_A28 += m_A6 * f2_7;
+ RHS7 += f2_7 * RHS2;
+ const double f3 = 1.0 / m_A7;
+ const double f3_6 = -f3 * m_A19;
+ m_A21 += m_A8 * f3_6;
+ m_A24 += m_A9 * f3_6;
+ RHS6 += f3_6 * RHS3;
+ const double f3_9 = -f3 * m_A35;
+ m_A36 += m_A8 * f3_9;
+ m_A39 += m_A9 * f3_9;
+ RHS9 += f3_9 * RHS3;
+ const double f3_10 = -f3 * m_A40;
+ m_A42 += m_A8 * f3_10;
+ m_A46 += m_A9 * f3_10;
+ RHS10 += f3_10 * RHS3;
+ const double f4 = 1.0 / m_A10;
+ const double f4_6 = -f4 * m_A20;
+ m_A21 += m_A11 * f4_6;
+ m_A22 += m_A12 * f4_6;
+ m_A23 += m_A13 * f4_6;
+ m_A24 += m_A14 * f4_6;
+ RHS6 += f4_6 * RHS4;
+ const double f4_8 = -f4 * m_A30;
+ m_A31 += m_A11 * f4_8;
+ m_A32 += m_A12 * f4_8;
+ m_A33 += m_A13 * f4_8;
+ m_A34 += m_A14 * f4_8;
+ RHS8 += f4_8 * RHS4;
+ const double f4_10 = -f4 * m_A41;
+ m_A42 += m_A11 * f4_10;
+ m_A44 += m_A12 * f4_10;
+ m_A45 += m_A13 * f4_10;
+ m_A46 += m_A14 * f4_10;
+ RHS10 += f4_10 * RHS4;
+ const double f5 = 1.0 / m_A17;
+ const double f5_7 = -f5 * m_A27;
+ m_A28 += m_A18 * f5_7;
+ RHS7 += f5_7 * RHS5;
+ const double f6 = 1.0 / m_A21;
+ const double f6_8 = -f6 * m_A31;
+ m_A32 += m_A22 * f6_8;
+ m_A33 += m_A23 * f6_8;
+ m_A34 += m_A24 * f6_8;
+ RHS8 += f6_8 * RHS6;
+ const double f6_9 = -f6 * m_A36;
+ m_A37 += m_A22 * f6_9;
+ m_A38 += m_A23 * f6_9;
+ m_A39 += m_A24 * f6_9;
+ RHS9 += f6_9 * RHS6;
+ const double f6_10 = -f6 * m_A42;
+ m_A44 += m_A22 * f6_10;
+ m_A45 += m_A23 * f6_10;
+ m_A46 += m_A24 * f6_10;
+ RHS10 += f6_10 * RHS6;
+ const double f7 = 1.0 / m_A28;
+ const double f7_10 = -f7 * m_A43;
+ m_A46 += m_A29 * f7_10;
+ RHS10 += f7_10 * RHS7;
+ const double f8 = 1.0 / m_A32;
+ const double f8_9 = -f8 * m_A37;
+ m_A38 += m_A33 * f8_9;
+ m_A39 += m_A34 * f8_9;
+ RHS9 += f8_9 * RHS8;
+ const double f8_10 = -f8 * m_A44;
+ m_A45 += m_A33 * f8_10;
+ m_A46 += m_A34 * f8_10;
+ RHS10 += f8_10 * RHS8;
+ const double f9 = 1.0 / m_A38;
+ const double f9_10 = -f9 * m_A45;
+ m_A46 += m_A39 * f9_10;
+ RHS10 += f9_10 * RHS9;
+ V[10] = RHS10 / m_A46;
+ double tmp9 = 0.0;
+ tmp9 += m_A39 * V[10];
+ V[9] = (RHS9 - tmp9) / m_A38;
+ double tmp8 = 0.0;
+ tmp8 += m_A33 * V[9];
+ tmp8 += m_A34 * V[10];
+ V[8] = (RHS8 - tmp8) / m_A32;
+ double tmp7 = 0.0;
+ tmp7 += m_A29 * V[10];
+ V[7] = (RHS7 - tmp7) / m_A28;
+ double tmp6 = 0.0;
+ tmp6 += m_A22 * V[8];
+ tmp6 += m_A23 * V[9];
+ tmp6 += m_A24 * V[10];
+ V[6] = (RHS6 - tmp6) / m_A21;
+ double tmp5 = 0.0;
+ tmp5 += m_A18 * V[7];
+ V[5] = (RHS5 - tmp5) / m_A17;
+ double tmp4 = 0.0;
+ tmp4 += m_A11 * V[6];
+ tmp4 += m_A12 * V[8];
+ tmp4 += m_A13 * V[9];
+ tmp4 += m_A14 * V[10];
+ V[4] = (RHS4 - tmp4) / m_A10;
+ double tmp3 = 0.0;
+ tmp3 += m_A8 * V[6];
+ tmp3 += m_A9 * V[10];
+ V[3] = (RHS3 - tmp3) / m_A7;
+ double tmp2 = 0.0;
+ tmp2 += m_A5 * V[5];
+ tmp2 += m_A6 * V[7];
+ V[2] = (RHS2 - tmp2) / m_A4;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[2];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[5];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
+// frogs
+static void nl_gcr_ab8d1ff6aa7499d8_119_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ double m_A75(0.0);
+ double m_A76(0.0);
+ double m_A77(0.0);
+ double m_A78(0.0);
+ double m_A79(0.0);
+ double m_A80(0.0);
+ double m_A81(0.0);
+ double m_A82(0.0);
+ double m_A83(0.0);
+ double m_A84(0.0);
+ double m_A85(0.0);
+ double m_A86(0.0);
+ double m_A87(0.0);
+ double m_A88(0.0);
+ double m_A89(0.0);
+ double m_A90(0.0);
+ double m_A91(0.0);
+ double m_A92(0.0);
+ double m_A93(0.0);
+ double m_A94(0.0);
+ double m_A95(0.0);
+ double m_A96(0.0);
+ double m_A97(0.0);
+ double m_A98(0.0);
+ double m_A99(0.0);
+ double m_A100(0.0);
+ double m_A101(0.0);
+ double m_A102(0.0);
+ double m_A103(0.0);
+ double m_A104(0.0);
+ double m_A105(0.0);
+ double m_A106(0.0);
+ double m_A107(0.0);
+ double m_A108(0.0);
+ double m_A109(0.0);
+ double m_A110(0.0);
+ double m_A111(0.0);
+ double m_A112(0.0);
+ double m_A113(0.0);
+ double m_A114(0.0);
+ double m_A115(0.0);
+ double m_A116(0.0);
+ double m_A117(0.0);
+ double m_A118(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A0 += gt[3];
+ m_A2 += go[0];
+ m_A1 += go[1];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 += Idr[3];
+ RHS0 -= go[2] * *cnV[2];
+ RHS0 -= go[3] * *cnV[3];
+ m_A3 += gt[4];
+ m_A3 += gt[5];
+ m_A4 += go[4];
+ double RHS1 = Idr[4];
+ RHS1 += Idr[5];
+ RHS1 -= go[5] * *cnV[5];
+ m_A5 += gt[6];
+ m_A5 += gt[7];
+ m_A5 += gt[8];
+ m_A5 += gt[9];
+ m_A5 += gt[10];
+ m_A5 += gt[11];
+ m_A5 += gt[12];
+ m_A6 += go[6];
+ double RHS2 = Idr[6];
+ RHS2 += Idr[7];
+ RHS2 += Idr[8];
+ RHS2 += Idr[9];
+ RHS2 += Idr[10];
+ RHS2 += Idr[11];
+ RHS2 += Idr[12];
+ RHS2 -= go[7] * *cnV[7];
+ RHS2 -= go[8] * *cnV[8];
+ RHS2 -= go[9] * *cnV[9];
+ RHS2 -= go[10] * *cnV[10];
+ RHS2 -= go[11] * *cnV[11];
+ RHS2 -= go[12] * *cnV[12];
+ m_A7 += gt[13];
+ m_A7 += gt[14];
+ m_A7 += gt[15];
+ m_A7 += gt[16];
+ m_A10 += go[13];
+ m_A9 += go[14];
+ m_A8 += go[15];
+ double RHS3 = Idr[13];
+ RHS3 += Idr[14];
+ RHS3 += Idr[15];
+ RHS3 += Idr[16];
+ RHS3 -= go[16] * *cnV[16];
+ m_A11 += gt[17];
+ m_A11 += gt[18];
+ m_A11 += gt[19];
+ m_A11 += gt[20];
+ m_A11 += gt[21];
+ m_A11 += gt[22];
+ m_A14 += go[17];
+ m_A14 += go[18];
+ m_A13 += go[19];
+ m_A13 += go[20];
+ m_A12 += go[21];
+ double RHS4 = Idr[17];
+ RHS4 += Idr[18];
+ RHS4 += Idr[19];
+ RHS4 += Idr[20];
+ RHS4 += Idr[21];
+ RHS4 += Idr[22];
+ RHS4 -= go[22] * *cnV[22];
+ m_A15 += gt[23];
+ m_A15 += gt[24];
+ m_A15 += gt[25];
+ m_A15 += gt[26];
+ m_A15 += gt[27];
+ m_A15 += gt[28];
+ m_A18 += go[23];
+ m_A18 += go[24];
+ m_A17 += go[25];
+ m_A17 += go[26];
+ m_A16 += go[27];
+ double RHS5 = Idr[23];
+ RHS5 += Idr[24];
+ RHS5 += Idr[25];
+ RHS5 += Idr[26];
+ RHS5 += Idr[27];
+ RHS5 += Idr[28];
+ RHS5 -= go[28] * *cnV[28];
+ m_A19 += gt[29];
+ m_A19 += gt[30];
+ m_A20 += go[29];
+ m_A21 += go[30];
+ double RHS6 = Idr[29];
+ RHS6 += Idr[30];
+ m_A22 += gt[31];
+ m_A22 += gt[32];
+ m_A22 += gt[33];
+ m_A22 += gt[34];
+ m_A22 += gt[35];
+ m_A22 += gt[36];
+ m_A22 += gt[37];
+ m_A23 += go[31];
+ m_A24 += go[32];
+ double RHS7 = Idr[31];
+ RHS7 += Idr[32];
+ RHS7 += Idr[33];
+ RHS7 += Idr[34];
+ RHS7 += Idr[35];
+ RHS7 += Idr[36];
+ RHS7 += Idr[37];
+ RHS7 -= go[33] * *cnV[33];
+ RHS7 -= go[34] * *cnV[34];
+ RHS7 -= go[35] * *cnV[35];
+ RHS7 -= go[36] * *cnV[36];
+ RHS7 -= go[37] * *cnV[37];
+ m_A25 += gt[38];
+ m_A25 += gt[39];
+ m_A25 += gt[40];
+ m_A25 += gt[41];
+ m_A25 += gt[42];
+ m_A25 += gt[43];
+ m_A26 += go[38];
+ m_A26 += go[39];
+ m_A27 += go[40];
+ m_A28 += go[41];
+ double RHS8 = Idr[38];
+ RHS8 += Idr[39];
+ RHS8 += Idr[40];
+ RHS8 += Idr[41];
+ RHS8 += Idr[42];
+ RHS8 += Idr[43];
+ RHS8 -= go[42] * *cnV[42];
+ RHS8 -= go[43] * *cnV[43];
+ m_A29 += gt[44];
+ m_A29 += gt[45];
+ m_A29 += gt[46];
+ m_A29 += gt[47];
+ m_A29 += gt[48];
+ m_A29 += gt[49];
+ m_A29 += gt[50];
+ m_A30 += go[44];
+ double RHS9 = Idr[44];
+ RHS9 += Idr[45];
+ RHS9 += Idr[46];
+ RHS9 += Idr[47];
+ RHS9 += Idr[48];
+ RHS9 += Idr[49];
+ RHS9 += Idr[50];
+ RHS9 -= go[45] * *cnV[45];
+ RHS9 -= go[46] * *cnV[46];
+ RHS9 -= go[47] * *cnV[47];
+ RHS9 -= go[48] * *cnV[48];
+ RHS9 -= go[49] * *cnV[49];
+ RHS9 -= go[50] * *cnV[50];
+ m_A31 += gt[51];
+ m_A31 += gt[52];
+ m_A31 += gt[53];
+ m_A31 += gt[54];
+ m_A34 += go[51];
+ m_A32 += go[52];
+ m_A33 += go[53];
+ double RHS10 = Idr[51];
+ RHS10 += Idr[52];
+ RHS10 += Idr[53];
+ RHS10 += Idr[54];
+ RHS10 -= go[54] * *cnV[54];
+ m_A37 += gt[55];
+ m_A37 += gt[56];
+ m_A37 += gt[57];
+ m_A36 += go[55];
+ m_A35 += go[56];
+ double RHS11 = Idr[55];
+ RHS11 += Idr[56];
+ RHS11 += Idr[57];
+ RHS11 -= go[57] * *cnV[57];
+ m_A43 += gt[58];
+ m_A43 += gt[59];
+ m_A43 += gt[60];
+ m_A45 += go[58];
+ m_A41 += go[59];
+ double RHS12 = Idr[58];
+ RHS12 += Idr[59];
+ RHS12 += Idr[60];
+ RHS12 -= go[60] * *cnV[60];
+ m_A51 += gt[61];
+ m_A51 += gt[62];
+ m_A51 += gt[63];
+ m_A51 += gt[64];
+ m_A51 += gt[65];
+ m_A48 += go[61];
+ m_A47 += go[62];
+ m_A46 += go[63];
+ double RHS13 = Idr[61];
+ RHS13 += Idr[62];
+ RHS13 += Idr[63];
+ RHS13 += Idr[64];
+ RHS13 += Idr[65];
+ RHS13 -= go[64] * *cnV[64];
+ RHS13 -= go[65] * *cnV[65];
+ m_A57 += gt[66];
+ m_A57 += gt[67];
+ m_A57 += gt[68];
+ m_A57 += gt[69];
+ m_A59 += go[66];
+ m_A55 += go[67];
+ m_A55 += go[68];
+ double RHS14 = Idr[66];
+ RHS14 += Idr[67];
+ RHS14 += Idr[68];
+ RHS14 += Idr[69];
+ RHS14 -= go[69] * *cnV[69];
+ m_A61 += gt[70];
+ m_A61 += gt[71];
+ m_A60 += go[70];
+ double RHS15 = Idr[70];
+ RHS15 += Idr[71];
+ RHS15 -= go[71] * *cnV[71];
+ m_A66 += gt[72];
+ m_A66 += gt[73];
+ m_A66 += gt[74];
+ m_A66 += gt[75];
+ m_A66 += gt[76];
+ m_A66 += gt[77];
+ m_A63 += go[72];
+ m_A64 += go[73];
+ m_A64 += go[74];
+ m_A68 += go[75];
+ m_A68 += go[76];
+ double RHS16 = Idr[72];
+ RHS16 += Idr[73];
+ RHS16 += Idr[74];
+ RHS16 += Idr[75];
+ RHS16 += Idr[76];
+ RHS16 += Idr[77];
+ RHS16 -= go[77] * *cnV[77];
+ m_A71 += gt[78];
+ m_A71 += gt[79];
+ m_A71 += gt[80];
+ m_A71 += gt[81];
+ m_A71 += gt[82];
+ m_A71 += gt[83];
+ m_A72 += go[78];
+ m_A69 += go[79];
+ m_A73 += go[80];
+ double RHS17 = Idr[78];
+ RHS17 += Idr[79];
+ RHS17 += Idr[80];
+ RHS17 += Idr[81];
+ RHS17 += Idr[82];
+ RHS17 += Idr[83];
+ RHS17 -= go[81] * *cnV[81];
+ RHS17 -= go[82] * *cnV[82];
+ RHS17 -= go[83] * *cnV[83];
+ m_A75 += gt[84];
+ m_A75 += gt[85];
+ m_A75 += gt[86];
+ m_A77 += go[84];
+ m_A74 += go[85];
+ double RHS18 = Idr[84];
+ RHS18 += Idr[85];
+ RHS18 += Idr[86];
+ RHS18 -= go[86] * *cnV[86];
+ m_A85 += gt[87];
+ m_A85 += gt[88];
+ m_A85 += gt[89];
+ m_A85 += gt[90];
+ m_A85 += gt[91];
+ m_A85 += gt[92];
+ m_A78 += go[87];
+ m_A80 += go[88];
+ m_A82 += go[89];
+ m_A79 += go[90];
+ double RHS19 = Idr[87];
+ RHS19 += Idr[88];
+ RHS19 += Idr[89];
+ RHS19 += Idr[90];
+ RHS19 += Idr[91];
+ RHS19 += Idr[92];
+ RHS19 -= go[91] * *cnV[91];
+ RHS19 -= go[92] * *cnV[92];
+ m_A94 += gt[93];
+ m_A94 += gt[94];
+ m_A94 += gt[95];
+ m_A94 += gt[96];
+ m_A94 += gt[97];
+ m_A88 += go[93];
+ m_A90 += go[94];
+ m_A92 += go[95];
+ double RHS20 = Idr[93];
+ RHS20 += Idr[94];
+ RHS20 += Idr[95];
+ RHS20 += Idr[96];
+ RHS20 += Idr[97];
+ RHS20 -= go[96] * *cnV[96];
+ RHS20 -= go[97] * *cnV[97];
+ m_A102 += gt[98];
+ m_A102 += gt[99];
+ m_A102 += gt[100];
+ m_A102 += gt[101];
+ m_A102 += gt[102];
+ m_A102 += gt[103];
+ m_A102 += gt[104];
+ m_A103 += go[98];
+ m_A98 += go[99];
+ m_A98 += go[100];
+ m_A100 += go[101];
+ m_A97 += go[102];
+ m_A97 += go[103];
+ double RHS21 = Idr[98];
+ RHS21 += Idr[99];
+ RHS21 += Idr[100];
+ RHS21 += Idr[101];
+ RHS21 += Idr[102];
+ RHS21 += Idr[103];
+ RHS21 += Idr[104];
+ RHS21 -= go[104] * *cnV[104];
+ m_A108 += gt[105];
+ m_A108 += gt[106];
+ m_A108 += gt[107];
+ m_A108 += gt[108];
+ m_A108 += gt[109];
+ m_A108 += gt[110];
+ m_A104 += go[105];
+ m_A106 += go[106];
+ m_A105 += go[107];
+ double RHS22 = Idr[105];
+ RHS22 += Idr[106];
+ RHS22 += Idr[107];
+ RHS22 += Idr[108];
+ RHS22 += Idr[109];
+ RHS22 += Idr[110];
+ RHS22 -= go[108] * *cnV[108];
+ RHS22 -= go[109] * *cnV[109];
+ RHS22 -= go[110] * *cnV[110];
+ m_A118 += gt[111];
+ m_A118 += gt[112];
+ m_A118 += gt[113];
+ m_A118 += gt[114];
+ m_A118 += gt[115];
+ m_A118 += gt[116];
+ m_A118 += gt[117];
+ m_A118 += gt[118];
+ m_A118 += gt[119];
+ m_A112 += go[111];
+ m_A112 += go[112];
+ m_A111 += go[113];
+ m_A113 += go[114];
+ m_A116 += go[115];
+ m_A110 += go[116];
+ m_A110 += go[117];
+ double RHS23 = Idr[111];
+ RHS23 += Idr[112];
+ RHS23 += Idr[113];
+ RHS23 += Idr[114];
+ RHS23 += Idr[115];
+ RHS23 += Idr[116];
+ RHS23 += Idr[117];
+ RHS23 += Idr[118];
+ RHS23 += Idr[119];
+ RHS23 -= go[118] * *cnV[118];
+ RHS23 -= go[119] * *cnV[119];
+ const double f0 = 1.0 / m_A0;
+ const double f0_11 = -f0 * m_A35;
+ m_A37 += m_A1 * f0_11;
+ m_A39 += m_A2 * f0_11;
+ RHS11 += f0_11 * RHS0;
+ const double f0_13 = -f0 * m_A46;
+ m_A49 += m_A1 * f0_13;
+ m_A51 += m_A2 * f0_13;
+ RHS13 += f0_13 * RHS0;
+ const double f1 = 1.0 / m_A3;
+ const double f1_13 = -f1 * m_A47;
+ m_A51 += m_A4 * f1_13;
+ RHS13 += f1_13 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_19 = -f2 * m_A78;
+ m_A82 += m_A6 * f2_19;
+ RHS19 += f2_19 * RHS2;
+ const double f3 = 1.0 / m_A7;
+ const double f3_11 = -f3 * m_A36;
+ m_A37 += m_A8 * f3_11;
+ m_A38 += m_A9 * f3_11;
+ m_A40 += m_A10 * f3_11;
+ RHS11 += f3_11 * RHS3;
+ const double f3_12 = -f3 * m_A41;
+ m_A42 += m_A8 * f3_12;
+ m_A43 += m_A9 * f3_12;
+ m_A45 += m_A10 * f3_12;
+ RHS12 += f3_12 * RHS3;
+ const double f3_19 = -f3 * m_A79;
+ m_A81 += m_A8 * f3_19;
+ m_A82 += m_A9 * f3_19;
+ m_A85 += m_A10 * f3_19;
+ RHS19 += f3_19 * RHS3;
+ const double f4 = 1.0 / m_A11;
+ const double f4_13 = -f4 * m_A48;
+ m_A51 += m_A12 * f4_13;
+ m_A52 += m_A13 * f4_13;
+ m_A54 += m_A14 * f4_13;
+ RHS13 += f4_13 * RHS4;
+ const double f4_14 = -f4 * m_A55;
+ m_A56 += m_A12 * f4_14;
+ m_A57 += m_A13 * f4_14;
+ m_A59 += m_A14 * f4_14;
+ RHS14 += f4_14 * RHS4;
+ const double f4_21 = -f4 * m_A97;
+ m_A99 += m_A12 * f4_21;
+ m_A100 += m_A13 * f4_21;
+ m_A102 += m_A14 * f4_21;
+ RHS21 += f4_21 * RHS4;
+ const double f5 = 1.0 / m_A15;
+ const double f5_19 = -f5 * m_A80;
+ m_A85 += m_A16 * f5_19;
+ m_A86 += m_A17 * f5_19;
+ m_A87 += m_A18 * f5_19;
+ RHS19 += f5_19 * RHS5;
+ const double f5_21 = -f5 * m_A98;
+ m_A101 += m_A16 * f5_21;
+ m_A102 += m_A17 * f5_21;
+ m_A103 += m_A18 * f5_21;
+ RHS21 += f5_21 * RHS5;
+ const double f5_23 = -f5 * m_A110;
+ m_A114 += m_A16 * f5_23;
+ m_A116 += m_A17 * f5_23;
+ m_A118 += m_A18 * f5_23;
+ RHS23 += f5_23 * RHS5;
+ const double f6 = 1.0 / m_A19;
+ const double f6_15 = -f6 * m_A60;
+ m_A61 += m_A20 * f6_15;
+ m_A62 += m_A21 * f6_15;
+ RHS15 += f6_15 * RHS6;
+ const double f6_16 = -f6 * m_A63;
+ m_A65 += m_A20 * f6_16;
+ m_A66 += m_A21 * f6_16;
+ RHS16 += f6_16 * RHS6;
+ const double f7 = 1.0 / m_A22;
+ const double f7_20 = -f7 * m_A88;
+ m_A89 += m_A23 * f7_20;
+ m_A92 += m_A24 * f7_20;
+ RHS20 += f7_20 * RHS7;
+ const double f8 = 1.0 / m_A25;
+ const double f8_16 = -f8 * m_A64;
+ m_A66 += m_A26 * f8_16;
+ m_A67 += m_A27 * f8_16;
+ m_A68 += m_A28 * f8_16;
+ RHS16 += f8_16 * RHS8;
+ const double f8_17 = -f8 * m_A69;
+ m_A70 += m_A26 * f8_17;
+ m_A71 += m_A27 * f8_17;
+ m_A73 += m_A28 * f8_17;
+ RHS17 += f8_17 * RHS8;
+ const double f8_20 = -f8 * m_A89;
+ m_A91 += m_A26 * f8_20;
+ m_A92 += m_A27 * f8_20;
+ m_A96 += m_A28 * f8_20;
+ RHS20 += f8_20 * RHS8;
+ const double f8_23 = -f8 * m_A111;
+ m_A112 += m_A26 * f8_23;
+ m_A113 += m_A27 * f8_23;
+ m_A118 += m_A28 * f8_23;
+ RHS23 += f8_23 * RHS8;
+ const double f9 = 1.0 / m_A29;
+ const double f9_22 = -f9 * m_A104;
+ m_A106 += m_A30 * f9_22;
+ RHS22 += f9_22 * RHS9;
+ const double f10 = 1.0 / m_A31;
+ const double f10_18 = -f10 * m_A74;
+ m_A75 += m_A32 * f10_18;
+ m_A76 += m_A33 * f10_18;
+ m_A77 += m_A34 * f10_18;
+ RHS18 += f10_18 * RHS10;
+ const double f10_20 = -f10 * m_A90;
+ m_A93 += m_A32 * f10_20;
+ m_A94 += m_A33 * f10_20;
+ m_A95 += m_A34 * f10_20;
+ RHS20 += f10_20 * RHS10;
+ const double f10_22 = -f10 * m_A105;
+ m_A106 += m_A32 * f10_22;
+ m_A107 += m_A33 * f10_22;
+ m_A108 += m_A34 * f10_22;
+ RHS22 += f10_22 * RHS10;
+ const double f11 = 1.0 / m_A37;
+ const double f11_12 = -f11 * m_A42;
+ m_A43 += m_A38 * f11_12;
+ m_A44 += m_A39 * f11_12;
+ m_A45 += m_A40 * f11_12;
+ RHS12 += f11_12 * RHS11;
+ const double f11_13 = -f11 * m_A49;
+ m_A50 += m_A38 * f11_13;
+ m_A51 += m_A39 * f11_13;
+ m_A53 += m_A40 * f11_13;
+ RHS13 += f11_13 * RHS11;
+ const double f11_19 = -f11 * m_A81;
+ m_A82 += m_A38 * f11_19;
+ m_A83 += m_A39 * f11_19;
+ m_A85 += m_A40 * f11_19;
+ RHS19 += f11_19 * RHS11;
+ const double f12 = 1.0 / m_A43;
+ const double f12_13 = -f12 * m_A50;
+ m_A51 += m_A44 * f12_13;
+ m_A53 += m_A45 * f12_13;
+ RHS13 += f12_13 * RHS12;
+ const double f12_19 = -f12 * m_A82;
+ m_A83 += m_A44 * f12_19;
+ m_A85 += m_A45 * f12_19;
+ RHS19 += f12_19 * RHS12;
+ const double f13 = 1.0 / m_A51;
+ const double f13_14 = -f13 * m_A56;
+ m_A57 += m_A52 * f13_14;
+ m_A58 += m_A53 * f13_14;
+ m_A59 += m_A54 * f13_14;
+ RHS14 += f13_14 * RHS13;
+ const double f13_19 = -f13 * m_A83;
+ m_A84 += m_A52 * f13_19;
+ m_A85 += m_A53 * f13_19;
+ m_A86 += m_A54 * f13_19;
+ RHS19 += f13_19 * RHS13;
+ const double f13_21 = -f13 * m_A99;
+ m_A100 += m_A52 * f13_21;
+ m_A101 += m_A53 * f13_21;
+ m_A102 += m_A54 * f13_21;
+ RHS21 += f13_21 * RHS13;
+ const double f14 = 1.0 / m_A57;
+ const double f14_19 = -f14 * m_A84;
+ m_A85 += m_A58 * f14_19;
+ m_A86 += m_A59 * f14_19;
+ RHS19 += f14_19 * RHS14;
+ const double f14_21 = -f14 * m_A100;
+ m_A101 += m_A58 * f14_21;
+ m_A102 += m_A59 * f14_21;
+ RHS21 += f14_21 * RHS14;
+ const double f15 = 1.0 / m_A61;
+ const double f15_16 = -f15 * m_A65;
+ m_A66 += m_A62 * f15_16;
+ RHS16 += f15_16 * RHS15;
+ const double f16 = 1.0 / m_A66;
+ const double f16_17 = -f16 * m_A70;
+ m_A71 += m_A67 * f16_17;
+ m_A73 += m_A68 * f16_17;
+ RHS17 += f16_17 * RHS16;
+ const double f16_20 = -f16 * m_A91;
+ m_A92 += m_A67 * f16_20;
+ m_A96 += m_A68 * f16_20;
+ RHS20 += f16_20 * RHS16;
+ const double f16_23 = -f16 * m_A112;
+ m_A113 += m_A67 * f16_23;
+ m_A118 += m_A68 * f16_23;
+ RHS23 += f16_23 * RHS16;
+ const double f17 = 1.0 / m_A71;
+ const double f17_20 = -f17 * m_A92;
+ m_A94 += m_A72 * f17_20;
+ m_A96 += m_A73 * f17_20;
+ RHS20 += f17_20 * RHS17;
+ const double f17_23 = -f17 * m_A113;
+ m_A115 += m_A72 * f17_23;
+ m_A118 += m_A73 * f17_23;
+ RHS23 += f17_23 * RHS17;
+ const double f18 = 1.0 / m_A75;
+ const double f18_20 = -f18 * m_A93;
+ m_A94 += m_A76 * f18_20;
+ m_A95 += m_A77 * f18_20;
+ RHS20 += f18_20 * RHS18;
+ const double f18_22 = -f18 * m_A106;
+ m_A107 += m_A76 * f18_22;
+ m_A108 += m_A77 * f18_22;
+ RHS22 += f18_22 * RHS18;
+ const double f19 = 1.0 / m_A85;
+ const double f19_21 = -f19 * m_A101;
+ m_A102 += m_A86 * f19_21;
+ m_A103 += m_A87 * f19_21;
+ RHS21 += f19_21 * RHS19;
+ const double f19_23 = -f19 * m_A114;
+ m_A116 += m_A86 * f19_23;
+ m_A118 += m_A87 * f19_23;
+ RHS23 += f19_23 * RHS19;
+ const double f20 = 1.0 / m_A94;
+ const double f20_22 = -f20 * m_A107;
+ m_A108 += m_A95 * f20_22;
+ m_A109 += m_A96 * f20_22;
+ RHS22 += f20_22 * RHS20;
+ const double f20_23 = -f20 * m_A115;
+ m_A117 += m_A95 * f20_23;
+ m_A118 += m_A96 * f20_23;
+ RHS23 += f20_23 * RHS20;
+ const double f21 = 1.0 / m_A102;
+ const double f21_23 = -f21 * m_A116;
+ m_A118 += m_A103 * f21_23;
+ RHS23 += f21_23 * RHS21;
+ const double f22 = 1.0 / m_A108;
+ const double f22_23 = -f22 * m_A117;
+ m_A118 += m_A109 * f22_23;
+ RHS23 += f22_23 * RHS22;
+ V[23] = RHS23 / m_A118;
+ double tmp22 = 0.0;
+ tmp22 += m_A109 * V[23];
+ V[22] = (RHS22 - tmp22) / m_A108;
+ double tmp21 = 0.0;
+ tmp21 += m_A103 * V[23];
+ V[21] = (RHS21 - tmp21) / m_A102;
+ double tmp20 = 0.0;
+ tmp20 += m_A95 * V[22];
+ tmp20 += m_A96 * V[23];
+ V[20] = (RHS20 - tmp20) / m_A94;
+ double tmp19 = 0.0;
+ tmp19 += m_A86 * V[21];
+ tmp19 += m_A87 * V[23];
+ V[19] = (RHS19 - tmp19) / m_A85;
+ double tmp18 = 0.0;
+ tmp18 += m_A76 * V[20];
+ tmp18 += m_A77 * V[22];
+ V[18] = (RHS18 - tmp18) / m_A75;
+ double tmp17 = 0.0;
+ tmp17 += m_A72 * V[20];
+ tmp17 += m_A73 * V[23];
+ V[17] = (RHS17 - tmp17) / m_A71;
+ double tmp16 = 0.0;
+ tmp16 += m_A67 * V[17];
+ tmp16 += m_A68 * V[23];
+ V[16] = (RHS16 - tmp16) / m_A66;
+ double tmp15 = 0.0;
+ tmp15 += m_A62 * V[16];
+ V[15] = (RHS15 - tmp15) / m_A61;
+ double tmp14 = 0.0;
+ tmp14 += m_A58 * V[19];
+ tmp14 += m_A59 * V[21];
+ V[14] = (RHS14 - tmp14) / m_A57;
+ double tmp13 = 0.0;
+ tmp13 += m_A52 * V[14];
+ tmp13 += m_A53 * V[19];
+ tmp13 += m_A54 * V[21];
+ V[13] = (RHS13 - tmp13) / m_A51;
+ double tmp12 = 0.0;
+ tmp12 += m_A44 * V[13];
+ tmp12 += m_A45 * V[19];
+ V[12] = (RHS12 - tmp12) / m_A43;
+ double tmp11 = 0.0;
+ tmp11 += m_A38 * V[12];
+ tmp11 += m_A39 * V[13];
+ tmp11 += m_A40 * V[19];
+ V[11] = (RHS11 - tmp11) / m_A37;
+ double tmp10 = 0.0;
+ tmp10 += m_A32 * V[18];
+ tmp10 += m_A33 * V[20];
+ tmp10 += m_A34 * V[22];
+ V[10] = (RHS10 - tmp10) / m_A31;
+ double tmp9 = 0.0;
+ tmp9 += m_A30 * V[18];
+ V[9] = (RHS9 - tmp9) / m_A29;
+ double tmp8 = 0.0;
+ tmp8 += m_A26 * V[16];
+ tmp8 += m_A27 * V[17];
+ tmp8 += m_A28 * V[23];
+ V[8] = (RHS8 - tmp8) / m_A25;
+ double tmp7 = 0.0;
+ tmp7 += m_A23 * V[8];
+ tmp7 += m_A24 * V[17];
+ V[7] = (RHS7 - tmp7) / m_A22;
+ double tmp6 = 0.0;
+ tmp6 += m_A20 * V[15];
+ tmp6 += m_A21 * V[16];
+ V[6] = (RHS6 - tmp6) / m_A19;
+ double tmp5 = 0.0;
+ tmp5 += m_A16 * V[19];
+ tmp5 += m_A17 * V[21];
+ tmp5 += m_A18 * V[23];
+ V[5] = (RHS5 - tmp5) / m_A15;
+ double tmp4 = 0.0;
+ tmp4 += m_A12 * V[13];
+ tmp4 += m_A13 * V[14];
+ tmp4 += m_A14 * V[21];
+ V[4] = (RHS4 - tmp4) / m_A11;
+ double tmp3 = 0.0;
+ tmp3 += m_A8 * V[11];
+ tmp3 += m_A9 * V[12];
+ tmp3 += m_A10 * V[19];
+ V[3] = (RHS3 - tmp3) / m_A7;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[12];
+ V[2] = (RHS2 - tmp2) / m_A5;
+ double tmp1 = 0.0;
+ tmp1 += m_A4 * V[13];
+ V[1] = (RHS1 - tmp1) / m_A3;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[11];
+ tmp0 += m_A2 * V[13];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// 280zzzap
static void nl_gcr_ab9144d965a37e4_113_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -44954,6 +50133,633 @@ static void nl_gcr_b22769fbf3159a8d_21_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_b66df357763b1dce_97_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ double m_A75(0.0);
+ double m_A76(0.0);
+ double m_A77(0.0);
+ double m_A78(0.0);
+ double m_A79(0.0);
+ double m_A80(0.0);
+ double m_A81(0.0);
+ double m_A82(0.0);
+ double m_A83(0.0);
+ double m_A84(0.0);
+ double m_A85(0.0);
+ double m_A86(0.0);
+ double m_A87(0.0);
+ double m_A88(0.0);
+ double m_A89(0.0);
+ double m_A90(0.0);
+ double m_A91(0.0);
+ double m_A92(0.0);
+ double m_A93(0.0);
+ double m_A94(0.0);
+ double m_A95(0.0);
+ double m_A96(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A2 += gt[6];
+ m_A2 += gt[7];
+ m_A5 += go[3];
+ m_A4 += go[4];
+ m_A3 += go[5];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 += Idr[6];
+ RHS1 += Idr[7];
+ RHS1 -= go[6] * *cnV[6];
+ RHS1 -= go[7] * *cnV[7];
+ m_A6 += gt[8];
+ m_A6 += gt[9];
+ m_A6 += gt[10];
+ m_A7 += go[8];
+ double RHS2 = Idr[8];
+ RHS2 += Idr[9];
+ RHS2 += Idr[10];
+ RHS2 -= go[9] * *cnV[9];
+ RHS2 -= go[10] * *cnV[10];
+ m_A8 += gt[11];
+ m_A8 += gt[12];
+ m_A8 += gt[13];
+ m_A8 += gt[14];
+ m_A8 += gt[15];
+ m_A8 += gt[16];
+ m_A9 += go[11];
+ m_A10 += go[12];
+ m_A12 += go[13];
+ m_A11 += go[14];
+ double RHS3 = Idr[11];
+ RHS3 += Idr[12];
+ RHS3 += Idr[13];
+ RHS3 += Idr[14];
+ RHS3 += Idr[15];
+ RHS3 += Idr[16];
+ RHS3 -= go[15] * *cnV[15];
+ RHS3 -= go[16] * *cnV[16];
+ m_A13 += gt[17];
+ m_A13 += gt[18];
+ m_A13 += gt[19];
+ m_A14 += go[17];
+ double RHS4 = Idr[17];
+ RHS4 += Idr[18];
+ RHS4 += Idr[19];
+ RHS4 -= go[18] * *cnV[18];
+ RHS4 -= go[19] * *cnV[19];
+ m_A15 += gt[20];
+ m_A15 += gt[21];
+ m_A15 += gt[22];
+ m_A15 += gt[23];
+ m_A16 += go[20];
+ double RHS5 = Idr[20];
+ RHS5 += Idr[21];
+ RHS5 += Idr[22];
+ RHS5 += Idr[23];
+ RHS5 -= go[21] * *cnV[21];
+ RHS5 -= go[22] * *cnV[22];
+ RHS5 -= go[23] * *cnV[23];
+ m_A17 += gt[24];
+ m_A17 += gt[25];
+ m_A17 += gt[26];
+ m_A17 += gt[27];
+ m_A17 += gt[28];
+ m_A17 += gt[29];
+ m_A18 += go[24];
+ m_A21 += go[25];
+ m_A20 += go[26];
+ m_A19 += go[27];
+ double RHS6 = Idr[24];
+ RHS6 += Idr[25];
+ RHS6 += Idr[26];
+ RHS6 += Idr[27];
+ RHS6 += Idr[28];
+ RHS6 += Idr[29];
+ RHS6 -= go[28] * *cnV[28];
+ RHS6 -= go[29] * *cnV[29];
+ m_A22 += gt[30];
+ m_A22 += gt[31];
+ m_A22 += gt[32];
+ m_A22 += gt[33];
+ m_A22 += gt[34];
+ m_A22 += gt[35];
+ m_A22 += gt[36];
+ m_A24 += go[30];
+ m_A23 += go[31];
+ double RHS7 = Idr[30];
+ RHS7 += Idr[31];
+ RHS7 += Idr[32];
+ RHS7 += Idr[33];
+ RHS7 += Idr[34];
+ RHS7 += Idr[35];
+ RHS7 += Idr[36];
+ RHS7 -= go[32] * *cnV[32];
+ RHS7 -= go[33] * *cnV[33];
+ RHS7 -= go[34] * *cnV[34];
+ RHS7 -= go[35] * *cnV[35];
+ RHS7 -= go[36] * *cnV[36];
+ m_A25 += gt[37];
+ m_A25 += gt[38];
+ m_A26 += go[37];
+ m_A27 += go[38];
+ double RHS8 = Idr[37];
+ RHS8 += Idr[38];
+ m_A30 += gt[39];
+ m_A30 += gt[40];
+ m_A30 += gt[41];
+ m_A29 += go[39];
+ m_A28 += go[40];
+ double RHS9 = Idr[39];
+ RHS9 += Idr[40];
+ RHS9 += Idr[41];
+ RHS9 -= go[41] * *cnV[41];
+ m_A34 += gt[42];
+ m_A34 += gt[43];
+ m_A34 += gt[44];
+ m_A34 += gt[45];
+ m_A34 += gt[46];
+ m_A34 += gt[47];
+ m_A34 += gt[48];
+ m_A35 += go[42];
+ m_A33 += go[43];
+ double RHS10 = Idr[42];
+ RHS10 += Idr[43];
+ RHS10 += Idr[44];
+ RHS10 += Idr[45];
+ RHS10 += Idr[46];
+ RHS10 += Idr[47];
+ RHS10 += Idr[48];
+ RHS10 -= go[44] * *cnV[44];
+ RHS10 -= go[45] * *cnV[45];
+ RHS10 -= go[46] * *cnV[46];
+ RHS10 -= go[47] * *cnV[47];
+ RHS10 -= go[48] * *cnV[48];
+ m_A37 += gt[49];
+ m_A37 += gt[50];
+ m_A37 += gt[51];
+ m_A37 += gt[52];
+ m_A37 += gt[53];
+ m_A37 += gt[54];
+ m_A37 += gt[55];
+ m_A38 += go[49];
+ m_A36 += go[50];
+ double RHS11 = Idr[49];
+ RHS11 += Idr[50];
+ RHS11 += Idr[51];
+ RHS11 += Idr[52];
+ RHS11 += Idr[53];
+ RHS11 += Idr[54];
+ RHS11 += Idr[55];
+ RHS11 -= go[51] * *cnV[51];
+ RHS11 -= go[52] * *cnV[52];
+ RHS11 -= go[53] * *cnV[53];
+ RHS11 -= go[54] * *cnV[54];
+ RHS11 -= go[55] * *cnV[55];
+ m_A44 += gt[56];
+ m_A44 += gt[57];
+ m_A44 += gt[58];
+ m_A41 += go[56];
+ m_A40 += go[57];
+ m_A39 += go[58];
+ double RHS12 = Idr[56];
+ RHS12 += Idr[57];
+ RHS12 += Idr[58];
+ m_A54 += gt[59];
+ m_A54 += gt[60];
+ m_A54 += gt[61];
+ m_A56 += go[59];
+ m_A50 += go[60];
+ m_A49 += go[61];
+ double RHS13 = Idr[59];
+ RHS13 += Idr[60];
+ RHS13 += Idr[61];
+ m_A59 += gt[62];
+ m_A59 += gt[63];
+ m_A59 += gt[64];
+ m_A58 += go[62];
+ m_A60 += go[63];
+ double RHS14 = Idr[62];
+ RHS14 += Idr[63];
+ RHS14 += Idr[64];
+ RHS14 -= go[64] * *cnV[64];
+ m_A65 += gt[65];
+ m_A65 += gt[66];
+ m_A65 += gt[67];
+ m_A67 += go[65];
+ m_A61 += go[66];
+ double RHS15 = Idr[65];
+ RHS15 += Idr[66];
+ RHS15 += Idr[67];
+ RHS15 -= go[67] * *cnV[67];
+ m_A69 += gt[68];
+ m_A69 += gt[69];
+ m_A69 += gt[70];
+ m_A68 += go[68];
+ double RHS16 = Idr[68];
+ RHS16 += Idr[69];
+ RHS16 += Idr[70];
+ RHS16 -= go[69] * *cnV[69];
+ RHS16 -= go[70] * *cnV[70];
+ m_A79 += gt[71];
+ m_A79 += gt[72];
+ m_A79 += gt[73];
+ m_A79 += gt[74];
+ m_A79 += gt[75];
+ m_A72 += go[71];
+ m_A73 += go[72];
+ m_A77 += go[73];
+ m_A71 += go[74];
+ double RHS17 = Idr[71];
+ RHS17 += Idr[72];
+ RHS17 += Idr[73];
+ RHS17 += Idr[74];
+ RHS17 += Idr[75];
+ RHS17 -= go[75] * *cnV[75];
+ m_A86 += gt[76];
+ m_A86 += gt[77];
+ m_A86 += gt[78];
+ m_A86 += gt[79];
+ m_A86 += gt[80];
+ m_A81 += go[76];
+ m_A82 += go[77];
+ m_A87 += go[78];
+ double RHS18 = Idr[76];
+ RHS18 += Idr[77];
+ RHS18 += Idr[78];
+ RHS18 += Idr[79];
+ RHS18 += Idr[80];
+ RHS18 -= go[79] * *cnV[79];
+ RHS18 -= go[80] * *cnV[80];
+ m_A96 += gt[81];
+ m_A96 += gt[82];
+ m_A96 += gt[83];
+ m_A96 += gt[84];
+ m_A95 += go[81];
+ m_A92 += go[82];
+ m_A93 += go[83];
+ m_A88 += go[84];
+ double RHS19 = Idr[81];
+ RHS19 += Idr[82];
+ RHS19 += Idr[83];
+ RHS19 += Idr[84];
+ const double f0 = 1.0 / m_A0;
+ const double f0_9 = -f0 * m_A28;
+ m_A30 += m_A1 * f0_9;
+ RHS9 += f0_9 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_9 = -f1 * m_A29;
+ m_A30 += m_A3 * f1_9;
+ m_A31 += m_A4 * f1_9;
+ m_A32 += m_A5 * f1_9;
+ RHS9 += f1_9 * RHS1;
+ const double f1_13 = -f1 * m_A49;
+ m_A51 += m_A3 * f1_13;
+ m_A54 += m_A4 * f1_13;
+ m_A56 += m_A5 * f1_13;
+ RHS13 += f1_13 * RHS1;
+ const double f1_17 = -f1 * m_A71;
+ m_A74 += m_A3 * f1_17;
+ m_A77 += m_A4 * f1_17;
+ m_A79 += m_A5 * f1_17;
+ RHS17 += f1_17 * RHS1;
+ const double f2 = 1.0 / m_A6;
+ const double f2_11 = -f2 * m_A36;
+ m_A38 += m_A7 * f2_11;
+ RHS11 += f2_11 * RHS2;
+ const double f2_17 = -f2 * m_A72;
+ m_A79 += m_A7 * f2_17;
+ RHS17 += f2_17 * RHS2;
+ const double f3 = 1.0 / m_A8;
+ const double f3_12 = -f3 * m_A39;
+ m_A43 += m_A9 * f3_12;
+ m_A44 += m_A10 * f3_12;
+ m_A45 += m_A11 * f3_12;
+ m_A47 += m_A12 * f3_12;
+ RHS12 += f3_12 * RHS3;
+ const double f3_13 = -f3 * m_A50;
+ m_A52 += m_A9 * f3_13;
+ m_A53 += m_A10 * f3_13;
+ m_A54 += m_A11 * f3_13;
+ m_A56 += m_A12 * f3_13;
+ RHS13 += f3_13 * RHS3;
+ const double f3_17 = -f3 * m_A73;
+ m_A75 += m_A9 * f3_17;
+ m_A76 += m_A10 * f3_17;
+ m_A77 += m_A11 * f3_17;
+ m_A79 += m_A12 * f3_17;
+ RHS17 += f3_17 * RHS3;
+ const double f4 = 1.0 / m_A13;
+ const double f4_10 = -f4 * m_A33;
+ m_A35 += m_A14 * f4_10;
+ RHS10 += f4_10 * RHS4;
+ const double f4_12 = -f4 * m_A40;
+ m_A44 += m_A14 * f4_12;
+ RHS12 += f4_12 * RHS4;
+ const double f5 = 1.0 / m_A15;
+ const double f5_14 = -f5 * m_A58;
+ m_A59 += m_A16 * f5_14;
+ RHS14 += f5_14 * RHS5;
+ const double f6 = 1.0 / m_A17;
+ const double f6_12 = -f6 * m_A41;
+ m_A42 += m_A18 * f6_12;
+ m_A44 += m_A19 * f6_12;
+ m_A46 += m_A20 * f6_12;
+ m_A48 += m_A21 * f6_12;
+ RHS12 += f6_12 * RHS6;
+ const double f6_15 = -f6 * m_A61;
+ m_A62 += m_A18 * f6_15;
+ m_A63 += m_A19 * f6_15;
+ m_A65 += m_A20 * f6_15;
+ m_A67 += m_A21 * f6_15;
+ RHS15 += f6_15 * RHS6;
+ const double f6_19 = -f6 * m_A88;
+ m_A89 += m_A18 * f6_19;
+ m_A90 += m_A19 * f6_19;
+ m_A93 += m_A20 * f6_19;
+ m_A96 += m_A21 * f6_19;
+ RHS19 += f6_19 * RHS6;
+ const double f7 = 1.0 / m_A22;
+ const double f7_18 = -f7 * m_A81;
+ m_A83 += m_A23 * f7_18;
+ m_A87 += m_A24 * f7_18;
+ RHS18 += f7_18 * RHS7;
+ const double f8 = 1.0 / m_A25;
+ const double f8_16 = -f8 * m_A68;
+ m_A69 += m_A26 * f8_16;
+ m_A70 += m_A27 * f8_16;
+ RHS16 += f8_16 * RHS8;
+ const double f8_18 = -f8 * m_A82;
+ m_A84 += m_A26 * f8_18;
+ m_A86 += m_A27 * f8_18;
+ RHS18 += f8_18 * RHS8;
+ const double f9 = 1.0 / m_A30;
+ const double f9_13 = -f9 * m_A51;
+ m_A54 += m_A31 * f9_13;
+ m_A56 += m_A32 * f9_13;
+ RHS13 += f9_13 * RHS9;
+ const double f9_17 = -f9 * m_A74;
+ m_A77 += m_A31 * f9_17;
+ m_A79 += m_A32 * f9_17;
+ RHS17 += f9_17 * RHS9;
+ const double f10 = 1.0 / m_A34;
+ const double f10_12 = -f10 * m_A42;
+ m_A44 += m_A35 * f10_12;
+ RHS12 += f10_12 * RHS10;
+ const double f10_15 = -f10 * m_A62;
+ m_A63 += m_A35 * f10_15;
+ RHS15 += f10_15 * RHS10;
+ const double f10_19 = -f10 * m_A89;
+ m_A90 += m_A35 * f10_19;
+ RHS19 += f10_19 * RHS10;
+ const double f11 = 1.0 / m_A37;
+ const double f11_12 = -f11 * m_A43;
+ m_A47 += m_A38 * f11_12;
+ RHS12 += f11_12 * RHS11;
+ const double f11_13 = -f11 * m_A52;
+ m_A56 += m_A38 * f11_13;
+ RHS13 += f11_13 * RHS11;
+ const double f11_17 = -f11 * m_A75;
+ m_A79 += m_A38 * f11_17;
+ RHS17 += f11_17 * RHS11;
+ const double f12 = 1.0 / m_A44;
+ const double f12_13 = -f12 * m_A53;
+ m_A54 += m_A45 * f12_13;
+ m_A55 += m_A46 * f12_13;
+ m_A56 += m_A47 * f12_13;
+ m_A57 += m_A48 * f12_13;
+ RHS13 += f12_13 * RHS12;
+ const double f12_15 = -f12 * m_A63;
+ m_A64 += m_A45 * f12_15;
+ m_A65 += m_A46 * f12_15;
+ m_A66 += m_A47 * f12_15;
+ m_A67 += m_A48 * f12_15;
+ RHS15 += f12_15 * RHS12;
+ const double f12_17 = -f12 * m_A76;
+ m_A77 += m_A45 * f12_17;
+ m_A78 += m_A46 * f12_17;
+ m_A79 += m_A47 * f12_17;
+ m_A80 += m_A48 * f12_17;
+ RHS17 += f12_17 * RHS12;
+ const double f12_19 = -f12 * m_A90;
+ m_A91 += m_A45 * f12_19;
+ m_A93 += m_A46 * f12_19;
+ m_A94 += m_A47 * f12_19;
+ m_A96 += m_A48 * f12_19;
+ RHS19 += f12_19 * RHS12;
+ const double f13 = 1.0 / m_A54;
+ const double f13_15 = -f13 * m_A64;
+ m_A65 += m_A55 * f13_15;
+ m_A66 += m_A56 * f13_15;
+ m_A67 += m_A57 * f13_15;
+ RHS15 += f13_15 * RHS13;
+ const double f13_17 = -f13 * m_A77;
+ m_A78 += m_A55 * f13_17;
+ m_A79 += m_A56 * f13_17;
+ m_A80 += m_A57 * f13_17;
+ RHS17 += f13_17 * RHS13;
+ const double f13_19 = -f13 * m_A91;
+ m_A93 += m_A55 * f13_19;
+ m_A94 += m_A56 * f13_19;
+ m_A96 += m_A57 * f13_19;
+ RHS19 += f13_19 * RHS13;
+ const double f14 = 1.0 / m_A59;
+ const double f14_19 = -f14 * m_A92;
+ m_A96 += m_A60 * f14_19;
+ RHS19 += f14_19 * RHS14;
+ const double f15 = 1.0 / m_A65;
+ const double f15_17 = -f15 * m_A78;
+ m_A79 += m_A66 * f15_17;
+ m_A80 += m_A67 * f15_17;
+ RHS17 += f15_17 * RHS15;
+ const double f15_18 = -f15 * m_A83;
+ m_A85 += m_A66 * f15_18;
+ m_A87 += m_A67 * f15_18;
+ RHS18 += f15_18 * RHS15;
+ const double f15_19 = -f15 * m_A93;
+ m_A94 += m_A66 * f15_19;
+ m_A96 += m_A67 * f15_19;
+ RHS19 += f15_19 * RHS15;
+ const double f16 = 1.0 / m_A69;
+ const double f16_18 = -f16 * m_A84;
+ m_A86 += m_A70 * f16_18;
+ RHS18 += f16_18 * RHS16;
+ const double f17 = 1.0 / m_A79;
+ const double f17_18 = -f17 * m_A85;
+ m_A87 += m_A80 * f17_18;
+ RHS18 += f17_18 * RHS17;
+ const double f17_19 = -f17 * m_A94;
+ m_A96 += m_A80 * f17_19;
+ RHS19 += f17_19 * RHS17;
+ const double f18 = 1.0 / m_A86;
+ const double f18_19 = -f18 * m_A95;
+ m_A96 += m_A87 * f18_19;
+ RHS19 += f18_19 * RHS18;
+ V[19] = RHS19 / m_A96;
+ double tmp18 = 0.0;
+ tmp18 += m_A87 * V[19];
+ V[18] = (RHS18 - tmp18) / m_A86;
+ double tmp17 = 0.0;
+ tmp17 += m_A80 * V[19];
+ V[17] = (RHS17 - tmp17) / m_A79;
+ double tmp16 = 0.0;
+ tmp16 += m_A70 * V[18];
+ V[16] = (RHS16 - tmp16) / m_A69;
+ double tmp15 = 0.0;
+ tmp15 += m_A66 * V[17];
+ tmp15 += m_A67 * V[19];
+ V[15] = (RHS15 - tmp15) / m_A65;
+ double tmp14 = 0.0;
+ tmp14 += m_A60 * V[19];
+ V[14] = (RHS14 - tmp14) / m_A59;
+ double tmp13 = 0.0;
+ tmp13 += m_A55 * V[15];
+ tmp13 += m_A56 * V[17];
+ tmp13 += m_A57 * V[19];
+ V[13] = (RHS13 - tmp13) / m_A54;
+ double tmp12 = 0.0;
+ tmp12 += m_A45 * V[13];
+ tmp12 += m_A46 * V[15];
+ tmp12 += m_A47 * V[17];
+ tmp12 += m_A48 * V[19];
+ V[12] = (RHS12 - tmp12) / m_A44;
+ double tmp11 = 0.0;
+ tmp11 += m_A38 * V[17];
+ V[11] = (RHS11 - tmp11) / m_A37;
+ double tmp10 = 0.0;
+ tmp10 += m_A35 * V[12];
+ V[10] = (RHS10 - tmp10) / m_A34;
+ double tmp9 = 0.0;
+ tmp9 += m_A31 * V[13];
+ tmp9 += m_A32 * V[17];
+ V[9] = (RHS9 - tmp9) / m_A30;
+ double tmp8 = 0.0;
+ tmp8 += m_A26 * V[16];
+ tmp8 += m_A27 * V[18];
+ V[8] = (RHS8 - tmp8) / m_A25;
+ double tmp7 = 0.0;
+ tmp7 += m_A23 * V[15];
+ tmp7 += m_A24 * V[19];
+ V[7] = (RHS7 - tmp7) / m_A22;
+ double tmp6 = 0.0;
+ tmp6 += m_A18 * V[10];
+ tmp6 += m_A19 * V[12];
+ tmp6 += m_A20 * V[15];
+ tmp6 += m_A21 * V[19];
+ V[6] = (RHS6 - tmp6) / m_A17;
+ double tmp5 = 0.0;
+ tmp5 += m_A16 * V[14];
+ V[5] = (RHS5 - tmp5) / m_A15;
+ double tmp4 = 0.0;
+ tmp4 += m_A14 * V[12];
+ V[4] = (RHS4 - tmp4) / m_A13;
+ double tmp3 = 0.0;
+ tmp3 += m_A9 * V[11];
+ tmp3 += m_A10 * V[12];
+ tmp3 += m_A11 * V[13];
+ tmp3 += m_A12 * V[17];
+ V[3] = (RHS3 - tmp3) / m_A8;
+ double tmp2 = 0.0;
+ tmp2 += m_A7 * V[17];
+ V[2] = (RHS2 - tmp2) / m_A6;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[9];
+ tmp1 += m_A4 * V[13];
+ tmp1 += m_A5 * V[17];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[9];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// breakout
static void nl_gcr_b66ff415b228d5f8_10_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -49110,6 +54916,907 @@ static void nl_gcr_bff07f8d339f7cc4_89_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_c05df522276e65fd_134_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ double m_A75(0.0);
+ double m_A76(0.0);
+ double m_A77(0.0);
+ double m_A78(0.0);
+ double m_A79(0.0);
+ double m_A80(0.0);
+ double m_A81(0.0);
+ double m_A82(0.0);
+ double m_A83(0.0);
+ double m_A84(0.0);
+ double m_A85(0.0);
+ double m_A86(0.0);
+ double m_A87(0.0);
+ double m_A88(0.0);
+ double m_A89(0.0);
+ double m_A90(0.0);
+ double m_A91(0.0);
+ double m_A92(0.0);
+ double m_A93(0.0);
+ double m_A94(0.0);
+ double m_A95(0.0);
+ double m_A96(0.0);
+ double m_A97(0.0);
+ double m_A98(0.0);
+ double m_A99(0.0);
+ double m_A100(0.0);
+ double m_A101(0.0);
+ double m_A102(0.0);
+ double m_A103(0.0);
+ double m_A104(0.0);
+ double m_A105(0.0);
+ double m_A106(0.0);
+ double m_A107(0.0);
+ double m_A108(0.0);
+ double m_A109(0.0);
+ double m_A110(0.0);
+ double m_A111(0.0);
+ double m_A112(0.0);
+ double m_A113(0.0);
+ double m_A114(0.0);
+ double m_A115(0.0);
+ double m_A116(0.0);
+ double m_A117(0.0);
+ double m_A118(0.0);
+ double m_A119(0.0);
+ double m_A120(0.0);
+ double m_A121(0.0);
+ double m_A122(0.0);
+ double m_A123(0.0);
+ double m_A124(0.0);
+ double m_A125(0.0);
+ double m_A126(0.0);
+ double m_A127(0.0);
+ double m_A128(0.0);
+ double m_A129(0.0);
+ double m_A130(0.0);
+ double m_A131(0.0);
+ double m_A132(0.0);
+ double m_A133(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A4 += go[3];
+ m_A3 += go[4];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 -= go[5] * *cnV[5];
+ m_A5 += gt[6];
+ m_A5 += gt[7];
+ m_A5 += gt[8];
+ m_A5 += gt[9];
+ m_A5 += gt[10];
+ m_A5 += gt[11];
+ m_A5 += gt[12];
+ m_A7 += go[6];
+ m_A6 += go[7];
+ double RHS2 = Idr[6];
+ RHS2 += Idr[7];
+ RHS2 += Idr[8];
+ RHS2 += Idr[9];
+ RHS2 += Idr[10];
+ RHS2 += Idr[11];
+ RHS2 += Idr[12];
+ RHS2 -= go[8] * *cnV[8];
+ RHS2 -= go[9] * *cnV[9];
+ RHS2 -= go[10] * *cnV[10];
+ RHS2 -= go[11] * *cnV[11];
+ RHS2 -= go[12] * *cnV[12];
+ m_A8 += gt[13];
+ m_A8 += gt[14];
+ m_A8 += gt[15];
+ m_A9 += go[13];
+ double RHS3 = Idr[13];
+ RHS3 += Idr[14];
+ RHS3 += Idr[15];
+ RHS3 -= go[14] * *cnV[14];
+ RHS3 -= go[15] * *cnV[15];
+ m_A10 += gt[16];
+ m_A10 += gt[17];
+ m_A10 += gt[18];
+ m_A10 += gt[19];
+ m_A11 += go[16];
+ double RHS4 = Idr[16];
+ RHS4 += Idr[17];
+ RHS4 += Idr[18];
+ RHS4 += Idr[19];
+ RHS4 -= go[17] * *cnV[17];
+ RHS4 -= go[18] * *cnV[18];
+ RHS4 -= go[19] * *cnV[19];
+ m_A12 += gt[20];
+ m_A12 += gt[21];
+ m_A12 += gt[22];
+ m_A12 += gt[23];
+ m_A12 += gt[24];
+ m_A12 += gt[25];
+ m_A12 += gt[26];
+ m_A14 += go[20];
+ m_A13 += go[21];
+ double RHS5 = Idr[20];
+ RHS5 += Idr[21];
+ RHS5 += Idr[22];
+ RHS5 += Idr[23];
+ RHS5 += Idr[24];
+ RHS5 += Idr[25];
+ RHS5 += Idr[26];
+ RHS5 -= go[22] * *cnV[22];
+ RHS5 -= go[23] * *cnV[23];
+ RHS5 -= go[24] * *cnV[24];
+ RHS5 -= go[25] * *cnV[25];
+ RHS5 -= go[26] * *cnV[26];
+ m_A15 += gt[27];
+ m_A15 += gt[28];
+ m_A15 += gt[29];
+ m_A16 += go[27];
+ m_A17 += go[28];
+ double RHS6 = Idr[27];
+ RHS6 += Idr[28];
+ RHS6 += Idr[29];
+ RHS6 -= go[29] * *cnV[29];
+ m_A18 += gt[30];
+ m_A18 += gt[31];
+ m_A18 += gt[32];
+ m_A18 += gt[33];
+ m_A19 += go[30];
+ double RHS7 = Idr[30];
+ RHS7 += Idr[31];
+ RHS7 += Idr[32];
+ RHS7 += Idr[33];
+ RHS7 -= go[31] * *cnV[31];
+ RHS7 -= go[32] * *cnV[32];
+ RHS7 -= go[33] * *cnV[33];
+ m_A20 += gt[34];
+ m_A20 += gt[35];
+ m_A20 += gt[36];
+ m_A21 += go[34];
+ m_A22 += go[35];
+ double RHS8 = Idr[34];
+ RHS8 += Idr[35];
+ RHS8 += Idr[36];
+ RHS8 -= go[36] * *cnV[36];
+ m_A23 += gt[37];
+ m_A23 += gt[38];
+ m_A23 += gt[39];
+ m_A23 += gt[40];
+ m_A23 += gt[41];
+ m_A24 += go[37];
+ m_A25 += go[38];
+ m_A26 += go[39];
+ double RHS9 = Idr[37];
+ RHS9 += Idr[38];
+ RHS9 += Idr[39];
+ RHS9 += Idr[40];
+ RHS9 += Idr[41];
+ RHS9 -= go[40] * *cnV[40];
+ RHS9 -= go[41] * *cnV[41];
+ m_A27 += gt[42];
+ m_A27 += gt[43];
+ m_A27 += gt[44];
+ m_A28 += go[42];
+ double RHS10 = Idr[42];
+ RHS10 += Idr[43];
+ RHS10 += Idr[44];
+ RHS10 -= go[43] * *cnV[43];
+ RHS10 -= go[44] * *cnV[44];
+ m_A29 += gt[45];
+ m_A29 += gt[46];
+ m_A30 += go[45];
+ double RHS11 = Idr[45];
+ RHS11 += Idr[46];
+ RHS11 -= go[46] * *cnV[46];
+ m_A31 += gt[47];
+ m_A31 += gt[48];
+ m_A32 += go[47];
+ double RHS12 = Idr[47];
+ RHS12 += Idr[48];
+ RHS12 -= go[48] * *cnV[48];
+ m_A33 += gt[49];
+ m_A33 += gt[50];
+ m_A33 += gt[51];
+ m_A34 += go[49];
+ m_A35 += go[50];
+ double RHS13 = Idr[49];
+ RHS13 += Idr[50];
+ RHS13 += Idr[51];
+ RHS13 -= go[51] * *cnV[51];
+ m_A36 += gt[52];
+ m_A36 += gt[53];
+ m_A36 += gt[54];
+ m_A36 += gt[55];
+ m_A36 += gt[56];
+ m_A36 += gt[57];
+ m_A37 += go[52];
+ m_A39 += go[53];
+ m_A39 += go[54];
+ m_A38 += go[55];
+ double RHS14 = Idr[52];
+ RHS14 += Idr[53];
+ RHS14 += Idr[54];
+ RHS14 += Idr[55];
+ RHS14 += Idr[56];
+ RHS14 += Idr[57];
+ RHS14 -= go[56] * *cnV[56];
+ RHS14 -= go[57] * *cnV[57];
+ m_A40 += gt[58];
+ m_A40 += gt[59];
+ m_A40 += gt[60];
+ m_A40 += gt[61];
+ m_A41 += go[58];
+ double RHS15 = Idr[58];
+ RHS15 += Idr[59];
+ RHS15 += Idr[60];
+ RHS15 += Idr[61];
+ RHS15 -= go[59] * *cnV[59];
+ RHS15 -= go[60] * *cnV[60];
+ RHS15 -= go[61] * *cnV[61];
+ m_A44 += gt[62];
+ m_A44 += gt[63];
+ m_A43 += go[62];
+ m_A42 += go[63];
+ double RHS16 = Idr[62];
+ RHS16 += Idr[63];
+ m_A48 += gt[64];
+ m_A48 += gt[65];
+ m_A48 += gt[66];
+ m_A49 += go[64];
+ m_A46 += go[65];
+ double RHS17 = Idr[64];
+ RHS17 += Idr[65];
+ RHS17 += Idr[66];
+ RHS17 -= go[66] * *cnV[66];
+ m_A51 += gt[67];
+ m_A51 += gt[68];
+ m_A51 += gt[69];
+ m_A51 += gt[70];
+ m_A51 += gt[71];
+ m_A51 += gt[72];
+ m_A51 += gt[73];
+ m_A52 += go[67];
+ m_A50 += go[68];
+ double RHS18 = Idr[67];
+ RHS18 += Idr[68];
+ RHS18 += Idr[69];
+ RHS18 += Idr[70];
+ RHS18 += Idr[71];
+ RHS18 += Idr[72];
+ RHS18 += Idr[73];
+ RHS18 -= go[69] * *cnV[69];
+ RHS18 -= go[70] * *cnV[70];
+ RHS18 -= go[71] * *cnV[71];
+ RHS18 -= go[72] * *cnV[72];
+ RHS18 -= go[73] * *cnV[73];
+ m_A54 += gt[74];
+ m_A54 += gt[75];
+ m_A54 += gt[76];
+ m_A53 += go[74];
+ m_A55 += go[75];
+ double RHS19 = Idr[74];
+ RHS19 += Idr[75];
+ RHS19 += Idr[76];
+ RHS19 -= go[76] * *cnV[76];
+ m_A57 += gt[77];
+ m_A57 += gt[78];
+ m_A57 += gt[79];
+ m_A56 += go[77];
+ m_A58 += go[78];
+ double RHS20 = Idr[77];
+ RHS20 += Idr[78];
+ RHS20 += Idr[79];
+ RHS20 -= go[79] * *cnV[79];
+ m_A61 += gt[80];
+ m_A61 += gt[81];
+ m_A61 += gt[82];
+ m_A61 += gt[83];
+ m_A61 += gt[84];
+ m_A59 += go[80];
+ m_A62 += go[81];
+ m_A63 += go[82];
+ double RHS21 = Idr[80];
+ RHS21 += Idr[81];
+ RHS21 += Idr[82];
+ RHS21 += Idr[83];
+ RHS21 += Idr[84];
+ RHS21 -= go[83] * *cnV[83];
+ RHS21 -= go[84] * *cnV[84];
+ m_A66 += gt[85];
+ m_A66 += gt[86];
+ m_A66 += gt[87];
+ m_A66 += gt[88];
+ m_A66 += gt[89];
+ m_A66 += gt[90];
+ m_A66 += gt[91];
+ m_A67 += go[85];
+ m_A65 += go[86];
+ double RHS22 = Idr[85];
+ RHS22 += Idr[86];
+ RHS22 += Idr[87];
+ RHS22 += Idr[88];
+ RHS22 += Idr[89];
+ RHS22 += Idr[90];
+ RHS22 += Idr[91];
+ RHS22 -= go[87] * *cnV[87];
+ RHS22 -= go[88] * *cnV[88];
+ RHS22 -= go[89] * *cnV[89];
+ RHS22 -= go[90] * *cnV[90];
+ RHS22 -= go[91] * *cnV[91];
+ m_A70 += gt[92];
+ m_A70 += gt[93];
+ m_A70 += gt[94];
+ m_A70 += gt[95];
+ m_A70 += gt[96];
+ m_A70 += gt[97];
+ m_A70 += gt[98];
+ m_A71 += go[92];
+ m_A69 += go[93];
+ double RHS23 = Idr[92];
+ RHS23 += Idr[93];
+ RHS23 += Idr[94];
+ RHS23 += Idr[95];
+ RHS23 += Idr[96];
+ RHS23 += Idr[97];
+ RHS23 += Idr[98];
+ RHS23 -= go[94] * *cnV[94];
+ RHS23 -= go[95] * *cnV[95];
+ RHS23 -= go[96] * *cnV[96];
+ RHS23 -= go[97] * *cnV[97];
+ RHS23 -= go[98] * *cnV[98];
+ m_A77 += gt[99];
+ m_A77 += gt[100];
+ m_A77 += gt[101];
+ m_A77 += gt[102];
+ m_A77 += gt[103];
+ m_A74 += go[99];
+ m_A73 += go[100];
+ m_A75 += go[101];
+ double RHS24 = Idr[99];
+ RHS24 += Idr[100];
+ RHS24 += Idr[101];
+ RHS24 += Idr[102];
+ RHS24 += Idr[103];
+ RHS24 -= go[102] * *cnV[102];
+ RHS24 -= go[103] * *cnV[103];
+ m_A81 += gt[104];
+ m_A81 += gt[105];
+ m_A81 += gt[106];
+ m_A83 += go[104];
+ m_A80 += go[105];
+ m_A82 += go[106];
+ double RHS25 = Idr[104];
+ RHS25 += Idr[105];
+ RHS25 += Idr[106];
+ m_A88 += gt[107];
+ m_A88 += gt[108];
+ m_A88 += gt[109];
+ m_A88 += gt[110];
+ m_A88 += gt[111];
+ m_A85 += go[107];
+ m_A85 += go[108];
+ m_A89 += go[109];
+ m_A84 += go[110];
+ m_A90 += go[111];
+ double RHS26 = Idr[107];
+ RHS26 += Idr[108];
+ RHS26 += Idr[109];
+ RHS26 += Idr[110];
+ RHS26 += Idr[111];
+ m_A95 += gt[112];
+ m_A95 += gt[113];
+ m_A95 += gt[114];
+ m_A92 += go[112];
+ m_A91 += go[113];
+ m_A93 += go[114];
+ double RHS27 = Idr[112];
+ RHS27 += Idr[113];
+ RHS27 += Idr[114];
+ m_A104 += gt[115];
+ m_A104 += gt[116];
+ m_A104 += gt[117];
+ m_A104 += gt[118];
+ m_A100 += go[115];
+ m_A101 += go[116];
+ m_A99 += go[117];
+ m_A106 += go[118];
+ double RHS28 = Idr[115];
+ RHS28 += Idr[116];
+ RHS28 += Idr[117];
+ RHS28 += Idr[118];
+ m_A112 += gt[119];
+ m_A112 += gt[120];
+ m_A112 += gt[121];
+ m_A112 += gt[122];
+ m_A109 += go[119];
+ m_A108 += go[120];
+ m_A107 += go[121];
+ m_A113 += go[122];
+ double RHS29 = Idr[119];
+ RHS29 += Idr[120];
+ RHS29 += Idr[121];
+ RHS29 += Idr[122];
+ m_A117 += gt[123];
+ m_A117 += gt[124];
+ m_A117 += gt[125];
+ m_A117 += gt[126];
+ m_A117 += gt[127];
+ m_A114 += go[123];
+ m_A116 += go[124];
+ m_A115 += go[125];
+ double RHS30 = Idr[123];
+ RHS30 += Idr[124];
+ RHS30 += Idr[125];
+ RHS30 += Idr[126];
+ RHS30 += Idr[127];
+ RHS30 -= go[126] * *cnV[126];
+ RHS30 -= go[127] * *cnV[127];
+ m_A121 += gt[128];
+ m_A121 += gt[129];
+ m_A121 += gt[130];
+ m_A119 += go[128];
+ m_A120 += go[129];
+ double RHS31 = Idr[128];
+ RHS31 += Idr[129];
+ RHS31 += Idr[130];
+ RHS31 -= go[130] * *cnV[130];
+ m_A133 += gt[131];
+ m_A133 += gt[132];
+ m_A133 += gt[133];
+ m_A133 += gt[134];
+ m_A133 += gt[135];
+ m_A133 += gt[136];
+ m_A133 += gt[137];
+ m_A133 += gt[138];
+ m_A133 += gt[139];
+ m_A133 += gt[140];
+ m_A126 += go[131];
+ m_A128 += go[132];
+ m_A125 += go[133];
+ m_A129 += go[134];
+ m_A124 += go[135];
+ m_A130 += go[136];
+ m_A123 += go[137];
+ m_A127 += go[138];
+ double RHS32 = Idr[131];
+ RHS32 += Idr[132];
+ RHS32 += Idr[133];
+ RHS32 += Idr[134];
+ RHS32 += Idr[135];
+ RHS32 += Idr[136];
+ RHS32 += Idr[137];
+ RHS32 += Idr[138];
+ RHS32 += Idr[139];
+ RHS32 += Idr[140];
+ RHS32 -= go[139] * *cnV[139];
+ RHS32 -= go[140] * *cnV[140];
+ const double f0 = 1.0 / m_A0;
+ const double f0_16 = -f0 * m_A42;
+ m_A44 += m_A1 * f0_16;
+ RHS16 += f0_16 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_16 = -f1 * m_A43;
+ m_A44 += m_A3 * f1_16;
+ m_A45 += m_A4 * f1_16;
+ RHS16 += f1_16 * RHS1;
+ const double f1_17 = -f1 * m_A46;
+ m_A47 += m_A3 * f1_17;
+ m_A48 += m_A4 * f1_17;
+ RHS17 += f1_17 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_30 = -f2 * m_A114;
+ m_A115 += m_A6 * f2_30;
+ m_A117 += m_A7 * f2_30;
+ RHS30 += f2_30 * RHS2;
+ const double f3 = 1.0 / m_A8;
+ const double f3_18 = -f3 * m_A50;
+ m_A52 += m_A9 * f3_18;
+ RHS18 += f3_18 * RHS3;
+ const double f3_25 = -f3 * m_A80;
+ m_A81 += m_A9 * f3_25;
+ RHS25 += f3_25 * RHS3;
+ const double f4 = 1.0 / m_A10;
+ const double f4_19 = -f4 * m_A53;
+ m_A54 += m_A11 * f4_19;
+ RHS19 += f4_19 * RHS4;
+ const double f5 = 1.0 / m_A12;
+ const double f5_21 = -f5 * m_A59;
+ m_A60 += m_A13 * f5_21;
+ m_A63 += m_A14 * f5_21;
+ RHS21 += f5_21 * RHS5;
+ const double f6 = 1.0 / m_A15;
+ const double f6_21 = -f6 * m_A60;
+ m_A63 += m_A16 * f6_21;
+ m_A64 += m_A17 * f6_21;
+ RHS21 += f6_21 * RHS6;
+ const double f6_29 = -f6 * m_A107;
+ m_A112 += m_A16 * f6_29;
+ m_A113 += m_A17 * f6_29;
+ RHS29 += f6_29 * RHS6;
+ const double f6_32 = -f6 * m_A123;
+ m_A130 += m_A16 * f6_32;
+ m_A133 += m_A17 * f6_32;
+ RHS32 += f6_32 * RHS6;
+ const double f7 = 1.0 / m_A18;
+ const double f7_20 = -f7 * m_A56;
+ m_A57 += m_A19 * f7_20;
+ RHS20 += f7_20 * RHS7;
+ const double f8 = 1.0 / m_A20;
+ const double f8_22 = -f8 * m_A65;
+ m_A67 += m_A21 * f8_22;
+ m_A68 += m_A22 * f8_22;
+ RHS22 += f8_22 * RHS8;
+ const double f8_28 = -f8 * m_A99;
+ m_A104 += m_A21 * f8_28;
+ m_A106 += m_A22 * f8_28;
+ RHS28 += f8_28 * RHS8;
+ const double f8_32 = -f8 * m_A124;
+ m_A129 += m_A21 * f8_32;
+ m_A133 += m_A22 * f8_32;
+ RHS32 += f8_32 * RHS8;
+ const double f9 = 1.0 / m_A23;
+ const double f9_27 = -f9 * m_A91;
+ m_A94 += m_A24 * f9_27;
+ m_A95 += m_A25 * f9_27;
+ m_A96 += m_A26 * f9_27;
+ RHS27 += f9_27 * RHS9;
+ const double f9_28 = -f9 * m_A100;
+ m_A102 += m_A24 * f9_28;
+ m_A103 += m_A25 * f9_28;
+ m_A104 += m_A26 * f9_28;
+ RHS28 += f9_28 * RHS9;
+ const double f10 = 1.0 / m_A27;
+ const double f10_27 = -f10 * m_A92;
+ m_A95 += m_A28 * f10_27;
+ RHS27 += f10_27 * RHS10;
+ const double f11 = 1.0 / m_A29;
+ const double f11_24 = -f11 * m_A73;
+ m_A77 += m_A30 * f11_24;
+ RHS24 += f11_24 * RHS11;
+ const double f12 = 1.0 / m_A31;
+ const double f12_24 = -f12 * m_A74;
+ m_A77 += m_A32 * f12_24;
+ RHS24 += f12_24 * RHS12;
+ const double f13 = 1.0 / m_A33;
+ const double f13_23 = -f13 * m_A69;
+ m_A71 += m_A34 * f13_23;
+ m_A72 += m_A35 * f13_23;
+ RHS23 += f13_23 * RHS13;
+ const double f13_26 = -f13 * m_A84;
+ m_A88 += m_A34 * f13_26;
+ m_A90 += m_A35 * f13_26;
+ RHS26 += f13_26 * RHS13;
+ const double f13_32 = -f13 * m_A125;
+ m_A128 += m_A34 * f13_32;
+ m_A133 += m_A35 * f13_32;
+ RHS32 += f13_32 * RHS13;
+ const double f14 = 1.0 / m_A36;
+ const double f14_24 = -f14 * m_A75;
+ m_A76 += m_A37 * f14_24;
+ m_A77 += m_A38 * f14_24;
+ m_A78 += m_A39 * f14_24;
+ RHS24 += f14_24 * RHS14;
+ const double f14_26 = -f14 * m_A85;
+ m_A86 += m_A37 * f14_26;
+ m_A87 += m_A38 * f14_26;
+ m_A88 += m_A39 * f14_26;
+ RHS26 += f14_26 * RHS14;
+ const double f15 = 1.0 / m_A40;
+ const double f15_31 = -f15 * m_A119;
+ m_A121 += m_A41 * f15_31;
+ RHS31 += f15_31 * RHS15;
+ const double f16 = 1.0 / m_A44;
+ const double f16_17 = -f16 * m_A47;
+ m_A48 += m_A45 * f16_17;
+ RHS17 += f16_17 * RHS16;
+ const double f17 = 1.0 / m_A48;
+ const double f17_30 = -f17 * m_A115;
+ m_A117 += m_A49 * f17_30;
+ RHS30 += f17_30 * RHS17;
+ const double f18 = 1.0 / m_A51;
+ const double f18_32 = -f18 * m_A126;
+ m_A127 += m_A52 * f18_32;
+ RHS32 += f18_32 * RHS18;
+ const double f19 = 1.0 / m_A54;
+ const double f19_29 = -f19 * m_A108;
+ m_A112 += m_A55 * f19_29;
+ RHS29 += f19_29 * RHS19;
+ const double f20 = 1.0 / m_A57;
+ const double f20_28 = -f20 * m_A101;
+ m_A104 += m_A58 * f20_28;
+ RHS28 += f20_28 * RHS20;
+ const double f21 = 1.0 / m_A61;
+ const double f21_27 = -f21 * m_A93;
+ m_A95 += m_A62 * f21_27;
+ m_A97 += m_A63 * f21_27;
+ m_A98 += m_A64 * f21_27;
+ RHS27 += f21_27 * RHS21;
+ const double f21_29 = -f21 * m_A109;
+ m_A110 += m_A62 * f21_29;
+ m_A112 += m_A63 * f21_29;
+ m_A113 += m_A64 * f21_29;
+ RHS29 += f21_29 * RHS21;
+ const double f22 = 1.0 / m_A66;
+ const double f22_27 = -f22 * m_A94;
+ m_A96 += m_A67 * f22_27;
+ m_A98 += m_A68 * f22_27;
+ RHS27 += f22_27 * RHS22;
+ const double f22_28 = -f22 * m_A102;
+ m_A104 += m_A67 * f22_28;
+ m_A106 += m_A68 * f22_28;
+ RHS28 += f22_28 * RHS22;
+ const double f23 = 1.0 / m_A70;
+ const double f23_24 = -f23 * m_A76;
+ m_A78 += m_A71 * f23_24;
+ m_A79 += m_A72 * f23_24;
+ RHS24 += f23_24 * RHS23;
+ const double f23_26 = -f23 * m_A86;
+ m_A88 += m_A71 * f23_26;
+ m_A90 += m_A72 * f23_26;
+ RHS26 += f23_26 * RHS23;
+ const double f24 = 1.0 / m_A77;
+ const double f24_26 = -f24 * m_A87;
+ m_A88 += m_A78 * f24_26;
+ m_A90 += m_A79 * f24_26;
+ RHS26 += f24_26 * RHS24;
+ const double f25 = 1.0 / m_A81;
+ const double f25_30 = -f25 * m_A116;
+ m_A117 += m_A82 * f25_30;
+ m_A118 += m_A83 * f25_30;
+ RHS30 += f25_30 * RHS25;
+ const double f25_32 = -f25 * m_A127;
+ m_A131 += m_A82 * f25_32;
+ m_A133 += m_A83 * f25_32;
+ RHS32 += f25_32 * RHS25;
+ const double f26 = 1.0 / m_A88;
+ const double f26_31 = -f26 * m_A120;
+ m_A121 += m_A89 * f26_31;
+ m_A122 += m_A90 * f26_31;
+ RHS31 += f26_31 * RHS26;
+ const double f26_32 = -f26 * m_A128;
+ m_A132 += m_A89 * f26_32;
+ m_A133 += m_A90 * f26_32;
+ RHS32 += f26_32 * RHS26;
+ const double f27 = 1.0 / m_A95;
+ const double f27_28 = -f27 * m_A103;
+ m_A104 += m_A96 * f27_28;
+ m_A105 += m_A97 * f27_28;
+ m_A106 += m_A98 * f27_28;
+ RHS28 += f27_28 * RHS27;
+ const double f27_29 = -f27 * m_A110;
+ m_A111 += m_A96 * f27_29;
+ m_A112 += m_A97 * f27_29;
+ m_A113 += m_A98 * f27_29;
+ RHS29 += f27_29 * RHS27;
+ const double f28 = 1.0 / m_A104;
+ const double f28_29 = -f28 * m_A111;
+ m_A112 += m_A105 * f28_29;
+ m_A113 += m_A106 * f28_29;
+ RHS29 += f28_29 * RHS28;
+ const double f28_32 = -f28 * m_A129;
+ m_A130 += m_A105 * f28_32;
+ m_A133 += m_A106 * f28_32;
+ RHS32 += f28_32 * RHS28;
+ const double f29 = 1.0 / m_A112;
+ const double f29_32 = -f29 * m_A130;
+ m_A133 += m_A113 * f29_32;
+ RHS32 += f29_32 * RHS29;
+ const double f30 = 1.0 / m_A117;
+ const double f30_32 = -f30 * m_A131;
+ m_A133 += m_A118 * f30_32;
+ RHS32 += f30_32 * RHS30;
+ const double f31 = 1.0 / m_A121;
+ const double f31_32 = -f31 * m_A132;
+ m_A133 += m_A122 * f31_32;
+ RHS32 += f31_32 * RHS31;
+ V[32] = RHS32 / m_A133;
+ double tmp31 = 0.0;
+ tmp31 += m_A122 * V[32];
+ V[31] = (RHS31 - tmp31) / m_A121;
+ double tmp30 = 0.0;
+ tmp30 += m_A118 * V[32];
+ V[30] = (RHS30 - tmp30) / m_A117;
+ double tmp29 = 0.0;
+ tmp29 += m_A113 * V[32];
+ V[29] = (RHS29 - tmp29) / m_A112;
+ double tmp28 = 0.0;
+ tmp28 += m_A105 * V[29];
+ tmp28 += m_A106 * V[32];
+ V[28] = (RHS28 - tmp28) / m_A104;
+ double tmp27 = 0.0;
+ tmp27 += m_A96 * V[28];
+ tmp27 += m_A97 * V[29];
+ tmp27 += m_A98 * V[32];
+ V[27] = (RHS27 - tmp27) / m_A95;
+ double tmp26 = 0.0;
+ tmp26 += m_A89 * V[31];
+ tmp26 += m_A90 * V[32];
+ V[26] = (RHS26 - tmp26) / m_A88;
+ double tmp25 = 0.0;
+ tmp25 += m_A82 * V[30];
+ tmp25 += m_A83 * V[32];
+ V[25] = (RHS25 - tmp25) / m_A81;
+ double tmp24 = 0.0;
+ tmp24 += m_A78 * V[26];
+ tmp24 += m_A79 * V[32];
+ V[24] = (RHS24 - tmp24) / m_A77;
+ double tmp23 = 0.0;
+ tmp23 += m_A71 * V[26];
+ tmp23 += m_A72 * V[32];
+ V[23] = (RHS23 - tmp23) / m_A70;
+ double tmp22 = 0.0;
+ tmp22 += m_A67 * V[28];
+ tmp22 += m_A68 * V[32];
+ V[22] = (RHS22 - tmp22) / m_A66;
+ double tmp21 = 0.0;
+ tmp21 += m_A62 * V[27];
+ tmp21 += m_A63 * V[29];
+ tmp21 += m_A64 * V[32];
+ V[21] = (RHS21 - tmp21) / m_A61;
+ double tmp20 = 0.0;
+ tmp20 += m_A58 * V[28];
+ V[20] = (RHS20 - tmp20) / m_A57;
+ double tmp19 = 0.0;
+ tmp19 += m_A55 * V[29];
+ V[19] = (RHS19 - tmp19) / m_A54;
+ double tmp18 = 0.0;
+ tmp18 += m_A52 * V[25];
+ V[18] = (RHS18 - tmp18) / m_A51;
+ double tmp17 = 0.0;
+ tmp17 += m_A49 * V[30];
+ V[17] = (RHS17 - tmp17) / m_A48;
+ double tmp16 = 0.0;
+ tmp16 += m_A45 * V[17];
+ V[16] = (RHS16 - tmp16) / m_A44;
+ double tmp15 = 0.0;
+ tmp15 += m_A41 * V[31];
+ V[15] = (RHS15 - tmp15) / m_A40;
+ double tmp14 = 0.0;
+ tmp14 += m_A37 * V[23];
+ tmp14 += m_A38 * V[24];
+ tmp14 += m_A39 * V[26];
+ V[14] = (RHS14 - tmp14) / m_A36;
+ double tmp13 = 0.0;
+ tmp13 += m_A34 * V[26];
+ tmp13 += m_A35 * V[32];
+ V[13] = (RHS13 - tmp13) / m_A33;
+ double tmp12 = 0.0;
+ tmp12 += m_A32 * V[24];
+ V[12] = (RHS12 - tmp12) / m_A31;
+ double tmp11 = 0.0;
+ tmp11 += m_A30 * V[24];
+ V[11] = (RHS11 - tmp11) / m_A29;
+ double tmp10 = 0.0;
+ tmp10 += m_A28 * V[27];
+ V[10] = (RHS10 - tmp10) / m_A27;
+ double tmp9 = 0.0;
+ tmp9 += m_A24 * V[22];
+ tmp9 += m_A25 * V[27];
+ tmp9 += m_A26 * V[28];
+ V[9] = (RHS9 - tmp9) / m_A23;
+ double tmp8 = 0.0;
+ tmp8 += m_A21 * V[28];
+ tmp8 += m_A22 * V[32];
+ V[8] = (RHS8 - tmp8) / m_A20;
+ double tmp7 = 0.0;
+ tmp7 += m_A19 * V[20];
+ V[7] = (RHS7 - tmp7) / m_A18;
+ double tmp6 = 0.0;
+ tmp6 += m_A16 * V[29];
+ tmp6 += m_A17 * V[32];
+ V[6] = (RHS6 - tmp6) / m_A15;
+ double tmp5 = 0.0;
+ tmp5 += m_A13 * V[6];
+ tmp5 += m_A14 * V[29];
+ V[5] = (RHS5 - tmp5) / m_A12;
+ double tmp4 = 0.0;
+ tmp4 += m_A11 * V[19];
+ V[4] = (RHS4 - tmp4) / m_A10;
+ double tmp3 = 0.0;
+ tmp3 += m_A9 * V[25];
+ V[3] = (RHS3 - tmp3) / m_A8;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[17];
+ tmp2 += m_A7 * V[30];
+ V[2] = (RHS2 - tmp2) / m_A5;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[16];
+ tmp1 += m_A4 * V[17];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[16];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// fireone
static void nl_gcr_c1d22fe6e895255d_79_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -50037,6 +56744,153 @@ static void nl_gcr_c4cec7aed23b7b94_23_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_c5b523ed6a9677e6_21_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 -= go[1] * *cnV[1];
+ m_A2 += gt[2];
+ m_A2 += gt[3];
+ m_A4 += go[2];
+ m_A3 += go[3];
+ double RHS1 = Idr[2];
+ RHS1 += Idr[3];
+ m_A5 += gt[4];
+ m_A5 += gt[5];
+ m_A5 += gt[6];
+ m_A5 += gt[7];
+ m_A5 += gt[8];
+ m_A5 += gt[9];
+ m_A5 += gt[10];
+ m_A6 += go[4];
+ double RHS2 = Idr[4];
+ RHS2 += Idr[5];
+ RHS2 += Idr[6];
+ RHS2 += Idr[7];
+ RHS2 += Idr[8];
+ RHS2 += Idr[9];
+ RHS2 += Idr[10];
+ RHS2 -= go[5] * *cnV[5];
+ RHS2 -= go[6] * *cnV[6];
+ RHS2 -= go[7] * *cnV[7];
+ RHS2 -= go[8] * *cnV[8];
+ RHS2 -= go[9] * *cnV[9];
+ RHS2 -= go[10] * *cnV[10];
+ m_A7 += gt[11];
+ m_A8 += go[11];
+ double RHS3 = Idr[11];
+ m_A11 += gt[12];
+ m_A11 += gt[13];
+ m_A11 += gt[14];
+ m_A10 += go[12];
+ m_A9 += go[13];
+ double RHS4 = Idr[12];
+ RHS4 += Idr[13];
+ RHS4 += Idr[14];
+ RHS4 -= go[14] * *cnV[14];
+ m_A15 += gt[15];
+ m_A15 += gt[16];
+ m_A15 += gt[17];
+ m_A16 += go[15];
+ m_A13 += go[16];
+ double RHS5 = Idr[15];
+ RHS5 += Idr[16];
+ RHS5 += Idr[17];
+ RHS5 -= go[17] * *cnV[17];
+ m_A20 += gt[18];
+ m_A20 += gt[19];
+ m_A20 += gt[20];
+ m_A20 += gt[21];
+ m_A20 += gt[22];
+ m_A17 += go[18];
+ m_A18 += go[19];
+ m_A19 += go[20];
+ double RHS6 = Idr[18];
+ RHS6 += Idr[19];
+ RHS6 += Idr[20];
+ RHS6 += Idr[21];
+ RHS6 += Idr[22];
+ RHS6 -= go[21] * *cnV[21];
+ RHS6 -= go[22] * *cnV[22];
+ const double f0 = 1.0 / m_A0;
+ const double f0_4 = -f0 * m_A9;
+ m_A11 += m_A1 * f0_4;
+ RHS4 += f0_4 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_4 = -f1 * m_A10;
+ m_A11 += m_A3 * f1_4;
+ m_A12 += m_A4 * f1_4;
+ RHS4 += f1_4 * RHS1;
+ const double f1_5 = -f1 * m_A13;
+ m_A14 += m_A3 * f1_5;
+ m_A15 += m_A4 * f1_5;
+ RHS5 += f1_5 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_6 = -f2 * m_A17;
+ m_A19 += m_A6 * f2_6;
+ RHS6 += f2_6 * RHS2;
+ const double f3 = 1.0 / m_A7;
+ const double f3_6 = -f3 * m_A18;
+ m_A20 += m_A8 * f3_6;
+ RHS6 += f3_6 * RHS3;
+ const double f4 = 1.0 / m_A11;
+ const double f4_5 = -f4 * m_A14;
+ m_A15 += m_A12 * f4_5;
+ RHS5 += f4_5 * RHS4;
+ const double f5 = 1.0 / m_A15;
+ const double f5_6 = -f5 * m_A19;
+ m_A20 += m_A16 * f5_6;
+ RHS6 += f5_6 * RHS5;
+ V[6] = RHS6 / m_A20;
+ double tmp5 = 0.0;
+ tmp5 += m_A16 * V[6];
+ V[5] = (RHS5 - tmp5) / m_A15;
+ double tmp4 = 0.0;
+ tmp4 += m_A12 * V[5];
+ V[4] = (RHS4 - tmp4) / m_A11;
+ double tmp3 = 0.0;
+ tmp3 += m_A8 * V[6];
+ V[3] = (RHS3 - tmp3) / m_A7;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[5];
+ V[2] = (RHS2 - tmp2) / m_A5;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[4];
+ tmp1 += m_A4 * V[5];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[4];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// segausb
static void nl_gcr_c61e08cf5e35918_84_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -50975,6 +57829,2216 @@ static void nl_gcr_c74b1a65978d7121_7_double_double(double * __restrict V, const
V[0] = (RHS0 - tmp0) / m_A0;
}
+// headon
+static void nl_gcr_c90daff82be2d052_350_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ double m_A75(0.0);
+ double m_A76(0.0);
+ double m_A77(0.0);
+ double m_A78(0.0);
+ double m_A79(0.0);
+ double m_A80(0.0);
+ double m_A81(0.0);
+ double m_A82(0.0);
+ double m_A83(0.0);
+ double m_A84(0.0);
+ double m_A85(0.0);
+ double m_A86(0.0);
+ double m_A87(0.0);
+ double m_A88(0.0);
+ double m_A89(0.0);
+ double m_A90(0.0);
+ double m_A91(0.0);
+ double m_A92(0.0);
+ double m_A93(0.0);
+ double m_A94(0.0);
+ double m_A95(0.0);
+ double m_A96(0.0);
+ double m_A97(0.0);
+ double m_A98(0.0);
+ double m_A99(0.0);
+ double m_A100(0.0);
+ double m_A101(0.0);
+ double m_A102(0.0);
+ double m_A103(0.0);
+ double m_A104(0.0);
+ double m_A105(0.0);
+ double m_A106(0.0);
+ double m_A107(0.0);
+ double m_A108(0.0);
+ double m_A109(0.0);
+ double m_A110(0.0);
+ double m_A111(0.0);
+ double m_A112(0.0);
+ double m_A113(0.0);
+ double m_A114(0.0);
+ double m_A115(0.0);
+ double m_A116(0.0);
+ double m_A117(0.0);
+ double m_A118(0.0);
+ double m_A119(0.0);
+ double m_A120(0.0);
+ double m_A121(0.0);
+ double m_A122(0.0);
+ double m_A123(0.0);
+ double m_A124(0.0);
+ double m_A125(0.0);
+ double m_A126(0.0);
+ double m_A127(0.0);
+ double m_A128(0.0);
+ double m_A129(0.0);
+ double m_A130(0.0);
+ double m_A131(0.0);
+ double m_A132(0.0);
+ double m_A133(0.0);
+ double m_A134(0.0);
+ double m_A135(0.0);
+ double m_A136(0.0);
+ double m_A137(0.0);
+ double m_A138(0.0);
+ double m_A139(0.0);
+ double m_A140(0.0);
+ double m_A141(0.0);
+ double m_A142(0.0);
+ double m_A143(0.0);
+ double m_A144(0.0);
+ double m_A145(0.0);
+ double m_A146(0.0);
+ double m_A147(0.0);
+ double m_A148(0.0);
+ double m_A149(0.0);
+ double m_A150(0.0);
+ double m_A151(0.0);
+ double m_A152(0.0);
+ double m_A153(0.0);
+ double m_A154(0.0);
+ double m_A155(0.0);
+ double m_A156(0.0);
+ double m_A157(0.0);
+ double m_A158(0.0);
+ double m_A159(0.0);
+ double m_A160(0.0);
+ double m_A161(0.0);
+ double m_A162(0.0);
+ double m_A163(0.0);
+ double m_A164(0.0);
+ double m_A165(0.0);
+ double m_A166(0.0);
+ double m_A167(0.0);
+ double m_A168(0.0);
+ double m_A169(0.0);
+ double m_A170(0.0);
+ double m_A171(0.0);
+ double m_A172(0.0);
+ double m_A173(0.0);
+ double m_A174(0.0);
+ double m_A175(0.0);
+ double m_A176(0.0);
+ double m_A177(0.0);
+ double m_A178(0.0);
+ double m_A179(0.0);
+ double m_A180(0.0);
+ double m_A181(0.0);
+ double m_A182(0.0);
+ double m_A183(0.0);
+ double m_A184(0.0);
+ double m_A185(0.0);
+ double m_A186(0.0);
+ double m_A187(0.0);
+ double m_A188(0.0);
+ double m_A189(0.0);
+ double m_A190(0.0);
+ double m_A191(0.0);
+ double m_A192(0.0);
+ double m_A193(0.0);
+ double m_A194(0.0);
+ double m_A195(0.0);
+ double m_A196(0.0);
+ double m_A197(0.0);
+ double m_A198(0.0);
+ double m_A199(0.0);
+ double m_A200(0.0);
+ double m_A201(0.0);
+ double m_A202(0.0);
+ double m_A203(0.0);
+ double m_A204(0.0);
+ double m_A205(0.0);
+ double m_A206(0.0);
+ double m_A207(0.0);
+ double m_A208(0.0);
+ double m_A209(0.0);
+ double m_A210(0.0);
+ double m_A211(0.0);
+ double m_A212(0.0);
+ double m_A213(0.0);
+ double m_A214(0.0);
+ double m_A215(0.0);
+ double m_A216(0.0);
+ double m_A217(0.0);
+ double m_A218(0.0);
+ double m_A219(0.0);
+ double m_A220(0.0);
+ double m_A221(0.0);
+ double m_A222(0.0);
+ double m_A223(0.0);
+ double m_A224(0.0);
+ double m_A225(0.0);
+ double m_A226(0.0);
+ double m_A227(0.0);
+ double m_A228(0.0);
+ double m_A229(0.0);
+ double m_A230(0.0);
+ double m_A231(0.0);
+ double m_A232(0.0);
+ double m_A233(0.0);
+ double m_A234(0.0);
+ double m_A235(0.0);
+ double m_A236(0.0);
+ double m_A237(0.0);
+ double m_A238(0.0);
+ double m_A239(0.0);
+ double m_A240(0.0);
+ double m_A241(0.0);
+ double m_A242(0.0);
+ double m_A243(0.0);
+ double m_A244(0.0);
+ double m_A245(0.0);
+ double m_A246(0.0);
+ double m_A247(0.0);
+ double m_A248(0.0);
+ double m_A249(0.0);
+ double m_A250(0.0);
+ double m_A251(0.0);
+ double m_A252(0.0);
+ double m_A253(0.0);
+ double m_A254(0.0);
+ double m_A255(0.0);
+ double m_A256(0.0);
+ double m_A257(0.0);
+ double m_A258(0.0);
+ double m_A259(0.0);
+ double m_A260(0.0);
+ double m_A261(0.0);
+ double m_A262(0.0);
+ double m_A263(0.0);
+ double m_A264(0.0);
+ double m_A265(0.0);
+ double m_A266(0.0);
+ double m_A267(0.0);
+ double m_A268(0.0);
+ double m_A269(0.0);
+ double m_A270(0.0);
+ double m_A271(0.0);
+ double m_A272(0.0);
+ double m_A273(0.0);
+ double m_A274(0.0);
+ double m_A275(0.0);
+ double m_A276(0.0);
+ double m_A277(0.0);
+ double m_A278(0.0);
+ double m_A279(0.0);
+ double m_A280(0.0);
+ double m_A281(0.0);
+ double m_A282(0.0);
+ double m_A283(0.0);
+ double m_A284(0.0);
+ double m_A285(0.0);
+ double m_A286(0.0);
+ double m_A287(0.0);
+ double m_A288(0.0);
+ double m_A289(0.0);
+ double m_A290(0.0);
+ double m_A291(0.0);
+ double m_A292(0.0);
+ double m_A293(0.0);
+ double m_A294(0.0);
+ double m_A295(0.0);
+ double m_A296(0.0);
+ double m_A297(0.0);
+ double m_A298(0.0);
+ double m_A299(0.0);
+ double m_A300(0.0);
+ double m_A301(0.0);
+ double m_A302(0.0);
+ double m_A303(0.0);
+ double m_A304(0.0);
+ double m_A305(0.0);
+ double m_A306(0.0);
+ double m_A307(0.0);
+ double m_A308(0.0);
+ double m_A309(0.0);
+ double m_A310(0.0);
+ double m_A311(0.0);
+ double m_A312(0.0);
+ double m_A313(0.0);
+ double m_A314(0.0);
+ double m_A315(0.0);
+ double m_A316(0.0);
+ double m_A317(0.0);
+ double m_A318(0.0);
+ double m_A319(0.0);
+ double m_A320(0.0);
+ double m_A321(0.0);
+ double m_A322(0.0);
+ double m_A323(0.0);
+ double m_A324(0.0);
+ double m_A325(0.0);
+ double m_A326(0.0);
+ double m_A327(0.0);
+ double m_A328(0.0);
+ double m_A329(0.0);
+ double m_A330(0.0);
+ double m_A331(0.0);
+ double m_A332(0.0);
+ double m_A333(0.0);
+ double m_A334(0.0);
+ double m_A335(0.0);
+ double m_A336(0.0);
+ double m_A337(0.0);
+ double m_A338(0.0);
+ double m_A339(0.0);
+ double m_A340(0.0);
+ double m_A341(0.0);
+ double m_A342(0.0);
+ double m_A343(0.0);
+ double m_A344(0.0);
+ double m_A345(0.0);
+ double m_A346(0.0);
+ double m_A347(0.0);
+ double m_A348(0.0);
+ double m_A349(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A3 += go[3];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 -= go[4] * *cnV[4];
+ m_A4 += gt[5];
+ m_A4 += gt[6];
+ m_A4 += gt[7];
+ m_A4 += gt[8];
+ m_A6 += go[5];
+ m_A5 += go[6];
+ m_A5 += go[7];
+ double RHS2 = Idr[5];
+ RHS2 += Idr[6];
+ RHS2 += Idr[7];
+ RHS2 += Idr[8];
+ RHS2 -= go[8] * *cnV[8];
+ m_A7 += gt[9];
+ m_A7 += gt[10];
+ m_A8 += go[9];
+ double RHS3 = Idr[9];
+ RHS3 += Idr[10];
+ RHS3 -= go[10] * *cnV[10];
+ m_A9 += gt[11];
+ m_A9 += gt[12];
+ m_A9 += gt[13];
+ m_A10 += go[11];
+ m_A11 += go[12];
+ double RHS4 = Idr[11];
+ RHS4 += Idr[12];
+ RHS4 += Idr[13];
+ RHS4 -= go[13] * *cnV[13];
+ m_A12 += gt[14];
+ m_A12 += gt[15];
+ m_A13 += go[14];
+ double RHS5 = Idr[14];
+ RHS5 += Idr[15];
+ RHS5 -= go[15] * *cnV[15];
+ m_A14 += gt[16];
+ m_A14 += gt[17];
+ m_A15 += go[16];
+ double RHS6 = Idr[16];
+ RHS6 += Idr[17];
+ RHS6 -= go[17] * *cnV[17];
+ m_A16 += gt[18];
+ m_A16 += gt[19];
+ m_A17 += go[18];
+ double RHS7 = Idr[18];
+ RHS7 += Idr[19];
+ RHS7 -= go[19] * *cnV[19];
+ m_A18 += gt[20];
+ m_A18 += gt[21];
+ m_A19 += go[20];
+ double RHS8 = Idr[20];
+ RHS8 += Idr[21];
+ RHS8 -= go[21] * *cnV[21];
+ m_A20 += gt[22];
+ m_A20 += gt[23];
+ m_A20 += gt[24];
+ m_A20 += gt[25];
+ m_A21 += go[22];
+ m_A22 += go[23];
+ m_A23 += go[24];
+ double RHS9 = Idr[22];
+ RHS9 += Idr[23];
+ RHS9 += Idr[24];
+ RHS9 += Idr[25];
+ RHS9 -= go[25] * *cnV[25];
+ m_A24 += gt[26];
+ m_A24 += gt[27];
+ m_A24 += gt[28];
+ m_A24 += gt[29];
+ m_A24 += gt[30];
+ m_A25 += go[26];
+ m_A27 += go[27];
+ m_A26 += go[28];
+ double RHS10 = Idr[26];
+ RHS10 += Idr[27];
+ RHS10 += Idr[28];
+ RHS10 += Idr[29];
+ RHS10 += Idr[30];
+ RHS10 -= go[29] * *cnV[29];
+ RHS10 -= go[30] * *cnV[30];
+ m_A28 += gt[31];
+ m_A28 += gt[32];
+ m_A28 += gt[33];
+ m_A28 += gt[34];
+ m_A28 += gt[35];
+ m_A28 += gt[36];
+ m_A28 += gt[37];
+ m_A29 += go[31];
+ m_A30 += go[32];
+ double RHS11 = Idr[31];
+ RHS11 += Idr[32];
+ RHS11 += Idr[33];
+ RHS11 += Idr[34];
+ RHS11 += Idr[35];
+ RHS11 += Idr[36];
+ RHS11 += Idr[37];
+ RHS11 -= go[33] * *cnV[33];
+ RHS11 -= go[34] * *cnV[34];
+ RHS11 -= go[35] * *cnV[35];
+ RHS11 -= go[36] * *cnV[36];
+ RHS11 -= go[37] * *cnV[37];
+ m_A31 += gt[38];
+ m_A31 += gt[39];
+ m_A31 += gt[40];
+ m_A31 += gt[41];
+ m_A33 += go[38];
+ m_A34 += go[39];
+ m_A32 += go[40];
+ double RHS12 = Idr[38];
+ RHS12 += Idr[39];
+ RHS12 += Idr[40];
+ RHS12 += Idr[41];
+ RHS12 -= go[41] * *cnV[41];
+ m_A35 += gt[42];
+ m_A35 += gt[43];
+ m_A35 += gt[44];
+ m_A37 += go[42];
+ m_A36 += go[43];
+ double RHS13 = Idr[42];
+ RHS13 += Idr[43];
+ RHS13 += Idr[44];
+ RHS13 -= go[44] * *cnV[44];
+ m_A38 += gt[45];
+ m_A38 += gt[46];
+ m_A38 += gt[47];
+ m_A38 += gt[48];
+ m_A38 += gt[49];
+ m_A38 += gt[50];
+ m_A38 += gt[51];
+ m_A39 += go[45];
+ double RHS14 = Idr[45];
+ RHS14 += Idr[46];
+ RHS14 += Idr[47];
+ RHS14 += Idr[48];
+ RHS14 += Idr[49];
+ RHS14 += Idr[50];
+ RHS14 += Idr[51];
+ RHS14 -= go[46] * *cnV[46];
+ RHS14 -= go[47] * *cnV[47];
+ RHS14 -= go[48] * *cnV[48];
+ RHS14 -= go[49] * *cnV[49];
+ RHS14 -= go[50] * *cnV[50];
+ RHS14 -= go[51] * *cnV[51];
+ m_A40 += gt[52];
+ m_A40 += gt[53];
+ m_A40 += gt[54];
+ m_A40 += gt[55];
+ m_A43 += go[52];
+ m_A42 += go[53];
+ m_A41 += go[54];
+ double RHS15 = Idr[52];
+ RHS15 += Idr[53];
+ RHS15 += Idr[54];
+ RHS15 += Idr[55];
+ RHS15 -= go[55] * *cnV[55];
+ m_A44 += gt[56];
+ m_A44 += gt[57];
+ m_A45 += go[56];
+ m_A46 += go[57];
+ double RHS16 = Idr[56];
+ RHS16 += Idr[57];
+ m_A47 += gt[58];
+ m_A47 += gt[59];
+ m_A48 += go[58];
+ m_A49 += go[59];
+ double RHS17 = Idr[58];
+ RHS17 += Idr[59];
+ m_A50 += gt[60];
+ m_A50 += gt[61];
+ m_A50 += gt[62];
+ m_A50 += gt[63];
+ m_A50 += gt[64];
+ m_A50 += gt[65];
+ m_A50 += gt[66];
+ m_A51 += go[60];
+ double RHS18 = Idr[60];
+ RHS18 += Idr[61];
+ RHS18 += Idr[62];
+ RHS18 += Idr[63];
+ RHS18 += Idr[64];
+ RHS18 += Idr[65];
+ RHS18 += Idr[66];
+ RHS18 -= go[61] * *cnV[61];
+ RHS18 -= go[62] * *cnV[62];
+ RHS18 -= go[63] * *cnV[63];
+ RHS18 -= go[64] * *cnV[64];
+ RHS18 -= go[65] * *cnV[65];
+ RHS18 -= go[66] * *cnV[66];
+ m_A52 += gt[67];
+ m_A52 += gt[68];
+ m_A52 += gt[69];
+ m_A53 += go[67];
+ double RHS19 = Idr[67];
+ RHS19 += Idr[68];
+ RHS19 += Idr[69];
+ RHS19 -= go[68] * *cnV[68];
+ RHS19 -= go[69] * *cnV[69];
+ m_A54 += gt[70];
+ m_A54 += gt[71];
+ m_A54 += gt[72];
+ m_A54 += gt[73];
+ m_A54 += gt[74];
+ m_A56 += go[70];
+ m_A55 += go[71];
+ m_A55 += go[72];
+ double RHS20 = Idr[70];
+ RHS20 += Idr[71];
+ RHS20 += Idr[72];
+ RHS20 += Idr[73];
+ RHS20 += Idr[74];
+ RHS20 -= go[73] * *cnV[73];
+ RHS20 -= go[74] * *cnV[74];
+ m_A57 += gt[75];
+ m_A57 += gt[76];
+ m_A57 += gt[77];
+ m_A57 += gt[78];
+ m_A57 += gt[79];
+ m_A59 += go[75];
+ m_A58 += go[76];
+ m_A58 += go[77];
+ double RHS21 = Idr[75];
+ RHS21 += Idr[76];
+ RHS21 += Idr[77];
+ RHS21 += Idr[78];
+ RHS21 += Idr[79];
+ RHS21 -= go[78] * *cnV[78];
+ RHS21 -= go[79] * *cnV[79];
+ m_A60 += gt[80];
+ m_A60 += gt[81];
+ m_A60 += gt[82];
+ m_A60 += gt[83];
+ m_A62 += go[80];
+ m_A63 += go[81];
+ m_A61 += go[82];
+ double RHS22 = Idr[80];
+ RHS22 += Idr[81];
+ RHS22 += Idr[82];
+ RHS22 += Idr[83];
+ RHS22 -= go[83] * *cnV[83];
+ m_A64 += gt[84];
+ m_A64 += gt[85];
+ m_A64 += gt[86];
+ m_A65 += go[84];
+ double RHS23 = Idr[84];
+ RHS23 += Idr[85];
+ RHS23 += Idr[86];
+ RHS23 -= go[85] * *cnV[85];
+ RHS23 -= go[86] * *cnV[86];
+ m_A66 += gt[87];
+ m_A66 += gt[88];
+ m_A66 += gt[89];
+ m_A66 += gt[90];
+ m_A66 += gt[91];
+ m_A67 += go[87];
+ double RHS24 = Idr[87];
+ RHS24 += Idr[88];
+ RHS24 += Idr[89];
+ RHS24 += Idr[90];
+ RHS24 += Idr[91];
+ RHS24 -= go[88] * *cnV[88];
+ RHS24 -= go[89] * *cnV[89];
+ RHS24 -= go[90] * *cnV[90];
+ RHS24 -= go[91] * *cnV[91];
+ m_A68 += gt[92];
+ m_A69 += go[92];
+ double RHS25 = Idr[92];
+ m_A70 += gt[93];
+ m_A70 += gt[94];
+ m_A70 += gt[95];
+ m_A70 += gt[96];
+ m_A72 += go[93];
+ m_A71 += go[94];
+ m_A71 += go[95];
+ double RHS26 = Idr[93];
+ RHS26 += Idr[94];
+ RHS26 += Idr[95];
+ RHS26 += Idr[96];
+ RHS26 -= go[96] * *cnV[96];
+ m_A73 += gt[97];
+ m_A73 += gt[98];
+ m_A73 += gt[99];
+ m_A73 += gt[100];
+ m_A75 += go[97];
+ m_A76 += go[98];
+ m_A74 += go[99];
+ double RHS27 = Idr[97];
+ RHS27 += Idr[98];
+ RHS27 += Idr[99];
+ RHS27 += Idr[100];
+ RHS27 -= go[100] * *cnV[100];
+ m_A77 += gt[101];
+ m_A77 += gt[102];
+ m_A78 += go[101];
+ double RHS28 = Idr[101];
+ RHS28 += Idr[102];
+ RHS28 -= go[102] * *cnV[102];
+ m_A79 += gt[103];
+ m_A79 += gt[104];
+ m_A79 += gt[105];
+ m_A80 += go[103];
+ double RHS29 = Idr[103];
+ RHS29 += Idr[104];
+ RHS29 += Idr[105];
+ RHS29 -= go[104] * *cnV[104];
+ RHS29 -= go[105] * *cnV[105];
+ m_A83 += gt[106];
+ m_A83 += gt[107];
+ m_A83 += gt[108];
+ m_A83 += gt[109];
+ m_A83 += gt[110];
+ m_A83 += gt[111];
+ m_A82 += go[106];
+ m_A82 += go[107];
+ m_A81 += go[108];
+ double RHS30 = Idr[106];
+ RHS30 += Idr[107];
+ RHS30 += Idr[108];
+ RHS30 += Idr[109];
+ RHS30 += Idr[110];
+ RHS30 += Idr[111];
+ RHS30 -= go[109] * *cnV[109];
+ RHS30 -= go[110] * *cnV[110];
+ RHS30 -= go[111] * *cnV[111];
+ m_A86 += gt[112];
+ m_A86 += gt[113];
+ m_A85 += go[112];
+ double RHS31 = Idr[112];
+ RHS31 += Idr[113];
+ RHS31 -= go[113] * *cnV[113];
+ m_A89 += gt[114];
+ m_A89 += gt[115];
+ m_A89 += gt[116];
+ m_A88 += go[114];
+ m_A90 += go[115];
+ double RHS32 = Idr[114];
+ RHS32 += Idr[115];
+ RHS32 += Idr[116];
+ RHS32 -= go[116] * *cnV[116];
+ m_A93 += gt[117];
+ m_A93 += gt[118];
+ m_A92 += go[117];
+ m_A91 += go[118];
+ double RHS33 = Idr[117];
+ RHS33 += Idr[118];
+ m_A98 += gt[119];
+ m_A98 += gt[120];
+ m_A98 += gt[121];
+ m_A97 += go[119];
+ m_A99 += go[120];
+ double RHS34 = Idr[119];
+ RHS34 += Idr[120];
+ RHS34 += Idr[121];
+ RHS34 -= go[121] * *cnV[121];
+ m_A101 += gt[122];
+ m_A101 += gt[123];
+ m_A101 += gt[124];
+ m_A101 += gt[125];
+ m_A101 += gt[126];
+ m_A103 += go[122];
+ m_A100 += go[123];
+ m_A102 += go[124];
+ double RHS35 = Idr[122];
+ RHS35 += Idr[123];
+ RHS35 += Idr[124];
+ RHS35 += Idr[125];
+ RHS35 += Idr[126];
+ RHS35 -= go[125] * *cnV[125];
+ RHS35 -= go[126] * *cnV[126];
+ m_A105 += gt[127];
+ m_A105 += gt[128];
+ m_A105 += gt[129];
+ m_A105 += gt[130];
+ m_A105 += gt[131];
+ m_A105 += gt[132];
+ m_A105 += gt[133];
+ m_A106 += go[127];
+ m_A104 += go[128];
+ double RHS36 = Idr[127];
+ RHS36 += Idr[128];
+ RHS36 += Idr[129];
+ RHS36 += Idr[130];
+ RHS36 += Idr[131];
+ RHS36 += Idr[132];
+ RHS36 += Idr[133];
+ RHS36 -= go[129] * *cnV[129];
+ RHS36 -= go[130] * *cnV[130];
+ RHS36 -= go[131] * *cnV[131];
+ RHS36 -= go[132] * *cnV[132];
+ RHS36 -= go[133] * *cnV[133];
+ m_A112 += gt[134];
+ m_A112 += gt[135];
+ m_A112 += gt[136];
+ m_A110 += go[134];
+ m_A109 += go[135];
+ m_A115 += go[136];
+ double RHS37 = Idr[134];
+ RHS37 += Idr[135];
+ RHS37 += Idr[136];
+ m_A119 += gt[137];
+ m_A119 += gt[138];
+ m_A119 += gt[139];
+ m_A119 += gt[140];
+ m_A118 += go[137];
+ m_A121 += go[138];
+ m_A117 += go[139];
+ m_A116 += go[140];
+ double RHS38 = Idr[137];
+ RHS38 += Idr[138];
+ RHS38 += Idr[139];
+ RHS38 += Idr[140];
+ m_A123 += gt[141];
+ m_A123 += gt[142];
+ m_A123 += gt[143];
+ m_A123 += gt[144];
+ m_A123 += gt[145];
+ m_A123 += gt[146];
+ m_A123 += gt[147];
+ m_A125 += go[141];
+ m_A122 += go[142];
+ double RHS39 = Idr[141];
+ RHS39 += Idr[142];
+ RHS39 += Idr[143];
+ RHS39 += Idr[144];
+ RHS39 += Idr[145];
+ RHS39 += Idr[146];
+ RHS39 += Idr[147];
+ RHS39 -= go[143] * *cnV[143];
+ RHS39 -= go[144] * *cnV[144];
+ RHS39 -= go[145] * *cnV[145];
+ RHS39 -= go[146] * *cnV[146];
+ RHS39 -= go[147] * *cnV[147];
+ m_A130 += gt[148];
+ m_A130 += gt[149];
+ m_A130 += gt[150];
+ m_A133 += go[148];
+ m_A127 += go[149];
+ m_A126 += go[150];
+ double RHS40 = Idr[148];
+ RHS40 += Idr[149];
+ RHS40 += Idr[150];
+ m_A138 += gt[151];
+ m_A138 += gt[152];
+ m_A138 += gt[153];
+ m_A138 += gt[154];
+ m_A138 += gt[155];
+ m_A134 += go[151];
+ m_A136 += go[152];
+ m_A141 += go[153];
+ double RHS41 = Idr[151];
+ RHS41 += Idr[152];
+ RHS41 += Idr[153];
+ RHS41 += Idr[154];
+ RHS41 += Idr[155];
+ RHS41 -= go[154] * *cnV[154];
+ RHS41 -= go[155] * *cnV[155];
+ m_A145 += gt[156];
+ m_A145 += gt[157];
+ m_A145 += gt[158];
+ m_A148 += go[156];
+ m_A143 += go[157];
+ double RHS42 = Idr[156];
+ RHS42 += Idr[157];
+ RHS42 += Idr[158];
+ RHS42 -= go[158] * *cnV[158];
+ m_A150 += gt[159];
+ m_A150 += gt[160];
+ m_A150 += gt[161];
+ m_A150 += gt[162];
+ m_A150 += gt[163];
+ m_A150 += gt[164];
+ m_A151 += go[159];
+ m_A151 += go[160];
+ m_A149 += go[161];
+ m_A149 += go[162];
+ double RHS43 = Idr[159];
+ RHS43 += Idr[160];
+ RHS43 += Idr[161];
+ RHS43 += Idr[162];
+ RHS43 += Idr[163];
+ RHS43 += Idr[164];
+ RHS43 -= go[163] * *cnV[163];
+ RHS43 -= go[164] * *cnV[164];
+ m_A153 += gt[165];
+ m_A153 += gt[166];
+ m_A153 += gt[167];
+ m_A153 += gt[168];
+ m_A153 += gt[169];
+ m_A153 += gt[170];
+ m_A154 += go[165];
+ m_A154 += go[166];
+ m_A152 += go[167];
+ m_A152 += go[168];
+ double RHS44 = Idr[165];
+ RHS44 += Idr[166];
+ RHS44 += Idr[167];
+ RHS44 += Idr[168];
+ RHS44 += Idr[169];
+ RHS44 += Idr[170];
+ RHS44 -= go[169] * *cnV[169];
+ RHS44 -= go[170] * *cnV[170];
+ m_A158 += gt[171];
+ m_A158 += gt[172];
+ m_A155 += go[171];
+ m_A156 += go[172];
+ double RHS45 = Idr[171];
+ RHS45 += Idr[172];
+ m_A164 += gt[173];
+ m_A164 += gt[174];
+ m_A164 += gt[175];
+ m_A164 += gt[176];
+ m_A164 += gt[177];
+ m_A164 += gt[178];
+ m_A163 += go[173];
+ m_A163 += go[174];
+ m_A162 += go[175];
+ double RHS46 = Idr[173];
+ RHS46 += Idr[174];
+ RHS46 += Idr[175];
+ RHS46 += Idr[176];
+ RHS46 += Idr[177];
+ RHS46 += Idr[178];
+ RHS46 -= go[176] * *cnV[176];
+ RHS46 -= go[177] * *cnV[177];
+ RHS46 -= go[178] * *cnV[178];
+ m_A172 += gt[179];
+ m_A172 += gt[180];
+ m_A172 += gt[181];
+ m_A172 += gt[182];
+ m_A172 += gt[183];
+ m_A166 += go[179];
+ m_A167 += go[180];
+ m_A168 += go[181];
+ double RHS47 = Idr[179];
+ RHS47 += Idr[180];
+ RHS47 += Idr[181];
+ RHS47 += Idr[182];
+ RHS47 += Idr[183];
+ RHS47 -= go[182] * *cnV[182];
+ RHS47 -= go[183] * *cnV[183];
+ m_A181 += gt[184];
+ m_A181 += gt[185];
+ m_A181 += gt[186];
+ m_A181 += gt[187];
+ m_A181 += gt[188];
+ m_A182 += go[184];
+ m_A178 += go[185];
+ m_A179 += go[186];
+ double RHS48 = Idr[184];
+ RHS48 += Idr[185];
+ RHS48 += Idr[186];
+ RHS48 += Idr[187];
+ RHS48 += Idr[188];
+ RHS48 -= go[187] * *cnV[187];
+ RHS48 -= go[188] * *cnV[188];
+ m_A183 += gt[189];
+ m_A183 += gt[190];
+ m_A183 += gt[191];
+ m_A184 += go[189];
+ double RHS49 = Idr[189];
+ RHS49 += Idr[190];
+ RHS49 += Idr[191];
+ RHS49 -= go[190] * *cnV[190];
+ RHS49 -= go[191] * *cnV[191];
+ m_A192 += gt[192];
+ m_A192 += gt[193];
+ m_A192 += gt[194];
+ m_A192 += gt[195];
+ m_A192 += gt[196];
+ m_A191 += go[192];
+ m_A186 += go[193];
+ m_A190 += go[194];
+ m_A189 += go[195];
+ m_A185 += go[196];
+ double RHS50 = Idr[192];
+ RHS50 += Idr[193];
+ RHS50 += Idr[194];
+ RHS50 += Idr[195];
+ RHS50 += Idr[196];
+ m_A201 += gt[197];
+ m_A201 += gt[198];
+ m_A201 += gt[199];
+ m_A201 += gt[200];
+ m_A197 += go[197];
+ m_A195 += go[198];
+ m_A194 += go[199];
+ m_A196 += go[200];
+ double RHS51 = Idr[197];
+ RHS51 += Idr[198];
+ RHS51 += Idr[199];
+ RHS51 += Idr[200];
+ m_A214 += gt[201];
+ m_A214 += gt[202];
+ m_A214 += gt[203];
+ m_A214 += gt[204];
+ m_A214 += gt[205];
+ m_A214 += gt[206];
+ m_A209 += go[201];
+ m_A207 += go[202];
+ m_A206 += go[203];
+ m_A210 += go[204];
+ double RHS52 = Idr[201];
+ RHS52 += Idr[202];
+ RHS52 += Idr[203];
+ RHS52 += Idr[204];
+ RHS52 += Idr[205];
+ RHS52 += Idr[206];
+ RHS52 -= go[205] * *cnV[205];
+ RHS52 -= go[206] * *cnV[206];
+ m_A225 += gt[207];
+ m_A225 += gt[208];
+ m_A225 += gt[209];
+ m_A225 += gt[210];
+ m_A225 += gt[211];
+ m_A231 += go[207];
+ m_A231 += go[208];
+ m_A220 += go[209];
+ m_A229 += go[210];
+ m_A221 += go[211];
+ double RHS53 = Idr[207];
+ RHS53 += Idr[208];
+ RHS53 += Idr[209];
+ RHS53 += Idr[210];
+ RHS53 += Idr[211];
+ m_A240 += gt[212];
+ m_A240 += gt[213];
+ m_A240 += gt[214];
+ m_A234 += go[212];
+ m_A232 += go[213];
+ m_A233 += go[214];
+ double RHS54 = Idr[212];
+ RHS54 += Idr[213];
+ RHS54 += Idr[214];
+ m_A257 += gt[215];
+ m_A257 += gt[216];
+ m_A257 += gt[217];
+ m_A257 += gt[218];
+ m_A257 += gt[219];
+ m_A257 += gt[220];
+ m_A246 += go[215];
+ m_A248 += go[216];
+ m_A250 += go[217];
+ m_A247 += go[218];
+ double RHS55 = Idr[215];
+ RHS55 += Idr[216];
+ RHS55 += Idr[217];
+ RHS55 += Idr[218];
+ RHS55 += Idr[219];
+ RHS55 += Idr[220];
+ RHS55 -= go[219] * *cnV[219];
+ RHS55 -= go[220] * *cnV[220];
+ m_A270 += gt[221];
+ m_A270 += gt[222];
+ m_A270 += gt[223];
+ m_A270 += gt[224];
+ m_A275 += go[221];
+ m_A262 += go[222];
+ m_A272 += go[223];
+ m_A263 += go[224];
+ double RHS56 = Idr[221];
+ RHS56 += Idr[222];
+ RHS56 += Idr[223];
+ RHS56 += Idr[224];
+ m_A282 += gt[225];
+ m_A282 += gt[226];
+ m_A282 += gt[227];
+ m_A282 += gt[228];
+ m_A282 += gt[229];
+ m_A278 += go[225];
+ m_A277 += go[226];
+ m_A277 += go[227];
+ m_A276 += go[228];
+ double RHS57 = Idr[225];
+ RHS57 += Idr[226];
+ RHS57 += Idr[227];
+ RHS57 += Idr[228];
+ RHS57 += Idr[229];
+ RHS57 -= go[229] * *cnV[229];
+ m_A287 += gt[230];
+ m_A287 += gt[231];
+ m_A287 += gt[232];
+ m_A288 += go[230];
+ double RHS58 = Idr[230];
+ RHS58 += Idr[231];
+ RHS58 += Idr[232];
+ RHS58 -= go[231] * *cnV[231];
+ RHS58 -= go[232] * *cnV[232];
+ m_A293 += gt[233];
+ m_A293 += gt[234];
+ m_A293 += gt[235];
+ m_A293 += gt[236];
+ m_A293 += gt[237];
+ m_A291 += go[233];
+ m_A290 += go[234];
+ m_A290 += go[235];
+ m_A289 += go[236];
+ double RHS59 = Idr[233];
+ RHS59 += Idr[234];
+ RHS59 += Idr[235];
+ RHS59 += Idr[236];
+ RHS59 += Idr[237];
+ RHS59 -= go[237] * *cnV[237];
+ m_A297 += gt[238];
+ m_A297 += gt[239];
+ m_A297 += gt[240];
+ m_A298 += go[238];
+ double RHS60 = Idr[238];
+ RHS60 += Idr[239];
+ RHS60 += Idr[240];
+ RHS60 -= go[239] * *cnV[239];
+ RHS60 -= go[240] * *cnV[240];
+ m_A299 += gt[241];
+ m_A299 += gt[242];
+ m_A299 += gt[243];
+ m_A300 += go[241];
+ double RHS61 = Idr[241];
+ RHS61 += Idr[242];
+ RHS61 += Idr[243];
+ RHS61 -= go[242] * *cnV[242];
+ RHS61 -= go[243] * *cnV[243];
+ m_A301 += gt[244];
+ m_A301 += gt[245];
+ m_A301 += gt[246];
+ m_A302 += go[244];
+ double RHS62 = Idr[244];
+ RHS62 += Idr[245];
+ RHS62 += Idr[246];
+ RHS62 -= go[245] * *cnV[245];
+ RHS62 -= go[246] * *cnV[246];
+ m_A314 += gt[247];
+ m_A314 += gt[248];
+ m_A314 += gt[249];
+ m_A314 += gt[250];
+ m_A314 += gt[251];
+ m_A303 += go[247];
+ m_A317 += go[248];
+ m_A304 += go[249];
+ double RHS63 = Idr[247];
+ RHS63 += Idr[248];
+ RHS63 += Idr[249];
+ RHS63 += Idr[250];
+ RHS63 += Idr[251];
+ RHS63 -= go[250] * *cnV[250];
+ RHS63 -= go[251] * *cnV[251];
+ m_A320 += gt[252];
+ m_A320 += gt[253];
+ m_A320 += gt[254];
+ m_A321 += go[252];
+ m_A318 += go[253];
+ m_A319 += go[254];
+ double RHS64 = Idr[252];
+ RHS64 += Idr[253];
+ RHS64 += Idr[254];
+ m_A329 += gt[255];
+ m_A329 += gt[256];
+ m_A329 += gt[257];
+ m_A331 += go[255];
+ m_A322 += go[256];
+ m_A322 += go[257];
+ double RHS65 = Idr[255];
+ RHS65 += Idr[256];
+ RHS65 += Idr[257];
+ m_A337 += gt[258];
+ m_A337 += gt[259];
+ m_A337 += gt[260];
+ m_A337 += gt[261];
+ m_A338 += go[258];
+ m_A332 += go[259];
+ double RHS66 = Idr[258];
+ RHS66 += Idr[259];
+ RHS66 += Idr[260];
+ RHS66 += Idr[261];
+ RHS66 -= go[260] * *cnV[260];
+ RHS66 -= go[261] * *cnV[261];
+ m_A349 += gt[262];
+ m_A349 += gt[263];
+ m_A349 += gt[264];
+ m_A349 += gt[265];
+ m_A349 += gt[266];
+ m_A349 += gt[267];
+ m_A349 += gt[268];
+ m_A349 += gt[269];
+ m_A349 += gt[270];
+ m_A349 += gt[271];
+ m_A346 += go[262];
+ m_A347 += go[263];
+ m_A348 += go[264];
+ m_A345 += go[265];
+ m_A344 += go[266];
+ m_A343 += go[267];
+ m_A342 += go[268];
+ m_A341 += go[269];
+ m_A340 += go[270];
+ m_A339 += go[271];
+ double RHS67 = Idr[262];
+ RHS67 += Idr[263];
+ RHS67 += Idr[264];
+ RHS67 += Idr[265];
+ RHS67 += Idr[266];
+ RHS67 += Idr[267];
+ RHS67 += Idr[268];
+ RHS67 += Idr[269];
+ RHS67 += Idr[270];
+ RHS67 += Idr[271];
+ const double f0 = 1.0 / m_A0;
+ const double f0_30 = -f0 * m_A81;
+ m_A83 += m_A1 * f0_30;
+ RHS30 += f0_30 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_32 = -f1 * m_A88;
+ m_A89 += m_A3 * f1_32;
+ RHS32 += f1_32 * RHS1;
+ const double f2 = 1.0 / m_A4;
+ const double f2_30 = -f2 * m_A82;
+ m_A83 += m_A5 * f2_30;
+ m_A84 += m_A6 * f2_30;
+ RHS30 += f2_30 * RHS2;
+ const double f2_50 = -f2 * m_A185;
+ m_A187 += m_A5 * f2_50;
+ m_A192 += m_A6 * f2_50;
+ RHS50 += f2_50 * RHS2;
+ const double f3 = 1.0 / m_A7;
+ const double f3_34 = -f3 * m_A97;
+ m_A98 += m_A8 * f3_34;
+ RHS34 += f3_34 * RHS3;
+ const double f4 = 1.0 / m_A9;
+ const double f4_31 = -f4 * m_A85;
+ m_A86 += m_A10 * f4_31;
+ m_A87 += m_A11 * f4_31;
+ RHS31 += f4_31 * RHS4;
+ const double f4_50 = -f4 * m_A186;
+ m_A188 += m_A10 * f4_50;
+ m_A192 += m_A11 * f4_50;
+ RHS50 += f4_50 * RHS4;
+ const double f5 = 1.0 / m_A12;
+ const double f5_35 = -f5 * m_A100;
+ m_A101 += m_A13 * f5_35;
+ RHS35 += f5_35 * RHS5;
+ const double f6 = 1.0 / m_A14;
+ const double f6_38 = -f6 * m_A116;
+ m_A119 += m_A15 * f6_38;
+ RHS38 += f6_38 * RHS6;
+ const double f7 = 1.0 / m_A16;
+ const double f7_51 = -f7 * m_A194;
+ m_A201 += m_A17 * f7_51;
+ RHS51 += f7_51 * RHS7;
+ const double f8 = 1.0 / m_A18;
+ const double f8_38 = -f8 * m_A117;
+ m_A119 += m_A19 * f8_38;
+ RHS38 += f8_38 * RHS8;
+ const double f9 = 1.0 / m_A20;
+ const double f9_36 = -f9 * m_A104;
+ m_A106 += m_A21 * f9_36;
+ m_A107 += m_A22 * f9_36;
+ m_A108 += m_A23 * f9_36;
+ RHS36 += f9_36 * RHS9;
+ const double f9_37 = -f9 * m_A109;
+ m_A112 += m_A21 * f9_37;
+ m_A114 += m_A22 * f9_37;
+ m_A115 += m_A23 * f9_37;
+ RHS37 += f9_37 * RHS9;
+ const double f9_47 = -f9 * m_A166;
+ m_A169 += m_A21 * f9_47;
+ m_A172 += m_A22 * f9_47;
+ m_A173 += m_A23 * f9_47;
+ RHS47 += f9_47 * RHS9;
+ const double f9_51 = -f9 * m_A195;
+ m_A197 += m_A21 * f9_51;
+ m_A199 += m_A22 * f9_51;
+ m_A201 += m_A23 * f9_51;
+ RHS51 += f9_51 * RHS9;
+ const double f10 = 1.0 / m_A24;
+ const double f10_37 = -f10 * m_A110;
+ m_A111 += m_A25 * f10_37;
+ m_A112 += m_A26 * f10_37;
+ m_A113 += m_A27 * f10_37;
+ RHS37 += f10_37 * RHS10;
+ const double f10_40 = -f10 * m_A126;
+ m_A128 += m_A25 * f10_40;
+ m_A129 += m_A26 * f10_40;
+ m_A130 += m_A27 * f10_40;
+ RHS40 += f10_40 * RHS10;
+ const double f11 = 1.0 / m_A28;
+ const double f11_41 = -f11 * m_A134;
+ m_A135 += m_A29 * f11_41;
+ m_A141 += m_A30 * f11_41;
+ RHS41 += f11_41 * RHS11;
+ const double f12 = 1.0 / m_A31;
+ const double f12_38 = -f12 * m_A118;
+ m_A119 += m_A32 * f12_38;
+ m_A120 += m_A33 * f12_38;
+ m_A121 += m_A34 * f12_38;
+ RHS38 += f12_38 * RHS12;
+ const double f12_41 = -f12 * m_A135;
+ m_A137 += m_A32 * f12_41;
+ m_A140 += m_A33 * f12_41;
+ m_A141 += m_A34 * f12_41;
+ RHS41 += f12_41 * RHS12;
+ const double f12_47 = -f12 * m_A167;
+ m_A170 += m_A32 * f12_47;
+ m_A172 += m_A33 * f12_47;
+ m_A176 += m_A34 * f12_47;
+ RHS47 += f12_47 * RHS12;
+ const double f12_54 = -f12 * m_A232;
+ m_A233 += m_A32 * f12_54;
+ m_A236 += m_A33 * f12_54;
+ m_A240 += m_A34 * f12_54;
+ RHS54 += f12_54 * RHS12;
+ const double f13 = 1.0 / m_A35;
+ const double f13_39 = -f13 * m_A122;
+ m_A124 += m_A36 * f13_39;
+ m_A125 += m_A37 * f13_39;
+ RHS39 += f13_39 * RHS13;
+ const double f13_40 = -f13 * m_A127;
+ m_A130 += m_A36 * f13_40;
+ m_A133 += m_A37 * f13_40;
+ RHS40 += f13_40 * RHS13;
+ const double f13_52 = -f13 * m_A206;
+ m_A210 += m_A36 * f13_52;
+ m_A214 += m_A37 * f13_52;
+ RHS52 += f13_52 * RHS13;
+ const double f14 = 1.0 / m_A38;
+ const double f14_55 = -f14 * m_A246;
+ m_A250 += m_A39 * f14_55;
+ RHS55 += f14_55 * RHS14;
+ const double f15 = 1.0 / m_A40;
+ const double f15_41 = -f15 * m_A136;
+ m_A138 += m_A41 * f15_41;
+ m_A139 += m_A42 * f15_41;
+ m_A142 += m_A43 * f15_41;
+ RHS41 += f15_41 * RHS15;
+ const double f15_42 = -f15 * m_A143;
+ m_A144 += m_A41 * f15_42;
+ m_A145 += m_A42 * f15_42;
+ m_A148 += m_A43 * f15_42;
+ RHS42 += f15_42 * RHS15;
+ const double f15_55 = -f15 * m_A247;
+ m_A249 += m_A41 * f15_55;
+ m_A250 += m_A42 * f15_55;
+ m_A257 += m_A43 * f15_55;
+ RHS55 += f15_55 * RHS15;
+ const double f16 = 1.0 / m_A44;
+ const double f16_33 = -f16 * m_A91;
+ m_A93 += m_A45 * f16_33;
+ m_A95 += m_A46 * f16_33;
+ RHS33 += f16_33 * RHS16;
+ const double f16_52 = -f16 * m_A207;
+ m_A208 += m_A45 * f16_52;
+ m_A214 += m_A46 * f16_52;
+ RHS52 += f16_52 * RHS16;
+ const double f17 = 1.0 / m_A47;
+ const double f17_45 = -f17 * m_A155;
+ m_A158 += m_A48 * f17_45;
+ m_A160 += m_A49 * f17_45;
+ RHS45 += f17_45 * RHS17;
+ const double f17_55 = -f17 * m_A248;
+ m_A251 += m_A48 * f17_55;
+ m_A257 += m_A49 * f17_55;
+ RHS55 += f17_55 * RHS17;
+ const double f18 = 1.0 / m_A50;
+ const double f18_63 = -f18 * m_A303;
+ m_A304 += m_A51 * f18_63;
+ RHS63 += f18_63 * RHS18;
+ const double f19 = 1.0 / m_A52;
+ const double f19_46 = -f19 * m_A162;
+ m_A164 += m_A53 * f19_46;
+ RHS46 += f19_46 * RHS19;
+ const double f20 = 1.0 / m_A54;
+ const double f20_43 = -f20 * m_A149;
+ m_A150 += m_A55 * f20_43;
+ m_A151 += m_A56 * f20_43;
+ RHS43 += f20_43 * RHS20;
+ const double f20_59 = -f20 * m_A289;
+ m_A290 += m_A55 * f20_59;
+ m_A293 += m_A56 * f20_59;
+ RHS59 += f20_59 * RHS20;
+ const double f21 = 1.0 / m_A57;
+ const double f21_44 = -f21 * m_A152;
+ m_A153 += m_A58 * f21_44;
+ m_A154 += m_A59 * f21_44;
+ RHS44 += f21_44 * RHS21;
+ const double f21_57 = -f21 * m_A276;
+ m_A277 += m_A58 * f21_57;
+ m_A282 += m_A59 * f21_57;
+ RHS57 += f21_57 * RHS21;
+ const double f22 = 1.0 / m_A60;
+ const double f22_33 = -f22 * m_A92;
+ m_A93 += m_A61 * f22_33;
+ m_A94 += m_A62 * f22_33;
+ m_A96 += m_A63 * f22_33;
+ RHS33 += f22_33 * RHS22;
+ const double f22_45 = -f22 * m_A156;
+ m_A157 += m_A61 * f22_45;
+ m_A158 += m_A62 * f22_45;
+ m_A161 += m_A63 * f22_45;
+ RHS45 += f22_45 * RHS22;
+ const double f22_63 = -f22 * m_A304;
+ m_A305 += m_A61 * f22_63;
+ m_A306 += m_A62 * f22_63;
+ m_A314 += m_A63 * f22_63;
+ RHS63 += f22_63 * RHS22;
+ const double f23 = 1.0 / m_A64;
+ const double f23_56 = -f23 * m_A262;
+ m_A270 += m_A65 * f23_56;
+ RHS56 += f23_56 * RHS23;
+ const double f24 = 1.0 / m_A66;
+ const double f24_53 = -f24 * m_A220;
+ m_A225 += m_A67 * f24_53;
+ RHS53 += f24_53 * RHS24;
+ const double f25 = 1.0 / m_A68;
+ const double f25_48 = -f25 * m_A178;
+ m_A181 += m_A69 * f25_48;
+ RHS48 += f25_48 * RHS25;
+ const double f26 = 1.0 / m_A70;
+ const double f26_46 = -f26 * m_A163;
+ m_A164 += m_A71 * f26_46;
+ m_A165 += m_A72 * f26_46;
+ RHS46 += f26_46 * RHS26;
+ const double f26_48 = -f26 * m_A179;
+ m_A180 += m_A71 * f26_48;
+ m_A181 += m_A72 * f26_48;
+ RHS48 += f26_48 * RHS26;
+ const double f27 = 1.0 / m_A73;
+ const double f27_47 = -f27 * m_A168;
+ m_A172 += m_A74 * f27_47;
+ m_A175 += m_A75 * f27_47;
+ m_A177 += m_A76 * f27_47;
+ RHS47 += f27_47 * RHS27;
+ const double f27_53 = -f27 * m_A221;
+ m_A222 += m_A74 * f27_53;
+ m_A225 += m_A75 * f27_53;
+ m_A228 += m_A76 * f27_53;
+ RHS53 += f27_53 * RHS27;
+ const double f27_56 = -f27 * m_A263;
+ m_A264 += m_A74 * f27_56;
+ m_A267 += m_A75 * f27_56;
+ m_A270 += m_A76 * f27_56;
+ RHS56 += f27_56 * RHS27;
+ const double f28 = 1.0 / m_A77;
+ const double f28_64 = -f28 * m_A318;
+ m_A320 += m_A78 * f28_64;
+ RHS64 += f28_64 * RHS28;
+ const double f29 = 1.0 / m_A79;
+ const double f29_67 = -f29 * m_A339;
+ m_A349 += m_A80 * f29_67;
+ RHS67 += f29_67 * RHS29;
+ const double f30 = 1.0 / m_A83;
+ const double f30_50 = -f30 * m_A187;
+ m_A192 += m_A84 * f30_50;
+ RHS50 += f30_50 * RHS30;
+ const double f31 = 1.0 / m_A86;
+ const double f31_50 = -f31 * m_A188;
+ m_A192 += m_A87 * f31_50;
+ RHS50 += f31_50 * RHS31;
+ const double f32 = 1.0 / m_A89;
+ const double f32_50 = -f32 * m_A189;
+ m_A192 += m_A90 * f32_50;
+ RHS50 += f32_50 * RHS32;
+ const double f33 = 1.0 / m_A93;
+ const double f33_45 = -f33 * m_A157;
+ m_A158 += m_A94 * f33_45;
+ m_A159 += m_A95 * f33_45;
+ m_A161 += m_A96 * f33_45;
+ RHS45 += f33_45 * RHS33;
+ const double f33_52 = -f33 * m_A208;
+ m_A211 += m_A94 * f33_52;
+ m_A214 += m_A95 * f33_52;
+ m_A219 += m_A96 * f33_52;
+ RHS52 += f33_52 * RHS33;
+ const double f33_63 = -f33 * m_A305;
+ m_A306 += m_A94 * f33_63;
+ m_A307 += m_A95 * f33_63;
+ m_A314 += m_A96 * f33_63;
+ RHS63 += f33_63 * RHS33;
+ const double f34 = 1.0 / m_A98;
+ const double f34_50 = -f34 * m_A190;
+ m_A192 += m_A99 * f34_50;
+ RHS50 += f34_50 * RHS34;
+ const double f35 = 1.0 / m_A101;
+ const double f35_50 = -f35 * m_A191;
+ m_A192 += m_A102 * f35_50;
+ m_A193 += m_A103 * f35_50;
+ RHS50 += f35_50 * RHS35;
+ const double f35_51 = -f35 * m_A196;
+ m_A200 += m_A102 * f35_51;
+ m_A201 += m_A103 * f35_51;
+ RHS51 += f35_51 * RHS35;
+ const double f36 = 1.0 / m_A105;
+ const double f36_37 = -f36 * m_A111;
+ m_A112 += m_A106 * f36_37;
+ m_A114 += m_A107 * f36_37;
+ m_A115 += m_A108 * f36_37;
+ RHS37 += f36_37 * RHS36;
+ const double f36_40 = -f36 * m_A128;
+ m_A129 += m_A106 * f36_40;
+ m_A131 += m_A107 * f36_40;
+ m_A132 += m_A108 * f36_40;
+ RHS40 += f36_40 * RHS36;
+ const double f37 = 1.0 / m_A112;
+ const double f37_40 = -f37 * m_A129;
+ m_A130 += m_A113 * f37_40;
+ m_A131 += m_A114 * f37_40;
+ m_A132 += m_A115 * f37_40;
+ RHS40 += f37_40 * RHS37;
+ const double f37_47 = -f37 * m_A169;
+ m_A171 += m_A113 * f37_47;
+ m_A172 += m_A114 * f37_47;
+ m_A173 += m_A115 * f37_47;
+ RHS47 += f37_47 * RHS37;
+ const double f37_51 = -f37 * m_A197;
+ m_A198 += m_A113 * f37_51;
+ m_A199 += m_A114 * f37_51;
+ m_A201 += m_A115 * f37_51;
+ RHS51 += f37_51 * RHS37;
+ const double f38 = 1.0 / m_A119;
+ const double f38_41 = -f38 * m_A137;
+ m_A140 += m_A120 * f38_41;
+ m_A141 += m_A121 * f38_41;
+ RHS41 += f38_41 * RHS38;
+ const double f38_47 = -f38 * m_A170;
+ m_A172 += m_A120 * f38_47;
+ m_A176 += m_A121 * f38_47;
+ RHS47 += f38_47 * RHS38;
+ const double f38_54 = -f38 * m_A233;
+ m_A236 += m_A120 * f38_54;
+ m_A240 += m_A121 * f38_54;
+ RHS54 += f38_54 * RHS38;
+ const double f39 = 1.0 / m_A123;
+ const double f39_52 = -f39 * m_A209;
+ m_A210 += m_A124 * f39_52;
+ m_A214 += m_A125 * f39_52;
+ RHS52 += f39_52 * RHS39;
+ const double f40 = 1.0 / m_A130;
+ const double f40_47 = -f40 * m_A171;
+ m_A172 += m_A131 * f40_47;
+ m_A173 += m_A132 * f40_47;
+ m_A174 += m_A133 * f40_47;
+ RHS47 += f40_47 * RHS40;
+ const double f40_51 = -f40 * m_A198;
+ m_A199 += m_A131 * f40_51;
+ m_A201 += m_A132 * f40_51;
+ m_A202 += m_A133 * f40_51;
+ RHS51 += f40_51 * RHS40;
+ const double f40_52 = -f40 * m_A210;
+ m_A212 += m_A131 * f40_52;
+ m_A213 += m_A132 * f40_52;
+ m_A214 += m_A133 * f40_52;
+ RHS52 += f40_52 * RHS40;
+ const double f41 = 1.0 / m_A138;
+ const double f41_42 = -f41 * m_A144;
+ m_A145 += m_A139 * f41_42;
+ m_A146 += m_A140 * f41_42;
+ m_A147 += m_A141 * f41_42;
+ m_A148 += m_A142 * f41_42;
+ RHS42 += f41_42 * RHS41;
+ const double f41_54 = -f41 * m_A234;
+ m_A235 += m_A139 * f41_54;
+ m_A236 += m_A140 * f41_54;
+ m_A240 += m_A141 * f41_54;
+ m_A241 += m_A142 * f41_54;
+ RHS54 += f41_54 * RHS41;
+ const double f41_55 = -f41 * m_A249;
+ m_A250 += m_A139 * f41_55;
+ m_A252 += m_A140 * f41_55;
+ m_A256 += m_A141 * f41_55;
+ m_A257 += m_A142 * f41_55;
+ RHS55 += f41_55 * RHS41;
+ const double f42 = 1.0 / m_A145;
+ const double f42_54 = -f42 * m_A235;
+ m_A236 += m_A146 * f42_54;
+ m_A240 += m_A147 * f42_54;
+ m_A241 += m_A148 * f42_54;
+ RHS54 += f42_54 * RHS42;
+ const double f42_55 = -f42 * m_A250;
+ m_A252 += m_A146 * f42_55;
+ m_A256 += m_A147 * f42_55;
+ m_A257 += m_A148 * f42_55;
+ RHS55 += f42_55 * RHS42;
+ const double f43 = 1.0 / m_A150;
+ const double f43_59 = -f43 * m_A290;
+ m_A293 += m_A151 * f43_59;
+ RHS59 += f43_59 * RHS43;
+ const double f44 = 1.0 / m_A153;
+ const double f44_57 = -f44 * m_A277;
+ m_A282 += m_A154 * f44_57;
+ RHS57 += f44_57 * RHS44;
+ const double f45 = 1.0 / m_A158;
+ const double f45_52 = -f45 * m_A211;
+ m_A214 += m_A159 * f45_52;
+ m_A217 += m_A160 * f45_52;
+ m_A219 += m_A161 * f45_52;
+ RHS52 += f45_52 * RHS45;
+ const double f45_55 = -f45 * m_A251;
+ m_A254 += m_A159 * f45_55;
+ m_A257 += m_A160 * f45_55;
+ m_A260 += m_A161 * f45_55;
+ RHS55 += f45_55 * RHS45;
+ const double f45_63 = -f45 * m_A306;
+ m_A307 += m_A159 * f45_63;
+ m_A310 += m_A160 * f45_63;
+ m_A314 += m_A161 * f45_63;
+ RHS63 += f45_63 * RHS45;
+ const double f46 = 1.0 / m_A164;
+ const double f46_48 = -f46 * m_A180;
+ m_A181 += m_A165 * f46_48;
+ RHS48 += f46_48 * RHS46;
+ const double f47 = 1.0 / m_A172;
+ const double f47_51 = -f47 * m_A199;
+ m_A201 += m_A173 * f47_51;
+ m_A202 += m_A174 * f47_51;
+ m_A203 += m_A175 * f47_51;
+ m_A204 += m_A176 * f47_51;
+ m_A205 += m_A177 * f47_51;
+ RHS51 += f47_51 * RHS47;
+ const double f47_52 = -f47 * m_A212;
+ m_A213 += m_A173 * f47_52;
+ m_A214 += m_A174 * f47_52;
+ m_A215 += m_A175 * f47_52;
+ m_A216 += m_A176 * f47_52;
+ m_A218 += m_A177 * f47_52;
+ RHS52 += f47_52 * RHS47;
+ const double f47_53 = -f47 * m_A222;
+ m_A223 += m_A173 * f47_53;
+ m_A224 += m_A174 * f47_53;
+ m_A225 += m_A175 * f47_53;
+ m_A226 += m_A176 * f47_53;
+ m_A228 += m_A177 * f47_53;
+ RHS53 += f47_53 * RHS47;
+ const double f47_54 = -f47 * m_A236;
+ m_A237 += m_A173 * f47_54;
+ m_A238 += m_A174 * f47_54;
+ m_A239 += m_A175 * f47_54;
+ m_A240 += m_A176 * f47_54;
+ m_A242 += m_A177 * f47_54;
+ RHS54 += f47_54 * RHS47;
+ const double f47_55 = -f47 * m_A252;
+ m_A253 += m_A173 * f47_55;
+ m_A254 += m_A174 * f47_55;
+ m_A255 += m_A175 * f47_55;
+ m_A256 += m_A176 * f47_55;
+ m_A258 += m_A177 * f47_55;
+ RHS55 += f47_55 * RHS47;
+ const double f47_56 = -f47 * m_A264;
+ m_A265 += m_A173 * f47_56;
+ m_A266 += m_A174 * f47_56;
+ m_A267 += m_A175 * f47_56;
+ m_A268 += m_A176 * f47_56;
+ m_A270 += m_A177 * f47_56;
+ RHS56 += f47_56 * RHS47;
+ const double f48 = 1.0 / m_A181;
+ const double f48_64 = -f48 * m_A319;
+ m_A320 += m_A182 * f48_64;
+ RHS64 += f48_64 * RHS48;
+ const double f49 = 1.0 / m_A183;
+ const double f49_67 = -f49 * m_A340;
+ m_A349 += m_A184 * f49_67;
+ RHS67 += f49_67 * RHS49;
+ const double f50 = 1.0 / m_A192;
+ const double f50_51 = -f50 * m_A200;
+ m_A201 += m_A193 * f50_51;
+ RHS51 += f50_51 * RHS50;
+ const double f51 = 1.0 / m_A201;
+ const double f51_52 = -f51 * m_A213;
+ m_A214 += m_A202 * f51_52;
+ m_A215 += m_A203 * f51_52;
+ m_A216 += m_A204 * f51_52;
+ m_A218 += m_A205 * f51_52;
+ RHS52 += f51_52 * RHS51;
+ const double f51_53 = -f51 * m_A223;
+ m_A224 += m_A202 * f51_53;
+ m_A225 += m_A203 * f51_53;
+ m_A226 += m_A204 * f51_53;
+ m_A228 += m_A205 * f51_53;
+ RHS53 += f51_53 * RHS51;
+ const double f51_54 = -f51 * m_A237;
+ m_A238 += m_A202 * f51_54;
+ m_A239 += m_A203 * f51_54;
+ m_A240 += m_A204 * f51_54;
+ m_A242 += m_A205 * f51_54;
+ RHS54 += f51_54 * RHS51;
+ const double f51_55 = -f51 * m_A253;
+ m_A254 += m_A202 * f51_55;
+ m_A255 += m_A203 * f51_55;
+ m_A256 += m_A204 * f51_55;
+ m_A258 += m_A205 * f51_55;
+ RHS55 += f51_55 * RHS51;
+ const double f51_56 = -f51 * m_A265;
+ m_A266 += m_A202 * f51_56;
+ m_A267 += m_A203 * f51_56;
+ m_A268 += m_A204 * f51_56;
+ m_A270 += m_A205 * f51_56;
+ RHS56 += f51_56 * RHS51;
+ const double f52 = 1.0 / m_A214;
+ const double f52_53 = -f52 * m_A224;
+ m_A225 += m_A215 * f52_53;
+ m_A226 += m_A216 * f52_53;
+ m_A227 += m_A217 * f52_53;
+ m_A228 += m_A218 * f52_53;
+ m_A230 += m_A219 * f52_53;
+ RHS53 += f52_53 * RHS52;
+ const double f52_54 = -f52 * m_A238;
+ m_A239 += m_A215 * f52_54;
+ m_A240 += m_A216 * f52_54;
+ m_A241 += m_A217 * f52_54;
+ m_A242 += m_A218 * f52_54;
+ m_A244 += m_A219 * f52_54;
+ RHS54 += f52_54 * RHS52;
+ const double f52_55 = -f52 * m_A254;
+ m_A255 += m_A215 * f52_55;
+ m_A256 += m_A216 * f52_55;
+ m_A257 += m_A217 * f52_55;
+ m_A258 += m_A218 * f52_55;
+ m_A260 += m_A219 * f52_55;
+ RHS55 += f52_55 * RHS52;
+ const double f52_56 = -f52 * m_A266;
+ m_A267 += m_A215 * f52_56;
+ m_A268 += m_A216 * f52_56;
+ m_A269 += m_A217 * f52_56;
+ m_A270 += m_A218 * f52_56;
+ m_A273 += m_A219 * f52_56;
+ RHS56 += f52_56 * RHS52;
+ const double f52_63 = -f52 * m_A307;
+ m_A308 += m_A215 * f52_63;
+ m_A309 += m_A216 * f52_63;
+ m_A310 += m_A217 * f52_63;
+ m_A311 += m_A218 * f52_63;
+ m_A314 += m_A219 * f52_63;
+ RHS63 += f52_63 * RHS52;
+ const double f53 = 1.0 / m_A225;
+ const double f53_54 = -f53 * m_A239;
+ m_A240 += m_A226 * f53_54;
+ m_A241 += m_A227 * f53_54;
+ m_A242 += m_A228 * f53_54;
+ m_A243 += m_A229 * f53_54;
+ m_A244 += m_A230 * f53_54;
+ m_A245 += m_A231 * f53_54;
+ RHS54 += f53_54 * RHS53;
+ const double f53_55 = -f53 * m_A255;
+ m_A256 += m_A226 * f53_55;
+ m_A257 += m_A227 * f53_55;
+ m_A258 += m_A228 * f53_55;
+ m_A259 += m_A229 * f53_55;
+ m_A260 += m_A230 * f53_55;
+ m_A261 += m_A231 * f53_55;
+ RHS55 += f53_55 * RHS53;
+ const double f53_56 = -f53 * m_A267;
+ m_A268 += m_A226 * f53_56;
+ m_A269 += m_A227 * f53_56;
+ m_A270 += m_A228 * f53_56;
+ m_A271 += m_A229 * f53_56;
+ m_A273 += m_A230 * f53_56;
+ m_A274 += m_A231 * f53_56;
+ RHS56 += f53_56 * RHS53;
+ const double f53_57 = -f53 * m_A278;
+ m_A279 += m_A226 * f53_57;
+ m_A280 += m_A227 * f53_57;
+ m_A281 += m_A228 * f53_57;
+ m_A282 += m_A229 * f53_57;
+ m_A284 += m_A230 * f53_57;
+ m_A285 += m_A231 * f53_57;
+ RHS57 += f53_57 * RHS53;
+ const double f53_63 = -f53 * m_A308;
+ m_A309 += m_A226 * f53_63;
+ m_A310 += m_A227 * f53_63;
+ m_A311 += m_A228 * f53_63;
+ m_A312 += m_A229 * f53_63;
+ m_A314 += m_A230 * f53_63;
+ m_A315 += m_A231 * f53_63;
+ RHS63 += f53_63 * RHS53;
+ const double f53_65 = -f53 * m_A322;
+ m_A323 += m_A226 * f53_65;
+ m_A324 += m_A227 * f53_65;
+ m_A325 += m_A228 * f53_65;
+ m_A326 += m_A229 * f53_65;
+ m_A328 += m_A230 * f53_65;
+ m_A329 += m_A231 * f53_65;
+ RHS65 += f53_65 * RHS53;
+ const double f54 = 1.0 / m_A240;
+ const double f54_55 = -f54 * m_A256;
+ m_A257 += m_A241 * f54_55;
+ m_A258 += m_A242 * f54_55;
+ m_A259 += m_A243 * f54_55;
+ m_A260 += m_A244 * f54_55;
+ m_A261 += m_A245 * f54_55;
+ RHS55 += f54_55 * RHS54;
+ const double f54_56 = -f54 * m_A268;
+ m_A269 += m_A241 * f54_56;
+ m_A270 += m_A242 * f54_56;
+ m_A271 += m_A243 * f54_56;
+ m_A273 += m_A244 * f54_56;
+ m_A274 += m_A245 * f54_56;
+ RHS56 += f54_56 * RHS54;
+ const double f54_57 = -f54 * m_A279;
+ m_A280 += m_A241 * f54_57;
+ m_A281 += m_A242 * f54_57;
+ m_A282 += m_A243 * f54_57;
+ m_A284 += m_A244 * f54_57;
+ m_A285 += m_A245 * f54_57;
+ RHS57 += f54_57 * RHS54;
+ const double f54_63 = -f54 * m_A309;
+ m_A310 += m_A241 * f54_63;
+ m_A311 += m_A242 * f54_63;
+ m_A312 += m_A243 * f54_63;
+ m_A314 += m_A244 * f54_63;
+ m_A315 += m_A245 * f54_63;
+ RHS63 += f54_63 * RHS54;
+ const double f54_65 = -f54 * m_A323;
+ m_A324 += m_A241 * f54_65;
+ m_A325 += m_A242 * f54_65;
+ m_A326 += m_A243 * f54_65;
+ m_A328 += m_A244 * f54_65;
+ m_A329 += m_A245 * f54_65;
+ RHS65 += f54_65 * RHS54;
+ const double f55 = 1.0 / m_A257;
+ const double f55_56 = -f55 * m_A269;
+ m_A270 += m_A258 * f55_56;
+ m_A271 += m_A259 * f55_56;
+ m_A273 += m_A260 * f55_56;
+ m_A274 += m_A261 * f55_56;
+ RHS56 += f55_56 * RHS55;
+ const double f55_57 = -f55 * m_A280;
+ m_A281 += m_A258 * f55_57;
+ m_A282 += m_A259 * f55_57;
+ m_A284 += m_A260 * f55_57;
+ m_A285 += m_A261 * f55_57;
+ RHS57 += f55_57 * RHS55;
+ const double f55_63 = -f55 * m_A310;
+ m_A311 += m_A258 * f55_63;
+ m_A312 += m_A259 * f55_63;
+ m_A314 += m_A260 * f55_63;
+ m_A315 += m_A261 * f55_63;
+ RHS63 += f55_63 * RHS55;
+ const double f55_65 = -f55 * m_A324;
+ m_A325 += m_A258 * f55_65;
+ m_A326 += m_A259 * f55_65;
+ m_A328 += m_A260 * f55_65;
+ m_A329 += m_A261 * f55_65;
+ RHS65 += f55_65 * RHS55;
+ const double f56 = 1.0 / m_A270;
+ const double f56_57 = -f56 * m_A281;
+ m_A282 += m_A271 * f56_57;
+ m_A283 += m_A272 * f56_57;
+ m_A284 += m_A273 * f56_57;
+ m_A285 += m_A274 * f56_57;
+ m_A286 += m_A275 * f56_57;
+ RHS57 += f56_57 * RHS56;
+ const double f56_59 = -f56 * m_A291;
+ m_A292 += m_A271 * f56_59;
+ m_A293 += m_A272 * f56_59;
+ m_A294 += m_A273 * f56_59;
+ m_A295 += m_A274 * f56_59;
+ m_A296 += m_A275 * f56_59;
+ RHS59 += f56_59 * RHS56;
+ const double f56_63 = -f56 * m_A311;
+ m_A312 += m_A271 * f56_63;
+ m_A313 += m_A272 * f56_63;
+ m_A314 += m_A273 * f56_63;
+ m_A315 += m_A274 * f56_63;
+ m_A316 += m_A275 * f56_63;
+ RHS63 += f56_63 * RHS56;
+ const double f56_65 = -f56 * m_A325;
+ m_A326 += m_A271 * f56_65;
+ m_A327 += m_A272 * f56_65;
+ m_A328 += m_A273 * f56_65;
+ m_A329 += m_A274 * f56_65;
+ m_A330 += m_A275 * f56_65;
+ RHS65 += f56_65 * RHS56;
+ const double f56_66 = -f56 * m_A332;
+ m_A333 += m_A271 * f56_66;
+ m_A334 += m_A272 * f56_66;
+ m_A335 += m_A273 * f56_66;
+ m_A336 += m_A274 * f56_66;
+ m_A337 += m_A275 * f56_66;
+ RHS66 += f56_66 * RHS56;
+ const double f57 = 1.0 / m_A282;
+ const double f57_59 = -f57 * m_A292;
+ m_A293 += m_A283 * f57_59;
+ m_A294 += m_A284 * f57_59;
+ m_A295 += m_A285 * f57_59;
+ m_A296 += m_A286 * f57_59;
+ RHS59 += f57_59 * RHS57;
+ const double f57_63 = -f57 * m_A312;
+ m_A313 += m_A283 * f57_63;
+ m_A314 += m_A284 * f57_63;
+ m_A315 += m_A285 * f57_63;
+ m_A316 += m_A286 * f57_63;
+ RHS63 += f57_63 * RHS57;
+ const double f57_65 = -f57 * m_A326;
+ m_A327 += m_A283 * f57_65;
+ m_A328 += m_A284 * f57_65;
+ m_A329 += m_A285 * f57_65;
+ m_A330 += m_A286 * f57_65;
+ RHS65 += f57_65 * RHS57;
+ const double f57_66 = -f57 * m_A333;
+ m_A334 += m_A283 * f57_66;
+ m_A335 += m_A284 * f57_66;
+ m_A336 += m_A285 * f57_66;
+ m_A337 += m_A286 * f57_66;
+ RHS66 += f57_66 * RHS57;
+ const double f58 = 1.0 / m_A287;
+ const double f58_67 = -f58 * m_A341;
+ m_A349 += m_A288 * f58_67;
+ RHS67 += f58_67 * RHS58;
+ const double f59 = 1.0 / m_A293;
+ const double f59_63 = -f59 * m_A313;
+ m_A314 += m_A294 * f59_63;
+ m_A315 += m_A295 * f59_63;
+ m_A316 += m_A296 * f59_63;
+ RHS63 += f59_63 * RHS59;
+ const double f59_65 = -f59 * m_A327;
+ m_A328 += m_A294 * f59_65;
+ m_A329 += m_A295 * f59_65;
+ m_A330 += m_A296 * f59_65;
+ RHS65 += f59_65 * RHS59;
+ const double f59_66 = -f59 * m_A334;
+ m_A335 += m_A294 * f59_66;
+ m_A336 += m_A295 * f59_66;
+ m_A337 += m_A296 * f59_66;
+ RHS66 += f59_66 * RHS59;
+ const double f60 = 1.0 / m_A297;
+ const double f60_67 = -f60 * m_A342;
+ m_A349 += m_A298 * f60_67;
+ RHS67 += f60_67 * RHS60;
+ const double f61 = 1.0 / m_A299;
+ const double f61_67 = -f61 * m_A343;
+ m_A349 += m_A300 * f61_67;
+ RHS67 += f61_67 * RHS61;
+ const double f62 = 1.0 / m_A301;
+ const double f62_67 = -f62 * m_A344;
+ m_A349 += m_A302 * f62_67;
+ RHS67 += f62_67 * RHS62;
+ const double f63 = 1.0 / m_A314;
+ const double f63_65 = -f63 * m_A328;
+ m_A329 += m_A315 * f63_65;
+ m_A330 += m_A316 * f63_65;
+ m_A331 += m_A317 * f63_65;
+ RHS65 += f63_65 * RHS63;
+ const double f63_66 = -f63 * m_A335;
+ m_A336 += m_A315 * f63_66;
+ m_A337 += m_A316 * f63_66;
+ m_A338 += m_A317 * f63_66;
+ RHS66 += f63_66 * RHS63;
+ const double f63_67 = -f63 * m_A345;
+ m_A347 += m_A315 * f63_67;
+ m_A348 += m_A316 * f63_67;
+ m_A349 += m_A317 * f63_67;
+ RHS67 += f63_67 * RHS63;
+ const double f64 = 1.0 / m_A320;
+ const double f64_67 = -f64 * m_A346;
+ m_A349 += m_A321 * f64_67;
+ RHS67 += f64_67 * RHS64;
+ const double f65 = 1.0 / m_A329;
+ const double f65_66 = -f65 * m_A336;
+ m_A337 += m_A330 * f65_66;
+ m_A338 += m_A331 * f65_66;
+ RHS66 += f65_66 * RHS65;
+ const double f65_67 = -f65 * m_A347;
+ m_A348 += m_A330 * f65_67;
+ m_A349 += m_A331 * f65_67;
+ RHS67 += f65_67 * RHS65;
+ const double f66 = 1.0 / m_A337;
+ const double f66_67 = -f66 * m_A348;
+ m_A349 += m_A338 * f66_67;
+ RHS67 += f66_67 * RHS66;
+ V[67] = RHS67 / m_A349;
+ double tmp66 = 0.0;
+ tmp66 += m_A338 * V[67];
+ V[66] = (RHS66 - tmp66) / m_A337;
+ double tmp65 = 0.0;
+ tmp65 += m_A330 * V[66];
+ tmp65 += m_A331 * V[67];
+ V[65] = (RHS65 - tmp65) / m_A329;
+ double tmp64 = 0.0;
+ tmp64 += m_A321 * V[67];
+ V[64] = (RHS64 - tmp64) / m_A320;
+ double tmp63 = 0.0;
+ tmp63 += m_A315 * V[65];
+ tmp63 += m_A316 * V[66];
+ tmp63 += m_A317 * V[67];
+ V[63] = (RHS63 - tmp63) / m_A314;
+ double tmp62 = 0.0;
+ tmp62 += m_A302 * V[67];
+ V[62] = (RHS62 - tmp62) / m_A301;
+ double tmp61 = 0.0;
+ tmp61 += m_A300 * V[67];
+ V[61] = (RHS61 - tmp61) / m_A299;
+ double tmp60 = 0.0;
+ tmp60 += m_A298 * V[67];
+ V[60] = (RHS60 - tmp60) / m_A297;
+ double tmp59 = 0.0;
+ tmp59 += m_A294 * V[63];
+ tmp59 += m_A295 * V[65];
+ tmp59 += m_A296 * V[66];
+ V[59] = (RHS59 - tmp59) / m_A293;
+ double tmp58 = 0.0;
+ tmp58 += m_A288 * V[67];
+ V[58] = (RHS58 - tmp58) / m_A287;
+ double tmp57 = 0.0;
+ tmp57 += m_A283 * V[59];
+ tmp57 += m_A284 * V[63];
+ tmp57 += m_A285 * V[65];
+ tmp57 += m_A286 * V[66];
+ V[57] = (RHS57 - tmp57) / m_A282;
+ double tmp56 = 0.0;
+ tmp56 += m_A271 * V[57];
+ tmp56 += m_A272 * V[59];
+ tmp56 += m_A273 * V[63];
+ tmp56 += m_A274 * V[65];
+ tmp56 += m_A275 * V[66];
+ V[56] = (RHS56 - tmp56) / m_A270;
+ double tmp55 = 0.0;
+ tmp55 += m_A258 * V[56];
+ tmp55 += m_A259 * V[57];
+ tmp55 += m_A260 * V[63];
+ tmp55 += m_A261 * V[65];
+ V[55] = (RHS55 - tmp55) / m_A257;
+ double tmp54 = 0.0;
+ tmp54 += m_A241 * V[55];
+ tmp54 += m_A242 * V[56];
+ tmp54 += m_A243 * V[57];
+ tmp54 += m_A244 * V[63];
+ tmp54 += m_A245 * V[65];
+ V[54] = (RHS54 - tmp54) / m_A240;
+ double tmp53 = 0.0;
+ tmp53 += m_A226 * V[54];
+ tmp53 += m_A227 * V[55];
+ tmp53 += m_A228 * V[56];
+ tmp53 += m_A229 * V[57];
+ tmp53 += m_A230 * V[63];
+ tmp53 += m_A231 * V[65];
+ V[53] = (RHS53 - tmp53) / m_A225;
+ double tmp52 = 0.0;
+ tmp52 += m_A215 * V[53];
+ tmp52 += m_A216 * V[54];
+ tmp52 += m_A217 * V[55];
+ tmp52 += m_A218 * V[56];
+ tmp52 += m_A219 * V[63];
+ V[52] = (RHS52 - tmp52) / m_A214;
+ double tmp51 = 0.0;
+ tmp51 += m_A202 * V[52];
+ tmp51 += m_A203 * V[53];
+ tmp51 += m_A204 * V[54];
+ tmp51 += m_A205 * V[56];
+ V[51] = (RHS51 - tmp51) / m_A201;
+ double tmp50 = 0.0;
+ tmp50 += m_A193 * V[51];
+ V[50] = (RHS50 - tmp50) / m_A192;
+ double tmp49 = 0.0;
+ tmp49 += m_A184 * V[67];
+ V[49] = (RHS49 - tmp49) / m_A183;
+ double tmp48 = 0.0;
+ tmp48 += m_A182 * V[64];
+ V[48] = (RHS48 - tmp48) / m_A181;
+ double tmp47 = 0.0;
+ tmp47 += m_A173 * V[51];
+ tmp47 += m_A174 * V[52];
+ tmp47 += m_A175 * V[53];
+ tmp47 += m_A176 * V[54];
+ tmp47 += m_A177 * V[56];
+ V[47] = (RHS47 - tmp47) / m_A172;
+ double tmp46 = 0.0;
+ tmp46 += m_A165 * V[48];
+ V[46] = (RHS46 - tmp46) / m_A164;
+ double tmp45 = 0.0;
+ tmp45 += m_A159 * V[52];
+ tmp45 += m_A160 * V[55];
+ tmp45 += m_A161 * V[63];
+ V[45] = (RHS45 - tmp45) / m_A158;
+ double tmp44 = 0.0;
+ tmp44 += m_A154 * V[57];
+ V[44] = (RHS44 - tmp44) / m_A153;
+ double tmp43 = 0.0;
+ tmp43 += m_A151 * V[59];
+ V[43] = (RHS43 - tmp43) / m_A150;
+ double tmp42 = 0.0;
+ tmp42 += m_A146 * V[47];
+ tmp42 += m_A147 * V[54];
+ tmp42 += m_A148 * V[55];
+ V[42] = (RHS42 - tmp42) / m_A145;
+ double tmp41 = 0.0;
+ tmp41 += m_A139 * V[42];
+ tmp41 += m_A140 * V[47];
+ tmp41 += m_A141 * V[54];
+ tmp41 += m_A142 * V[55];
+ V[41] = (RHS41 - tmp41) / m_A138;
+ double tmp40 = 0.0;
+ tmp40 += m_A131 * V[47];
+ tmp40 += m_A132 * V[51];
+ tmp40 += m_A133 * V[52];
+ V[40] = (RHS40 - tmp40) / m_A130;
+ double tmp39 = 0.0;
+ tmp39 += m_A124 * V[40];
+ tmp39 += m_A125 * V[52];
+ V[39] = (RHS39 - tmp39) / m_A123;
+ double tmp38 = 0.0;
+ tmp38 += m_A120 * V[47];
+ tmp38 += m_A121 * V[54];
+ V[38] = (RHS38 - tmp38) / m_A119;
+ double tmp37 = 0.0;
+ tmp37 += m_A113 * V[40];
+ tmp37 += m_A114 * V[47];
+ tmp37 += m_A115 * V[51];
+ V[37] = (RHS37 - tmp37) / m_A112;
+ double tmp36 = 0.0;
+ tmp36 += m_A106 * V[37];
+ tmp36 += m_A107 * V[47];
+ tmp36 += m_A108 * V[51];
+ V[36] = (RHS36 - tmp36) / m_A105;
+ double tmp35 = 0.0;
+ tmp35 += m_A102 * V[50];
+ tmp35 += m_A103 * V[51];
+ V[35] = (RHS35 - tmp35) / m_A101;
+ double tmp34 = 0.0;
+ tmp34 += m_A99 * V[50];
+ V[34] = (RHS34 - tmp34) / m_A98;
+ double tmp33 = 0.0;
+ tmp33 += m_A94 * V[45];
+ tmp33 += m_A95 * V[52];
+ tmp33 += m_A96 * V[63];
+ V[33] = (RHS33 - tmp33) / m_A93;
+ double tmp32 = 0.0;
+ tmp32 += m_A90 * V[50];
+ V[32] = (RHS32 - tmp32) / m_A89;
+ double tmp31 = 0.0;
+ tmp31 += m_A87 * V[50];
+ V[31] = (RHS31 - tmp31) / m_A86;
+ double tmp30 = 0.0;
+ tmp30 += m_A84 * V[50];
+ V[30] = (RHS30 - tmp30) / m_A83;
+ double tmp29 = 0.0;
+ tmp29 += m_A80 * V[67];
+ V[29] = (RHS29 - tmp29) / m_A79;
+ double tmp28 = 0.0;
+ tmp28 += m_A78 * V[64];
+ V[28] = (RHS28 - tmp28) / m_A77;
+ double tmp27 = 0.0;
+ tmp27 += m_A74 * V[47];
+ tmp27 += m_A75 * V[53];
+ tmp27 += m_A76 * V[56];
+ V[27] = (RHS27 - tmp27) / m_A73;
+ double tmp26 = 0.0;
+ tmp26 += m_A71 * V[46];
+ tmp26 += m_A72 * V[48];
+ V[26] = (RHS26 - tmp26) / m_A70;
+ double tmp25 = 0.0;
+ tmp25 += m_A69 * V[48];
+ V[25] = (RHS25 - tmp25) / m_A68;
+ double tmp24 = 0.0;
+ tmp24 += m_A67 * V[53];
+ V[24] = (RHS24 - tmp24) / m_A66;
+ double tmp23 = 0.0;
+ tmp23 += m_A65 * V[56];
+ V[23] = (RHS23 - tmp23) / m_A64;
+ double tmp22 = 0.0;
+ tmp22 += m_A61 * V[33];
+ tmp22 += m_A62 * V[45];
+ tmp22 += m_A63 * V[63];
+ V[22] = (RHS22 - tmp22) / m_A60;
+ double tmp21 = 0.0;
+ tmp21 += m_A58 * V[44];
+ tmp21 += m_A59 * V[57];
+ V[21] = (RHS21 - tmp21) / m_A57;
+ double tmp20 = 0.0;
+ tmp20 += m_A55 * V[43];
+ tmp20 += m_A56 * V[59];
+ V[20] = (RHS20 - tmp20) / m_A54;
+ double tmp19 = 0.0;
+ tmp19 += m_A53 * V[46];
+ V[19] = (RHS19 - tmp19) / m_A52;
+ double tmp18 = 0.0;
+ tmp18 += m_A51 * V[22];
+ V[18] = (RHS18 - tmp18) / m_A50;
+ double tmp17 = 0.0;
+ tmp17 += m_A48 * V[45];
+ tmp17 += m_A49 * V[55];
+ V[17] = (RHS17 - tmp17) / m_A47;
+ double tmp16 = 0.0;
+ tmp16 += m_A45 * V[33];
+ tmp16 += m_A46 * V[52];
+ V[16] = (RHS16 - tmp16) / m_A44;
+ double tmp15 = 0.0;
+ tmp15 += m_A41 * V[41];
+ tmp15 += m_A42 * V[42];
+ tmp15 += m_A43 * V[55];
+ V[15] = (RHS15 - tmp15) / m_A40;
+ double tmp14 = 0.0;
+ tmp14 += m_A39 * V[42];
+ V[14] = (RHS14 - tmp14) / m_A38;
+ double tmp13 = 0.0;
+ tmp13 += m_A36 * V[40];
+ tmp13 += m_A37 * V[52];
+ V[13] = (RHS13 - tmp13) / m_A35;
+ double tmp12 = 0.0;
+ tmp12 += m_A32 * V[38];
+ tmp12 += m_A33 * V[47];
+ tmp12 += m_A34 * V[54];
+ V[12] = (RHS12 - tmp12) / m_A31;
+ double tmp11 = 0.0;
+ tmp11 += m_A29 * V[12];
+ tmp11 += m_A30 * V[54];
+ V[11] = (RHS11 - tmp11) / m_A28;
+ double tmp10 = 0.0;
+ tmp10 += m_A25 * V[36];
+ tmp10 += m_A26 * V[37];
+ tmp10 += m_A27 * V[40];
+ V[10] = (RHS10 - tmp10) / m_A24;
+ double tmp9 = 0.0;
+ tmp9 += m_A21 * V[37];
+ tmp9 += m_A22 * V[47];
+ tmp9 += m_A23 * V[51];
+ V[9] = (RHS9 - tmp9) / m_A20;
+ double tmp8 = 0.0;
+ tmp8 += m_A19 * V[38];
+ V[8] = (RHS8 - tmp8) / m_A18;
+ double tmp7 = 0.0;
+ tmp7 += m_A17 * V[51];
+ V[7] = (RHS7 - tmp7) / m_A16;
+ double tmp6 = 0.0;
+ tmp6 += m_A15 * V[38];
+ V[6] = (RHS6 - tmp6) / m_A14;
+ double tmp5 = 0.0;
+ tmp5 += m_A13 * V[35];
+ V[5] = (RHS5 - tmp5) / m_A12;
+ double tmp4 = 0.0;
+ tmp4 += m_A10 * V[31];
+ tmp4 += m_A11 * V[50];
+ V[4] = (RHS4 - tmp4) / m_A9;
+ double tmp3 = 0.0;
+ tmp3 += m_A8 * V[34];
+ V[3] = (RHS3 - tmp3) / m_A7;
+ double tmp2 = 0.0;
+ tmp2 += m_A5 * V[30];
+ tmp2 += m_A6 * V[50];
+ V[2] = (RHS2 - tmp2) / m_A4;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[32];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[30];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// stuntcyc
static void nl_gcr_c924fe5960b1479e_20_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -57960,6 +67024,215 @@ static void nl_gcr_d4c34516ff6aa139_46_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_d5e1c37cfa2d2853_30_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A0 += gt[3];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 += Idr[3];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ RHS0 -= go[3] * *cnV[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A3 += go[4];
+ m_A4 += go[5];
+ double RHS1 = Idr[4];
+ RHS1 += Idr[5];
+ m_A5 += gt[6];
+ m_A5 += gt[7];
+ m_A5 += gt[8];
+ m_A6 += go[6];
+ double RHS2 = Idr[6];
+ RHS2 += Idr[7];
+ RHS2 += Idr[8];
+ RHS2 -= go[7] * *cnV[7];
+ RHS2 -= go[8] * *cnV[8];
+ m_A7 += gt[9];
+ m_A7 += gt[10];
+ m_A7 += gt[11];
+ m_A8 += go[9];
+ m_A9 += go[10];
+ double RHS3 = Idr[9];
+ RHS3 += Idr[10];
+ RHS3 += Idr[11];
+ RHS3 -= go[11] * *cnV[11];
+ m_A11 += gt[12];
+ m_A11 += gt[13];
+ m_A10 += go[12];
+ double RHS4 = Idr[12];
+ RHS4 += Idr[13];
+ RHS4 -= go[13] * *cnV[13];
+ m_A14 += gt[14];
+ m_A14 += gt[15];
+ m_A14 += gt[16];
+ m_A15 += go[14];
+ m_A13 += go[15];
+ double RHS5 = Idr[14];
+ RHS5 += Idr[15];
+ RHS5 += Idr[16];
+ RHS5 -= go[16] * *cnV[16];
+ m_A17 += gt[17];
+ m_A17 += gt[18];
+ m_A17 += gt[19];
+ m_A17 += gt[20];
+ m_A17 += gt[21];
+ m_A17 += gt[22];
+ m_A17 += gt[23];
+ m_A16 += go[17];
+ m_A18 += go[18];
+ double RHS6 = Idr[17];
+ RHS6 += Idr[18];
+ RHS6 += Idr[19];
+ RHS6 += Idr[20];
+ RHS6 += Idr[21];
+ RHS6 += Idr[22];
+ RHS6 += Idr[23];
+ RHS6 -= go[19] * *cnV[19];
+ RHS6 -= go[20] * *cnV[20];
+ RHS6 -= go[21] * *cnV[21];
+ RHS6 -= go[22] * *cnV[22];
+ RHS6 -= go[23] * *cnV[23];
+ m_A22 += gt[24];
+ m_A22 += gt[25];
+ m_A22 += gt[26];
+ m_A22 += gt[27];
+ m_A20 += go[24];
+ m_A19 += go[25];
+ m_A21 += go[26];
+ double RHS7 = Idr[24];
+ RHS7 += Idr[25];
+ RHS7 += Idr[26];
+ RHS7 += Idr[27];
+ RHS7 -= go[27] * *cnV[27];
+ m_A29 += gt[28];
+ m_A29 += gt[29];
+ m_A29 += gt[30];
+ m_A29 += gt[31];
+ m_A29 += gt[32];
+ m_A27 += go[28];
+ m_A25 += go[29];
+ m_A24 += go[30];
+ double RHS8 = Idr[28];
+ RHS8 += Idr[29];
+ RHS8 += Idr[30];
+ RHS8 += Idr[31];
+ RHS8 += Idr[32];
+ RHS8 -= go[31] * *cnV[31];
+ RHS8 -= go[32] * *cnV[32];
+ const double f0 = 1.0 / m_A0;
+ const double f0_5 = -f0 * m_A13;
+ m_A14 += m_A1 * f0_5;
+ RHS5 += f0_5 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_7 = -f1 * m_A19;
+ m_A22 += m_A3 * f1_7;
+ m_A23 += m_A4 * f1_7;
+ RHS7 += f1_7 * RHS1;
+ const double f1_8 = -f1 * m_A24;
+ m_A28 += m_A3 * f1_8;
+ m_A29 += m_A4 * f1_8;
+ RHS8 += f1_8 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_6 = -f2 * m_A16;
+ m_A18 += m_A6 * f2_6;
+ RHS6 += f2_6 * RHS2;
+ const double f2_7 = -f2 * m_A20;
+ m_A22 += m_A6 * f2_7;
+ RHS7 += f2_7 * RHS2;
+ const double f3 = 1.0 / m_A7;
+ const double f3_4 = -f3 * m_A10;
+ m_A11 += m_A8 * f3_4;
+ m_A12 += m_A9 * f3_4;
+ RHS4 += f3_4 * RHS3;
+ const double f3_8 = -f3 * m_A25;
+ m_A26 += m_A8 * f3_8;
+ m_A29 += m_A9 * f3_8;
+ RHS8 += f3_8 * RHS3;
+ const double f4 = 1.0 / m_A11;
+ const double f4_8 = -f4 * m_A26;
+ m_A29 += m_A12 * f4_8;
+ RHS8 += f4_8 * RHS4;
+ const double f5 = 1.0 / m_A14;
+ const double f5_7 = -f5 * m_A21;
+ m_A22 += m_A15 * f5_7;
+ RHS7 += f5_7 * RHS5;
+ const double f6 = 1.0 / m_A17;
+ const double f6_8 = -f6 * m_A27;
+ m_A28 += m_A18 * f6_8;
+ RHS8 += f6_8 * RHS6;
+ const double f7 = 1.0 / m_A22;
+ const double f7_8 = -f7 * m_A28;
+ m_A29 += m_A23 * f7_8;
+ RHS8 += f7_8 * RHS7;
+ V[8] = RHS8 / m_A29;
+ double tmp7 = 0.0;
+ tmp7 += m_A23 * V[8];
+ V[7] = (RHS7 - tmp7) / m_A22;
+ double tmp6 = 0.0;
+ tmp6 += m_A18 * V[7];
+ V[6] = (RHS6 - tmp6) / m_A17;
+ double tmp5 = 0.0;
+ tmp5 += m_A15 * V[7];
+ V[5] = (RHS5 - tmp5) / m_A14;
+ double tmp4 = 0.0;
+ tmp4 += m_A12 * V[8];
+ V[4] = (RHS4 - tmp4) / m_A11;
+ double tmp3 = 0.0;
+ tmp3 += m_A8 * V[4];
+ tmp3 += m_A9 * V[8];
+ V[3] = (RHS3 - tmp3) / m_A7;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[7];
+ V[2] = (RHS2 - tmp2) / m_A5;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[7];
+ tmp1 += m_A4 * V[8];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[5];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// boxingb
static void nl_gcr_d7d45dc58b08cab9_10_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -58279,6 +67552,133 @@ static void nl_gcr_d8c511d38cef5f6f_34_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
+// frogs
+static void nl_gcr_d97fd7ecc1ebba3d_19_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 -= go[1] * *cnV[1];
+ m_A2 += gt[2];
+ m_A2 += gt[3];
+ m_A3 += go[2];
+ double RHS1 = Idr[2];
+ RHS1 += Idr[3];
+ RHS1 -= go[3] * *cnV[3];
+ m_A4 += gt[4];
+ m_A4 += gt[5];
+ m_A5 += go[4];
+ double RHS2 = Idr[4];
+ RHS2 += Idr[5];
+ RHS2 -= go[5] * *cnV[5];
+ m_A6 += gt[6];
+ m_A6 += gt[7];
+ m_A7 += go[6];
+ double RHS3 = Idr[6];
+ RHS3 += Idr[7];
+ RHS3 -= go[7] * *cnV[7];
+ m_A8 += gt[8];
+ m_A8 += gt[9];
+ m_A9 += go[8];
+ double RHS4 = Idr[8];
+ RHS4 += Idr[9];
+ RHS4 -= go[9] * *cnV[9];
+ m_A10 += gt[10];
+ m_A10 += gt[11];
+ m_A11 += go[10];
+ double RHS5 = Idr[10];
+ RHS5 += Idr[11];
+ RHS5 -= go[11] * *cnV[11];
+ m_A18 += gt[12];
+ m_A18 += gt[13];
+ m_A18 += gt[14];
+ m_A18 += gt[15];
+ m_A18 += gt[16];
+ m_A18 += gt[17];
+ m_A18 += gt[18];
+ m_A17 += go[12];
+ m_A16 += go[13];
+ m_A15 += go[14];
+ m_A14 += go[15];
+ m_A13 += go[16];
+ m_A12 += go[17];
+ double RHS6 = Idr[12];
+ RHS6 += Idr[13];
+ RHS6 += Idr[14];
+ RHS6 += Idr[15];
+ RHS6 += Idr[16];
+ RHS6 += Idr[17];
+ RHS6 += Idr[18];
+ RHS6 -= go[18] * *cnV[18];
+ const double f0 = 1.0 / m_A0;
+ const double f0_6 = -f0 * m_A12;
+ m_A18 += m_A1 * f0_6;
+ RHS6 += f0_6 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_6 = -f1 * m_A13;
+ m_A18 += m_A3 * f1_6;
+ RHS6 += f1_6 * RHS1;
+ const double f2 = 1.0 / m_A4;
+ const double f2_6 = -f2 * m_A14;
+ m_A18 += m_A5 * f2_6;
+ RHS6 += f2_6 * RHS2;
+ const double f3 = 1.0 / m_A6;
+ const double f3_6 = -f3 * m_A15;
+ m_A18 += m_A7 * f3_6;
+ RHS6 += f3_6 * RHS3;
+ const double f4 = 1.0 / m_A8;
+ const double f4_6 = -f4 * m_A16;
+ m_A18 += m_A9 * f4_6;
+ RHS6 += f4_6 * RHS4;
+ const double f5 = 1.0 / m_A10;
+ const double f5_6 = -f5 * m_A17;
+ m_A18 += m_A11 * f5_6;
+ RHS6 += f5_6 * RHS5;
+ V[6] = RHS6 / m_A18;
+ double tmp5 = 0.0;
+ tmp5 += m_A11 * V[6];
+ V[5] = (RHS5 - tmp5) / m_A10;
+ double tmp4 = 0.0;
+ tmp4 += m_A9 * V[6];
+ V[4] = (RHS4 - tmp4) / m_A8;
+ double tmp3 = 0.0;
+ tmp3 += m_A7 * V[6];
+ V[3] = (RHS3 - tmp3) / m_A6;
+ double tmp2 = 0.0;
+ tmp2 += m_A5 * V[6];
+ V[2] = (RHS2 - tmp2) / m_A4;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[6];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[6];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// warrior
static void nl_gcr_da598f43329e823_27_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -59694,6 +69094,148 @@ static void nl_gcr_e02a162cb515a958_100_double_double(double * __restrict V, con
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_e03f0bc5ac056326_20_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A4 += go[3];
+ m_A3 += go[4];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 -= go[5] * *cnV[5];
+ m_A5 += gt[6];
+ m_A5 += gt[7];
+ m_A5 += gt[8];
+ m_A5 += gt[9];
+ m_A7 += go[6];
+ m_A6 += go[7];
+ double RHS2 = Idr[6];
+ RHS2 += Idr[7];
+ RHS2 += Idr[8];
+ RHS2 += Idr[9];
+ RHS2 -= go[8] * *cnV[8];
+ RHS2 -= go[9] * *cnV[9];
+ m_A10 += gt[10];
+ m_A10 += gt[11];
+ m_A9 += go[10];
+ m_A8 += go[11];
+ double RHS3 = Idr[10];
+ RHS3 += Idr[11];
+ m_A15 += gt[12];
+ m_A15 += gt[13];
+ m_A15 += gt[14];
+ m_A13 += go[12];
+ m_A12 += go[13];
+ double RHS4 = Idr[12];
+ RHS4 += Idr[13];
+ RHS4 += Idr[14];
+ RHS4 -= go[14] * *cnV[14];
+ m_A19 += gt[15];
+ m_A19 += gt[16];
+ m_A19 += gt[17];
+ m_A19 += gt[18];
+ m_A19 += gt[19];
+ m_A19 += gt[20];
+ m_A19 += gt[21];
+ m_A17 += go[15];
+ m_A18 += go[16];
+ double RHS5 = Idr[15];
+ RHS5 += Idr[16];
+ RHS5 += Idr[17];
+ RHS5 += Idr[18];
+ RHS5 += Idr[19];
+ RHS5 += Idr[20];
+ RHS5 += Idr[21];
+ RHS5 -= go[17] * *cnV[17];
+ RHS5 -= go[18] * *cnV[18];
+ RHS5 -= go[19] * *cnV[19];
+ RHS5 -= go[20] * *cnV[20];
+ RHS5 -= go[21] * *cnV[21];
+ const double f0 = 1.0 / m_A0;
+ const double f0_3 = -f0 * m_A8;
+ m_A10 += m_A1 * f0_3;
+ RHS3 += f0_3 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_3 = -f1 * m_A9;
+ m_A10 += m_A3 * f1_3;
+ m_A11 += m_A4 * f1_3;
+ RHS3 += f1_3 * RHS1;
+ const double f1_4 = -f1 * m_A12;
+ m_A14 += m_A3 * f1_4;
+ m_A15 += m_A4 * f1_4;
+ RHS4 += f1_4 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_4 = -f2 * m_A13;
+ m_A15 += m_A6 * f2_4;
+ m_A16 += m_A7 * f2_4;
+ RHS4 += f2_4 * RHS2;
+ const double f2_5 = -f2 * m_A17;
+ m_A18 += m_A6 * f2_5;
+ m_A19 += m_A7 * f2_5;
+ RHS5 += f2_5 * RHS2;
+ const double f3 = 1.0 / m_A10;
+ const double f3_4 = -f3 * m_A14;
+ m_A15 += m_A11 * f3_4;
+ RHS4 += f3_4 * RHS3;
+ const double f4 = 1.0 / m_A15;
+ const double f4_5 = -f4 * m_A18;
+ m_A19 += m_A16 * f4_5;
+ RHS5 += f4_5 * RHS4;
+ V[5] = RHS5 / m_A19;
+ double tmp4 = 0.0;
+ tmp4 += m_A16 * V[5];
+ V[4] = (RHS4 - tmp4) / m_A15;
+ double tmp3 = 0.0;
+ tmp3 += m_A11 * V[4];
+ V[3] = (RHS3 - tmp3) / m_A10;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[4];
+ tmp2 += m_A7 * V[5];
+ V[2] = (RHS2 - tmp2) / m_A5;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[3];
+ tmp1 += m_A4 * V[4];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[3];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// speedfrk
static void nl_gcr_e07b5b086812756c_7_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -66198,8 +75740,8 @@ static void nl_gcr_ef2f49641f433a74_94_double_double(double * __restrict V, cons
V[0] = (RHS0 - tmp0) / m_A0;
}
-// astrob
-static void nl_gcr_efd052e6829c33e_9_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+// frogs
+static void nl_gcr_f153eda877c6e8ed_30_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
{
@@ -66213,44 +75755,568 @@ static void nl_gcr_efd052e6829c33e_9_double_double(double * __restrict V, const
double m_A6(0.0);
double m_A7(0.0);
double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
m_A0 += gt[0];
m_A0 += gt[1];
- m_A2 += go[0];
- m_A1 += go[1];
+ m_A0 += gt[2];
+ m_A0 += gt[3];
+ m_A1 += go[0];
double RHS0 = Idr[0];
RHS0 += Idr[1];
- m_A4 += gt[2];
- m_A4 += gt[3];
- m_A5 += go[2];
+ RHS0 += Idr[2];
+ RHS0 += Idr[3];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ RHS0 -= go[3] * *cnV[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A2 += gt[6];
+ m_A2 += gt[7];
+ m_A2 += gt[8];
+ m_A2 += gt[9];
+ m_A2 += gt[10];
+ m_A5 += go[4];
+ m_A5 += go[5];
+ m_A4 += go[6];
+ m_A4 += go[7];
+ m_A3 += go[8];
+ m_A3 += go[9];
+ double RHS1 = Idr[4];
+ RHS1 += Idr[5];
+ RHS1 += Idr[6];
+ RHS1 += Idr[7];
+ RHS1 += Idr[8];
+ RHS1 += Idr[9];
+ RHS1 += Idr[10];
+ RHS1 -= go[10] * *cnV[10];
+ m_A6 += gt[11];
+ m_A6 += gt[12];
+ m_A6 += gt[13];
+ m_A6 += gt[14];
+ m_A7 += go[11];
+ m_A8 += go[12];
+ m_A8 += go[13];
+ double RHS2 = Idr[11];
+ RHS2 += Idr[12];
+ RHS2 += Idr[13];
+ RHS2 += Idr[14];
+ RHS2 -= go[14] * *cnV[14];
+ m_A9 += gt[15];
+ m_A10 += go[15];
+ double RHS3 = Idr[15];
+ m_A13 += gt[16];
+ m_A13 += gt[17];
+ m_A13 += gt[18];
+ m_A13 += gt[19];
+ m_A13 += gt[20];
+ m_A12 += go[16];
+ m_A12 += go[17];
+ m_A11 += go[18];
+ double RHS4 = Idr[16];
+ RHS4 += Idr[17];
+ RHS4 += Idr[18];
+ RHS4 += Idr[19];
+ RHS4 += Idr[20];
+ RHS4 -= go[19] * *cnV[19];
+ RHS4 -= go[20] * *cnV[20];
+ m_A18 += gt[21];
+ m_A18 += gt[22];
+ m_A18 += gt[23];
+ m_A18 += gt[24];
+ m_A19 += go[21];
+ m_A16 += go[22];
+ m_A16 += go[23];
+ double RHS5 = Idr[21];
+ RHS5 += Idr[22];
+ RHS5 += Idr[23];
+ RHS5 += Idr[24];
+ RHS5 -= go[24] * *cnV[24];
+ m_A22 += gt[25];
+ m_A22 += gt[26];
+ m_A22 += gt[27];
+ m_A22 += gt[28];
+ m_A22 += gt[29];
+ m_A22 += gt[30];
+ m_A21 += go[25];
+ m_A20 += go[26];
+ m_A23 += go[27];
+ m_A23 += go[28];
+ double RHS6 = Idr[25];
+ RHS6 += Idr[26];
+ RHS6 += Idr[27];
+ RHS6 += Idr[28];
+ RHS6 += Idr[29];
+ RHS6 += Idr[30];
+ RHS6 -= go[29] * *cnV[29];
+ RHS6 -= go[30] * *cnV[30];
+ m_A29 += gt[31];
+ m_A29 += gt[32];
+ m_A29 += gt[33];
+ m_A29 += gt[34];
+ m_A29 += gt[35];
+ m_A29 += gt[36];
+ m_A29 += gt[37];
+ m_A29 += gt[38];
+ m_A28 += go[31];
+ m_A28 += go[32];
+ m_A25 += go[33];
+ m_A25 += go[34];
+ m_A27 += go[35];
+ m_A24 += go[36];
+ m_A24 += go[37];
+ double RHS7 = Idr[31];
+ RHS7 += Idr[32];
+ RHS7 += Idr[33];
+ RHS7 += Idr[34];
+ RHS7 += Idr[35];
+ RHS7 += Idr[36];
+ RHS7 += Idr[37];
+ RHS7 += Idr[38];
+ RHS7 -= go[38] * *cnV[38];
+ const double f0 = 1.0 / m_A0;
+ const double f0_4 = -f0 * m_A11;
+ m_A13 += m_A1 * f0_4;
+ RHS4 += f0_4 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_4 = -f1 * m_A12;
+ m_A13 += m_A3 * f1_4;
+ m_A14 += m_A4 * f1_4;
+ m_A15 += m_A5 * f1_4;
+ RHS4 += f1_4 * RHS1;
+ const double f1_5 = -f1 * m_A16;
+ m_A17 += m_A3 * f1_5;
+ m_A18 += m_A4 * f1_5;
+ m_A19 += m_A5 * f1_5;
+ RHS5 += f1_5 * RHS1;
+ const double f1_7 = -f1 * m_A24;
+ m_A26 += m_A3 * f1_7;
+ m_A27 += m_A4 * f1_7;
+ m_A29 += m_A5 * f1_7;
+ RHS7 += f1_7 * RHS1;
+ const double f2 = 1.0 / m_A6;
+ const double f2_6 = -f2 * m_A20;
+ m_A22 += m_A7 * f2_6;
+ m_A23 += m_A8 * f2_6;
+ RHS6 += f2_6 * RHS2;
+ const double f2_7 = -f2 * m_A25;
+ m_A28 += m_A7 * f2_7;
+ m_A29 += m_A8 * f2_7;
+ RHS7 += f2_7 * RHS2;
+ const double f3 = 1.0 / m_A9;
+ const double f3_6 = -f3 * m_A21;
+ m_A22 += m_A10 * f3_6;
+ RHS6 += f3_6 * RHS3;
+ const double f4 = 1.0 / m_A13;
+ const double f4_5 = -f4 * m_A17;
+ m_A18 += m_A14 * f4_5;
+ m_A19 += m_A15 * f4_5;
+ RHS5 += f4_5 * RHS4;
+ const double f4_7 = -f4 * m_A26;
+ m_A27 += m_A14 * f4_7;
+ m_A29 += m_A15 * f4_7;
+ RHS7 += f4_7 * RHS4;
+ const double f5 = 1.0 / m_A18;
+ const double f5_7 = -f5 * m_A27;
+ m_A29 += m_A19 * f5_7;
+ RHS7 += f5_7 * RHS5;
+ const double f6 = 1.0 / m_A22;
+ const double f6_7 = -f6 * m_A28;
+ m_A29 += m_A23 * f6_7;
+ RHS7 += f6_7 * RHS6;
+ V[7] = RHS7 / m_A29;
+ double tmp6 = 0.0;
+ tmp6 += m_A23 * V[7];
+ V[6] = (RHS6 - tmp6) / m_A22;
+ double tmp5 = 0.0;
+ tmp5 += m_A19 * V[7];
+ V[5] = (RHS5 - tmp5) / m_A18;
+ double tmp4 = 0.0;
+ tmp4 += m_A14 * V[5];
+ tmp4 += m_A15 * V[7];
+ V[4] = (RHS4 - tmp4) / m_A13;
+ double tmp3 = 0.0;
+ tmp3 += m_A10 * V[6];
+ V[3] = (RHS3 - tmp3) / m_A9;
+ double tmp2 = 0.0;
+ tmp2 += m_A7 * V[6];
+ tmp2 += m_A8 * V[7];
+ V[2] = (RHS2 - tmp2) / m_A6;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[4];
+ tmp1 += m_A4 * V[5];
+ tmp1 += m_A5 * V[7];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[4];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
+// frogs
+static void nl_gcr_f2de20e827252602_53_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 -= go[1] * *cnV[1];
+ m_A2 += gt[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A4 += go[2];
m_A3 += go[3];
+ m_A3 += go[4];
double RHS1 = Idr[2];
RHS1 += Idr[3];
- m_A8 += gt[4];
- m_A8 += gt[5];
- m_A7 += go[4];
- m_A6 += go[5];
- double RHS2 = Idr[4];
- RHS2 += Idr[5];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 -= go[5] * *cnV[5];
+ m_A5 += gt[6];
+ m_A5 += gt[7];
+ m_A6 += go[6];
+ double RHS2 = Idr[6];
+ RHS2 += Idr[7];
+ RHS2 -= go[7] * *cnV[7];
+ m_A7 += gt[8];
+ m_A7 += gt[9];
+ m_A7 += gt[10];
+ m_A7 += gt[11];
+ m_A8 += go[8];
+ m_A8 += go[9];
+ double RHS3 = Idr[8];
+ RHS3 += Idr[9];
+ RHS3 += Idr[10];
+ RHS3 += Idr[11];
+ RHS3 -= go[10] * *cnV[10];
+ RHS3 -= go[11] * *cnV[11];
+ m_A9 += gt[12];
+ m_A9 += gt[13];
+ m_A10 += go[12];
+ m_A11 += go[13];
+ double RHS4 = Idr[12];
+ RHS4 += Idr[13];
+ m_A12 += gt[14];
+ m_A12 += gt[15];
+ m_A13 += go[14];
+ double RHS5 = Idr[14];
+ RHS5 += Idr[15];
+ RHS5 -= go[15] * *cnV[15];
+ m_A14 += gt[16];
+ m_A14 += gt[17];
+ m_A14 += gt[18];
+ m_A15 += go[16];
+ m_A16 += go[17];
+ double RHS6 = Idr[16];
+ RHS6 += Idr[17];
+ RHS6 += Idr[18];
+ RHS6 -= go[18] * *cnV[18];
+ m_A17 += gt[19];
+ m_A17 += gt[20];
+ m_A17 += gt[21];
+ m_A17 += gt[22];
+ m_A19 += go[19];
+ m_A18 += go[20];
+ double RHS7 = Idr[19];
+ RHS7 += Idr[20];
+ RHS7 += Idr[21];
+ RHS7 += Idr[22];
+ RHS7 -= go[21] * *cnV[21];
+ RHS7 -= go[22] * *cnV[22];
+ m_A22 += gt[23];
+ m_A22 += gt[24];
+ m_A22 += gt[25];
+ m_A22 += gt[26];
+ m_A22 += gt[27];
+ m_A22 += gt[28];
+ m_A21 += go[23];
+ m_A21 += go[24];
+ m_A20 += go[25];
+ double RHS8 = Idr[23];
+ RHS8 += Idr[24];
+ RHS8 += Idr[25];
+ RHS8 += Idr[26];
+ RHS8 += Idr[27];
+ RHS8 += Idr[28];
+ RHS8 -= go[26] * *cnV[26];
+ RHS8 -= go[27] * *cnV[27];
+ RHS8 -= go[28] * *cnV[28];
+ m_A27 += gt[29];
+ m_A27 += gt[30];
+ m_A27 += gt[31];
+ m_A27 += gt[32];
+ m_A25 += go[29];
+ m_A28 += go[30];
+ m_A24 += go[31];
+ double RHS9 = Idr[29];
+ RHS9 += Idr[30];
+ RHS9 += Idr[31];
+ RHS9 += Idr[32];
+ RHS9 -= go[32] * *cnV[32];
+ m_A30 += gt[33];
+ m_A30 += gt[34];
+ m_A30 += gt[35];
+ m_A30 += gt[36];
+ m_A29 += go[33];
+ m_A29 += go[34];
+ m_A31 += go[35];
+ double RHS10 = Idr[33];
+ RHS10 += Idr[34];
+ RHS10 += Idr[35];
+ RHS10 += Idr[36];
+ RHS10 -= go[36] * *cnV[36];
+ m_A34 += gt[37];
+ m_A34 += gt[38];
+ m_A33 += go[37];
+ m_A32 += go[38];
+ double RHS11 = Idr[37];
+ RHS11 += Idr[38];
+ m_A38 += gt[39];
+ m_A38 += gt[40];
+ m_A38 += gt[41];
+ m_A37 += go[39];
+ m_A36 += go[40];
+ double RHS12 = Idr[39];
+ RHS12 += Idr[40];
+ RHS12 += Idr[41];
+ RHS12 -= go[41] * *cnV[41];
+ m_A47 += gt[42];
+ m_A47 += gt[43];
+ m_A47 += gt[44];
+ m_A47 += gt[45];
+ m_A42 += go[42];
+ m_A41 += go[43];
+ m_A44 += go[44];
+ m_A43 += go[45];
+ double RHS13 = Idr[42];
+ RHS13 += Idr[43];
+ RHS13 += Idr[44];
+ RHS13 += Idr[45];
+ m_A52 += gt[46];
+ m_A52 += gt[47];
+ m_A52 += gt[48];
+ m_A52 += gt[49];
+ m_A52 += gt[50];
+ m_A52 += gt[51];
+ m_A52 += gt[52];
+ m_A50 += go[46];
+ m_A49 += go[47];
+ double RHS14 = Idr[46];
+ RHS14 += Idr[47];
+ RHS14 += Idr[48];
+ RHS14 += Idr[49];
+ RHS14 += Idr[50];
+ RHS14 += Idr[51];
+ RHS14 += Idr[52];
+ RHS14 -= go[48] * *cnV[48];
+ RHS14 -= go[49] * *cnV[49];
+ RHS14 -= go[50] * *cnV[50];
+ RHS14 -= go[51] * *cnV[51];
+ RHS14 -= go[52] * *cnV[52];
const double f0 = 1.0 / m_A0;
- const double f0_1 = -f0 * m_A3;
- m_A4 += m_A1 * f0_1;
- m_A5 += m_A2 * f0_1;
- RHS1 += f0_1 * RHS0;
- const double f0_2 = -f0 * m_A6;
- m_A7 += m_A1 * f0_2;
- m_A8 += m_A2 * f0_2;
- RHS2 += f0_2 * RHS0;
- const double f1 = 1.0 / m_A4;
- const double f1_2 = -f1 * m_A7;
- m_A8 += m_A5 * f1_2;
- RHS2 += f1_2 * RHS1;
- V[2] = RHS2 / m_A8;
+ const double f0_8 = -f0 * m_A20;
+ m_A22 += m_A1 * f0_8;
+ RHS8 += f0_8 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_8 = -f1 * m_A21;
+ m_A22 += m_A3 * f1_8;
+ m_A23 += m_A4 * f1_8;
+ RHS8 += f1_8 * RHS1;
+ const double f1_9 = -f1 * m_A24;
+ m_A26 += m_A3 * f1_9;
+ m_A27 += m_A4 * f1_9;
+ RHS9 += f1_9 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_9 = -f2 * m_A25;
+ m_A27 += m_A6 * f2_9;
+ RHS9 += f2_9 * RHS2;
+ const double f3 = 1.0 / m_A7;
+ const double f3_10 = -f3 * m_A29;
+ m_A30 += m_A8 * f3_10;
+ RHS10 += f3_10 * RHS3;
+ const double f4 = 1.0 / m_A9;
+ const double f4_11 = -f4 * m_A32;
+ m_A34 += m_A10 * f4_11;
+ m_A35 += m_A11 * f4_11;
+ RHS11 += f4_11 * RHS4;
+ const double f4_13 = -f4 * m_A41;
+ m_A45 += m_A10 * f4_13;
+ m_A47 += m_A11 * f4_13;
+ RHS13 += f4_13 * RHS4;
+ const double f5 = 1.0 / m_A12;
+ const double f5_11 = -f5 * m_A33;
+ m_A34 += m_A13 * f5_11;
+ RHS11 += f5_11 * RHS5;
+ const double f6 = 1.0 / m_A14;
+ const double f6_12 = -f6 * m_A36;
+ m_A38 += m_A15 * f6_12;
+ m_A39 += m_A16 * f6_12;
+ RHS12 += f6_12 * RHS6;
+ const double f6_13 = -f6 * m_A42;
+ m_A46 += m_A15 * f6_13;
+ m_A47 += m_A16 * f6_13;
+ RHS13 += f6_13 * RHS6;
+ const double f6_14 = -f6 * m_A49;
+ m_A50 += m_A15 * f6_14;
+ m_A51 += m_A16 * f6_14;
+ RHS14 += f6_14 * RHS6;
+ const double f7 = 1.0 / m_A17;
+ const double f7_12 = -f7 * m_A37;
+ m_A38 += m_A18 * f7_12;
+ m_A40 += m_A19 * f7_12;
+ RHS12 += f7_12 * RHS7;
+ const double f8 = 1.0 / m_A22;
+ const double f8_9 = -f8 * m_A26;
+ m_A27 += m_A23 * f8_9;
+ RHS9 += f8_9 * RHS8;
+ const double f9 = 1.0 / m_A27;
+ const double f9_13 = -f9 * m_A43;
+ m_A47 += m_A28 * f9_13;
+ RHS13 += f9_13 * RHS9;
+ const double f10 = 1.0 / m_A30;
+ const double f10_13 = -f10 * m_A44;
+ m_A47 += m_A31 * f10_13;
+ RHS13 += f10_13 * RHS10;
+ const double f11 = 1.0 / m_A34;
+ const double f11_13 = -f11 * m_A45;
+ m_A47 += m_A35 * f11_13;
+ RHS13 += f11_13 * RHS11;
+ const double f12 = 1.0 / m_A38;
+ const double f12_13 = -f12 * m_A46;
+ m_A47 += m_A39 * f12_13;
+ m_A48 += m_A40 * f12_13;
+ RHS13 += f12_13 * RHS12;
+ const double f12_14 = -f12 * m_A50;
+ m_A51 += m_A39 * f12_14;
+ m_A52 += m_A40 * f12_14;
+ RHS14 += f12_14 * RHS12;
+ const double f13 = 1.0 / m_A47;
+ const double f13_14 = -f13 * m_A51;
+ m_A52 += m_A48 * f13_14;
+ RHS14 += f13_14 * RHS13;
+ V[14] = RHS14 / m_A52;
+ double tmp13 = 0.0;
+ tmp13 += m_A48 * V[14];
+ V[13] = (RHS13 - tmp13) / m_A47;
+ double tmp12 = 0.0;
+ tmp12 += m_A39 * V[13];
+ tmp12 += m_A40 * V[14];
+ V[12] = (RHS12 - tmp12) / m_A38;
+ double tmp11 = 0.0;
+ tmp11 += m_A35 * V[13];
+ V[11] = (RHS11 - tmp11) / m_A34;
+ double tmp10 = 0.0;
+ tmp10 += m_A31 * V[13];
+ V[10] = (RHS10 - tmp10) / m_A30;
+ double tmp9 = 0.0;
+ tmp9 += m_A28 * V[13];
+ V[9] = (RHS9 - tmp9) / m_A27;
+ double tmp8 = 0.0;
+ tmp8 += m_A23 * V[9];
+ V[8] = (RHS8 - tmp8) / m_A22;
+ double tmp7 = 0.0;
+ tmp7 += m_A18 * V[12];
+ tmp7 += m_A19 * V[14];
+ V[7] = (RHS7 - tmp7) / m_A17;
+ double tmp6 = 0.0;
+ tmp6 += m_A15 * V[12];
+ tmp6 += m_A16 * V[13];
+ V[6] = (RHS6 - tmp6) / m_A14;
+ double tmp5 = 0.0;
+ tmp5 += m_A13 * V[11];
+ V[5] = (RHS5 - tmp5) / m_A12;
+ double tmp4 = 0.0;
+ tmp4 += m_A10 * V[11];
+ tmp4 += m_A11 * V[13];
+ V[4] = (RHS4 - tmp4) / m_A9;
+ double tmp3 = 0.0;
+ tmp3 += m_A8 * V[10];
+ V[3] = (RHS3 - tmp3) / m_A7;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[9];
+ V[2] = (RHS2 - tmp2) / m_A5;
double tmp1 = 0.0;
- tmp1 += m_A5 * V[2];
- V[1] = (RHS1 - tmp1) / m_A4;
+ tmp1 += m_A3 * V[8];
+ tmp1 += m_A4 * V[9];
+ V[1] = (RHS1 - tmp1) / m_A2;
double tmp0 = 0.0;
- tmp0 += m_A1 * V[1];
- tmp0 += m_A2 * V[2];
+ tmp0 += m_A1 * V[8];
V[0] = (RHS0 - tmp0) / m_A0;
}
@@ -69647,6 +79713,560 @@ static void nl_gcr_f8f6a951fd1af6bc_7_double_double(double * __restrict V, const
V[0] = (RHS0 - tmp0) / m_A0;
}
+// brdrline
+static void nl_gcr_f99b1245e708ec85_83_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
+
+{
+
+ plib::unused_var(cnV);
+ double m_A0(0.0);
+ double m_A1(0.0);
+ double m_A2(0.0);
+ double m_A3(0.0);
+ double m_A4(0.0);
+ double m_A5(0.0);
+ double m_A6(0.0);
+ double m_A7(0.0);
+ double m_A8(0.0);
+ double m_A9(0.0);
+ double m_A10(0.0);
+ double m_A11(0.0);
+ double m_A12(0.0);
+ double m_A13(0.0);
+ double m_A14(0.0);
+ double m_A15(0.0);
+ double m_A16(0.0);
+ double m_A17(0.0);
+ double m_A18(0.0);
+ double m_A19(0.0);
+ double m_A20(0.0);
+ double m_A21(0.0);
+ double m_A22(0.0);
+ double m_A23(0.0);
+ double m_A24(0.0);
+ double m_A25(0.0);
+ double m_A26(0.0);
+ double m_A27(0.0);
+ double m_A28(0.0);
+ double m_A29(0.0);
+ double m_A30(0.0);
+ double m_A31(0.0);
+ double m_A32(0.0);
+ double m_A33(0.0);
+ double m_A34(0.0);
+ double m_A35(0.0);
+ double m_A36(0.0);
+ double m_A37(0.0);
+ double m_A38(0.0);
+ double m_A39(0.0);
+ double m_A40(0.0);
+ double m_A41(0.0);
+ double m_A42(0.0);
+ double m_A43(0.0);
+ double m_A44(0.0);
+ double m_A45(0.0);
+ double m_A46(0.0);
+ double m_A47(0.0);
+ double m_A48(0.0);
+ double m_A49(0.0);
+ double m_A50(0.0);
+ double m_A51(0.0);
+ double m_A52(0.0);
+ double m_A53(0.0);
+ double m_A54(0.0);
+ double m_A55(0.0);
+ double m_A56(0.0);
+ double m_A57(0.0);
+ double m_A58(0.0);
+ double m_A59(0.0);
+ double m_A60(0.0);
+ double m_A61(0.0);
+ double m_A62(0.0);
+ double m_A63(0.0);
+ double m_A64(0.0);
+ double m_A65(0.0);
+ double m_A66(0.0);
+ double m_A67(0.0);
+ double m_A68(0.0);
+ double m_A69(0.0);
+ double m_A70(0.0);
+ double m_A71(0.0);
+ double m_A72(0.0);
+ double m_A73(0.0);
+ double m_A74(0.0);
+ double m_A75(0.0);
+ double m_A76(0.0);
+ double m_A77(0.0);
+ double m_A78(0.0);
+ double m_A79(0.0);
+ double m_A80(0.0);
+ double m_A81(0.0);
+ double m_A82(0.0);
+ m_A0 += gt[0];
+ m_A0 += gt[1];
+ m_A0 += gt[2];
+ m_A1 += go[0];
+ double RHS0 = Idr[0];
+ RHS0 += Idr[1];
+ RHS0 += Idr[2];
+ RHS0 -= go[1] * *cnV[1];
+ RHS0 -= go[2] * *cnV[2];
+ m_A2 += gt[3];
+ m_A2 += gt[4];
+ m_A2 += gt[5];
+ m_A4 += go[3];
+ m_A3 += go[4];
+ double RHS1 = Idr[3];
+ RHS1 += Idr[4];
+ RHS1 += Idr[5];
+ RHS1 -= go[5] * *cnV[5];
+ m_A5 += gt[6];
+ m_A5 += gt[7];
+ m_A6 += go[6];
+ double RHS2 = Idr[6];
+ RHS2 += Idr[7];
+ RHS2 -= go[7] * *cnV[7];
+ m_A7 += gt[8];
+ m_A7 += gt[9];
+ m_A7 += gt[10];
+ m_A7 += gt[11];
+ m_A8 += go[8];
+ double RHS3 = Idr[8];
+ RHS3 += Idr[9];
+ RHS3 += Idr[10];
+ RHS3 += Idr[11];
+ RHS3 -= go[9] * *cnV[9];
+ RHS3 -= go[10] * *cnV[10];
+ RHS3 -= go[11] * *cnV[11];
+ m_A9 += gt[12];
+ m_A9 += gt[13];
+ m_A9 += gt[14];
+ m_A10 += go[12];
+ double RHS4 = Idr[12];
+ RHS4 += Idr[13];
+ RHS4 += Idr[14];
+ RHS4 -= go[13] * *cnV[13];
+ RHS4 -= go[14] * *cnV[14];
+ m_A11 += gt[15];
+ m_A11 += gt[16];
+ m_A11 += gt[17];
+ m_A11 += gt[18];
+ m_A11 += gt[19];
+ m_A11 += gt[20];
+ m_A14 += go[15];
+ m_A13 += go[16];
+ m_A15 += go[17];
+ m_A12 += go[18];
+ double RHS5 = Idr[15];
+ RHS5 += Idr[16];
+ RHS5 += Idr[17];
+ RHS5 += Idr[18];
+ RHS5 += Idr[19];
+ RHS5 += Idr[20];
+ RHS5 -= go[19] * *cnV[19];
+ RHS5 -= go[20] * *cnV[20];
+ m_A16 += gt[21];
+ m_A16 += gt[22];
+ m_A16 += gt[23];
+ m_A17 += go[21];
+ double RHS6 = Idr[21];
+ RHS6 += Idr[22];
+ RHS6 += Idr[23];
+ RHS6 -= go[22] * *cnV[22];
+ RHS6 -= go[23] * *cnV[23];
+ m_A18 += gt[24];
+ m_A18 += gt[25];
+ m_A18 += gt[26];
+ m_A18 += gt[27];
+ m_A19 += go[24];
+ double RHS7 = Idr[24];
+ RHS7 += Idr[25];
+ RHS7 += Idr[26];
+ RHS7 += Idr[27];
+ RHS7 -= go[25] * *cnV[25];
+ RHS7 -= go[26] * *cnV[26];
+ RHS7 -= go[27] * *cnV[27];
+ m_A22 += gt[28];
+ m_A22 += gt[29];
+ m_A22 += gt[30];
+ m_A20 += go[28];
+ m_A21 += go[29];
+ double RHS8 = Idr[28];
+ RHS8 += Idr[29];
+ RHS8 += Idr[30];
+ RHS8 -= go[30] * *cnV[30];
+ m_A27 += gt[31];
+ m_A27 += gt[32];
+ m_A27 += gt[33];
+ m_A27 += gt[34];
+ m_A27 += gt[35];
+ m_A27 += gt[36];
+ m_A28 += go[31];
+ m_A29 += go[32];
+ m_A29 += go[33];
+ m_A26 += go[34];
+ double RHS9 = Idr[31];
+ RHS9 += Idr[32];
+ RHS9 += Idr[33];
+ RHS9 += Idr[34];
+ RHS9 += Idr[35];
+ RHS9 += Idr[36];
+ RHS9 -= go[35] * *cnV[35];
+ RHS9 -= go[36] * *cnV[36];
+ m_A31 += gt[37];
+ m_A31 += gt[38];
+ m_A31 += gt[39];
+ m_A31 += gt[40];
+ m_A31 += gt[41];
+ m_A31 += gt[42];
+ m_A31 += gt[43];
+ m_A33 += go[37];
+ m_A30 += go[38];
+ double RHS10 = Idr[37];
+ RHS10 += Idr[38];
+ RHS10 += Idr[39];
+ RHS10 += Idr[40];
+ RHS10 += Idr[41];
+ RHS10 += Idr[42];
+ RHS10 += Idr[43];
+ RHS10 -= go[39] * *cnV[39];
+ RHS10 -= go[40] * *cnV[40];
+ RHS10 -= go[41] * *cnV[41];
+ RHS10 -= go[42] * *cnV[42];
+ RHS10 -= go[43] * *cnV[43];
+ m_A35 += gt[44];
+ m_A35 += gt[45];
+ m_A35 += gt[46];
+ m_A35 += gt[47];
+ m_A35 += gt[48];
+ m_A35 += gt[49];
+ m_A36 += go[44];
+ m_A37 += go[45];
+ m_A38 += go[46];
+ m_A34 += go[47];
+ double RHS11 = Idr[44];
+ RHS11 += Idr[45];
+ RHS11 += Idr[46];
+ RHS11 += Idr[47];
+ RHS11 += Idr[48];
+ RHS11 += Idr[49];
+ RHS11 -= go[48] * *cnV[48];
+ RHS11 -= go[49] * *cnV[49];
+ m_A40 += gt[50];
+ m_A40 += gt[51];
+ m_A40 += gt[52];
+ m_A39 += go[50];
+ m_A41 += go[51];
+ double RHS12 = Idr[50];
+ RHS12 += Idr[51];
+ RHS12 += Idr[52];
+ RHS12 -= go[52] * *cnV[52];
+ m_A43 += gt[53];
+ m_A43 += gt[54];
+ m_A43 += gt[55];
+ m_A43 += gt[56];
+ m_A43 += gt[57];
+ m_A43 += gt[58];
+ m_A43 += gt[59];
+ m_A44 += go[53];
+ m_A42 += go[54];
+ double RHS13 = Idr[53];
+ RHS13 += Idr[54];
+ RHS13 += Idr[55];
+ RHS13 += Idr[56];
+ RHS13 += Idr[57];
+ RHS13 += Idr[58];
+ RHS13 += Idr[59];
+ RHS13 -= go[55] * *cnV[55];
+ RHS13 -= go[56] * *cnV[56];
+ RHS13 -= go[57] * *cnV[57];
+ RHS13 -= go[58] * *cnV[58];
+ RHS13 -= go[59] * *cnV[59];
+ m_A47 += gt[60];
+ m_A47 += gt[61];
+ m_A50 += go[60];
+ m_A45 += go[61];
+ double RHS14 = Idr[60];
+ RHS14 += Idr[61];
+ m_A52 += gt[62];
+ m_A52 += gt[63];
+ m_A52 += gt[64];
+ m_A52 += gt[65];
+ m_A52 += gt[66];
+ m_A52 += gt[67];
+ m_A52 += gt[68];
+ m_A51 += go[62];
+ m_A53 += go[63];
+ double RHS15 = Idr[62];
+ RHS15 += Idr[63];
+ RHS15 += Idr[64];
+ RHS15 += Idr[65];
+ RHS15 += Idr[66];
+ RHS15 += Idr[67];
+ RHS15 += Idr[68];
+ RHS15 -= go[64] * *cnV[64];
+ RHS15 -= go[65] * *cnV[65];
+ RHS15 -= go[66] * *cnV[66];
+ RHS15 -= go[67] * *cnV[67];
+ RHS15 -= go[68] * *cnV[68];
+ m_A61 += gt[69];
+ m_A61 += gt[70];
+ m_A61 += gt[71];
+ m_A54 += go[69];
+ m_A55 += go[70];
+ m_A57 += go[71];
+ double RHS16 = Idr[69];
+ RHS16 += Idr[70];
+ RHS16 += Idr[71];
+ m_A71 += gt[72];
+ m_A71 += gt[73];
+ m_A71 += gt[74];
+ m_A71 += gt[75];
+ m_A71 += gt[76];
+ m_A68 += go[72];
+ m_A64 += go[73];
+ m_A67 += go[74];
+ m_A65 += go[75];
+ m_A65 += go[76];
+ double RHS17 = Idr[72];
+ RHS17 += Idr[73];
+ RHS17 += Idr[74];
+ RHS17 += Idr[75];
+ RHS17 += Idr[76];
+ m_A74 += gt[77];
+ m_A74 += gt[78];
+ m_A74 += gt[79];
+ m_A73 += go[77];
+ m_A75 += go[78];
+ double RHS18 = Idr[77];
+ RHS18 += Idr[78];
+ RHS18 += Idr[79];
+ RHS18 -= go[79] * *cnV[79];
+ m_A82 += gt[80];
+ m_A82 += gt[81];
+ m_A82 += gt[82];
+ m_A82 += gt[83];
+ m_A81 += go[80];
+ m_A76 += go[81];
+ m_A77 += go[82];
+ double RHS19 = Idr[80];
+ RHS19 += Idr[81];
+ RHS19 += Idr[82];
+ RHS19 += Idr[83];
+ RHS19 -= go[83] * *cnV[83];
+ const double f0 = 1.0 / m_A0;
+ const double f0_9 = -f0 * m_A26;
+ m_A27 += m_A1 * f0_9;
+ RHS9 += f0_9 * RHS0;
+ const double f1 = 1.0 / m_A2;
+ const double f1_10 = -f1 * m_A30;
+ m_A32 += m_A3 * f1_10;
+ m_A33 += m_A4 * f1_10;
+ RHS10 += f1_10 * RHS1;
+ const double f1_11 = -f1 * m_A34;
+ m_A35 += m_A3 * f1_11;
+ m_A38 += m_A4 * f1_11;
+ RHS11 += f1_11 * RHS1;
+ const double f1_17 = -f1 * m_A64;
+ m_A67 += m_A3 * f1_17;
+ m_A71 += m_A4 * f1_17;
+ RHS17 += f1_17 * RHS1;
+ const double f2 = 1.0 / m_A5;
+ const double f2_8 = -f2 * m_A20;
+ m_A22 += m_A6 * f2_8;
+ RHS8 += f2_8 * RHS2;
+ const double f3 = 1.0 / m_A7;
+ const double f3_12 = -f3 * m_A39;
+ m_A40 += m_A8 * f3_12;
+ RHS12 += f3_12 * RHS3;
+ const double f4 = 1.0 / m_A9;
+ const double f4_13 = -f4 * m_A42;
+ m_A44 += m_A10 * f4_13;
+ RHS13 += f4_13 * RHS4;
+ const double f4_16 = -f4 * m_A54;
+ m_A61 += m_A10 * f4_16;
+ RHS16 += f4_16 * RHS4;
+ const double f5 = 1.0 / m_A11;
+ const double f5_8 = -f5 * m_A21;
+ m_A22 += m_A12 * f5_8;
+ m_A23 += m_A13 * f5_8;
+ m_A24 += m_A14 * f5_8;
+ m_A25 += m_A15 * f5_8;
+ RHS8 += f5_8 * RHS5;
+ const double f5_14 = -f5 * m_A45;
+ m_A46 += m_A12 * f5_14;
+ m_A47 += m_A13 * f5_14;
+ m_A48 += m_A14 * f5_14;
+ m_A49 += m_A15 * f5_14;
+ RHS14 += f5_14 * RHS5;
+ const double f5_16 = -f5 * m_A55;
+ m_A56 += m_A12 * f5_16;
+ m_A59 += m_A13 * f5_16;
+ m_A60 += m_A14 * f5_16;
+ m_A61 += m_A15 * f5_16;
+ RHS16 += f5_16 * RHS5;
+ const double f6 = 1.0 / m_A16;
+ const double f6_15 = -f6 * m_A51;
+ m_A53 += m_A17 * f6_15;
+ RHS15 += f6_15 * RHS6;
+ const double f6_19 = -f6 * m_A76;
+ m_A82 += m_A17 * f6_19;
+ RHS19 += f6_19 * RHS6;
+ const double f7 = 1.0 / m_A18;
+ const double f7_18 = -f7 * m_A73;
+ m_A74 += m_A19 * f7_18;
+ RHS18 += f7_18 * RHS7;
+ const double f8 = 1.0 / m_A22;
+ const double f8_14 = -f8 * m_A46;
+ m_A47 += m_A23 * f8_14;
+ m_A48 += m_A24 * f8_14;
+ m_A49 += m_A25 * f8_14;
+ RHS14 += f8_14 * RHS8;
+ const double f8_16 = -f8 * m_A56;
+ m_A59 += m_A23 * f8_16;
+ m_A60 += m_A24 * f8_16;
+ m_A61 += m_A25 * f8_16;
+ RHS16 += f8_16 * RHS8;
+ const double f9 = 1.0 / m_A27;
+ const double f9_17 = -f9 * m_A65;
+ m_A66 += m_A28 * f9_17;
+ m_A71 += m_A29 * f9_17;
+ RHS17 += f9_17 * RHS9;
+ const double f10 = 1.0 / m_A31;
+ const double f10_17 = -f10 * m_A66;
+ m_A67 += m_A32 * f10_17;
+ m_A71 += m_A33 * f10_17;
+ RHS17 += f10_17 * RHS10;
+ const double f11 = 1.0 / m_A35;
+ const double f11_16 = -f11 * m_A57;
+ m_A58 += m_A36 * f11_16;
+ m_A61 += m_A37 * f11_16;
+ m_A62 += m_A38 * f11_16;
+ RHS16 += f11_16 * RHS11;
+ const double f11_17 = -f11 * m_A67;
+ m_A69 += m_A36 * f11_17;
+ m_A70 += m_A37 * f11_17;
+ m_A71 += m_A38 * f11_17;
+ RHS17 += f11_17 * RHS11;
+ const double f12 = 1.0 / m_A40;
+ const double f12_17 = -f12 * m_A68;
+ m_A71 += m_A41 * f12_17;
+ RHS17 += f12_17 * RHS12;
+ const double f13 = 1.0 / m_A43;
+ const double f13_16 = -f13 * m_A58;
+ m_A61 += m_A44 * f13_16;
+ RHS16 += f13_16 * RHS13;
+ const double f13_17 = -f13 * m_A69;
+ m_A70 += m_A44 * f13_17;
+ RHS17 += f13_17 * RHS13;
+ const double f14 = 1.0 / m_A47;
+ const double f14_16 = -f14 * m_A59;
+ m_A60 += m_A48 * f14_16;
+ m_A61 += m_A49 * f14_16;
+ m_A63 += m_A50 * f14_16;
+ RHS16 += f14_16 * RHS14;
+ const double f14_19 = -f14 * m_A77;
+ m_A78 += m_A48 * f14_19;
+ m_A79 += m_A49 * f14_19;
+ m_A82 += m_A50 * f14_19;
+ RHS19 += f14_19 * RHS14;
+ const double f15 = 1.0 / m_A52;
+ const double f15_16 = -f15 * m_A60;
+ m_A63 += m_A53 * f15_16;
+ RHS16 += f15_16 * RHS15;
+ const double f15_19 = -f15 * m_A78;
+ m_A82 += m_A53 * f15_19;
+ RHS19 += f15_19 * RHS15;
+ const double f16 = 1.0 / m_A61;
+ const double f16_17 = -f16 * m_A70;
+ m_A71 += m_A62 * f16_17;
+ m_A72 += m_A63 * f16_17;
+ RHS17 += f16_17 * RHS16;
+ const double f16_19 = -f16 * m_A79;
+ m_A80 += m_A62 * f16_19;
+ m_A82 += m_A63 * f16_19;
+ RHS19 += f16_19 * RHS16;
+ const double f17 = 1.0 / m_A71;
+ const double f17_19 = -f17 * m_A80;
+ m_A82 += m_A72 * f17_19;
+ RHS19 += f17_19 * RHS17;
+ const double f18 = 1.0 / m_A74;
+ const double f18_19 = -f18 * m_A81;
+ m_A82 += m_A75 * f18_19;
+ RHS19 += f18_19 * RHS18;
+ V[19] = RHS19 / m_A82;
+ double tmp18 = 0.0;
+ tmp18 += m_A75 * V[19];
+ V[18] = (RHS18 - tmp18) / m_A74;
+ double tmp17 = 0.0;
+ tmp17 += m_A72 * V[19];
+ V[17] = (RHS17 - tmp17) / m_A71;
+ double tmp16 = 0.0;
+ tmp16 += m_A62 * V[17];
+ tmp16 += m_A63 * V[19];
+ V[16] = (RHS16 - tmp16) / m_A61;
+ double tmp15 = 0.0;
+ tmp15 += m_A53 * V[19];
+ V[15] = (RHS15 - tmp15) / m_A52;
+ double tmp14 = 0.0;
+ tmp14 += m_A48 * V[15];
+ tmp14 += m_A49 * V[16];
+ tmp14 += m_A50 * V[19];
+ V[14] = (RHS14 - tmp14) / m_A47;
+ double tmp13 = 0.0;
+ tmp13 += m_A44 * V[16];
+ V[13] = (RHS13 - tmp13) / m_A43;
+ double tmp12 = 0.0;
+ tmp12 += m_A41 * V[17];
+ V[12] = (RHS12 - tmp12) / m_A40;
+ double tmp11 = 0.0;
+ tmp11 += m_A36 * V[13];
+ tmp11 += m_A37 * V[16];
+ tmp11 += m_A38 * V[17];
+ V[11] = (RHS11 - tmp11) / m_A35;
+ double tmp10 = 0.0;
+ tmp10 += m_A32 * V[11];
+ tmp10 += m_A33 * V[17];
+ V[10] = (RHS10 - tmp10) / m_A31;
+ double tmp9 = 0.0;
+ tmp9 += m_A28 * V[10];
+ tmp9 += m_A29 * V[17];
+ V[9] = (RHS9 - tmp9) / m_A27;
+ double tmp8 = 0.0;
+ tmp8 += m_A23 * V[14];
+ tmp8 += m_A24 * V[15];
+ tmp8 += m_A25 * V[16];
+ V[8] = (RHS8 - tmp8) / m_A22;
+ double tmp7 = 0.0;
+ tmp7 += m_A19 * V[18];
+ V[7] = (RHS7 - tmp7) / m_A18;
+ double tmp6 = 0.0;
+ tmp6 += m_A17 * V[19];
+ V[6] = (RHS6 - tmp6) / m_A16;
+ double tmp5 = 0.0;
+ tmp5 += m_A12 * V[8];
+ tmp5 += m_A13 * V[14];
+ tmp5 += m_A14 * V[15];
+ tmp5 += m_A15 * V[16];
+ V[5] = (RHS5 - tmp5) / m_A11;
+ double tmp4 = 0.0;
+ tmp4 += m_A10 * V[16];
+ V[4] = (RHS4 - tmp4) / m_A9;
+ double tmp3 = 0.0;
+ tmp3 += m_A8 * V[12];
+ V[3] = (RHS3 - tmp3) / m_A7;
+ double tmp2 = 0.0;
+ tmp2 += m_A6 * V[8];
+ V[2] = (RHS2 - tmp2) / m_A5;
+ double tmp1 = 0.0;
+ tmp1 += m_A3 * V[11];
+ tmp1 += m_A4 * V[17];
+ V[1] = (RHS1 - tmp1) / m_A2;
+ double tmp0 = 0.0;
+ tmp0 += m_A1 * V[9];
+ V[0] = (RHS0 - tmp0) / m_A0;
+}
+
// zektor
static void nl_gcr_fbff020f5f5d5a5_144_double_double(double * __restrict V, const double * __restrict go, const double * __restrict gt, const double * __restrict Idr, const double * const * __restrict cnV)
@@ -72420,401 +83040,449 @@ 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)},
+ {"nl_gcr_11c2ae166b240b6e_10_double_double", reinterpret_cast<void *>(&nl_gcr_11c2ae166b240b6e_10_double_double)}, // NOLINT
// tankbatt
- {"nl_gcr_124f7aa10f044582_16_double_double", reinterpret_cast<void *>(&nl_gcr_124f7aa10f044582_16_double_double)},
+ {"nl_gcr_124f7aa10f044582_16_double_double", reinterpret_cast<void *>(&nl_gcr_124f7aa10f044582_16_double_double)}, // NOLINT
// armora
- {"nl_gcr_1250f340dea396ae_22_double_double", reinterpret_cast<void *>(&nl_gcr_1250f340dea396ae_22_double_double)},
+ {"nl_gcr_1250f340dea396ae_22_double_double", reinterpret_cast<void *>(&nl_gcr_1250f340dea396ae_22_double_double)}, // NOLINT
+// astrob
+ {"nl_gcr_13833bf8c127deaa_154_double_double", reinterpret_cast<void *>(&nl_gcr_13833bf8c127deaa_154_double_double)}, // NOLINT
// pongf
- {"nl_gcr_13e7b5ac1a260dbf_10_double_double", reinterpret_cast<void *>(&nl_gcr_13e7b5ac1a260dbf_10_double_double)},
+ {"nl_gcr_13e7b5ac1a260dbf_10_double_double", reinterpret_cast<void *>(&nl_gcr_13e7b5ac1a260dbf_10_double_double)}, // NOLINT
// tailg
- {"nl_gcr_144ed14e6bafdb_119_double_double", reinterpret_cast<void *>(&nl_gcr_144ed14e6bafdb_119_double_double)},
+ {"nl_gcr_144ed14e6bafdb_119_double_double", reinterpret_cast<void *>(&nl_gcr_144ed14e6bafdb_119_double_double)}, // NOLINT
// spacewar
- {"nl_gcr_15e8f6fb021de0f9_28_double_double", reinterpret_cast<void *>(&nl_gcr_15e8f6fb021de0f9_28_double_double)},
-// armora
- {"nl_gcr_1692de755a535408_9_double_double", reinterpret_cast<void *>(&nl_gcr_1692de755a535408_9_double_double)},
+ {"nl_gcr_15e8f6fb021de0f9_28_double_double", reinterpret_cast<void *>(&nl_gcr_15e8f6fb021de0f9_28_double_double)}, // NOLINT
// dpatrol
- {"nl_gcr_18f4d9160b51d613_20_double_double", reinterpret_cast<void *>(&nl_gcr_18f4d9160b51d613_20_double_double)},
+ {"nl_gcr_18f4d9160b51d613_20_double_double", reinterpret_cast<void *>(&nl_gcr_18f4d9160b51d613_20_double_double)}, // NOLINT
// starhawk
- {"nl_gcr_1f1086787c94f97c_40_double_double", reinterpret_cast<void *>(&nl_gcr_1f1086787c94f97c_40_double_double)},
+ {"nl_gcr_1f1086787c94f97c_40_double_double", reinterpret_cast<void *>(&nl_gcr_1f1086787c94f97c_40_double_double)}, // NOLINT
// zac1b11142
- {"nl_gcr_1fad5cda2646cf42_30_double_double", reinterpret_cast<void *>(&nl_gcr_1fad5cda2646cf42_30_double_double)},
+ {"nl_gcr_1fad5cda2646cf42_30_double_double", reinterpret_cast<void *>(&nl_gcr_1fad5cda2646cf42_30_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_1fec893028a7b809_34_double_double", reinterpret_cast<void *>(&nl_gcr_1fec893028a7b809_34_double_double)}, // NOLINT
// sspeedr
- {"nl_gcr_2294220d3c91e762_176_double_double", reinterpret_cast<void *>(&nl_gcr_2294220d3c91e762_176_double_double)},
+ {"nl_gcr_2294220d3c91e762_176_double_double", reinterpret_cast<void *>(&nl_gcr_2294220d3c91e762_176_double_double)}, // NOLINT
+// headon
+ {"nl_gcr_24023c8529f6bdb3_97_double_double", reinterpret_cast<void *>(&nl_gcr_24023c8529f6bdb3_97_double_double)}, // NOLINT
// 280zzzap
- {"nl_gcr_24643c159711f292_95_double_double", reinterpret_cast<void *>(&nl_gcr_24643c159711f292_95_double_double)},
+ {"nl_gcr_24643c159711f292_95_double_double", reinterpret_cast<void *>(&nl_gcr_24643c159711f292_95_double_double)}, // NOLINT
+// frogs
+ {"nl_gcr_263b618097fad01_38_double_double", reinterpret_cast<void *>(&nl_gcr_263b618097fad01_38_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_2753fc1815ce0cba_23_double_double", reinterpret_cast<void *>(&nl_gcr_2753fc1815ce0cba_23_double_double)}, // NOLINT
// zac1b11142
- {"nl_gcr_287a160e7c36b5b0_96_double_double", reinterpret_cast<void *>(&nl_gcr_287a160e7c36b5b0_96_double_double)},
+ {"nl_gcr_287a160e7c36b5b0_96_double_double", reinterpret_cast<void *>(&nl_gcr_287a160e7c36b5b0_96_double_double)}, // NOLINT
// elim
- {"nl_gcr_28b736fe552777a9_45_double_double", reinterpret_cast<void *>(&nl_gcr_28b736fe552777a9_45_double_double)},
+ {"nl_gcr_28b736fe552777a9_45_double_double", reinterpret_cast<void *>(&nl_gcr_28b736fe552777a9_45_double_double)}, // NOLINT
// kidniki
- {"nl_gcr_294dde1e0ecca6d0_37_double_double", reinterpret_cast<void *>(&nl_gcr_294dde1e0ecca6d0_37_double_double)},
+ {"nl_gcr_294dde1e0ecca6d0_37_double_double", reinterpret_cast<void *>(&nl_gcr_294dde1e0ecca6d0_37_double_double)}, // NOLINT
// ripoff
- {"nl_gcr_295cf2e2f3d489bf_12_double_double", reinterpret_cast<void *>(&nl_gcr_295cf2e2f3d489bf_12_double_double)},
+ {"nl_gcr_295cf2e2f3d489bf_12_double_double", reinterpret_cast<void *>(&nl_gcr_295cf2e2f3d489bf_12_double_double)}, // NOLINT
// spacfury
- {"nl_gcr_2a153513d3e8e2cc_53_double_double", reinterpret_cast<void *>(&nl_gcr_2a153513d3e8e2cc_53_double_double)},
+ {"nl_gcr_2a153513d3e8e2cc_53_double_double", reinterpret_cast<void *>(&nl_gcr_2a153513d3e8e2cc_53_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_2f84bc98d737730b_22_double_double", reinterpret_cast<void *>(&nl_gcr_2f84bc98d737730b_22_double_double)},
-// astrob
- {"nl_gcr_30fc51fe03b164cb_178_double_double", reinterpret_cast<void *>(&nl_gcr_30fc51fe03b164cb_178_double_double)},
+ {"nl_gcr_2f84bc98d737730b_22_double_double", reinterpret_cast<void *>(&nl_gcr_2f84bc98d737730b_22_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_30923b54310ae144_8_double_double", reinterpret_cast<void *>(&nl_gcr_30923b54310ae144_8_double_double)}, // NOLINT
// tankbatt
- {"nl_gcr_328d886b444b586b_137_double_double", reinterpret_cast<void *>(&nl_gcr_328d886b444b586b_137_double_double)},
+ {"nl_gcr_328d886b444b586b_137_double_double", reinterpret_cast<void *>(&nl_gcr_328d886b444b586b_137_double_double)}, // NOLINT
// astrob
- {"nl_gcr_339c6b457f339538_159_double_double", reinterpret_cast<void *>(&nl_gcr_339c6b457f339538_159_double_double)},
+ {"nl_gcr_339c6b457f339538_159_double_double", reinterpret_cast<void *>(&nl_gcr_339c6b457f339538_159_double_double)}, // NOLINT
// solarq
- {"nl_gcr_34e910fc1896999f_76_double_double", reinterpret_cast<void *>(&nl_gcr_34e910fc1896999f_76_double_double)},
+ {"nl_gcr_34e910fc1896999f_76_double_double", reinterpret_cast<void *>(&nl_gcr_34e910fc1896999f_76_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_3c79fd354e01fa8c_89_double_double", reinterpret_cast<void *>(&nl_gcr_3c79fd354e01fa8c_89_double_double)}, // NOLINT
// sspeedr
- {"nl_gcr_3e833834e5ce5aee_13_double_double", reinterpret_cast<void *>(&nl_gcr_3e833834e5ce5aee_13_double_double)},
+ {"nl_gcr_3e833834e5ce5aee_13_double_double", reinterpret_cast<void *>(&nl_gcr_3e833834e5ce5aee_13_double_double)}, // NOLINT
// astrob
- {"nl_gcr_41c6441d98369158_20_double_double", reinterpret_cast<void *>(&nl_gcr_41c6441d98369158_20_double_double)},
+ {"nl_gcr_41c6441d98369158_20_double_double", reinterpret_cast<void *>(&nl_gcr_41c6441d98369158_20_double_double)}, // NOLINT
// warrior
- {"nl_gcr_42a31ce5c187b308_12_double_double", reinterpret_cast<void *>(&nl_gcr_42a31ce5c187b308_12_double_double)},
+ {"nl_gcr_42a31ce5c187b308_12_double_double", reinterpret_cast<void *>(&nl_gcr_42a31ce5c187b308_12_double_double)}, // NOLINT
// 280zzzap
- {"nl_gcr_42c57d523cac30d0_122_double_double", reinterpret_cast<void *>(&nl_gcr_42c57d523cac30d0_122_double_double)},
+ {"nl_gcr_42c57d523cac30d0_122_double_double", reinterpret_cast<void *>(&nl_gcr_42c57d523cac30d0_122_double_double)}, // NOLINT
// ripoff
- {"nl_gcr_43188bf576854ae0_10_double_double", reinterpret_cast<void *>(&nl_gcr_43188bf576854ae0_10_double_double)},
+ {"nl_gcr_43188bf576854ae0_10_double_double", reinterpret_cast<void *>(&nl_gcr_43188bf576854ae0_10_double_double)}, // NOLINT
// destroyr
- {"nl_gcr_4334c95878d1be92_399_double_double", reinterpret_cast<void *>(&nl_gcr_4334c95878d1be92_399_double_double)},
+ {"nl_gcr_4334c95878d1be92_399_double_double", reinterpret_cast<void *>(&nl_gcr_4334c95878d1be92_399_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_437326911721091_77_double_double", reinterpret_cast<void *>(&nl_gcr_437326911721091_77_double_double)}, // NOLINT
// kidniki
- {"nl_gcr_43f7ff9bc651cc7a_198_double_double", reinterpret_cast<void *>(&nl_gcr_43f7ff9bc651cc7a_198_double_double)},
+ {"nl_gcr_43f7ff9bc651cc7a_198_double_double", reinterpret_cast<void *>(&nl_gcr_43f7ff9bc651cc7a_198_double_double)}, // NOLINT
// gamemachine
- {"nl_gcr_491f95430bfdfd05_19_double_double", reinterpret_cast<void *>(&nl_gcr_491f95430bfdfd05_19_double_double)},
+ {"nl_gcr_491f95430bfdfd05_19_double_double", reinterpret_cast<void *>(&nl_gcr_491f95430bfdfd05_19_double_double)}, // NOLINT
+// frogs
+ {"nl_gcr_494f233b1a947be1_88_double_double", reinterpret_cast<void *>(&nl_gcr_494f233b1a947be1_88_double_double)}, // NOLINT
// sspeedr
- {"nl_gcr_4a8e2b707bbac8a6_95_double_double", reinterpret_cast<void *>(&nl_gcr_4a8e2b707bbac8a6_95_double_double)},
+ {"nl_gcr_4a8e2b707bbac8a6_95_double_double", reinterpret_cast<void *>(&nl_gcr_4a8e2b707bbac8a6_95_double_double)}, // NOLINT
// ripoff
- {"nl_gcr_4b5ecfbb8f9fa97b_29_double_double", reinterpret_cast<void *>(&nl_gcr_4b5ecfbb8f9fa97b_29_double_double)},
+ {"nl_gcr_4b5ecfbb8f9fa97b_29_double_double", reinterpret_cast<void *>(&nl_gcr_4b5ecfbb8f9fa97b_29_double_double)}, // NOLINT
// gtrak10
- {"nl_gcr_4c46fdf7c0037727_43_double_double", reinterpret_cast<void *>(&nl_gcr_4c46fdf7c0037727_43_double_double)},
+ {"nl_gcr_4c46fdf7c0037727_43_double_double", reinterpret_cast<void *>(&nl_gcr_4c46fdf7c0037727_43_double_double)}, // NOLINT
// solarq
- {"nl_gcr_4cb524006206eb1a_25_double_double", reinterpret_cast<void *>(&nl_gcr_4cb524006206eb1a_25_double_double)},
+ {"nl_gcr_4cb524006206eb1a_25_double_double", reinterpret_cast<void *>(&nl_gcr_4cb524006206eb1a_25_double_double)}, // NOLINT
// spacfury
- {"nl_gcr_4dbd0f2aec7ef707_110_double_double", reinterpret_cast<void *>(&nl_gcr_4dbd0f2aec7ef707_110_double_double)},
+ {"nl_gcr_4dbd0f2aec7ef707_110_double_double", reinterpret_cast<void *>(&nl_gcr_4dbd0f2aec7ef707_110_double_double)}, // NOLINT
// solarq
- {"nl_gcr_4e4931ccbfb7a3c_70_double_double", reinterpret_cast<void *>(&nl_gcr_4e4931ccbfb7a3c_70_double_double)},
+ {"nl_gcr_4e4931ccbfb7a3c_70_double_double", reinterpret_cast<void *>(&nl_gcr_4e4931ccbfb7a3c_70_double_double)}, // NOLINT
// fireone
- {"nl_gcr_4f2b2f3cdc384f75_41_double_double", reinterpret_cast<void *>(&nl_gcr_4f2b2f3cdc384f75_41_double_double)},
+ {"nl_gcr_4f2b2f3cdc384f75_41_double_double", reinterpret_cast<void *>(&nl_gcr_4f2b2f3cdc384f75_41_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_50f5194a994d56ec_16_double_double", reinterpret_cast<void *>(&nl_gcr_50f5194a994d56ec_16_double_double)},
+ {"nl_gcr_50f5194a994d56ec_16_double_double", reinterpret_cast<void *>(&nl_gcr_50f5194a994d56ec_16_double_double)}, // NOLINT
// starhawk
- {"nl_gcr_528a27fe9ed07d67_45_double_double", reinterpret_cast<void *>(&nl_gcr_528a27fe9ed07d67_45_double_double)},
+ {"nl_gcr_528a27fe9ed07d67_45_double_double", reinterpret_cast<void *>(&nl_gcr_528a27fe9ed07d67_45_double_double)}, // NOLINT
// astrob
- {"nl_gcr_536c3652eb3bc075_46_double_double", reinterpret_cast<void *>(&nl_gcr_536c3652eb3bc075_46_double_double)},
+ {"nl_gcr_536c3652eb3bc075_46_double_double", reinterpret_cast<void *>(&nl_gcr_536c3652eb3bc075_46_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_53e1117fdb16f546_23_double_double", reinterpret_cast<void *>(&nl_gcr_53e1117fdb16f546_23_double_double)},
+ {"nl_gcr_53e1117fdb16f546_23_double_double", reinterpret_cast<void *>(&nl_gcr_53e1117fdb16f546_23_double_double)}, // NOLINT
// cheekyms
- {"nl_gcr_546396f65ce48700_12_double_double", reinterpret_cast<void *>(&nl_gcr_546396f65ce48700_12_double_double)},
-// dpatrol
- {"nl_gcr_59cb6bf7cb9d17dc_7_double_double", reinterpret_cast<void *>(&nl_gcr_59cb6bf7cb9d17dc_7_double_double)},
+ {"nl_gcr_546396f65ce48700_12_double_double", reinterpret_cast<void *>(&nl_gcr_546396f65ce48700_12_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_576f391d0418cb76_13_double_double", reinterpret_cast<void *>(&nl_gcr_576f391d0418cb76_13_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_59cb6bf7cb9d17dc_7_double_double", reinterpret_cast<void *>(&nl_gcr_59cb6bf7cb9d17dc_7_double_double)}, // NOLINT
// breakout
- {"nl_gcr_5a3419e2809520de_13_double_double", reinterpret_cast<void *>(&nl_gcr_5a3419e2809520de_13_double_double)},
+ {"nl_gcr_5a3419e2809520de_13_double_double", reinterpret_cast<void *>(&nl_gcr_5a3419e2809520de_13_double_double)}, // NOLINT
// segausb
- {"nl_gcr_5b73834d5f313d38_12_double_double", reinterpret_cast<void *>(&nl_gcr_5b73834d5f313d38_12_double_double)},
+ {"nl_gcr_5b73834d5f313d38_12_double_double", reinterpret_cast<void *>(&nl_gcr_5b73834d5f313d38_12_double_double)}, // NOLINT
// tailg
- {"nl_gcr_5ccf7da1202da2e5_31_double_double", reinterpret_cast<void *>(&nl_gcr_5ccf7da1202da2e5_31_double_double)},
+ {"nl_gcr_5ccf7da1202da2e5_31_double_double", reinterpret_cast<void *>(&nl_gcr_5ccf7da1202da2e5_31_double_double)}, // NOLINT
// starcas
- {"nl_gcr_5d550fc7441617a2_109_double_double", reinterpret_cast<void *>(&nl_gcr_5d550fc7441617a2_109_double_double)},
+ {"nl_gcr_5d550fc7441617a2_109_double_double", reinterpret_cast<void *>(&nl_gcr_5d550fc7441617a2_109_double_double)}, // NOLINT
// zac1b11142
- {"nl_gcr_6041272373b8603c_178_double_double", reinterpret_cast<void *>(&nl_gcr_6041272373b8603c_178_double_double)},
+ {"nl_gcr_6041272373b8603c_178_double_double", reinterpret_cast<void *>(&nl_gcr_6041272373b8603c_178_double_double)}, // NOLINT
+// astrob
+ {"nl_gcr_62464664b1c5aa1e_27_double_double", reinterpret_cast<void *>(&nl_gcr_62464664b1c5aa1e_27_double_double)}, // NOLINT
// solarq
- {"nl_gcr_62612f71055b8fd4_303_double_double", reinterpret_cast<void *>(&nl_gcr_62612f71055b8fd4_303_double_double)},
+ {"nl_gcr_62612f71055b8fd4_303_double_double", reinterpret_cast<void *>(&nl_gcr_62612f71055b8fd4_303_double_double)}, // NOLINT
// konami1x
- {"nl_gcr_62b99b9904a8c804_49_double_double", reinterpret_cast<void *>(&nl_gcr_62b99b9904a8c804_49_double_double)},
+ {"nl_gcr_62b99b9904a8c804_49_double_double", reinterpret_cast<void *>(&nl_gcr_62b99b9904a8c804_49_double_double)}, // NOLINT
// fireone
- {"nl_gcr_643133e86b2b1628_73_double_double", reinterpret_cast<void *>(&nl_gcr_643133e86b2b1628_73_double_double)},
+ {"nl_gcr_643133e86b2b1628_73_double_double", reinterpret_cast<void *>(&nl_gcr_643133e86b2b1628_73_double_double)}, // NOLINT
// starfire
- {"nl_gcr_649ebca7fa6793ed_27_double_double", reinterpret_cast<void *>(&nl_gcr_649ebca7fa6793ed_27_double_double)},
+ {"nl_gcr_649ebca7fa6793ed_27_double_double", reinterpret_cast<void *>(&nl_gcr_649ebca7fa6793ed_27_double_double)}, // NOLINT
// armora
- {"nl_gcr_64e460d8f716cd89_58_double_double", reinterpret_cast<void *>(&nl_gcr_64e460d8f716cd89_58_double_double)},
+ {"nl_gcr_64e460d8f716cd89_58_double_double", reinterpret_cast<void *>(&nl_gcr_64e460d8f716cd89_58_double_double)}, // NOLINT
// flyball
- {"nl_gcr_6622b53554e3776_291_double_double", reinterpret_cast<void *>(&nl_gcr_6622b53554e3776_291_double_double)},
+ {"nl_gcr_6622b53554e3776_291_double_double", reinterpret_cast<void *>(&nl_gcr_6622b53554e3776_291_double_double)}, // NOLINT
// solarq
- {"nl_gcr_66496d6073aca98e_20_double_double", reinterpret_cast<void *>(&nl_gcr_66496d6073aca98e_20_double_double)},
+ {"nl_gcr_66496d6073aca98e_20_double_double", reinterpret_cast<void *>(&nl_gcr_66496d6073aca98e_20_double_double)}, // NOLINT
// starhawk
- {"nl_gcr_67838e11f714c455_12_double_double", reinterpret_cast<void *>(&nl_gcr_67838e11f714c455_12_double_double)},
+ {"nl_gcr_67838e11f714c455_12_double_double", reinterpret_cast<void *>(&nl_gcr_67838e11f714c455_12_double_double)}, // NOLINT
// ripoff
- {"nl_gcr_698d5dd47fb16d5_16_double_double", reinterpret_cast<void *>(&nl_gcr_698d5dd47fb16d5_16_double_double)},
+ {"nl_gcr_698d5dd47fb16d5_16_double_double", reinterpret_cast<void *>(&nl_gcr_698d5dd47fb16d5_16_double_double)}, // NOLINT
// astrob
- {"nl_gcr_6c24726f30e8dc34_15_double_double", reinterpret_cast<void *>(&nl_gcr_6c24726f30e8dc34_15_double_double)},
+ {"nl_gcr_6c24726f30e8dc34_15_double_double", reinterpret_cast<void *>(&nl_gcr_6c24726f30e8dc34_15_double_double)}, // NOLINT
// spacfury
- {"nl_gcr_6eae7b15cd376318_43_double_double", reinterpret_cast<void *>(&nl_gcr_6eae7b15cd376318_43_double_double)},
+ {"nl_gcr_6eae7b15cd376318_43_double_double", reinterpret_cast<void *>(&nl_gcr_6eae7b15cd376318_43_double_double)}, // NOLINT
// barrier
- {"nl_gcr_6ef39a62161d596c_47_double_double", reinterpret_cast<void *>(&nl_gcr_6ef39a62161d596c_47_double_double)},
+ {"nl_gcr_6ef39a62161d596c_47_double_double", reinterpret_cast<void *>(&nl_gcr_6ef39a62161d596c_47_double_double)}, // NOLINT
// starhawk
- {"nl_gcr_723fa454468a93d_7_double_double", reinterpret_cast<void *>(&nl_gcr_723fa454468a93d_7_double_double)},
+ {"nl_gcr_723fa454468a93d_7_double_double", reinterpret_cast<void *>(&nl_gcr_723fa454468a93d_7_double_double)}, // NOLINT
// cheekyms
- {"nl_gcr_733c72a820fdbd1f_7_double_double", reinterpret_cast<void *>(&nl_gcr_733c72a820fdbd1f_7_double_double)},
+ {"nl_gcr_733c72a820fdbd1f_7_double_double", reinterpret_cast<void *>(&nl_gcr_733c72a820fdbd1f_7_double_double)}, // NOLINT
// tailg
- {"nl_gcr_7388106355fb27c3_12_double_double", reinterpret_cast<void *>(&nl_gcr_7388106355fb27c3_12_double_double)},
+ {"nl_gcr_7388106355fb27c3_12_double_double", reinterpret_cast<void *>(&nl_gcr_7388106355fb27c3_12_double_double)}, // NOLINT
// tp1985
- {"nl_gcr_73f2ba8ad4a45b26_10_double_double", reinterpret_cast<void *>(&nl_gcr_73f2ba8ad4a45b26_10_double_double)},
+ {"nl_gcr_73f2ba8ad4a45b26_10_double_double", reinterpret_cast<void *>(&nl_gcr_73f2ba8ad4a45b26_10_double_double)}, // NOLINT
// zac1b11142
- {"nl_gcr_7425594cec8024ad_30_double_double", reinterpret_cast<void *>(&nl_gcr_7425594cec8024ad_30_double_double)},
+ {"nl_gcr_7425594cec8024ad_30_double_double", reinterpret_cast<void *>(&nl_gcr_7425594cec8024ad_30_double_double)}, // NOLINT
// tp1985
- {"nl_gcr_74349e9889a2630b_7_double_double", reinterpret_cast<void *>(&nl_gcr_74349e9889a2630b_7_double_double)},
+ {"nl_gcr_74349e9889a2630b_7_double_double", reinterpret_cast<void *>(&nl_gcr_74349e9889a2630b_7_double_double)}, // NOLINT
// gunfight
- {"nl_gcr_743595e64cee0a5e_112_double_double", reinterpret_cast<void *>(&nl_gcr_743595e64cee0a5e_112_double_double)},
+ {"nl_gcr_743595e64cee0a5e_112_double_double", reinterpret_cast<void *>(&nl_gcr_743595e64cee0a5e_112_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_75400df5d559a266_75_double_double", reinterpret_cast<void *>(&nl_gcr_75400df5d559a266_75_double_double)}, // NOLINT
+// frogs
+ {"nl_gcr_75852e71cc632a65_33_double_double", reinterpret_cast<void *>(&nl_gcr_75852e71cc632a65_33_double_double)}, // NOLINT
// ripoff
- {"nl_gcr_76c9e236353caed1_35_double_double", reinterpret_cast<void *>(&nl_gcr_76c9e236353caed1_35_double_double)},
+ {"nl_gcr_76c9e236353caed1_35_double_double", reinterpret_cast<void *>(&nl_gcr_76c9e236353caed1_35_double_double)}, // NOLINT
// gamemachine
- {"nl_gcr_782d79b5cbe953b1_7_double_double", reinterpret_cast<void *>(&nl_gcr_782d79b5cbe953b1_7_double_double)},
+ {"nl_gcr_782d79b5cbe953b1_7_double_double", reinterpret_cast<void *>(&nl_gcr_782d79b5cbe953b1_7_double_double)}, // NOLINT
// barrier
- {"nl_gcr_79e756c5892cf87d_31_double_double", reinterpret_cast<void *>(&nl_gcr_79e756c5892cf87d_31_double_double)},
+ {"nl_gcr_79e756c5892cf87d_31_double_double", reinterpret_cast<void *>(&nl_gcr_79e756c5892cf87d_31_double_double)}, // NOLINT
// breakout
- {"nl_gcr_7a42b97d838ca073_7_double_double", reinterpret_cast<void *>(&nl_gcr_7a42b97d838ca073_7_double_double)},
+ {"nl_gcr_7a42b97d838ca073_7_double_double", reinterpret_cast<void *>(&nl_gcr_7a42b97d838ca073_7_double_double)}, // NOLINT
// fireone
- {"nl_gcr_7aee4423e3fdbfda_128_double_double", reinterpret_cast<void *>(&nl_gcr_7aee4423e3fdbfda_128_double_double)},
+ {"nl_gcr_7aee4423e3fdbfda_128_double_double", reinterpret_cast<void *>(&nl_gcr_7aee4423e3fdbfda_128_double_double)}, // NOLINT
// astrob
- {"nl_gcr_7c86a9bc1c6aef4c_7_double_double", reinterpret_cast<void *>(&nl_gcr_7c86a9bc1c6aef4c_7_double_double)},
+ {"nl_gcr_7c86a9bc1c6aef4c_7_double_double", reinterpret_cast<void *>(&nl_gcr_7c86a9bc1c6aef4c_7_double_double)}, // NOLINT
// solarq
- {"nl_gcr_7caaa135bff3d9f3_15_double_double", reinterpret_cast<void *>(&nl_gcr_7caaa135bff3d9f3_15_double_double)},
+ {"nl_gcr_7caaa135bff3d9f3_15_double_double", reinterpret_cast<void *>(&nl_gcr_7caaa135bff3d9f3_15_double_double)}, // NOLINT
// warrior
- {"nl_gcr_8003d4625273fa4d_10_double_double", reinterpret_cast<void *>(&nl_gcr_8003d4625273fa4d_10_double_double)},
+ {"nl_gcr_8003d4625273fa4d_10_double_double", reinterpret_cast<void *>(&nl_gcr_8003d4625273fa4d_10_double_double)}, // NOLINT
// kidniki
- {"nl_gcr_8046625a0fe0959_21_double_double", reinterpret_cast<void *>(&nl_gcr_8046625a0fe0959_21_double_double)},
+ {"nl_gcr_8046625a0fe0959_21_double_double", reinterpret_cast<void *>(&nl_gcr_8046625a0fe0959_21_double_double)}, // NOLINT
// mario
- {"nl_gcr_80b4b1e5cc58d303_29_double_double", reinterpret_cast<void *>(&nl_gcr_80b4b1e5cc58d303_29_double_double)},
+ {"nl_gcr_80b4b1e5cc58d303_29_double_double", reinterpret_cast<void *>(&nl_gcr_80b4b1e5cc58d303_29_double_double)}, // NOLINT
+// frogs
+ {"nl_gcr_815733e3f2e05029_9_double_double", reinterpret_cast<void *>(&nl_gcr_815733e3f2e05029_9_double_double)}, // NOLINT
// elim
- {"nl_gcr_81f40a54af2ca202_10_double_double", reinterpret_cast<void *>(&nl_gcr_81f40a54af2ca202_10_double_double)},
+ {"nl_gcr_81f40a54af2ca202_10_double_double", reinterpret_cast<void *>(&nl_gcr_81f40a54af2ca202_10_double_double)}, // NOLINT
+// frogs
+ {"nl_gcr_84425fea9033e75d_7_double_double", reinterpret_cast<void *>(&nl_gcr_84425fea9033e75d_7_double_double)}, // NOLINT
// sundance
- {"nl_gcr_8446e63d7842f6a6_70_double_double", reinterpret_cast<void *>(&nl_gcr_8446e63d7842f6a6_70_double_double)},
+ {"nl_gcr_8446e63d7842f6a6_70_double_double", reinterpret_cast<void *>(&nl_gcr_8446e63d7842f6a6_70_double_double)}, // NOLINT
// dpatrol
- {"nl_gcr_85652d3e3ada285a_10_double_double", reinterpret_cast<void *>(&nl_gcr_85652d3e3ada285a_10_double_double)},
+ {"nl_gcr_85652d3e3ada285a_10_double_double", reinterpret_cast<void *>(&nl_gcr_85652d3e3ada285a_10_double_double)}, // NOLINT
// zac1b11142
- {"nl_gcr_861d39f81d29d51_12_double_double", reinterpret_cast<void *>(&nl_gcr_861d39f81d29d51_12_double_double)},
+ {"nl_gcr_861d39f81d29d51_12_double_double", reinterpret_cast<void *>(&nl_gcr_861d39f81d29d51_12_double_double)}, // NOLINT
// 280zzzap
- {"nl_gcr_864a61c57bac9c38_123_double_double", reinterpret_cast<void *>(&nl_gcr_864a61c57bac9c38_123_double_double)},
+ {"nl_gcr_864a61c57bac9c38_123_double_double", reinterpret_cast<void *>(&nl_gcr_864a61c57bac9c38_123_double_double)}, // NOLINT
// zac1b11142
- {"nl_gcr_87cb2c78a2628efd_7_double_double", reinterpret_cast<void *>(&nl_gcr_87cb2c78a2628efd_7_double_double)},
+ {"nl_gcr_87cb2c78a2628efd_7_double_double", reinterpret_cast<void *>(&nl_gcr_87cb2c78a2628efd_7_double_double)}, // NOLINT
// starcas
- {"nl_gcr_88a8ef5f6bd43d48_12_double_double", reinterpret_cast<void *>(&nl_gcr_88a8ef5f6bd43d48_12_double_double)},
+ {"nl_gcr_88a8ef5f6bd43d48_12_double_double", reinterpret_cast<void *>(&nl_gcr_88a8ef5f6bd43d48_12_double_double)}, // NOLINT
// breakout
- {"nl_gcr_8a1565d1413f42f7_31_double_double", reinterpret_cast<void *>(&nl_gcr_8a1565d1413f42f7_31_double_double)},
+ {"nl_gcr_8a1565d1413f42f7_31_double_double", reinterpret_cast<void *>(&nl_gcr_8a1565d1413f42f7_31_double_double)}, // NOLINT
// starhawk
- {"nl_gcr_8b1ac1e181eec3fc_40_double_double", reinterpret_cast<void *>(&nl_gcr_8b1ac1e181eec3fc_40_double_double)},
+ {"nl_gcr_8b1ac1e181eec3fc_40_double_double", reinterpret_cast<void *>(&nl_gcr_8b1ac1e181eec3fc_40_double_double)}, // NOLINT
// rebound
- {"nl_gcr_8bec817b324dcc3_28_double_double", reinterpret_cast<void *>(&nl_gcr_8bec817b324dcc3_28_double_double)},
+ {"nl_gcr_8bec817b324dcc3_28_double_double", reinterpret_cast<void *>(&nl_gcr_8bec817b324dcc3_28_double_double)}, // NOLINT
// cocoloco
- {"nl_gcr_8c0f7f2284333de5_16_double_double", reinterpret_cast<void *>(&nl_gcr_8c0f7f2284333de5_16_double_double)},
+ {"nl_gcr_8c0f7f2284333de5_16_double_double", reinterpret_cast<void *>(&nl_gcr_8c0f7f2284333de5_16_double_double)}, // NOLINT
// spacfury
- {"nl_gcr_8c1dd4afcf0f8ea2_15_double_double", reinterpret_cast<void *>(&nl_gcr_8c1dd4afcf0f8ea2_15_double_double)},
+ {"nl_gcr_8c1dd4afcf0f8ea2_15_double_double", reinterpret_cast<void *>(&nl_gcr_8c1dd4afcf0f8ea2_15_double_double)}, // NOLINT
// fireone
- {"nl_gcr_8c512fd6a6dabc50_35_double_double", reinterpret_cast<void *>(&nl_gcr_8c512fd6a6dabc50_35_double_double)},
+ {"nl_gcr_8c512fd6a6dabc50_35_double_double", reinterpret_cast<void *>(&nl_gcr_8c512fd6a6dabc50_35_double_double)}, // NOLINT
// segausb
- {"nl_gcr_8cc4eb213eaeef9b_30_double_double", reinterpret_cast<void *>(&nl_gcr_8cc4eb213eaeef9b_30_double_double)},
+ {"nl_gcr_8cc4eb213eaeef9b_30_double_double", reinterpret_cast<void *>(&nl_gcr_8cc4eb213eaeef9b_30_double_double)}, // NOLINT
// starcrus
- {"nl_gcr_8d7bddf33d942482_129_double_double", reinterpret_cast<void *>(&nl_gcr_8d7bddf33d942482_129_double_double)},
+ {"nl_gcr_8d7bddf33d942482_129_double_double", reinterpret_cast<void *>(&nl_gcr_8d7bddf33d942482_129_double_double)}, // NOLINT
// tank
- {"nl_gcr_930b64361c2cdba8_328_double_double", reinterpret_cast<void *>(&nl_gcr_930b64361c2cdba8_328_double_double)},
+ {"nl_gcr_930b64361c2cdba8_328_double_double", reinterpret_cast<void *>(&nl_gcr_930b64361c2cdba8_328_double_double)}, // NOLINT
// gamemachine
- {"nl_gcr_934712b55bb3b2b2_10_double_double", reinterpret_cast<void *>(&nl_gcr_934712b55bb3b2b2_10_double_double)},
+ {"nl_gcr_934712b55bb3b2b2_10_double_double", reinterpret_cast<void *>(&nl_gcr_934712b55bb3b2b2_10_double_double)}, // NOLINT
// kidniki
- {"nl_gcr_9a5874c8e2da79d2_37_double_double", reinterpret_cast<void *>(&nl_gcr_9a5874c8e2da79d2_37_double_double)},
+ {"nl_gcr_9a5874c8e2da79d2_37_double_double", reinterpret_cast<void *>(&nl_gcr_9a5874c8e2da79d2_37_double_double)}, // NOLINT
// fireone
- {"nl_gcr_9aa159329f86ca8b_70_double_double", reinterpret_cast<void *>(&nl_gcr_9aa159329f86ca8b_70_double_double)},
+ {"nl_gcr_9aa159329f86ca8b_70_double_double", reinterpret_cast<void *>(&nl_gcr_9aa159329f86ca8b_70_double_double)}, // NOLINT
// warrior
- {"nl_gcr_9c975530a1a529d6_7_double_double", reinterpret_cast<void *>(&nl_gcr_9c975530a1a529d6_7_double_double)},
+ {"nl_gcr_9c975530a1a529d6_7_double_double", reinterpret_cast<void *>(&nl_gcr_9c975530a1a529d6_7_double_double)}, // NOLINT
// kidniki
- {"nl_gcr_9f141889c2091efc_24_double_double", reinterpret_cast<void *>(&nl_gcr_9f141889c2091efc_24_double_double)},
+ {"nl_gcr_9f141889c2091efc_24_double_double", reinterpret_cast<void *>(&nl_gcr_9f141889c2091efc_24_double_double)}, // NOLINT
// segas16b_audio
- {"nl_gcr_9f7104c5e25c87dd_111_double_double", reinterpret_cast<void *>(&nl_gcr_9f7104c5e25c87dd_111_double_double)},
+ {"nl_gcr_9f7104c5e25c87dd_111_double_double", reinterpret_cast<void *>(&nl_gcr_9f7104c5e25c87dd_111_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_a0bf548977306172_25_double_double", reinterpret_cast<void *>(&nl_gcr_a0bf548977306172_25_double_double)},
+ {"nl_gcr_a0bf548977306172_25_double_double", reinterpret_cast<void *>(&nl_gcr_a0bf548977306172_25_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_a1132c8737d5d463_96_double_double", reinterpret_cast<void *>(&nl_gcr_a1132c8737d5d463_96_double_double)},
+ {"nl_gcr_a1132c8737d5d463_96_double_double", reinterpret_cast<void *>(&nl_gcr_a1132c8737d5d463_96_double_double)}, // NOLINT
// astrob
- {"nl_gcr_a41a44bd5c424f88_13_double_double", reinterpret_cast<void *>(&nl_gcr_a41a44bd5c424f88_13_double_double)},
+ {"nl_gcr_a41a44bd5c424f88_13_double_double", reinterpret_cast<void *>(&nl_gcr_a41a44bd5c424f88_13_double_double)}, // NOLINT
// tp1985
- {"nl_gcr_a4540ffea06b4346_26_double_double", reinterpret_cast<void *>(&nl_gcr_a4540ffea06b4346_26_double_double)},
+ {"nl_gcr_a4540ffea06b4346_26_double_double", reinterpret_cast<void *>(&nl_gcr_a4540ffea06b4346_26_double_double)}, // NOLINT
// tailg
- {"nl_gcr_a46301cd3479b8db_15_double_double", reinterpret_cast<void *>(&nl_gcr_a46301cd3479b8db_15_double_double)},
+ {"nl_gcr_a46301cd3479b8db_15_double_double", reinterpret_cast<void *>(&nl_gcr_a46301cd3479b8db_15_double_double)}, // NOLINT
// barrier
- {"nl_gcr_a50a4b733e95414a_10_double_double", reinterpret_cast<void *>(&nl_gcr_a50a4b733e95414a_10_double_double)},
+ {"nl_gcr_a50a4b733e95414a_10_double_double", reinterpret_cast<void *>(&nl_gcr_a50a4b733e95414a_10_double_double)}, // NOLINT
// starcas
- {"nl_gcr_a582a424cb61c678_62_double_double", reinterpret_cast<void *>(&nl_gcr_a582a424cb61c678_62_double_double)},
+ {"nl_gcr_a582a424cb61c678_62_double_double", reinterpret_cast<void *>(&nl_gcr_a582a424cb61c678_62_double_double)}, // NOLINT
// tank
- {"nl_gcr_a63d1344e34bef4b_36_double_double", reinterpret_cast<void *>(&nl_gcr_a63d1344e34bef4b_36_double_double)},
+ {"nl_gcr_a63d1344e34bef4b_36_double_double", reinterpret_cast<void *>(&nl_gcr_a63d1344e34bef4b_36_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_a6b734322b3ea924_22_double_double", reinterpret_cast<void *>(&nl_gcr_a6b734322b3ea924_22_double_double)},
+ {"nl_gcr_a6b734322b3ea924_22_double_double", reinterpret_cast<void *>(&nl_gcr_a6b734322b3ea924_22_double_double)}, // NOLINT
// armora
- {"nl_gcr_a6cfda6668b153c2_22_double_double", reinterpret_cast<void *>(&nl_gcr_a6cfda6668b153c2_22_double_double)},
+ {"nl_gcr_a6cfda6668b153c2_22_double_double", reinterpret_cast<void *>(&nl_gcr_a6cfda6668b153c2_22_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_a6f74be7f61e6db2_29_double_double", reinterpret_cast<void *>(&nl_gcr_a6f74be7f61e6db2_29_double_double)},
+ {"nl_gcr_a6f74be7f61e6db2_29_double_double", reinterpret_cast<void *>(&nl_gcr_a6f74be7f61e6db2_29_double_double)}, // NOLINT
// carpolo
- {"nl_gcr_a8f1d076330f06b7_34_double_double", reinterpret_cast<void *>(&nl_gcr_a8f1d076330f06b7_34_double_double)},
+ {"nl_gcr_a8f1d076330f06b7_34_double_double", reinterpret_cast<void *>(&nl_gcr_a8f1d076330f06b7_34_double_double)}, // NOLINT
// breakout
- {"nl_gcr_a971eeb2ef76f75f_13_double_double", reinterpret_cast<void *>(&nl_gcr_a971eeb2ef76f75f_13_double_double)},
+ {"nl_gcr_a971eeb2ef76f75f_13_double_double", reinterpret_cast<void *>(&nl_gcr_a971eeb2ef76f75f_13_double_double)}, // NOLINT
// ripoff
- {"nl_gcr_aa07266ef5d420d1_11_double_double", reinterpret_cast<void *>(&nl_gcr_aa07266ef5d420d1_11_double_double)},
+ {"nl_gcr_aa07266ef5d420d1_11_double_double", reinterpret_cast<void *>(&nl_gcr_aa07266ef5d420d1_11_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_aa68b74ffdea9bd8_47_double_double", reinterpret_cast<void *>(&nl_gcr_aa68b74ffdea9bd8_47_double_double)}, // NOLINT
+// frogs
+ {"nl_gcr_ab8d1ff6aa7499d8_119_double_double", reinterpret_cast<void *>(&nl_gcr_ab8d1ff6aa7499d8_119_double_double)}, // NOLINT
// 280zzzap
- {"nl_gcr_ab9144d965a37e4_113_double_double", reinterpret_cast<void *>(&nl_gcr_ab9144d965a37e4_113_double_double)},
+ {"nl_gcr_ab9144d965a37e4_113_double_double", reinterpret_cast<void *>(&nl_gcr_ab9144d965a37e4_113_double_double)}, // NOLINT
// sspeedr
- {"nl_gcr_ac1e401ddf971e15_10_double_double", reinterpret_cast<void *>(&nl_gcr_ac1e401ddf971e15_10_double_double)},
+ {"nl_gcr_ac1e401ddf971e15_10_double_double", reinterpret_cast<void *>(&nl_gcr_ac1e401ddf971e15_10_double_double)}, // NOLINT
// starfire
- {"nl_gcr_aceb6035dfb557c9_12_double_double", reinterpret_cast<void *>(&nl_gcr_aceb6035dfb557c9_12_double_double)},
+ {"nl_gcr_aceb6035dfb557c9_12_double_double", reinterpret_cast<void *>(&nl_gcr_aceb6035dfb557c9_12_double_double)}, // NOLINT
// sundance
- {"nl_gcr_ad6dba01ff2425c3_12_double_double", reinterpret_cast<void *>(&nl_gcr_ad6dba01ff2425c3_12_double_double)},
+ {"nl_gcr_ad6dba01ff2425c3_12_double_double", reinterpret_cast<void *>(&nl_gcr_ad6dba01ff2425c3_12_double_double)}, // NOLINT
// rebound
- {"nl_gcr_ae15f7f8a55fc96_7_double_double", reinterpret_cast<void *>(&nl_gcr_ae15f7f8a55fc96_7_double_double)},
+ {"nl_gcr_ae15f7f8a55fc96_7_double_double", reinterpret_cast<void *>(&nl_gcr_ae15f7f8a55fc96_7_double_double)}, // NOLINT
// armora
- {"nl_gcr_afcde432efdafb81_56_double_double", reinterpret_cast<void *>(&nl_gcr_afcde432efdafb81_56_double_double)},
+ {"nl_gcr_afcde432efdafb81_56_double_double", reinterpret_cast<void *>(&nl_gcr_afcde432efdafb81_56_double_double)}, // NOLINT
// mario
- {"nl_gcr_afce66fb47d3c5f3_62_double_double", reinterpret_cast<void *>(&nl_gcr_afce66fb47d3c5f3_62_double_double)},
+ {"nl_gcr_afce66fb47d3c5f3_62_double_double", reinterpret_cast<void *>(&nl_gcr_afce66fb47d3c5f3_62_double_double)}, // NOLINT
// spacewar
- {"nl_gcr_b09deef9a25aecaf_24_double_double", reinterpret_cast<void *>(&nl_gcr_b09deef9a25aecaf_24_double_double)},
+ {"nl_gcr_b09deef9a25aecaf_24_double_double", reinterpret_cast<void *>(&nl_gcr_b09deef9a25aecaf_24_double_double)}, // NOLINT
// spacfury
- {"nl_gcr_b1db23287df1da54_175_double_double", reinterpret_cast<void *>(&nl_gcr_b1db23287df1da54_175_double_double)},
+ {"nl_gcr_b1db23287df1da54_175_double_double", reinterpret_cast<void *>(&nl_gcr_b1db23287df1da54_175_double_double)}, // NOLINT
// segaspeech
- {"nl_gcr_b22769fbf3159a8d_21_double_double", reinterpret_cast<void *>(&nl_gcr_b22769fbf3159a8d_21_double_double)},
+ {"nl_gcr_b22769fbf3159a8d_21_double_double", reinterpret_cast<void *>(&nl_gcr_b22769fbf3159a8d_21_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_b66df357763b1dce_97_double_double", reinterpret_cast<void *>(&nl_gcr_b66df357763b1dce_97_double_double)}, // NOLINT
// breakout
- {"nl_gcr_b66ff415b228d5f8_10_double_double", reinterpret_cast<void *>(&nl_gcr_b66ff415b228d5f8_10_double_double)},
+ {"nl_gcr_b66ff415b228d5f8_10_double_double", reinterpret_cast<void *>(&nl_gcr_b66ff415b228d5f8_10_double_double)}, // NOLINT
// starcas
- {"nl_gcr_b7344e05aac90017_65_double_double", reinterpret_cast<void *>(&nl_gcr_b7344e05aac90017_65_double_double)},
+ {"nl_gcr_b7344e05aac90017_65_double_double", reinterpret_cast<void *>(&nl_gcr_b7344e05aac90017_65_double_double)}, // NOLINT
// starfire
- {"nl_gcr_b75e0baeb501e907_23_double_double", reinterpret_cast<void *>(&nl_gcr_b75e0baeb501e907_23_double_double)},
+ {"nl_gcr_b75e0baeb501e907_23_double_double", reinterpret_cast<void *>(&nl_gcr_b75e0baeb501e907_23_double_double)}, // NOLINT
// spacfury
- {"nl_gcr_b7b209d222c0a9a6_91_double_double", reinterpret_cast<void *>(&nl_gcr_b7b209d222c0a9a6_91_double_double)},
+ {"nl_gcr_b7b209d222c0a9a6_91_double_double", reinterpret_cast<void *>(&nl_gcr_b7b209d222c0a9a6_91_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_b8d6d148a50bdb8f_55_double_double", reinterpret_cast<void *>(&nl_gcr_b8d6d148a50bdb8f_55_double_double)},
+ {"nl_gcr_b8d6d148a50bdb8f_55_double_double", reinterpret_cast<void *>(&nl_gcr_b8d6d148a50bdb8f_55_double_double)}, // NOLINT
// 280zzzap
- {"nl_gcr_bb501e6a23177009_57_double_double", reinterpret_cast<void *>(&nl_gcr_bb501e6a23177009_57_double_double)},
+ {"nl_gcr_bb501e6a23177009_57_double_double", reinterpret_cast<void *>(&nl_gcr_bb501e6a23177009_57_double_double)}, // NOLINT
// elim
- {"nl_gcr_bb56fa5325163fc3_15_double_double", reinterpret_cast<void *>(&nl_gcr_bb56fa5325163fc3_15_double_double)},
+ {"nl_gcr_bb56fa5325163fc3_15_double_double", reinterpret_cast<void *>(&nl_gcr_bb56fa5325163fc3_15_double_double)}, // NOLINT
// starfire
- {"nl_gcr_bd1514d7defd4062_9_double_double", reinterpret_cast<void *>(&nl_gcr_bd1514d7defd4062_9_double_double)},
+ {"nl_gcr_bd1514d7defd4062_9_double_double", reinterpret_cast<void *>(&nl_gcr_bd1514d7defd4062_9_double_double)}, // NOLINT
// ripoff
- {"nl_gcr_be7c805100c522fd_59_double_double", reinterpret_cast<void *>(&nl_gcr_be7c805100c522fd_59_double_double)},
+ {"nl_gcr_be7c805100c522fd_59_double_double", reinterpret_cast<void *>(&nl_gcr_be7c805100c522fd_59_double_double)}, // NOLINT
// elim
- {"nl_gcr_be831e5faa508573_150_double_double", reinterpret_cast<void *>(&nl_gcr_be831e5faa508573_150_double_double)},
+ {"nl_gcr_be831e5faa508573_150_double_double", reinterpret_cast<void *>(&nl_gcr_be831e5faa508573_150_double_double)}, // NOLINT
// warrior
- {"nl_gcr_bff07f8d339f7cc4_89_double_double", reinterpret_cast<void *>(&nl_gcr_bff07f8d339f7cc4_89_double_double)},
+ {"nl_gcr_bff07f8d339f7cc4_89_double_double", reinterpret_cast<void *>(&nl_gcr_bff07f8d339f7cc4_89_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_c05df522276e65fd_134_double_double", reinterpret_cast<void *>(&nl_gcr_c05df522276e65fd_134_double_double)}, // NOLINT
// fireone
- {"nl_gcr_c1d22fe6e895255d_79_double_double", reinterpret_cast<void *>(&nl_gcr_c1d22fe6e895255d_79_double_double)},
+ {"nl_gcr_c1d22fe6e895255d_79_double_double", reinterpret_cast<void *>(&nl_gcr_c1d22fe6e895255d_79_double_double)}, // NOLINT
// starcrus
- {"nl_gcr_c2e616f3de30f15b_31_double_double", reinterpret_cast<void *>(&nl_gcr_c2e616f3de30f15b_31_double_double)},
+ {"nl_gcr_c2e616f3de30f15b_31_double_double", reinterpret_cast<void *>(&nl_gcr_c2e616f3de30f15b_31_double_double)}, // NOLINT
// tailg
- {"nl_gcr_c4cec7aed23b7b94_23_double_double", reinterpret_cast<void *>(&nl_gcr_c4cec7aed23b7b94_23_double_double)},
+ {"nl_gcr_c4cec7aed23b7b94_23_double_double", reinterpret_cast<void *>(&nl_gcr_c4cec7aed23b7b94_23_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_c5b523ed6a9677e6_21_double_double", reinterpret_cast<void *>(&nl_gcr_c5b523ed6a9677e6_21_double_double)}, // NOLINT
// segausb
- {"nl_gcr_c61e08cf5e35918_84_double_double", reinterpret_cast<void *>(&nl_gcr_c61e08cf5e35918_84_double_double)},
+ {"nl_gcr_c61e08cf5e35918_84_double_double", reinterpret_cast<void *>(&nl_gcr_c61e08cf5e35918_84_double_double)}, // NOLINT
// popeye
- {"nl_gcr_c6f25bb06e161d1c_50_double_double", reinterpret_cast<void *>(&nl_gcr_c6f25bb06e161d1c_50_double_double)},
+ {"nl_gcr_c6f25bb06e161d1c_50_double_double", reinterpret_cast<void *>(&nl_gcr_c6f25bb06e161d1c_50_double_double)}, // NOLINT
// flyball
- {"nl_gcr_c74b1a65978d7121_7_double_double", reinterpret_cast<void *>(&nl_gcr_c74b1a65978d7121_7_double_double)},
+ {"nl_gcr_c74b1a65978d7121_7_double_double", reinterpret_cast<void *>(&nl_gcr_c74b1a65978d7121_7_double_double)}, // NOLINT
+// headon
+ {"nl_gcr_c90daff82be2d052_350_double_double", reinterpret_cast<void *>(&nl_gcr_c90daff82be2d052_350_double_double)}, // NOLINT
// stuntcyc
- {"nl_gcr_c924fe5960b1479e_20_double_double", reinterpret_cast<void *>(&nl_gcr_c924fe5960b1479e_20_double_double)},
+ {"nl_gcr_c924fe5960b1479e_20_double_double", reinterpret_cast<void *>(&nl_gcr_c924fe5960b1479e_20_double_double)}, // NOLINT
// dpatrol
- {"nl_gcr_ca68d70bd8f2f62e_22_double_double", reinterpret_cast<void *>(&nl_gcr_ca68d70bd8f2f62e_22_double_double)},
+ {"nl_gcr_ca68d70bd8f2f62e_22_double_double", reinterpret_cast<void *>(&nl_gcr_ca68d70bd8f2f62e_22_double_double)}, // NOLINT
// breakout
- {"nl_gcr_cb2aae3366e0ac1c_7_double_double", reinterpret_cast<void *>(&nl_gcr_cb2aae3366e0ac1c_7_double_double)},
+ {"nl_gcr_cb2aae3366e0ac1c_7_double_double", reinterpret_cast<void *>(&nl_gcr_cb2aae3366e0ac1c_7_double_double)}, // NOLINT
// barrier
- {"nl_gcr_cc913f9c3f9293e7_19_double_double", reinterpret_cast<void *>(&nl_gcr_cc913f9c3f9293e7_19_double_double)},
+ {"nl_gcr_cc913f9c3f9293e7_19_double_double", reinterpret_cast<void *>(&nl_gcr_cc913f9c3f9293e7_19_double_double)}, // NOLINT
// fireone
- {"nl_gcr_cca3d1a4219e2ec0_153_double_double", reinterpret_cast<void *>(&nl_gcr_cca3d1a4219e2ec0_153_double_double)},
+ {"nl_gcr_cca3d1a4219e2ec0_153_double_double", reinterpret_cast<void *>(&nl_gcr_cca3d1a4219e2ec0_153_double_double)}, // NOLINT
// 1942
- {"nl_gcr_ce766957cb26ff3e_90_double_double", reinterpret_cast<void *>(&nl_gcr_ce766957cb26ff3e_90_double_double)},
+ {"nl_gcr_ce766957cb26ff3e_90_double_double", reinterpret_cast<void *>(&nl_gcr_ce766957cb26ff3e_90_double_double)}, // NOLINT
// astrob
- {"nl_gcr_cf1018e7ed626623_43_double_double", reinterpret_cast<void *>(&nl_gcr_cf1018e7ed626623_43_double_double)},
+ {"nl_gcr_cf1018e7ed626623_43_double_double", reinterpret_cast<void *>(&nl_gcr_cf1018e7ed626623_43_double_double)}, // NOLINT
// zac1b11142
- {"nl_gcr_cfd3bbf5fbba4765_71_double_double", reinterpret_cast<void *>(&nl_gcr_cfd3bbf5fbba4765_71_double_double)},
+ {"nl_gcr_cfd3bbf5fbba4765_71_double_double", reinterpret_cast<void *>(&nl_gcr_cfd3bbf5fbba4765_71_double_double)}, // NOLINT
// gunfight
- {"nl_gcr_d05b3dbe370c7904_14_double_double", reinterpret_cast<void *>(&nl_gcr_d05b3dbe370c7904_14_double_double)},
+ {"nl_gcr_d05b3dbe370c7904_14_double_double", reinterpret_cast<void *>(&nl_gcr_d05b3dbe370c7904_14_double_double)}, // NOLINT
// barrier
- {"nl_gcr_d06bd7ddbfd17b5e_15_double_double", reinterpret_cast<void *>(&nl_gcr_d06bd7ddbfd17b5e_15_double_double)},
+ {"nl_gcr_d06bd7ddbfd17b5e_15_double_double", reinterpret_cast<void *>(&nl_gcr_d06bd7ddbfd17b5e_15_double_double)}, // NOLINT
// elim
- {"nl_gcr_d13f9c6838af6aeb_13_double_double", reinterpret_cast<void *>(&nl_gcr_d13f9c6838af6aeb_13_double_double)},
+ {"nl_gcr_d13f9c6838af6aeb_13_double_double", reinterpret_cast<void *>(&nl_gcr_d13f9c6838af6aeb_13_double_double)}, // NOLINT
// elim
- {"nl_gcr_d190a0e3b8e1f4a7_7_double_double", reinterpret_cast<void *>(&nl_gcr_d190a0e3b8e1f4a7_7_double_double)},
+ {"nl_gcr_d190a0e3b8e1f4a7_7_double_double", reinterpret_cast<void *>(&nl_gcr_d190a0e3b8e1f4a7_7_double_double)}, // NOLINT
// elim
- {"nl_gcr_d224211d1af6811d_12_double_double", reinterpret_cast<void *>(&nl_gcr_d224211d1af6811d_12_double_double)},
+ {"nl_gcr_d224211d1af6811d_12_double_double", reinterpret_cast<void *>(&nl_gcr_d224211d1af6811d_12_double_double)}, // NOLINT
// armora
- {"nl_gcr_d27a39bc93616187_45_double_double", reinterpret_cast<void *>(&nl_gcr_d27a39bc93616187_45_double_double)},
+ {"nl_gcr_d27a39bc93616187_45_double_double", reinterpret_cast<void *>(&nl_gcr_d27a39bc93616187_45_double_double)}, // NOLINT
// elim
- {"nl_gcr_d2ea3f267b959e8b_20_double_double", reinterpret_cast<void *>(&nl_gcr_d2ea3f267b959e8b_20_double_double)},
+ {"nl_gcr_d2ea3f267b959e8b_20_double_double", reinterpret_cast<void *>(&nl_gcr_d2ea3f267b959e8b_20_double_double)}, // NOLINT
// starfire
- {"nl_gcr_d32effa2b0ea54a1_438_double_double", reinterpret_cast<void *>(&nl_gcr_d32effa2b0ea54a1_438_double_double)},
+ {"nl_gcr_d32effa2b0ea54a1_438_double_double", reinterpret_cast<void *>(&nl_gcr_d32effa2b0ea54a1_438_double_double)}, // NOLINT
// spacfury
- {"nl_gcr_d4c34516ff6aa139_46_double_double", reinterpret_cast<void *>(&nl_gcr_d4c34516ff6aa139_46_double_double)},
+ {"nl_gcr_d4c34516ff6aa139_46_double_double", reinterpret_cast<void *>(&nl_gcr_d4c34516ff6aa139_46_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_d5e1c37cfa2d2853_30_double_double", reinterpret_cast<void *>(&nl_gcr_d5e1c37cfa2d2853_30_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_d7d45dc58b08cab9_10_double_double", reinterpret_cast<void *>(&nl_gcr_d7d45dc58b08cab9_10_double_double)},
+ {"nl_gcr_d7d45dc58b08cab9_10_double_double", reinterpret_cast<void *>(&nl_gcr_d7d45dc58b08cab9_10_double_double)}, // NOLINT
// kidniki
- {"nl_gcr_d8c511d38cef5f6f_34_double_double", reinterpret_cast<void *>(&nl_gcr_d8c511d38cef5f6f_34_double_double)},
+ {"nl_gcr_d8c511d38cef5f6f_34_double_double", reinterpret_cast<void *>(&nl_gcr_d8c511d38cef5f6f_34_double_double)}, // NOLINT
+// frogs
+ {"nl_gcr_d97fd7ecc1ebba3d_19_double_double", reinterpret_cast<void *>(&nl_gcr_d97fd7ecc1ebba3d_19_double_double)}, // NOLINT
// warrior
- {"nl_gcr_da598f43329e823_27_double_double", reinterpret_cast<void *>(&nl_gcr_da598f43329e823_27_double_double)},
+ {"nl_gcr_da598f43329e823_27_double_double", reinterpret_cast<void *>(&nl_gcr_da598f43329e823_27_double_double)}, // NOLINT
// pongf
- {"nl_gcr_dbafc5ddaf7a08f8_35_double_double", reinterpret_cast<void *>(&nl_gcr_dbafc5ddaf7a08f8_35_double_double)},
+ {"nl_gcr_dbafc5ddaf7a08f8_35_double_double", reinterpret_cast<void *>(&nl_gcr_dbafc5ddaf7a08f8_35_double_double)}, // NOLINT
// fireone
- {"nl_gcr_dcbecbc127c5868f_36_double_double", reinterpret_cast<void *>(&nl_gcr_dcbecbc127c5868f_36_double_double)},
+ {"nl_gcr_dcbecbc127c5868f_36_double_double", reinterpret_cast<void *>(&nl_gcr_dcbecbc127c5868f_36_double_double)}, // NOLINT
// sundance
- {"nl_gcr_e02a162cb515a958_100_double_double", reinterpret_cast<void *>(&nl_gcr_e02a162cb515a958_100_double_double)},
+ {"nl_gcr_e02a162cb515a958_100_double_double", reinterpret_cast<void *>(&nl_gcr_e02a162cb515a958_100_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_e03f0bc5ac056326_20_double_double", reinterpret_cast<void *>(&nl_gcr_e03f0bc5ac056326_20_double_double)}, // NOLINT
// speedfrk
- {"nl_gcr_e07b5b086812756c_7_double_double", reinterpret_cast<void *>(&nl_gcr_e07b5b086812756c_7_double_double)},
+ {"nl_gcr_e07b5b086812756c_7_double_double", reinterpret_cast<void *>(&nl_gcr_e07b5b086812756c_7_double_double)}, // NOLINT
// solarq
- {"nl_gcr_e081f90c2e0313f6_45_double_double", reinterpret_cast<void *>(&nl_gcr_e081f90c2e0313f6_45_double_double)},
+ {"nl_gcr_e081f90c2e0313f6_45_double_double", reinterpret_cast<void *>(&nl_gcr_e081f90c2e0313f6_45_double_double)}, // NOLINT
// spacewar
- {"nl_gcr_e0b492db40bba291_20_double_double", reinterpret_cast<void *>(&nl_gcr_e0b492db40bba291_20_double_double)},
+ {"nl_gcr_e0b492db40bba291_20_double_double", reinterpret_cast<void *>(&nl_gcr_e0b492db40bba291_20_double_double)}, // NOLINT
// flyball
- {"nl_gcr_e15d9316d59cdad9_7_double_double", reinterpret_cast<void *>(&nl_gcr_e15d9316d59cdad9_7_double_double)},
+ {"nl_gcr_e15d9316d59cdad9_7_double_double", reinterpret_cast<void *>(&nl_gcr_e15d9316d59cdad9_7_double_double)}, // NOLINT
// speedfrk
- {"nl_gcr_e4f2ffbf201a3d0c_37_double_double", reinterpret_cast<void *>(&nl_gcr_e4f2ffbf201a3d0c_37_double_double)},
+ {"nl_gcr_e4f2ffbf201a3d0c_37_double_double", reinterpret_cast<void *>(&nl_gcr_e4f2ffbf201a3d0c_37_double_double)}, // NOLINT
// pongf
- {"nl_gcr_e51b463cd890ef6d_7_double_double", reinterpret_cast<void *>(&nl_gcr_e51b463cd890ef6d_7_double_double)},
+ {"nl_gcr_e51b463cd890ef6d_7_double_double", reinterpret_cast<void *>(&nl_gcr_e51b463cd890ef6d_7_double_double)}, // NOLINT
// sundance
- {"nl_gcr_e5b7711fac1ea80c_8_double_double", reinterpret_cast<void *>(&nl_gcr_e5b7711fac1ea80c_8_double_double)},
+ {"nl_gcr_e5b7711fac1ea80c_8_double_double", reinterpret_cast<void *>(&nl_gcr_e5b7711fac1ea80c_8_double_double)}, // NOLINT
// ripoff
- {"nl_gcr_e60314070a75e121_20_double_double", reinterpret_cast<void *>(&nl_gcr_e60314070a75e121_20_double_double)},
+ {"nl_gcr_e60314070a75e121_20_double_double", reinterpret_cast<void *>(&nl_gcr_e60314070a75e121_20_double_double)}, // NOLINT
// cheekyms
- {"nl_gcr_e75302e17c866419_150_double_double", reinterpret_cast<void *>(&nl_gcr_e75302e17c866419_150_double_double)},
+ {"nl_gcr_e75302e17c866419_150_double_double", reinterpret_cast<void *>(&nl_gcr_e75302e17c866419_150_double_double)}, // NOLINT
// elim
- {"nl_gcr_e76692c10e79997e_36_double_double", reinterpret_cast<void *>(&nl_gcr_e76692c10e79997e_36_double_double)},
+ {"nl_gcr_e76692c10e79997e_36_double_double", reinterpret_cast<void *>(&nl_gcr_e76692c10e79997e_36_double_double)}, // NOLINT
// fireone
- {"nl_gcr_e7fb484f621b3ab9_7_double_double", reinterpret_cast<void *>(&nl_gcr_e7fb484f621b3ab9_7_double_double)},
+ {"nl_gcr_e7fb484f621b3ab9_7_double_double", reinterpret_cast<void *>(&nl_gcr_e7fb484f621b3ab9_7_double_double)}, // NOLINT
// elim
- {"nl_gcr_e8aeb165b69427ec_18_double_double", reinterpret_cast<void *>(&nl_gcr_e8aeb165b69427ec_18_double_double)},
+ {"nl_gcr_e8aeb165b69427ec_18_double_double", reinterpret_cast<void *>(&nl_gcr_e8aeb165b69427ec_18_double_double)}, // NOLINT
// spacewar
- {"nl_gcr_e9e8211f43d8f4b3_22_double_double", reinterpret_cast<void *>(&nl_gcr_e9e8211f43d8f4b3_22_double_double)},
+ {"nl_gcr_e9e8211f43d8f4b3_22_double_double", reinterpret_cast<void *>(&nl_gcr_e9e8211f43d8f4b3_22_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_ea2b6e3a05e6ef0b_23_double_double", reinterpret_cast<void *>(&nl_gcr_ea2b6e3a05e6ef0b_23_double_double)},
+ {"nl_gcr_ea2b6e3a05e6ef0b_23_double_double", reinterpret_cast<void *>(&nl_gcr_ea2b6e3a05e6ef0b_23_double_double)}, // NOLINT
// starcas
- {"nl_gcr_ec4f6d2dad5961b9_64_double_double", reinterpret_cast<void *>(&nl_gcr_ec4f6d2dad5961b9_64_double_double)},
+ {"nl_gcr_ec4f6d2dad5961b9_64_double_double", reinterpret_cast<void *>(&nl_gcr_ec4f6d2dad5961b9_64_double_double)}, // NOLINT
// barrier
- {"nl_gcr_ecf17036ce1c07cf_10_double_double", reinterpret_cast<void *>(&nl_gcr_ecf17036ce1c07cf_10_double_double)},
+ {"nl_gcr_ecf17036ce1c07cf_10_double_double", reinterpret_cast<void *>(&nl_gcr_ecf17036ce1c07cf_10_double_double)}, // NOLINT
// armora
- {"nl_gcr_ee2cacaa15d32491_67_double_double", reinterpret_cast<void *>(&nl_gcr_ee2cacaa15d32491_67_double_double)},
+ {"nl_gcr_ee2cacaa15d32491_67_double_double", reinterpret_cast<void *>(&nl_gcr_ee2cacaa15d32491_67_double_double)}, // NOLINT
// astrob
- {"nl_gcr_ee61dcaa355fc625_285_double_double", reinterpret_cast<void *>(&nl_gcr_ee61dcaa355fc625_285_double_double)},
+ {"nl_gcr_ee61dcaa355fc625_285_double_double", reinterpret_cast<void *>(&nl_gcr_ee61dcaa355fc625_285_double_double)}, // NOLINT
// starcrus
- {"nl_gcr_ef2f49641f433a74_94_double_double", reinterpret_cast<void *>(&nl_gcr_ef2f49641f433a74_94_double_double)},
-// astrob
- {"nl_gcr_efd052e6829c33e_9_double_double", reinterpret_cast<void *>(&nl_gcr_efd052e6829c33e_9_double_double)},
+ {"nl_gcr_ef2f49641f433a74_94_double_double", reinterpret_cast<void *>(&nl_gcr_ef2f49641f433a74_94_double_double)}, // NOLINT
+// frogs
+ {"nl_gcr_f153eda877c6e8ed_30_double_double", reinterpret_cast<void *>(&nl_gcr_f153eda877c6e8ed_30_double_double)}, // NOLINT
+// frogs
+ {"nl_gcr_f2de20e827252602_53_double_double", reinterpret_cast<void *>(&nl_gcr_f2de20e827252602_53_double_double)}, // NOLINT
// spacfury
- {"nl_gcr_f365c3863b050e35_45_double_double", reinterpret_cast<void *>(&nl_gcr_f365c3863b050e35_45_double_double)},
+ {"nl_gcr_f365c3863b050e35_45_double_double", reinterpret_cast<void *>(&nl_gcr_f365c3863b050e35_45_double_double)}, // NOLINT
// spacfury
- {"nl_gcr_f3c9a6d53371d709_227_double_double", reinterpret_cast<void *>(&nl_gcr_f3c9a6d53371d709_227_double_double)},
+ {"nl_gcr_f3c9a6d53371d709_227_double_double", reinterpret_cast<void *>(&nl_gcr_f3c9a6d53371d709_227_double_double)}, // NOLINT
// barrier
- {"nl_gcr_f425d4008ae1d2c6_13_double_double", reinterpret_cast<void *>(&nl_gcr_f425d4008ae1d2c6_13_double_double)},
+ {"nl_gcr_f425d4008ae1d2c6_13_double_double", reinterpret_cast<void *>(&nl_gcr_f425d4008ae1d2c6_13_double_double)}, // NOLINT
// boxingb
- {"nl_gcr_f43cf2a28a5a5561_23_double_double", reinterpret_cast<void *>(&nl_gcr_f43cf2a28a5a5561_23_double_double)},
+ {"nl_gcr_f43cf2a28a5a5561_23_double_double", reinterpret_cast<void *>(&nl_gcr_f43cf2a28a5a5561_23_double_double)}, // NOLINT
// spacfury
- {"nl_gcr_f4da1503eabe16cf_16_double_double", reinterpret_cast<void *>(&nl_gcr_f4da1503eabe16cf_16_double_double)},
+ {"nl_gcr_f4da1503eabe16cf_16_double_double", reinterpret_cast<void *>(&nl_gcr_f4da1503eabe16cf_16_double_double)}, // NOLINT
// elim
- {"nl_gcr_f4f4e2ee05cb584e_13_double_double", reinterpret_cast<void *>(&nl_gcr_f4f4e2ee05cb584e_13_double_double)},
+ {"nl_gcr_f4f4e2ee05cb584e_13_double_double", reinterpret_cast<void *>(&nl_gcr_f4f4e2ee05cb584e_13_double_double)}, // NOLINT
// konami2x
- {"nl_gcr_f6900d3f36a91049_85_double_double", reinterpret_cast<void *>(&nl_gcr_f6900d3f36a91049_85_double_double)},
+ {"nl_gcr_f6900d3f36a91049_85_double_double", reinterpret_cast<void *>(&nl_gcr_f6900d3f36a91049_85_double_double)}, // NOLINT
// breakout
- {"nl_gcr_f7dc4f87b5a8ba93_7_double_double", reinterpret_cast<void *>(&nl_gcr_f7dc4f87b5a8ba93_7_double_double)},
+ {"nl_gcr_f7dc4f87b5a8ba93_7_double_double", reinterpret_cast<void *>(&nl_gcr_f7dc4f87b5a8ba93_7_double_double)}, // NOLINT
// fireone
- {"nl_gcr_f8f6a951fd1af6bc_7_double_double", reinterpret_cast<void *>(&nl_gcr_f8f6a951fd1af6bc_7_double_double)},
+ {"nl_gcr_f8f6a951fd1af6bc_7_double_double", reinterpret_cast<void *>(&nl_gcr_f8f6a951fd1af6bc_7_double_double)}, // NOLINT
+// brdrline
+ {"nl_gcr_f99b1245e708ec85_83_double_double", reinterpret_cast<void *>(&nl_gcr_f99b1245e708ec85_83_double_double)}, // NOLINT
// zektor
- {"nl_gcr_fbff020f5f5d5a5_144_double_double", reinterpret_cast<void *>(&nl_gcr_fbff020f5f5d5a5_144_double_double)},
+ {"nl_gcr_fbff020f5f5d5a5_144_double_double", reinterpret_cast<void *>(&nl_gcr_fbff020f5f5d5a5_144_double_double)}, // NOLINT
// kidniki
- {"nl_gcr_fc02559fdbfb0e10_67_double_double", reinterpret_cast<void *>(&nl_gcr_fc02559fdbfb0e10_67_double_double)},
+ {"nl_gcr_fc02559fdbfb0e10_67_double_double", reinterpret_cast<void *>(&nl_gcr_fc02559fdbfb0e10_67_double_double)}, // NOLINT
// 280zzzap
- {"nl_gcr_fc9971724787b82b_149_double_double", reinterpret_cast<void *>(&nl_gcr_fc9971724787b82b_149_double_double)},
+ {"nl_gcr_fc9971724787b82b_149_double_double", reinterpret_cast<void *>(&nl_gcr_fc9971724787b82b_149_double_double)}, // NOLINT
// elim
- {"nl_gcr_fcce97532ad2f49d_18_double_double", reinterpret_cast<void *>(&nl_gcr_fcce97532ad2f49d_18_double_double)},
+ {"nl_gcr_fcce97532ad2f49d_18_double_double", reinterpret_cast<void *>(&nl_gcr_fcce97532ad2f49d_18_double_double)}, // NOLINT
// fireone
- {"nl_gcr_fd2796828f1ebd00_36_double_double", reinterpret_cast<void *>(&nl_gcr_fd2796828f1ebd00_36_double_double)},
+ {"nl_gcr_fd2796828f1ebd00_36_double_double", reinterpret_cast<void *>(&nl_gcr_fd2796828f1ebd00_36_double_double)}, // NOLINT
// starfire
- {"nl_gcr_feae15b80dd73620_7_double_double", reinterpret_cast<void *>(&nl_gcr_feae15b80dd73620_7_double_double)},
+ {"nl_gcr_feae15b80dd73620_7_double_double", reinterpret_cast<void *>(&nl_gcr_feae15b80dd73620_7_double_double)}, // NOLINT
#endif
{"", nullptr}
diff --git a/src/lib/netlist/macro/modules/nlmod_ICL8038_DIP.cpp b/src/lib/netlist/macro/modules/nlmod_icl8038_dip.cpp
index 05a4d300099..05a4d300099 100644..100755
--- a/src/lib/netlist/macro/modules/nlmod_ICL8038_DIP.cpp
+++ b/src/lib/netlist/macro/modules/nlmod_icl8038_dip.cpp
diff --git a/src/lib/netlist/macro/modules/nlmod_NE556_DIP.cpp b/src/lib/netlist/macro/modules/nlmod_ne556_dip.cpp
index 7f278a18b6d..7f278a18b6d 100644..100755
--- a/src/lib/netlist/macro/modules/nlmod_NE556_DIP.cpp
+++ b/src/lib/netlist/macro/modules/nlmod_ne556_dip.cpp
diff --git a/src/lib/netlist/macro/modules/nlmod_RTEST.cpp b/src/lib/netlist/macro/modules/nlmod_rtest.cpp
index c2ad129c6e3..c2ad129c6e3 100644..100755
--- a/src/lib/netlist/macro/modules/nlmod_RTEST.cpp
+++ b/src/lib/netlist/macro/modules/nlmod_rtest.cpp
diff --git a/src/lib/netlist/macro/nlm_cd4xxx_lib.cpp b/src/lib/netlist/macro/nlm_cd4xxx_lib.cpp
index 13c80aa391b..35f5cae6374 100644
--- a/src/lib/netlist/macro/nlm_cd4xxx_lib.cpp
+++ b/src/lib/netlist/macro/nlm_cd4xxx_lib.cpp
@@ -268,6 +268,251 @@ static NETLIST_START(CD4024_DIP)
/* +--------------+ */)
NETLIST_END()
+//- Identifier: CD4029_DIP
+//- Title: CD4029BM/CD4029BC Presettable Binary/Decade Up/Down Counter
+//- Pinalias: PE,Q4,J4,J1,CI,Q1,CO,VSS,BD,UD,Q2,J2,J3,Q3,CLK,VDD
+//- Package: DIP
+//- NamingConvention: Naming conventions follow National Semiconductor datasheet
+//- Limitations:
+//- Voltage-dependent timing is not implemented.
+//- FunctionTable:
+//- http://pdf.datasheetcatalog.com/datasheets/166/108968_DS.pdf
+//- See nld_4029.cpp for tables explaining the counting order for all states
+//-
+//- Counter Sequences:
+//-
+//- B/D high (Binary), U/D high (Up)
+//- +-------++----+----+----+----+----++-------+
+//- | COUNT || Q4 | Q3 | Q2 | Q1 | CO || NEXT |
+//- +=======++====+====+====+====+====++=======+
+//- | 0 || 0 | 0 | 0 | 0 | 1 || 1 |
+//- | 1 || 0 | 0 | 0 | 1 | 1 || 2 |
+//- | 2 || 0 | 0 | 1 | 0 | 1 || 3 |
+//- | 3 || 0 | 0 | 1 | 1 | 1 || 4 |
+//- | 4 || 0 | 1 | 0 | 0 | 1 || 5 |
+//- | 5 || 0 | 1 | 0 | 1 | 1 || 6 |
+//- | 6 || 0 | 1 | 1 | 0 | 1 || 7 |
+//- | 7 || 0 | 1 | 1 | 1 | 1 || 8 |
+//- | 8 || 1 | 0 | 0 | 0 | 1 || 9 |
+//- | 9 || 1 | 0 | 0 | 1 | 1 || A |
+//- | A || 1 | 0 | 1 | 0 | 1 || B |
+//- | B || 1 | 0 | 1 | 1 | 1 || C |
+//- | C || 1 | 1 | 0 | 0 | 1 || D |
+//- | D || 1 | 1 | 0 | 1 | 1 || E |
+//- | E || 1 | 1 | 1 | 0 | 1 || F |
+//- | F || 1 | 1 | 1 | 1 |0|CI|| 0 |
+//- | 0 || 0 | 0 | 0 | 0 | 1 || 1 |
+//- +-------++----+----+----+----+----++-------+
+//-
+//- B/D high (Binary), U/D low (Down)
+//- +-------++----+----+----+----+----++-------+
+//- | COUNT || Q4 | Q3 | Q2 | Q1 | CO || NEXT |
+//- +=======++====+====+====+====+====++=======+
+//- | F || 1 | 1 | 1 | 1 | 1 || E |
+//- | E || 1 | 1 | 1 | 0 | 1 || D |
+//- | D || 1 | 1 | 0 | 1 | 1 || C |
+//- | C || 1 | 1 | 0 | 0 | 1 || B |
+//- | B || 1 | 0 | 1 | 1 | 1 || A |
+//- | A || 1 | 0 | 1 | 0 | 1 || 9 |
+//- | 9 || 1 | 0 | 0 | 1 | 1 || 8 |
+//- | 8 || 1 | 0 | 0 | 0 | 1 || 7 |
+//- | 7 || 0 | 1 | 1 | 1 | 1 || 6 |
+//- | 6 || 0 | 1 | 1 | 0 | 1 || 5 |
+//- | 5 || 0 | 1 | 0 | 1 | 1 || 4 |
+//- | 4 || 0 | 1 | 0 | 0 | 1 || 3 |
+//- | 3 || 0 | 0 | 1 | 1 | 1 || 2 |
+//- | 2 || 0 | 0 | 1 | 0 | 1 || 1 |
+//- | 1 || 0 | 0 | 0 | 1 | 1 || 0 |
+//- | 0 || 0 | 0 | 0 | 0 |0|CI|| F |
+//- | F || 1 | 1 | 1 | 1 | 1 || E |
+//- +-------++----+----+----+----+----++-------+
+//-
+//- B/D low (Decimal), U/D high (Up)
+//- +-------++----+----+----+----+----++-------+
+//- | COUNT || Q4 | Q3 | Q2 | Q1 | CO || NEXT |
+//- +=======++====+====+====+====+====++=======+
+//- | 0 || 0 | 0 | 0 | 0 | 1 || 1 |
+//- | 1 || 0 | 0 | 0 | 1 | 1 || 2 |
+//- | 2 || 0 | 0 | 1 | 0 | 1 || 3 |
+//- | 3 || 0 | 0 | 1 | 1 | 1 || 4 |
+//- | 4 || 0 | 1 | 0 | 0 | 1 || 5 |
+//- | 5 || 0 | 1 | 0 | 1 | 1 || 6 |
+//- | 6 || 0 | 1 | 1 | 0 | 1 || 7 |
+//- | 7 || 0 | 1 | 1 | 1 | 1 || 8 |
+//- | 8 || 1 | 0 | 0 | 0 | 1 || 9 |
+//- | 9 || 1 | 0 | 0 | 1 |0|CI|| 0 |
+//- | A || 1 | 0 | 1 | 0 | 1 || B |
+//- | B || 1 | 0 | 1 | 1 |0|CI|| 6 |
+//- | C || 1 | 1 | 0 | 0 | 1 || D |
+//- | D || 1 | 1 | 0 | 1 |0|CI|| 4 |
+//- | E || 1 | 1 | 1 | 0 | 1 || F |
+//- | F || 1 | 1 | 1 | 1 |0|CI|| 2 |
+//- | 0 || 0 | 0 | 0 | 0 | 1 || 1 |
+//- +-------++----+----+----+----+----++-------+
+//-
+//- B/D low (Decimal), U/D low (Down)
+//- +-------++----+----+----+----+----++-------+
+//- | COUNT || Q4 | Q3 | Q2 | Q1 | CO || NEXT |
+//- +=======++====+====+====+====+====++=======+
+//- | F || 1 | 1 | 1 | 1 | 1 || E |
+//- | E || 1 | 1 | 1 | 0 | 1 || D |
+//- | D || 1 | 1 | 0 | 1 | 1 || C |
+//- | C || 1 | 1 | 0 | 0 | 1 || B |
+//- | B || 1 | 0 | 1 | 1 | 1 || A |
+//- | A || 1 | 0 | 1 | 0 | 1 || 9 |
+//- | 9 || 1 | 0 | 0 | 1 | 1 || 8 |
+//- | 8 || 1 | 0 | 0 | 0 | 1 || 7 |
+//- | 7 || 0 | 1 | 1 | 1 | 1 || 6 |
+//- | 6 || 0 | 1 | 1 | 0 | 1 || 5 |
+//- | 5 || 0 | 1 | 0 | 1 | 1 || 4 |
+//- | 4 || 0 | 1 | 0 | 0 | 1 || 3 |
+//- | 3 || 0 | 0 | 1 | 1 | 1 || 2 |
+//- | 2 || 0 | 0 | 1 | 0 | 1 || 1 |
+//- | 1 || 0 | 0 | 0 | 1 | 1 || 0 |
+//- | 0 || 0 | 0 | 0 | 0 |0|CI|| 9 |
+//- | 9 || 1 | 0 | 0 | 1 | 1 || 8 |
+//- +-------++----+----+----+----+----++-------+
+//-
+//- Note that in all cases where Carry-out is generating a non-1 signal (0 | Carry-in),
+//- this signal is asynchronous, so if carry-in changes the carry-out value will
+//- change immediately.
+//-
+//- Preset/Carry in function table
+//- +-----+-----+-----++----+----+----+----+
+//- | PE | CLK | CI || Q1 | Q2 | Q3 | Q4 |
+//- +=====+=====+=====++====+====+====+====+
+//- | 1 | X | X || J1 | J2 | J3 | J4 |
+//- | 0 | X | 1 || Q1 | Q2 | Q3 | Q4 |
+//- | 0 | ./` | 0 || COUNT |
+//- +-----+-----+-----++----+----+----+----+
+//-
+static NETLIST_START(CD4029_DIP)
+ CD4029(A)
+
+ DIPPINS( /* +--------------+ */
+ A.PE, /* PE |1 ++ 16| VDD */ A.VDD,
+ A.Q4, /* Q4 |2 15| CLK */ A.CLK,
+ A.J4, /* J4 |3 14| Q3 */ A.Q3,
+ A.J1, /* J1 |4 4029 13| J3 */ A.J3,
+ A.CI, /* CI |5 12| J2 */ A.J2,
+ A.Q1, /* Q1 |6 11| Q2 */ A.Q2,
+ A.CO, /* CO |7 10| U/D */ A.UD,
+ A.VSS, /* VSS |8 9| B/D */ A.BD
+ /* +--------------+ */)
+NETLIST_END()
+
+//- Identifier: CD4030_DIP
+//- Title: CD4030M/CD4030C Quad EXCLUSIVE-OR Gate
+//- Pinalias: A1,B1,Y1,Y2,A2,B2,VSS,A3,B3,Y3,Y4,A4,B4,VDD
+//- Package: DIP
+//- NamingConvention: Naming conventions follow National Semiconductor datasheet
+//- Limitations:
+//- Voltage-dependent timing is not implemented.
+//- FunctionTable:
+//- https://www.uni-kl.de/elektronik-lager/418055
+//-
+static NETLIST_START(CD4030_DIP)
+ CD4030_GATE(A)
+ CD4030_GATE(B)
+ CD4030_GATE(C)
+ CD4030_GATE(D)
+
+ DIPPINS( /* +--------------+ */
+ A.A, /* A1 |1 ++ 14| VDD */ A.VDD,
+ A.B, /* B1 |2 13| B4 */ D.B,
+ A.Q, /* Y1 |3 12| A4 */ D.A,
+ B.Q, /* Y2 |4 4030 11| Y4 */ D.Q,
+ B.A, /* A2 |5 10| Y3 */ C.Q,
+ B.B, /* B2 |6 9| B3 */ C.B,
+ A.VSS, /* VSS |7 8| A3 */ C.A
+ /* +--------------+ */
+ )
+NETLIST_END()
+
+//- Identifier: CD4042_DIP
+//- Title: CD4042BM/CD4042BC Quad Clocked D Latch
+//- Pinalias: Q4,Q1,QQ1,D1,CLK,POL,D2,VSS,QQ2,Q2,Q3,QQ3,D3,D4,QQ4,VDD
+//- Package: DIP
+//- NamingConvention: Naming conventions follow National Semiconductor datasheet
+//- Limitations:
+//- Voltage-dependent timing is partially implemented.
+//- FunctionTable:
+//- http://pdf.datasheetcatalog.com/datasheet/nationalsemiconductor/DS005966.PDF
+//-
+//- +-----+-----+----++----+-----+
+//- | POL | CLK | Dx || Qx | QQx |
+//- +=====+=====+====++====+=====+
+//- | 0 | 0 | X || Qx | /Qx |
+//- | 0 | 1 | D || D | /D |
+//- | 1 | 1 | X || Qx | /Qx |
+//- | 1 | 0 | D || D | /D |
+//- +-----+-----+----++----+-----+
+//- Note that since this is a level triggered transparent latch,
+//- as long as POL ^ CLK == true, the latch is transparent, and
+//- if D changes Q and QQ(/Q) will instantly change.
+//-
+static NETLIST_START(CD4042_DIP)
+ CD4042(A)
+
+ DIPPINS( /* +--------------+ */
+ A.Q4, /* Q4 |1 ++ 16| VDD */ A.VDD,
+ A.Q1, /* Q1 |2 15| Q4Q */ A.Q4Q,
+ A.Q1Q, /* Q1Q |3 14| D4 */ A.D4,
+ A.D1, /* D1 |4 4042 13| D3 */ A.D3,
+ A.CLK, /* CLK |5 12| Q3Q */ A.Q3Q,
+ A.POL, /* POL |6 11| Q3 */ A.Q3,
+ A.D2, /* D2 |7 10| Q2 */ A.Q2,
+ A.VSS, /* VSS |8 9| Q2Q */ A.Q2Q
+ /* +--------------+ */
+ )
+NETLIST_END()
+
+//- Identifier: CD4049_DIP
+//- Title: CD4049UBM/CD4049UBC Hex Inverting Buffer
+//- Pinalias: VDD,G,A,H,B,I,C,VSS,D,J,E,K,NC,F,L,NC
+//- Package: DIP
+//- NamingConvention: Naming conventions follow National Semiconductor datasheet
+//- Limitations:
+//- Voltage-dependent timing is not implemented.
+//- FunctionTable:
+//- http://pdf.datasheetcatalog.com/datasheets/134/109125_DS.pdf
+//-
+static NETLIST_START(CD4049_DIP)
+ CD4049_GATE(A)
+ CD4049_GATE(B)
+ CD4049_GATE(C)
+ CD4049_GATE(D)
+ CD4049_GATE(E)
+ CD4049_GATE(F)
+ NC_PIN(NC)
+
+ NET_C(A.VDD, B.VDD, C.VDD, D.VDD, E.VDD, F.VDD)
+ NET_C(A.VSS, B.VSS, C.VSS, D.VSS, E.VSS, F.VSS)
+
+ //DIPPINS( /* +--------------+ */
+ // A.VDD, /* VCC |1 ++ 16| NC */ NC.I,
+ // A.G, /*G=/A |2 15| L=/F*/ F.L,
+ // A.A, /* A |3 14| F */ F.F,
+ // B.H, /*H=/B |4 13| NC */ NC.I,
+ // B.B, /* B |5 4049 12| K=/E*/ E.K,
+ // C.I, /*I=/C |6 11| E */ E.E,
+ // C.C, /* C |7 10| J=/D*/ D.J,
+ // A.VSS, /* VSS |8 9| D */ D.D
+ // /* +--------------+ */
+ //)
+ DIPPINS( /* +--------------+ */
+ A.VDD, /* VCC |1 ++ 16| NC */ NC.I,
+ A.Q, /*G=/A |2 15| L=/F*/ F.Q,
+ A.A, /* A |3 14| F */ F.A,
+ B.Q, /*H=/B |4 13| NC */ NC.I,
+ B.A, /* B |5 4049 12| K=/E*/ E.Q,
+ C.Q, /*I=/C |6 11| E */ E.A,
+ C.A, /* C |7 10| J=/D*/ D.Q,
+ A.VSS, /* VSS |8 9| D */ D.A
+ /* +--------------+ */
+ )
+NETLIST_END()
+
//- Identifier: CD4053_DIP
//- Title: CD4053BM/CD4053BC Triple 2-Channel AnalogMultiplexer/Demultiplexer
//- Pinalias: INOUTBY,INOUTBX,INOUTCY,OUTINC,INOUTCX,INH,VEE,VSS,C,B,A,INOUTAX,INOUTAY,OUTINA,OUTINB,VDD
@@ -397,6 +642,114 @@ static NETLIST_START(CD4070_DIP)
)
NETLIST_END()
+//- Identifier: CD4071_DIP
+//- Title: CD4071BC Quad 2-Input OR Buffered B Series Gate
+//- Pinalias: A,B,J,K,C,D,VSS,E,F,L,M,G,H,VDD
+//- Package: DIP
+//- NamingConvention: Naming conventions follow National Semiconductor datasheet
+//- FunctionTable:
+//- pdf.datasheetcatalog.com/datasheets/185/109289_DS.pdf
+//-
+static NETLIST_START(CD4071_DIP)
+ CD4071_GATE(A)
+ CD4071_GATE(B)
+ CD4071_GATE(C)
+ CD4071_GATE(D)
+
+ NET_C(A.VDD, B.VDD, C.VDD, D.VDD)
+ NET_C(A.VSS, B.VSS, C.VSS, D.VSS)
+
+ DIPPINS( /* +--------------+ */
+ A.A, /* A |1 ++ 14| VDD */ A.VDD,
+ A.B, /* B |2 13| H */ D.B,
+ A.Q, /* J |3 12| G */ D.A,
+ B.Q, /* K |4 4071 11| M */ D.Q,
+ B.A, /* C |5 10| L */ C.Q,
+ B.B, /* D |6 9| F */ C.B,
+ A.VSS, /* VSS |7 8| E */ C.A
+ /* +--------------+ */
+ )
+NETLIST_END()
+
+//- Identifier: CD4076_DIP
+//- Title: CD4076BM/CD4076BC TRI-STATE(R) Quad D Flip-Flop
+//- Pinalias: OD1,OD2,OA,OB,OC,OD,CLK,VSS,ID1,ID2,ID,IC,IB,IA,CLR,VDD
+//- Package: DIP
+//- NamingConvention: Naming conventions follow National Semiconductor datasheet
+//- Limitations:
+//- Voltage-dependent timing is not implemented.
+//- FunctionTable:
+//- http://www.bitsavers.org/components/national/_dataBooks/1981_Natonal_CMOS_Databook.pdf 5-186 (pdf page 567)
+//-
+//- Function table for ID1/2 pins
+//- +-----+-----+-----+----+-----++-----+
+//- | ID1 | ID2 | CLR | Ix | CLK || iOx |
+//- +=====+=====+=====+====+=====++=====+
+//- | X | X | 0 | X | 0 || iOx |
+//- | X | X | 0 | X | 1 || iOx |
+//- | 1 | X | 0 | X | 0>1 || iOx |
+//- | X | 1 | 0 | X | 0>1 || iOx |
+//- | 0 | 0 | 0 | 0 | 0>1 || 0 |
+//- | 0 | 0 | 0 | 1 | 0>1 || 1 |
+//- | X | X | 1 | X | X || 0 |
+//- +-----+-----+-----+----+-----++-----+
+//- Note: iOX is an internal signal, the output of each D-latch
+//-
+//- Function table for OD1/2 pins vs output of the internal D-latches
+//- +-----+-----+-----++-----+
+//- | OD1 | OD2 | iOx || Ox |
+//- +=====+=====+=====++=====+
+//- | 1 | X | X || Z |
+//- | X | 1 | X || Z |
+//- | 0 | 0 | 0 || 0 |
+//- | 0 | 0 | 1 || 1 |
+//- +-----+-----+-----++-----+
+//-
+static NETLIST_START(CD4076_DIP)
+ CD4076(A)
+
+ DIPPINS( /* +--------------+ */
+ A.OD1, /* OD1 |1 ++ 16| VDD */ A.VDD,
+ A.OD2, /* OD2 |2 15| CLR */ A.CLR,
+ A.OA, /* OA |3 14| IA */ A.IA,
+ A.OB, /* OB |4 4076 13| IB */ A.IB,
+ A.OC, /* OC |5 12| IC */ A.IC,
+ A.OD, /* OD |6 11| ID */ A.ID,
+ A.CLK, /* CLK |7 10| ID2 */ A.ID2,
+ A.VSS, /* VSS |8 9| ID1 */ A.ID1
+ /* +--------------+ */
+ )
+NETLIST_END()
+
+//- Identifier: CD4081_DIP
+//- Title: CD4081BC Quad 2-Input AND Buffered B Series Gate
+//- Pinalias: A,B,J,K,C,D,VSS,E,F,L,M,G,H,VDD
+//- Package: DIP
+//- NamingConvention: Naming conventions follow National Semiconductor datasheet
+//- FunctionTable:
+//- pdf.datasheetcatalog.com/datasheets/185/109289_DS.pdf
+//-
+static NETLIST_START(CD4081_DIP)
+ CD4081_GATE(A)
+ CD4081_GATE(B)
+ CD4081_GATE(C)
+ CD4081_GATE(D)
+
+ NET_C(A.VDD, B.VDD, C.VDD, D.VDD)
+ NET_C(A.VSS, B.VSS, C.VSS, D.VSS)
+
+ DIPPINS( /* +--------------+ */
+ A.A, /* A |1 ++ 14| VDD */ A.VDD,
+ A.B, /* B |2 13| H */ D.B,
+ A.Q, /* J |3 12| G */ D.A,
+ B.Q, /* K |4 4081 11| M */ D.Q,
+ B.A, /* C |5 10| L */ C.Q,
+ B.B, /* D |6 9| F */ C.B,
+ A.VSS, /* VSS |7 8| E */ C.A
+ /* +--------------+ */
+ )
+NETLIST_END()
+
//- Identifier: CD4316_DIP
//- Title: 74HC/HCT4316 Quad bilateral switches
//- Pinalias: 1Z,1Y,2Y,2Z,2S,3S,EQ,GND,VEE,3Z,3Y,4Y,4Z,4S,1S,VCC
@@ -501,6 +854,22 @@ static TRUTHTABLE_START(CD4011_GATE, 2, 1, "")
TT_FAMILY("CD4XXX")
TRUTHTABLE_END()
+static TRUTHTABLE_START(CD4030_GATE, 2, 1, "")
+ TT_HEAD("A,B|Q ")
+ TT_LINE("0,0|0|100")
+ TT_LINE("0,1|1|100")
+ TT_LINE("1,0|1|100")
+ TT_LINE("1,1|0|100")
+ TT_FAMILY("CD4XXX")
+TRUTHTABLE_END()
+
+static TRUTHTABLE_START(CD4049_GATE, 1, 1, "")
+ TT_HEAD("A|Q ")
+ TT_LINE("0|1|45")
+ TT_LINE("1|0|45")
+ TT_FAMILY("CD4XXX")
+TRUTHTABLE_END()
+
static TRUTHTABLE_START(CD4069_GATE, 1, 1, "")
TT_HEAD("A|Q ")
TT_LINE("0|1|55")
@@ -517,17 +886,43 @@ static TRUTHTABLE_START(CD4070_GATE, 2, 1, "")
TT_FAMILY("CD4XXX")
TRUTHTABLE_END()
+static TRUTHTABLE_START(CD4071_GATE, 2, 1, "")
+ TT_HEAD("A,B|Q ")
+ TT_LINE("0,0|0|200")
+ TT_LINE("0,1|1|200")
+ TT_LINE("1,0|1|200")
+ TT_LINE("1,1|1|200")
+ TT_FAMILY("CD4XXX")
+TRUTHTABLE_END()
+
+static TRUTHTABLE_START(CD4081_GATE, 2, 1, "")
+ TT_HEAD("A,B|Q ")
+ TT_LINE("0,0|0|200")
+ TT_LINE("0,1|0|200")
+ TT_LINE("1,0|0|200")
+ TT_LINE("1,1|1|200")
+ TT_FAMILY("CD4XXX")
+TRUTHTABLE_END()
+
NETLIST_START(cd4xxx_lib)
TRUTHTABLE_ENTRY(CD4001_GATE)
TRUTHTABLE_ENTRY(CD4011_GATE)
+ TRUTHTABLE_ENTRY(CD4030_GATE)
+ TRUTHTABLE_ENTRY(CD4049_GATE)
TRUTHTABLE_ENTRY(CD4069_GATE)
TRUTHTABLE_ENTRY(CD4070_GATE)
+ TRUTHTABLE_ENTRY(CD4071_GATE)
+ TRUTHTABLE_ENTRY(CD4081_GATE)
LOCAL_LIB_ENTRY(CD4001_DIP)
LOCAL_LIB_ENTRY(CD4011_DIP)
+ LOCAL_LIB_ENTRY(CD4030_DIP)
+ LOCAL_LIB_ENTRY(CD4049_DIP)
LOCAL_LIB_ENTRY(CD4069_DIP)
LOCAL_LIB_ENTRY(CD4070_DIP)
+ LOCAL_LIB_ENTRY(CD4071_DIP)
+ LOCAL_LIB_ENTRY(CD4081_DIP)
/* DIP ONLY */
LOCAL_LIB_ENTRY(CD4006_DIP)
@@ -536,9 +931,12 @@ NETLIST_START(cd4xxx_lib)
LOCAL_LIB_ENTRY(CD4022_DIP)
LOCAL_LIB_ENTRY(CD4020_DIP)
LOCAL_LIB_ENTRY(CD4024_DIP)
+ LOCAL_LIB_ENTRY(CD4029_DIP)
+ LOCAL_LIB_ENTRY(CD4042_DIP)
LOCAL_LIB_ENTRY(CD4053_DIP)
LOCAL_LIB_ENTRY(CD4066_DIP)
LOCAL_LIB_ENTRY(CD4016_DIP)
+ LOCAL_LIB_ENTRY(CD4076_DIP)
LOCAL_LIB_ENTRY(CD4316_DIP)
LOCAL_LIB_ENTRY(CD4538_DIP)
diff --git a/src/lib/netlist/macro/nlm_opamp_lib.cpp b/src/lib/netlist/macro/nlm_opamp_lib.cpp
index 0d1a77a87b8..db5fba1888c 100644
--- a/src/lib/netlist/macro/nlm_opamp_lib.cpp
+++ b/src/lib/netlist/macro/nlm_opamp_lib.cpp
@@ -353,6 +353,16 @@ static NETLIST_START(LM2902_DIP)
NETLIST_END()
+static NETLIST_START(LM348_DIP)
+ OPAMP(A, "UA741")
+ OPAMP(B, "UA741")
+ OPAMP(C, "UA741")
+ OPAMP(D, "UA741")
+
+ INCLUDE(opamp_layout_4_4_11)
+
+NETLIST_END()
+
static NETLIST_START(LM358_DIP)
OPAMP(A, "LM358")
OPAMP(B, "LM358")
@@ -632,6 +642,7 @@ NETLIST_START(opamp_lib)
LOCAL_LIB_ENTRY(TL082_DIP)
LOCAL_LIB_ENTRY(TL084_DIP)
LOCAL_LIB_ENTRY(LM324_DIP)
+ LOCAL_LIB_ENTRY(LM348_DIP)
LOCAL_LIB_ENTRY(LM358_DIP)
LOCAL_LIB_ENTRY(LM2902_DIP)
LOCAL_LIB_ENTRY(UA741_DIP8)
diff --git a/src/lib/netlist/macro/nlm_roms_lib.cpp b/src/lib/netlist/macro/nlm_roms_lib.cpp
index 4e8ab22a910..d728078c87f 100644
--- a/src/lib/netlist/macro/nlm_roms_lib.cpp
+++ b/src/lib/netlist/macro/nlm_roms_lib.cpp
@@ -342,6 +342,39 @@ static NETLIST_START(PROM_MK28000_DIP)
ALIAS(24, A.OE1)
NETLIST_END()
+//- Identifier: ROM_MCM14524_DIP
+//- Title: MCM14524 1024-BIT READ ONLY MEMORY
+//- Pinalias: CLK,EN,B0,B1,B2,B3,A2,GND,A3,A4,A5,A6,A7,A1,A0,VCC
+//- Package: DIP
+//- Param: ROM
+//- The name of the source to load the rom content from
+//- NamingConvention: Naming conventions follow Motorola datasheet
+//- Limitations:
+//- Voltage-dependent timing is partially implemented.
+//- FunctionTable:
+//- http://www.bitsavers.org/components/motorola/_dataBooks/1978_Motorola_CMOS_Data_Book.pdf 7-439 (pdf page 488)
+
+static NETLIST_START(ROM_MCM14524_DIP)
+
+ ROM_MCM14524(A)
+
+ DEFPARAM(ROM, "unknown")
+ PARAM(A.ROM, "$(@.ROM)")
+
+ /* Motorola MCM14524: */
+ DIPPINS( /* +-----..-----+ */
+ A.CLK, /* /CLK |1 16| VDD */ A.VCC,
+ A.EN, /* CE |2 15| A0 */ A.A0,
+ A.B0, /* B0 |3 MCM 14| A1 */ A.A1,
+ A.B1, /* B1 |4 14524 13| A7 */ A.A7,
+ A.B2, /* B2 |5 12| A6 */ A.A6,
+ A.B3, /* B3 |6 11| A5 */ A.A5,
+ A.A2, /* A2 |7 10| A4 */ A.A4,
+ A.GND, /* VSS |8 9| A3 */ A.A3
+ /* +------------+ */
+ )
+NETLIST_END()
+
/* 2102: 1024 x 1-bit Static RAM
*
* +--------------+
@@ -402,6 +435,7 @@ NETLIST_START(roms_lib)
LOCAL_LIB_ENTRY(TTL_82S16_DIP)
LOCAL_LIB_ENTRY(PROM_82S115_DIP)
LOCAL_LIB_ENTRY(PROM_MK28000_DIP)
+ LOCAL_LIB_ENTRY(ROM_MCM14524_DIP)
LOCAL_LIB_ENTRY(RAM_2102A_DIP)
LOCAL_LIB_ENTRY(ROM_TMS4800_DIP)
NETLIST_END()
diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp
index d0a0e707aaf..d92b8e505c5 100644
--- a/src/lib/netlist/nl_base.cpp
+++ b/src/lib/netlist/nl_base.cpp
@@ -86,14 +86,14 @@ namespace netlist
// ----------------------------------------------------------------------------------------
netlist_t::netlist_t(netlist_state_t &state, const pstring &aname)
- : m_state(state)
- , m_solver(nullptr)
- , m_time(netlist_time_ext::zero())
- , m_mainclock(nullptr)
- , m_queue(config::MAX_QUEUE_SIZE::value,
- detail::queue_t::id_delegate(&netlist_state_t :: find_net_id, &state),
- detail::queue_t::obj_delegate(&netlist_state_t :: net_by_id, &state))
- , m_use_stats(false)
+ : m_state(state)
+ , m_solver(nullptr)
+ , m_time(netlist_time_ext::zero())
+ , m_mainclock(nullptr)
+ , m_use_stats(false)
+ , m_queue(config::MAX_QUEUE_SIZE::value,
+ detail::queue_t::id_delegate(&netlist_state_t :: find_net_id, &state),
+ detail::queue_t::obj_delegate(&netlist_state_t :: net_by_id, &state))
{
state.save(*this, static_cast<plib::state_manager_t::callback_t &>(m_queue), aname, "m_queue");
state.save(*this, m_time, aname, "m_time");
@@ -106,7 +106,6 @@ namespace netlist
netlist_state_t::netlist_state_t(const pstring &name,
plib::plog_delegate logger)
: m_log(logger)
- , m_extended_validation(false)
, m_dummy_version(1)
{
m_setup = plib::make_unique<setup_t, host_arena>(*this);
@@ -141,9 +140,9 @@ namespace netlist
//m_setup->parser().register_source<source_pattern_t>("../macro/nlm_{1}.cpp");
#else
#if 1
- m_setup->parser().register_source<source_pattern_t>("src/lib/netlist/macro/nlm_{1}.cpp");
- m_setup->parser().register_source<source_pattern_t>("src/lib/netlist/generated/nlm_{1}.cpp");
- m_setup->parser().register_source<source_pattern_t>("src/lib/netlist/macro/modules/nlmod_{1}.cpp");
+ m_setup->parser().register_source<source_pattern_t>("src/lib/netlist/macro/nlm_{1}.cpp", true);
+ m_setup->parser().register_source<source_pattern_t>("src/lib/netlist/generated/nlm_{1}.cpp", true);
+ m_setup->parser().register_source<source_pattern_t>("src/lib/netlist/macro/modules/nlmod_{1}.cpp", true);
m_setup->parser().include("base_lib");
#else
// FIXME: This is very slow - need optimized parsing scanning
@@ -246,6 +245,7 @@ namespace netlist
ENTRY_EX(sizeof(base_device_t))
ENTRY_EX(sizeof(device_t))
+ ENTRY_EX(sizeof(logic_t))
ENTRY_EX(sizeof(logic_input_t))
ENTRY_EX(sizeof(logic_output_t))
ENTRY_EX(sizeof(param_model_t))
@@ -253,6 +253,7 @@ namespace netlist
ENTRY_EX(sizeof(state_var<int>))
ENTRY_EX(sizeof(pstring))
ENTRY_EX(sizeof(core_device_t::stats_t))
+ ENTRY_EX(sizeof(std::vector<detail::core_terminal_t *>))
ENTRY_EX(sizeof(plib::plog_level))
ENTRY_EX(sizeof(nldelegate))
@@ -338,7 +339,7 @@ namespace netlist
for (auto &n : m_nets)
{
n->update_inputs(); // only used if USE_COPY_INSTEAD_OF_REFERENCE == 1
- for (auto & term : n->core_terms())
+ for (auto & term : core_terms(*n))
{
if (!plib::container::contains(t, &term->delegate()))
{
@@ -432,7 +433,6 @@ namespace netlist
log().verbose("Queue Pushes {1:15}", si.m_queue.m_prof_call());
log().verbose("Queue Moves {1:15}", si.m_queue.m_prof_sortmove());
log().verbose("Queue Removes {1:15}", si.m_queue.m_prof_remove());
- log().verbose("Queue Retimes {1:15}", si.m_queue.m_prof_retime());
log().verbose("");
log().verbose("Take the next lines with a grain of salt. They depend on the measurement implementation.");
@@ -619,7 +619,7 @@ namespace netlist
// rebuild m_list
m_list_active.clear();
- for (auto & term : core_terms())
+ for (auto & term : exec().nlstate().core_terms(*this))
if (term->terminal_state() != logic_t::STATE_INP_PASSIVE)
{
m_list_active.push_back(term);
@@ -644,7 +644,7 @@ namespace netlist
// rebuild m_list and reset terminals to active or analog out state
m_list_active.clear();
- for (core_terminal_t *ct : core_terms())
+ for (core_terminal_t *ct : exec().nlstate().core_terms(*this))
{
ct->reset();
if (ct->terminal_state() != logic_t::STATE_INP_PASSIVE)
@@ -704,13 +704,21 @@ namespace netlist
// terminal_t
// ----------------------------------------------------------------------------------------
- terminal_t::terminal_t(core_device_t &dev, const pstring &aname, terminal_t *otherterm, nldelegate delegate)
+ terminal_t::terminal_t(core_device_t &dev, const pstring &aname,
+ terminal_t *otherterm, nldelegate delegate)
+ : terminal_t(dev, aname, otherterm, { nullptr, nullptr }, delegate)
+ {
+ }
+
+ terminal_t::terminal_t(core_device_t &dev, const pstring &aname,
+ terminal_t *otherterm, const std::array<terminal_t *, 2> &splitterterms,
+ nldelegate delegate)
: analog_t(dev, aname, STATE_BIDIR, delegate)
, m_Idr(nullptr)
, m_go(nullptr)
, m_gt(nullptr)
{
- state().setup().register_term(*this, *otherterm);
+ state().setup().register_term(*this, otherterm, splitterterms);
}
void terminal_t::set_ptrs(nl_fptype *gt, nl_fptype *go, nl_fptype *Idr) noexcept(false)
@@ -1029,12 +1037,14 @@ namespace netlist
}
m_time = top->exec_time();
- auto *const obj(top->object());
+ detail::net_t *const obj(top->object());
m_queue.pop();
- if (obj != nullptr)
- obj->template update_devs<KEEP_STATS>();
- else
+
+ if (!!(obj == nullptr))
break;
+
+ obj->template update_devs<KEEP_STATS>();
+
if (KEEP_STATS)
m_perf_out_processed.inc();
} while (true);
diff --git a/src/lib/netlist/nl_config.h b/src/lib/netlist/nl_config.h
index 6d4c572eb08..3bd57c2771d 100644
--- a/src/lib/netlist/nl_config.h
+++ b/src/lib/netlist/nl_config.h
@@ -242,14 +242,14 @@ namespace netlist
template <>
struct fp_constants<long double>
{
- static inline constexpr long double DIODE_MAXDIFF() noexcept { return 1e100L; } // NOLINT
- static inline constexpr long double DIODE_MAXVOLT() noexcept { return 300.0L; } // NOLINT
+ static constexpr long double DIODE_MAXDIFF() noexcept { return 1e100L; } // NOLINT
+ static constexpr long double DIODE_MAXVOLT() noexcept { return 300.0L; } // NOLINT
- static inline constexpr long double TIMESTEP_MAXDIFF() noexcept { return 1e100L; } // NOLINT
- static inline constexpr long double TIMESTEP_MINDIV() noexcept { return 1e-60L; } // NOLINT
+ static constexpr long double TIMESTEP_MAXDIFF() noexcept { return 1e100L; } // NOLINT
+ static constexpr long double TIMESTEP_MINDIV() noexcept { return 1e-60L; } // NOLINT
- static inline constexpr const char * name() noexcept { return "long double"; }
- static inline constexpr const char * suffix() noexcept { return "L"; }
+ static constexpr const char * name() noexcept { return "long double"; }
+ static constexpr const char * suffix() noexcept { return "L"; }
};
/// \brief Specific constants for double floating point type
@@ -257,14 +257,14 @@ namespace netlist
template <>
struct fp_constants<double>
{
- static inline constexpr double DIODE_MAXDIFF() noexcept { return 1e100; } // NOLINT
- static inline constexpr double DIODE_MAXVOLT() noexcept { return 300.0; } // NOLINT
+ static constexpr double DIODE_MAXDIFF() noexcept { return 1e100; } // NOLINT
+ static constexpr double DIODE_MAXVOLT() noexcept { return 300.0; } // NOLINT
- static inline constexpr double TIMESTEP_MAXDIFF() noexcept { return 1e100; } // NOLINT
- static inline constexpr double TIMESTEP_MINDIV() noexcept { return 1e-60; } // NOLINT
+ static constexpr double TIMESTEP_MAXDIFF() noexcept { return 1e100; } // NOLINT
+ static constexpr double TIMESTEP_MINDIV() noexcept { return 1e-60; } // NOLINT
- static inline constexpr const char * name() noexcept { return "double"; }
- static inline constexpr const char * suffix() noexcept { return ""; }
+ static constexpr const char * name() noexcept { return "double"; }
+ static constexpr const char * suffix() noexcept { return ""; }
};
/// \brief Specific constants for float floating point type
@@ -272,14 +272,14 @@ namespace netlist
template <>
struct fp_constants<float>
{
- static inline constexpr float DIODE_MAXDIFF() noexcept { return 1e20F; } // NOLINT
- static inline constexpr float DIODE_MAXVOLT() noexcept { return 90.0F; } // NOLINT
+ static constexpr float DIODE_MAXDIFF() noexcept { return 1e20F; } // NOLINT
+ static constexpr float DIODE_MAXVOLT() noexcept { return 90.0F; } // NOLINT
- static inline constexpr float TIMESTEP_MAXDIFF() noexcept { return 1e30F; } // NOLINT
- static inline constexpr float TIMESTEP_MINDIV() noexcept { return 1e-8F; } // NOLINT
+ static constexpr float TIMESTEP_MAXDIFF() noexcept { return 1e30F; } // NOLINT
+ static constexpr float TIMESTEP_MINDIV() noexcept { return 1e-8F; } // NOLINT
- static inline constexpr const char * name() noexcept { return "float"; }
- static inline constexpr const char * suffix() noexcept { return "f"; }
+ static constexpr const char * name() noexcept { return "float"; }
+ static constexpr const char * suffix() noexcept { return "f"; }
};
#if (NL_USE_FLOAT128)
@@ -290,23 +290,23 @@ namespace netlist
{
#if 0
// MAME compile doesn't support Q
- static inline constexpr FLOAT128 DIODE_MAXDIFF() noexcept { return 1e100Q; }
- static inline constexpr FLOAT128 DIODE_MAXVOLT() noexcept { return 300.0Q; }
+ static constexpr FLOAT128 DIODE_MAXDIFF() noexcept { return 1e100Q; }
+ static constexpr FLOAT128 DIODE_MAXVOLT() noexcept { return 300.0Q; }
- static inline constexpr FLOAT128 TIMESTEP_MAXDIFF() noexcept { return 1e100Q; }
- static inline constexpr FLOAT128 TIMESTEP_MINDIV() noexcept { return 1e-60Q; }
+ static constexpr FLOAT128 TIMESTEP_MAXDIFF() noexcept { return 1e100Q; }
+ static constexpr FLOAT128 TIMESTEP_MINDIV() noexcept { return 1e-60Q; }
- static inline constexpr const char * name() noexcept { return "FLOAT128"; }
- static inline constexpr const char * suffix() noexcept { return "Q"; }
+ static constexpr const char * name() noexcept { return "FLOAT128"; }
+ static constexpr const char * suffix() noexcept { return "Q"; }
#else
- static inline constexpr FLOAT128 DIODE_MAXDIFF() noexcept { return static_cast<FLOAT128>(1e100L); }
- static inline constexpr FLOAT128 DIODE_MAXVOLT() noexcept { return static_cast<FLOAT128>(300.0L); }
+ static constexpr FLOAT128 DIODE_MAXDIFF() noexcept { return static_cast<FLOAT128>(1e100L); }
+ static constexpr FLOAT128 DIODE_MAXVOLT() noexcept { return static_cast<FLOAT128>(300.0L); }
- static inline constexpr FLOAT128 TIMESTEP_MAXDIFF() noexcept { return static_cast<FLOAT128>(1e100L); }
- static inline constexpr FLOAT128 TIMESTEP_MINDIV() noexcept { return static_cast<FLOAT128>(1e-60L); }
+ static constexpr FLOAT128 TIMESTEP_MAXDIFF() noexcept { return static_cast<FLOAT128>(1e100L); }
+ static constexpr FLOAT128 TIMESTEP_MINDIV() noexcept { return static_cast<FLOAT128>(1e-60L); }
- static inline constexpr const char * name() noexcept { return "__float128"; }
- static inline constexpr const char * suffix() noexcept { return "Q"; }
+ static constexpr const char * name() noexcept { return "__float128"; }
+ static constexpr const char * suffix() noexcept { return "Q"; }
#endif
};
diff --git a/src/lib/netlist/nl_errstr.h b/src/lib/netlist/nl_errstr.h
index 4b44fb7b963..f60287e7a2d 100644
--- a/src/lib/netlist/nl_errstr.h
+++ b/src/lib/netlist/nl_errstr.h
@@ -150,6 +150,17 @@ namespace netlist
PERRMSGV(MI_NO_SPECIFIC_SOLVER, 1, "No specific solver found for netlist of size {1}")
PERRMSGV(MW_SOLVER_METHOD_NOT_SUPPORTED, 2, "Solver method {1} not supported. Falling back to {2}")
+ PERRMSGV(ME_SOLVER_CONSISTENCY_NOT_ANALOG_NET, 1, "Solver consistency: {1} is not an analog net")
+ PERRMSGV(ME_SOLVER_CONSISTENCY_RAIL_NET, 1, "Solver consistency: {1} is a rail net")
+ PERRMSGV(ME_SOLVER_TERMINAL_NO_NET, 1, "Solver consistency: Terminal {1} has no net")
+ PERRMSGV(ME_SOLVER_NO_RAIL_TERMINAL, 1, "Solver consistency: No rail terminals in group with nets: {1}\n"
+ "At least one rail terminal (like ANALOG_INPUT) needs to be part of a group of nets\n"
+ "solved by a solver. Without a singular matrix would be created\n"
+ "which has the potential to cause a crash now or in the future.\n"
+ "A common cause of this error are BJT or FET devices which\n"
+ "are defined but not used in the netlist.")
+ PERRMSGV(MF_SOLVER_CONSISTENCY_ERRORS, 1, "Found {1} errors during solver consistency test")
+
// nld_mm5837.cpp
PERRMSGV(MW_FREQUENCY_OUTSIDE_OF_SPECS_1, 1, "MM5837: Frequency outside of specs: {1}")
diff --git a/src/lib/netlist/nl_parser.h b/src/lib/netlist/nl_parser.h
index cbc757307d5..06bcf4395e7 100644
--- a/src/lib/netlist/nl_parser.h
+++ b/src/lib/netlist/nl_parser.h
@@ -8,8 +8,8 @@
#ifndef NL_PARSER_H_
#define NL_PARSER_H_
-#include "nltypes.h" // for setup_t
#include "core/setup.h"
+#include "nltypes.h" // for setup_t
#include "plib/ptokenizer.h"
#include <unordered_map>
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index 9af1ec92d51..ab6626acde1 100644
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -6,6 +6,7 @@
#include "devices/nlid_proxy.h"
#include "devices/nlid_truthtable.h"
#include "nl_base.h"
+#include "nl_errstr.h"
#include "nl_factory.h"
#include "nl_parser.h"
#include "nl_setup.h"
@@ -164,7 +165,7 @@ namespace netlist
void nlparse_t::register_link(const pstring &sin, const pstring &sout)
{
- register_link_fqn(build_fqn(sin), build_fqn(sout));
+ register_link_fqn(build_fqn(plib::trim(sin)), build_fqn(plib::trim(sout)));
}
void nlparse_t::register_link_arr(const pstring &terms)
@@ -551,10 +552,10 @@ void setup_t::register_term(detail::core_terminal_t &term)
}
}
-void setup_t::register_term(terminal_t &term, terminal_t &other_term)
+void setup_t::register_term(terminal_t &term, terminal_t *other_term, const std::array<terminal_t *, 2> &splitter_terms)
{
this->register_term(term);
- m_connected_terminals.insert({&term, &other_term});
+ m_connected_terminals.insert({&term, {other_term, splitter_terms[0], splitter_terms[1], nullptr}});
}
void setup_t::register_param_t(param_t &param)
@@ -716,7 +717,7 @@ param_ref_t setup_t::find_param(const pstring &param_in) const
//NOLINTNEXTLINE(misc-no-recursion)
devices::nld_base_proxy *setup_t::get_d_a_proxy(const detail::core_terminal_t &out)
{
- nl_assert(out.is_logic());
+ gsl_Expects(out.is_logic());
const auto &out_cast = dynamic_cast<const logic_output_t &>(out);
auto iter_proxy(m_proxies.find(&out));
@@ -731,7 +732,7 @@ devices::nld_base_proxy *setup_t::get_d_a_proxy(const detail::core_terminal_t &o
m_proxy_cnt++;
// connect all existing terminals to new net
- for (auto & p : out.net().core_terms())
+ for (auto & p : nlstate().core_terms(out.net()))
{
p->clear_net(); // de-link from all nets ...
if (!connect(new_proxy->proxy_term(), *p))
@@ -742,7 +743,7 @@ devices::nld_base_proxy *setup_t::get_d_a_proxy(const detail::core_terminal_t &o
new_proxy->proxy_term().name(), (*p).name()));
}
}
- out.net().core_terms().clear();
+ nlstate().core_terms(out.net()).clear();
add_terminal(out.net(), new_proxy->in());
@@ -759,7 +760,7 @@ devices::nld_base_proxy *setup_t::get_d_a_proxy(const detail::core_terminal_t &o
//NOLINTNEXTLINE(misc-no-recursion)
devices::nld_base_proxy *setup_t::get_a_d_proxy(detail::core_terminal_t &inp)
{
- nl_assert(inp.is_logic());
+ gsl_Expects(inp.is_logic());
const auto &incast = dynamic_cast<const logic_input_t &>(inp);
@@ -783,7 +784,7 @@ devices::nld_base_proxy *setup_t::get_a_d_proxy(detail::core_terminal_t &inp)
if (inp.has_net())
{
- for (detail::core_terminal_t * p : inp.net().core_terms())
+ for (detail::core_terminal_t * p : nlstate().core_terms(inp.net()))
{
// inp may already belongs to the logic net. Thus skip it here.
// It will be removed by the clear further down.
@@ -799,7 +800,7 @@ devices::nld_base_proxy *setup_t::get_a_d_proxy(detail::core_terminal_t &inp)
}
}
}
- inp.net().core_terms().clear(); // clear the list
+ nlstate().core_terms(inp.net()).clear(); // clear the list
}
inp.clear_net();
add_terminal(ret->out().net(), inp);
@@ -973,7 +974,7 @@ bool setup_t::connect_input_input(detail::core_terminal_t &t1, detail::core_term
ret = connect(t2, t1.net().railterminal());
if (!ret)
{
- for (auto & t : t1.net().core_terms())
+ for (auto & t : nlstate().core_terms(t1.net()))
{
if (t->is_type(detail::terminal_type::TERMINAL))
ret = connect(t2, *t);
@@ -988,7 +989,7 @@ bool setup_t::connect_input_input(detail::core_terminal_t &t1, detail::core_term
ret = connect(t1, t2.net().railterminal());
if (!ret)
{
- for (auto & t : t2.net().core_terms())
+ for (auto & t : nlstate().core_terms(t2.net()))
{
if (t->is_type(detail::terminal_type::TERMINAL))
ret = connect(t1, *t);
@@ -1174,7 +1175,7 @@ void setup_t::resolve_inputs()
log().error(ME_TERMINAL_1_WITHOUT_NET(name_da));
err = true;
}
- else if (!term->net().has_connections())
+ else if (nlstate().core_terms(term->net()).empty())
{
if (term->is_logic_input())
log().warning(MW_LOGIC_INPUT_1_WITHOUT_CONNECTIONS(name_da));
@@ -1192,6 +1193,7 @@ void setup_t::resolve_inputs()
log().warning(MW_TERMINAL_1_WITHOUT_CONNECTIONS(name_da));
}
}
+
log().verbose("checking tristate consistency ...");
for (auto & i : m_terminals)
{
@@ -1224,7 +1226,7 @@ void setup_t::resolve_inputs()
void setup_t::add_terminal(detail::net_t &net, detail::core_terminal_t &terminal) noexcept(false)
{
- for (auto &t : net.core_terms())
+ for (auto &t : nlstate().core_terms(net))
if (t == &terminal)
{
log().fatal(MF_NET_1_DUPLICATE_TERMINAL_2(net.name(), t->name()));
@@ -1233,15 +1235,15 @@ void setup_t::add_terminal(detail::net_t &net, detail::core_terminal_t &terminal
terminal.set_net(&net);
- net.core_terms().push_back(&terminal);
+ nlstate().core_terms(net).push_back(&terminal);
}
void setup_t::remove_terminal(detail::net_t &net, detail::core_terminal_t &terminal) noexcept(false)
{
- if (plib::container::contains(net.core_terms(), &terminal))
+ if (plib::container::contains(nlstate().core_terms(net), &terminal))
{
terminal.set_net(nullptr);
- plib::container::remove(net.core_terms(), &terminal);
+ plib::container::remove(nlstate().core_terms(net), &terminal);
}
else
{
@@ -1252,9 +1254,9 @@ void setup_t::remove_terminal(detail::net_t &net, detail::core_terminal_t &termi
void setup_t::move_connections(detail::net_t &net, detail::net_t &dest_net)
{
- for (auto &ct : net.core_terms())
+ for (auto &ct : nlstate().core_terms(net))
add_terminal(dest_net, *ct);
- net.core_terms().clear();
+ nlstate().core_terms(net).clear();
}
@@ -1305,7 +1307,7 @@ void models_t::model_parse(const pstring &model_in, map_t &map)
if (!plib::endsWith(remainder, ")"))
throw nl_exception(MF_MODEL_ERROR_1(model));
// FIMXE: Not optimal
- remainder = plib::left(remainder, remainder.size() - 1);
+ remainder = plib::left(remainder, remainder.length() - 1);
const auto pairs(plib::psplit(remainder,' ', true));
for (const pstring &pe : pairs)
@@ -1353,7 +1355,7 @@ nl_fptype models_t::model_t::value(const pstring &entity) const
pstring tmp = value_str(entity);
nl_fptype factor = nlconst::one();
- auto p = std::next(tmp.begin(), plib::narrow_cast<pstring::difference_type>(tmp.size() - 1));
+ auto p = std::next(tmp.begin(), plib::narrow_cast<pstring::difference_type>(tmp.length() - 1));
switch (*p)
{
case 'M': factor = nlconst::magic(1e6); break; // NOLINT
@@ -1370,7 +1372,7 @@ nl_fptype models_t::model_t::value(const pstring &entity) const
throw nl_exception(MF_UNKNOWN_NUMBER_FACTOR_IN_2(m_model, entity));
}
if (factor != nlconst::one())
- tmp = plib::left(tmp, tmp.size() - 1);
+ tmp = plib::left(tmp, tmp.length() - 1);
// FIXME: check for errors
bool err(false);
auto val = plib::pstonum_ne<nl_fptype>(tmp, err);
@@ -1529,8 +1531,9 @@ void setup_t::delete_empty_nets()
std::remove_if(m_nlstate.nets().begin(), m_nlstate.nets().end(),
[](device_arena::owned_ptr<detail::net_t> &net)
{
- if (!net->has_connections())
+ if (net->state().core_terms(*net).empty())
{
+ // FIXME: need to remove from state->m_core_terms as well.
net->state().log().verbose("Deleting net {1} ...", net->name());
net->state().run_state_manager().remove_save_items(net.get());
return true;
@@ -1607,13 +1610,10 @@ void setup_t::prepare_to_run()
if (p != m_abstract.m_hints.end())
{
p->second = true; // mark as used
- if (use_deactivate)
- d.second->set_hint_deactivate(false);
- else
- d.second->set_hint_deactivate(true);
+ d.second->set_hint_deactivate(false);
}
else
- d.second->set_hint_deactivate(true);
+ d.second->set_hint_deactivate(use_deactivate);
}
if (errcnt > 0)
@@ -1684,7 +1684,7 @@ void setup_t::prepare_to_run()
for (auto &n : m_nlstate.nets())
{
- for (auto & term : n->core_terms())
+ for (auto & term : m_nlstate.core_terms(*n))
if (!term->delegate())
{
log().fatal(MF_DELEGATE_NOT_SET_1(term->name()));
@@ -1734,7 +1734,7 @@ plib::istream_uptr source_file_t::stream(const pstring &name)
plib::istream_uptr source_pattern_t::stream(const pstring &name)
{
- pstring filename = plib::pfmt(m_pattern)(name);
+ pstring filename = plib::pfmt(m_pattern)(m_force_lowercase ? plib::lcase(name) : name);
auto f = std::make_unique<plib::ifstream>(plib::filesystem::u8path(filename));
if (f->is_open())
{
diff --git a/src/lib/netlist/nl_setup.h b/src/lib/netlist/nl_setup.h
index fd9cb11afab..81f3e769a1d 100644
--- a/src/lib/netlist/nl_setup.h
+++ b/src/lib/netlist/nl_setup.h
@@ -23,7 +23,7 @@
#include <vector>
//============================================================
-// MACROS / inline netlist definitions
+// MACROS - netlist definitions
//============================================================
#define NET_STR(x) # x
@@ -274,10 +274,6 @@ namespace netlist
unsigned m_frontier_cnt;
};
- // -----------------------------------------------------------------------------
- // inline implementations
- // -----------------------------------------------------------------------------
-
} // namespace netlist
diff --git a/src/lib/netlist/nltypes.h b/src/lib/netlist/nltypes.h
index 5781619af1a..548d64613f5 100644
--- a/src/lib/netlist/nltypes.h
+++ b/src/lib/netlist/nltypes.h
@@ -98,10 +98,10 @@ namespace netlist
{
using BC = plib::constants<T>;
- static inline constexpr T np_VT(T n=BC::one(), T temp=BC::T0()) noexcept
+ static constexpr T np_VT(T n=BC::one(), T temp=BC::T0()) noexcept
{ return n * temp * BC::k_b() / BC::Q_e(); }
- static inline constexpr T np_Is() noexcept { return static_cast<T>(1e-15); } // NOLINT
+ static constexpr T np_Is() noexcept { return static_cast<T>(1e-15); } // NOLINT
/// \brief constant startup gmin
///
@@ -109,19 +109,19 @@ namespace netlist
/// conductivities with a reasonable value.
/// During reset, the object should than make use of exec().gmin()
/// to use the actual gmin() value.
- static inline constexpr T cgmin() noexcept { return BC::magic(1e-9); } // NOLINT
+ static constexpr T cgmin() noexcept { return BC::magic(1e-9); } // NOLINT
// FIXME: Some objects used 1e-15 for initial gmin. Needs to be
// aligned with cgmin
- static inline constexpr T cgminalt() noexcept { return BC::magic(1e-15); } // NOLINT
+ static constexpr T cgminalt() noexcept { return BC::magic(1e-15); } // NOLINT
/// \brief Multiplier applied to VT in np diode models to determine range for constant model
///
- static inline constexpr T diode_min_cutoff_mult() noexcept { return BC::magic(-5.0); } // NOLINT
+ static constexpr T diode_min_cutoff_mult() noexcept { return BC::magic(-5.0); } // NOLINT
/// \brief Startup voltage used by np diode models
///
- static inline constexpr T diode_start_voltage() noexcept { return BC::magic(0.7); } // NOLINT
+ static constexpr T diode_start_voltage() noexcept { return BC::magic(0.7); } // NOLINT
};
@@ -191,9 +191,9 @@ namespace netlist
// MACROS
//============================================================
- template <typename T> inline constexpr netlist_time NLTIME_FROM_NS(T &&t) noexcept { return netlist_time::from_nsec(t); }
- template <typename T> inline constexpr netlist_time NLTIME_FROM_US(T &&t) noexcept { return netlist_time::from_usec(t); }
- template <typename T> inline constexpr netlist_time NLTIME_FROM_MS(T &&t) noexcept { return netlist_time::from_msec(t); }
+ template <typename T> constexpr netlist_time NLTIME_FROM_NS(T &&t) noexcept { return netlist_time::from_nsec(t); }
+ template <typename T> constexpr netlist_time NLTIME_FROM_US(T &&t) noexcept { return netlist_time::from_usec(t); }
+ template <typename T> constexpr netlist_time NLTIME_FROM_MS(T &&t) noexcept { return netlist_time::from_msec(t); }
struct desc_base
{
diff --git a/src/lib/netlist/plib/gmres.h b/src/lib/netlist/plib/gmres.h
index df0fc787c52..1709d1bb510 100644
--- a/src/lib/netlist/plib/gmres.h
+++ b/src/lib/netlist/plib/gmres.h
@@ -8,9 +8,9 @@
/// \file gmres.h
///
-#include "mat_cr.h"
#include "parray.h"
#include "pconfig.h"
+#include "pmatrix_cr.h"
#include "vector_ops.h"
#include <algorithm>
@@ -33,11 +33,11 @@ namespace plib
template <typename FT, int SIZE>
struct mat_precondition_ILU
{
- using mat_type = plib::pmatrix_cr_t<FT, SIZE>;
- using matLU_type = plib::pLUmatrix_cr_t<mat_type>;
+ using mat_type = plib::pmatrix_cr<FT, SIZE>;
+ using matLU_type = plib::pLUmatrix_cr<mat_type>;
mat_precondition_ILU(std::size_t size, std::size_t ilu_scale = 4
- , std::size_t bw = plib::pmatrix_cr_t<FT, SIZE>::FILL_INFINITY)
+ , std::size_t bw = plib::pmatrix_cr<FT, SIZE>::FILL_INFINITY)
: m_mat(narrow_cast<typename mat_type::index_type>(size))
, m_LU(narrow_cast<typename mat_type::index_type>(size))
, m_ILU_scale(narrow_cast<std::size_t>(ilu_scale))
@@ -167,7 +167,7 @@ namespace plib
v[i] = v[i] * m_diag[i];
}
- plib::pmatrix_cr_t<FT, SIZE> m_mat;
+ plib::pmatrix_cr<FT, SIZE> m_mat;
plib::parray<FT, SIZE> m_diag;
plib::parray<std::vector<std::size_t>, SIZE > nzcol;
};
@@ -203,19 +203,23 @@ namespace plib
plib::unused_var(v);
}
- plib::pmatrix_cr_t<FT, SIZE> m_mat;
+ plib::pmatrix_cr<FT, SIZE> m_mat;
};
// FIXME: hardcoding RESTART to 20 becomes an issue on very large
// systems.
- template <typename FT, int SIZE, int RESTART = 16>
+ template <typename FT, int SIZE, int RESTARTMAX = 16>
struct gmres_t
{
public:
using float_type = FT;
+ //constexpr static int RESTART = RESTARTMAX;
+ constexpr static const int RESTART = (SIZE > 0) ? ((SIZE < RESTARTMAX) ? SIZE : RESTARTMAX)
+ : ((SIZE < 0) ? ((-SIZE < RESTARTMAX) ? -SIZE : RESTARTMAX) : RESTARTMAX);
+
explicit gmres_t(std::size_t size)
: residual(size)
, Ax(size)
@@ -226,83 +230,8 @@ namespace plib
{
}
- void givens_mult( const FT c, const FT s, FT & g0, FT & g1 )
- {
- const FT g0_last(g0);
-
- g0 = c * g0 - s * g1;
- g1 = s * g0_last + c * g1;
- }
-
std::size_t size() const { return (SIZE<=0) ? m_size : narrow_cast<std::size_t>(SIZE); }
- template <int k, typename OPS, typename VT>
- bool do_k(OPS &ops, VT &x, std::size_t &itr_used, FT rho_delta, bool dummy)
- {
- plib::unused_var(dummy);
- if (do_k<k-1, OPS>(ops, x, itr_used, rho_delta, do_khelper<k-1>::value))
- return true;
-
- const std::size_t kp1 = k + 1;
- const std::size_t n = size();
-
- ops.calc_rhs(m_v[kp1], m_v[k]);
- ops.solve_inplace(m_v[kp1]);
-
- for (std::size_t j = 0; j <= k; j++)
- {
- m_ht[j][k] = vec_mult<FT>(n, m_v[kp1], m_v[j]);
- vec_add_mult_scalar(n, m_v[kp1], m_v[j], -m_ht[j][k]);
- }
- m_ht[kp1][k] = plib::sqrt(vec_mult2<FT>(n, m_v[kp1]));
-
- // FIXME: comparison to zero
- if (m_ht[kp1][k] != plib::constants<FT>::zero())
- vec_scale(n, m_v[kp1], reciprocal(m_ht[kp1][k]));
-
- for (std::size_t j = 0; j < k; j++)
- givens_mult(m_c[j], m_s[j], m_ht[j][k], m_ht[j+1][k]);
-
- const float_type mu = reciprocal(plib::hypot(m_ht[k][k], m_ht[kp1][k]));
-
- m_c[k] = m_ht[k][k] * mu;
- m_s[k] = -m_ht[kp1][k] * mu;
- m_ht[k][k] = m_c[k] * m_ht[k][k] - m_s[k] * m_ht[kp1][k];
- m_ht[kp1][k] = plib::constants<FT>::zero();
-
- givens_mult(m_c[k], m_s[k], m_g[k], m_g[kp1]);
-
- FT rho = plib::abs(m_g[kp1]);
-
- // FIXME ..
- itr_used = itr_used + 1;
-
- if (rho <= rho_delta || k == RESTART-1)
- {
- // Solve the system H * y = g
- // x += m_v[j] * m_y[j]
- for (std::size_t i = k + 1; i-- > 0;)
- {
- auto tmp(m_g[i]);
- for (std::size_t j = i + 1; j <= k; j++)
- tmp -= m_ht[i][j] * m_y[j];
- m_y[i] = tmp / m_ht[i][i];
- }
-
- for (std::size_t i = 0; i <= k; i++)
- vec_add_mult_scalar(n, x, m_v[i], m_y[i]);
- return true;
- }
- return false;
- }
-
- template <int k, typename OPS, typename VT>
- bool do_k(OPS &ops, VT &x, std::size_t &itr_used, FT rho_delta, float dummy)
- {
- plib::unused_var(ops, x, itr_used, rho_delta, dummy);
- return false;
- }
-
template <typename OPS, typename VT, typename VRHS>
std::size_t solve(OPS &ops, VT &x, const VRHS & rhs, const std::size_t itr_max, float_type accuracy)
{
@@ -348,19 +277,23 @@ namespace plib
// differently: The invest doesn't pay off.
//
- vec_set_scalar(n, residual, accuracy);
+ vec_set_scalar(residual, accuracy);
ops.calc_rhs(Ax, residual);
ops.solve_inplace(Ax);
- const float_type rho_to_accuracy = plib::sqrt(vec_mult2<FT>(n, Ax)) / accuracy;
+ const float_type rho_to_accuracy = plib::sqrt(vec_mult2<FT>(Ax)) / accuracy;
rho_delta = accuracy * rho_to_accuracy;
}
else
+ //rho_delta = accuracy * plib::sqrt(vec_mult2<FT>(n, rhs))
+ // + 1e-4 * std::sqrt(n);
rho_delta = accuracy * plib::sqrt(narrow_cast<FT>(n));
//
+ // LU x = b; solve for x;
+ //
// Using
//
// vec_set(n, x, rhs);
@@ -368,9 +301,6 @@ namespace plib
//
// to get a starting point for x degrades convergence speed compared
// to using the last solution for x.
- //
- // LU x = b; solve for x;
- //
while (itr_used < itr_max)
{
@@ -378,11 +308,11 @@ namespace plib
ops.calc_rhs(Ax, x);
- vec_sub(n, residual, rhs, Ax);
+ vec_sub(residual, rhs, Ax);
ops.solve_inplace(residual);
- rho = plib::sqrt(vec_mult2<FT>(n, residual));
+ rho = plib::sqrt(vec_mult2<FT>(residual));
if (rho < rho_delta)
return itr_used + 1;
@@ -391,10 +321,10 @@ namespace plib
// on some systems / compiler versions. Issue reported by
// AJR, no details known yet.
- vec_set_scalar(RESTART+1, m_g, +constants<FT>::zero());
+ vec_set_scalar(m_g, +constants<FT>::zero());
m_g[0] = rho;
- vec_mult_scalar(n, m_v[0], residual, reciprocal(rho));
+ vec_mult_scalar(m_v[0], residual, plib::reciprocal(rho));
if (do_k<RESTART-1>(ops, x, itr_used, rho_delta, true))
// converged
@@ -405,6 +335,83 @@ namespace plib
private:
+ static void givens_mult(FT c, FT s, FT & g0, FT & g1 )
+ {
+ const FT g0_last(g0);
+
+ g0 = c * g0 - s * g1;
+ g1 = s * g0_last + c * g1;
+ }
+
+ template <int k, typename OPS, typename VT>
+ bool do_k(OPS &ops, VT &x, std::size_t &itr_used, FT rho_delta, bool dummy)
+ {
+ plib::unused_var(dummy);
+ if (do_k<k-1, OPS>(ops, x, itr_used, rho_delta, do_khelper<k-1>::value))
+ return true;
+
+ constexpr const std::size_t kp1 = k + 1;
+ //const std::size_t n = size();
+
+ ops.calc_rhs(m_v[kp1], m_v[k]);
+ ops.solve_inplace(m_v[kp1]);
+
+ for (std::size_t j = 0; j <= k; j++)
+ {
+ m_ht[j][k] = vec_mult<FT>(m_v[kp1], m_v[j]);
+ vec_add_mult_scalar(m_v[kp1], m_v[j], -m_ht[j][k]);
+ }
+ m_ht[kp1][k] = plib::sqrt(vec_mult2<FT>(m_v[kp1]));
+
+ // FIXME: comparison to zero
+ if (m_ht[kp1][k] != plib::constants<FT>::zero())
+ vec_scale(m_v[kp1], reciprocal(m_ht[kp1][k]));
+
+ for (std::size_t j = 0; j < k; j++)
+ givens_mult(m_c[j], m_s[j], m_ht[j][k], m_ht[j+1][k]);
+
+ const float_type mu = reciprocal(plib::hypot(m_ht[k][k], m_ht[kp1][k]));
+
+ m_c[k] = m_ht[k][k] * mu;
+ m_s[k] = -m_ht[kp1][k] * mu;
+ m_ht[k][k] = m_c[k] * m_ht[k][k] - m_s[k] * m_ht[kp1][k];
+ m_ht[kp1][k] = plib::constants<FT>::zero();
+
+ givens_mult(m_c[k], m_s[k], m_g[k], m_g[kp1]);
+
+ const float_type rho = plib::abs(m_g[kp1]);
+
+ // FIXME ..
+ itr_used = itr_used + 1;
+
+ if (rho <= rho_delta || k == RESTART-1)
+ {
+ // Solve the system H * y = g
+ // x += m_v[j] * m_y[j]
+ for (std::size_t i = k + 1; i-- > 0;)
+ {
+ auto tmp(m_g[i]);
+ const auto htii=plib::reciprocal(m_ht[i][i]);
+ for (std::size_t j = i + 1; j <= k; j++)
+ tmp -= m_ht[i][j] * m_y[j];
+ m_y[i] = tmp * htii;
+ vec_add_mult_scalar(x, m_v[i], m_y[i]);
+ }
+
+ //for (std::size_t i = 0; i <= k; i++)
+ // vec_add_mult_scalar(n, x, m_v[i], m_y[i]);
+ return true;
+ }
+ return false;
+ }
+
+ template <int k, typename OPS, typename VT>
+ bool do_k(OPS &ops, VT &x, std::size_t &itr_used, FT rho_delta, float dummy)
+ {
+ plib::unused_var(ops, x, itr_used, rho_delta, dummy);
+ return false;
+ }
+
plib::parray<float_type, SIZE> residual;
plib::parray<float_type, SIZE> Ax;
diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h
index 50507d10eea..9243645f781 100644
--- a/src/lib/netlist/plib/palloc.h
+++ b/src/lib/netlist/plib/palloc.h
@@ -256,7 +256,10 @@ namespace plib {
~arena_allocator() noexcept = default;
- PCOPYASSIGNMOVE(arena_allocator, default)
+ arena_allocator(const arena_allocator &) = default;
+ arena_allocator &operator=(const arena_allocator &) = default;
+ arena_allocator(arena_allocator &&) noexcept = default;
+ arena_allocator &operator=(arena_allocator &&) noexcept = default;
explicit arena_allocator(arena_type & a) noexcept : m_a(a)
{
@@ -288,7 +291,7 @@ namespace plib {
void construct(U* p, Args&&... args)
{
// NOLINTNEXTLINE(cppcoreguidelines-owning-memory)
- ::new (static_cast<void *>(p)) U(std::forward<Args>(args)...);
+ ::new (void_ptr_cast(p)) U(std::forward<Args>(args)...);
}
template<typename U>
diff --git a/src/lib/netlist/plib/parray.h b/src/lib/netlist/plib/parray.h
index 514c231025b..54d72484ac2 100644
--- a/src/lib/netlist/plib/parray.h
+++ b/src/lib/netlist/plib/parray.h
@@ -105,12 +105,9 @@ namespace plib {
{
}
- // osx clang doesn't like COPYASSIGNMOVE(parray, default)
- // it will generate some weird error messages about move assignment
- // constructor having a different noexcept status.
-
parray(const parray &rhs) : m_a(rhs.m_a), m_size(rhs.m_size) {}
parray(parray &&rhs) noexcept : m_a(std::move(rhs.m_a)), m_size(std::move(rhs.m_size)) {}
+
parray &operator=(const parray &rhs) noexcept // NOLINT(bugprone-unhandled-self-assignment, cert-oop54-cpp)
{
if (this == &rhs)
@@ -127,7 +124,7 @@ namespace plib {
base_type &as_base() noexcept { return m_a; }
- inline size_type size() const noexcept { return SIZE <= 0 ? m_size : SIZEABS(); }
+ constexpr size_type size() const noexcept { return SIZE <= 0 ? m_size : SIZEABS(); }
constexpr size_type max_size() const noexcept { return base_type::max_size(); }
@@ -135,11 +132,11 @@ namespace plib {
constexpr reference operator[](size_type i) noexcept
{
- return data()[i];
+ return m_a[i];
}
constexpr const_reference operator[](size_type i) const noexcept
{
- return data()[i];
+ return m_a[i];
}
pointer data() noexcept { return m_a.data(); }
@@ -157,6 +154,7 @@ namespace plib {
public:
using size_type = std::size_t;
+ using base_type = parray<parray<FT, SIZE2>, SIZE1>;
parray2D(size_type size1, size_type size2)
: parray<parray<FT, SIZE2>, SIZE1>(size1)
@@ -168,7 +166,10 @@ namespace plib {
}
}
- PCOPYASSIGNMOVE(parray2D, default)
+ parray2D(const parray2D &) = default;
+ parray2D &operator=(const parray2D &) = default;
+ parray2D(parray2D &&) noexcept(std::is_nothrow_move_constructible<base_type>::value) = default;
+ parray2D &operator=(parray2D &&) noexcept(std::is_nothrow_move_assignable<base_type>::value) = default;
~parray2D() noexcept = default;
diff --git a/src/lib/netlist/plib/pchrono.h b/src/lib/netlist/plib/pchrono.h
index 6695f238290..813c3e651f3 100644..100755
--- a/src/lib/netlist/plib/pchrono.h
+++ b/src/lib/netlist/plib/pchrono.h
@@ -20,9 +20,9 @@ namespace plib {
struct sys_ticks
{
using type = typename T::rep;
- static inline constexpr type start() noexcept { return T::now().time_since_epoch().count(); }
- static inline constexpr type stop() noexcept { return T::now().time_since_epoch().count(); }
- static inline constexpr type per_second() noexcept { return T::period::den / T::period::num; }
+ static constexpr type start() noexcept { return T::now().time_since_epoch().count(); }
+ static constexpr type stop() noexcept { return T::now().time_since_epoch().count(); }
+ static constexpr type per_second() noexcept { return T::period::den / T::period::num; }
};
using hires_ticks = sys_ticks<std::chrono::high_resolution_clock>;
@@ -194,29 +194,32 @@ namespace plib {
struct guard_t
{
guard_t() = delete;
- explicit guard_t(timer &m) noexcept : m_m(m) { m_m.m_time -= T::start(); }
- ~guard_t() noexcept { m_m.m_time += T::stop(); ++m_m.m_count; }
+ explicit constexpr guard_t(timer &m) noexcept : m_m(&m) { m_m->m_time -= T::start(); }
+ ~guard_t() noexcept { m_m->m_time += T::stop(); ++m_m->m_count; }
- PCOPYASSIGNMOVE(guard_t, default)
+ constexpr guard_t(const guard_t &) = default;
+ constexpr guard_t &operator=(const guard_t &) = default;
+ constexpr guard_t(guard_t &&) noexcept = default;
+ constexpr guard_t &operator=(guard_t &&) noexcept = default;
private:
- timer &m_m;
+ timer *m_m;
};
- timer() : m_time(0), m_count(0) { }
+ constexpr timer() : m_time(0), m_count(0) { }
- type operator()() const { return m_time; }
+ constexpr type operator()() const { return m_time; }
void reset() noexcept { m_time = 0; m_count = 0; }
- type average() const noexcept { return (m_count == 0) ? 0 : m_time / m_count; }
- type total() const noexcept { return m_time; }
- ctype count() const noexcept { return m_count; }
+ constexpr type average() const noexcept { return (m_count == 0) ? 0 : m_time / m_count; }
+ constexpr type total() const noexcept { return m_time; }
+ constexpr ctype count() const noexcept { return m_count; }
template <typename S>
- S as_seconds() const noexcept { return narrow_cast<S>(total())
+ constexpr S as_seconds() const noexcept { return narrow_cast<S>(total())
/ narrow_cast<S>(T::per_second()); }
- guard_t guard() noexcept { return guard_t(*this); }
+ constexpr guard_t guard() noexcept { return guard_t(*this); }
// pause must be followed by cont(inue)
void stop() noexcept { m_time += T::stop(); }
@@ -236,8 +239,13 @@ namespace plib {
struct guard_t
{
- guard_t() = default;
- PCOPYASSIGNMOVE(guard_t, default)
+ constexpr guard_t() = default;
+
+ constexpr guard_t(const guard_t &) = default;
+ constexpr guard_t &operator=(const guard_t &) = default;
+ constexpr guard_t(guard_t &&) noexcept = default;
+ constexpr guard_t &operator=(guard_t &&) noexcept = default;
+
// using default constructor will trigger warning on
// unused local variable.
@@ -251,7 +259,7 @@ namespace plib {
constexpr type total() const noexcept { return 0; }
constexpr ctype count() const noexcept { return 0; }
template <typename S>
- S as_seconds() const noexcept { return narrow_cast<S>(0); }
+ constexpr S as_seconds() const noexcept { return narrow_cast<S>(0); }
constexpr static bool enabled = false;
guard_t guard() { return guard_t(); }
};
diff --git a/src/lib/netlist/plib/pconfig.h b/src/lib/netlist/plib/pconfig.h
index c80f1bbadd6..4253ff355b1 100644
--- a/src/lib/netlist/plib/pconfig.h
+++ b/src/lib/netlist/plib/pconfig.h
@@ -8,7 +8,7 @@
/// \file pconfig.h
///
-/// \brief More accurate measurements if you processor supports RDTSCP.
+/// \brief More accurate measurements the processor supports RDTSCP.
///
#ifndef PHAS_RDTSCP
#define PHAS_RDTSCP (0)
@@ -75,8 +75,13 @@
#define PALIGN_MIN_SIZE (16)
+#if (PUSE_ALIGNED_OPTIMIZATIONS)
#define PALIGNAS_CACHELINE() PALIGNAS(PALIGN_CACHELINE)
#define PALIGNAS_VECTOROPT() PALIGNAS(PALIGN_VECTOROPT)
+#else
+#define PALIGNAS_CACHELINE()
+#define PALIGNAS_VECTOROPT()
+#endif
// FIXME: Breaks mame build on windows mingw due to -Wattribute
// also triggers -Wattribute on ARM
diff --git a/src/lib/netlist/plib/pexception.cpp b/src/lib/netlist/plib/pexception.cpp
index 56ef7f93efb..d974c6b9a4e 100644
--- a/src/lib/netlist/plib/pexception.cpp
+++ b/src/lib/netlist/plib/pexception.cpp
@@ -102,7 +102,7 @@ namespace plib {
}
- bool fpsignalenabler::m_enable = false;
+ bool fpsignalenabler::m_enable = false; // NOLINT
//FIXME: mingw needs to be compiled with "-fnon-call-exceptions"
@@ -117,7 +117,8 @@ namespace plib {
if (fpexceptions & plib::FP_UNDERFLOW) b = b | FE_UNDERFLOW;
if (fpexceptions & plib::FP_OVERFLOW) b = b | FE_OVERFLOW;
if (fpexceptions & plib::FP_INVALID) b = b | FE_INVALID;
- m_last_enabled = feenableexcept(b);
+ if ((b & m_last_enabled) != b)
+ m_last_enabled = feenableexcept(b);
}
#elif defined(_WIN32) && defined(_EM_INEXACT)
if (m_enable)
@@ -136,7 +137,6 @@ namespace plib {
#endif
}
-
fpsignalenabler::~fpsignalenabler()
{
#if HAS_FEENABLE_EXCEPT
diff --git a/src/lib/netlist/plib/pexception.h b/src/lib/netlist/plib/pexception.h
index 709f8810b83..efed23d6178 100644
--- a/src/lib/netlist/plib/pexception.h
+++ b/src/lib/netlist/plib/pexception.h
@@ -39,7 +39,7 @@ namespace plib {
public:
explicit pexception(const pstring &text);
- const pstring &text() const noexcept { return m_text; }
+ const putf8string &text() const noexcept { return m_text; }
const char* what() const noexcept override { return m_text.c_str(); }
private:
@@ -125,7 +125,7 @@ namespace plib {
private:
int m_last_enabled;
- static bool m_enable;
+ static bool m_enable; // NOLINT
};
diff --git a/src/lib/netlist/plib/pfmtlog.cpp b/src/lib/netlist/plib/pfmtlog.cpp
index ddb9b5dd2e5..32468752658 100644
--- a/src/lib/netlist/plib/pfmtlog.cpp
+++ b/src/lib/netlist/plib/pfmtlog.cpp
@@ -47,7 +47,7 @@ pfmt::rtype pfmt::setfmt(std::stringstream &strm, char32_t cfmt_spec)
rtype r;
- r.sl = search.size();
+ r.sl = search.length();
r.p = m_str.find(search + ':');
r.sl++; // ":"
if (r.p == pstring::npos) // no further specifiers
@@ -94,11 +94,12 @@ pfmt::rtype pfmt::setfmt(std::stringstream &strm, char32_t cfmt_spec)
int width(0);
if (!fmt.empty() && pstring("duxofge").find(static_cast<pstring::value_type>(cfmt_spec)) != pstring::npos)
{
- pend = static_cast<char32_t>(fmt.at(fmt.size() - 1));
+ //pend = static_cast<char32_t>(fmt.at(fmt.size() - 1));
+ pend = plib::right(fmt, 1).at(0);
if (pstring("duxofge").find(static_cast<pstring::value_type>(pend)) == pstring::npos)
pend = cfmt_spec;
else
- fmt = plib::left(fmt, fmt.size() - 1);
+ fmt = plib::left(fmt, fmt.length() - 1);
}
else
// FIXME: Error
diff --git a/src/lib/netlist/plib/pfmtlog.h b/src/lib/netlist/plib/pfmtlog.h
index 45f7d3e4fc1..fd04f58bc73 100644
--- a/src/lib/netlist/plib/pfmtlog.h
+++ b/src/lib/netlist/plib/pfmtlog.h
@@ -9,6 +9,7 @@
#define PFMTLOG_H_
#include "penum.h"
+#include "pgsl.h"
#include "ppmf.h"
#include "pstring.h"
#include "ptypes.h"
@@ -40,7 +41,7 @@ namespace plib {
{
static constexpr const bool is_signed = std::numeric_limits<T>::is_signed;
static char32_t fmt_spec() { return 'u'; }
- static inline void streamify(std::ostream &s, const T &v)
+ static void streamify(std::ostream &s, const T &v)
{
s << v;
}
@@ -53,7 +54,7 @@ namespace plib {
// FIXME: need native support at some time
static constexpr const bool is_signed = true;
static char32_t fmt_spec() { return 'f'; }
- static inline void streamify(std::ostream &s, const FLOAT128 &v)
+ static void streamify(std::ostream &s, const FLOAT128 &v)
{
s << narrow_cast<long double>(v);
}
@@ -64,6 +65,19 @@ namespace plib {
struct ptype_traits;
template<>
+ struct ptype_traits<compile_info::int128_type>
+ {
+ // FIXME: need native support at some time
+ static constexpr const bool is_signed = true;
+ static char32_t fmt_spec() { return 'd'; }
+ template <typename T, typename = std::enable_if_t<plib::is_arithmetic<T>::value>>
+ static void streamify(std::ostream &s, const T &v)
+ {
+ s << narrow_cast<long long>(v);
+ }
+ };
+
+ template<>
struct ptype_traits<bool> : ptype_traits_base<bool>
{
};
@@ -160,6 +174,7 @@ namespace plib {
};
#endif
+
template<>
struct ptype_traits<char *> : ptype_traits_base<char *>
{
@@ -176,7 +191,7 @@ namespace plib {
struct ptype_traits<const char16_t *> : ptype_traits_base<const char16_t *>
{
static char32_t fmt_spec() { return 's'; }
- static inline void streamify(std::ostream &s, const char16_t *v)
+ static void streamify(std::ostream &s, const char16_t *v)
{
const putf16string su16(v);
s << putf8string(su16).c_str();
@@ -187,7 +202,7 @@ namespace plib {
struct ptype_traits<const char32_t *> : ptype_traits_base<const char32_t *>
{
static char32_t fmt_spec() { return 's'; }
- static inline void streamify(std::ostream &s, const char32_t *v)
+ static void streamify(std::ostream &s, const char32_t *v)
{
const putf32string su32(v);
s << putf8string(su32).c_str();
@@ -210,7 +225,7 @@ namespace plib {
struct ptype_traits<putf16string> : ptype_traits_base<putf16string>
{
static char32_t fmt_spec() { return 's'; }
- static inline void streamify(std::ostream &s, const putf16string &v)
+ static void streamify(std::ostream &s, const putf16string &v)
{
s << putf8string(v).c_str();
}
@@ -436,7 +451,7 @@ namespace plib {
fatal(logger)
{}
- PCOPYASSIGNMOVE(plog_base, default)
+ PCOPYASSIGNMOVE(plog_base, delete)
virtual ~plog_base() noexcept = default;
plog_channel<plog_level::DEBUG, debug_enabled> debug;
diff --git a/src/lib/netlist/plib/pfunction.cpp b/src/lib/netlist/plib/pfunction.cpp
index 5a00844becc..d592a90d670 100644
--- a/src/lib/netlist/plib/pfunction.cpp
+++ b/src/lib/netlist/plib/pfunction.cpp
@@ -118,7 +118,7 @@ namespace plib {
auto p = pcmds().find(cmd);
if (p != pcmds().end())
{
- rc.m_cmd = p->second.cmd;
+ rc = rpn_inst(p->second.cmd);
stk -= p->second.adj;
}
else
@@ -127,23 +127,20 @@ namespace plib {
{
if (inputs[i] == cmd)
{
- rc.m_cmd = PUSH_INPUT;
- rc.m_param.index = i;
+ rc = rpn_inst(PUSH_INPUT, i);
stk += 1;
break;
}
}
- if (rc.m_cmd != PUSH_INPUT)
+ if (rc.cmd() != PUSH_INPUT)
{
- using fl_t = decltype(rc.m_param.val);
- rc.m_cmd = PUSH_CONST;
bool err(false);
auto rs(plib::right(cmd,1));
- auto r=units_si<fl_t>().find(rs);
- if (r == units_si<fl_t>().end())
- rc.m_param.val = plib::pstonum_ne<fl_t>(cmd, err);
+ auto r=units_si<NT>().find(rs);
+ if (r == units_si<NT>().end())
+ rc = rpn_inst(plib::pstonum_ne<NT>(cmd, err));
else
- rc.m_param.val = plib::pstonum_ne<fl_t>(plib::left(cmd, cmd.size()-1), err) * r->second;
+ rc = rpn_inst(plib::pstonum_ne<NT>(plib::left(cmd, cmd.length()-1), err) * r->second);
if (err)
throw pexception(plib::pfmt("pfunction: unknown/misformatted token <{1}> in <{2}>")(cmd)(expr));
stk += 1;
@@ -153,10 +150,13 @@ namespace plib {
throw pexception(plib::pfmt("pfunction: stack underflow on token <{1}> in <{2}>")(cmd)(expr));
if (stk >= narrow_cast<int>(MAX_STACK))
throw pexception(plib::pfmt("pfunction: stack overflow on token <{1}> in <{2}>")(cmd)(expr));
+ if (rc.cmd() == LP || rc.cmd() == RP)
+ throw pexception(plib::pfmt("pfunction: parenthesis inequality on token <{1}> in <{2}>")(cmd)(expr));
m_precompiled.push_back(rc);
}
if (stk != 1)
throw pexception(plib::pfmt("pfunction: stack count {1} different to one on <{2}>")(stk, expr));
+ compress();
}
static bool is_number(const pstring &n)
@@ -339,27 +339,105 @@ namespace plib {
return narrow_cast<NT>(lfsr);
}
#endif
- #define ST0 stack[ptr+1]
- #define ST1 stack[ptr]
- #define ST2 stack[ptr-1]
+ #define ST0 *(ptr+1)
+ #define ST1 *ptr
+ #define ST2 *(ptr-1)
#define OP(OP, ADJ, EXPR) \
case OP: \
ptr-= (ADJ); \
- stack[ptr-1] = (EXPR); \
+ *(ptr-1) = (EXPR); \
+ break;
+
+ #define OP0(OP, EXPR) \
+ case OP: \
+ *(ptr++) = (EXPR); \
break;
template <typename NT>
NT pfunction<NT>::evaluate(const values_container &values) noexcept
{
- std::array<value_type, MAX_STACK> stack = { plib::constants<value_type>::zero() };
+ std::array<value_type, MAX_STACK> stack; // NOLINT
+ value_type *ptr = stack.data();
+ constexpr const auto zero = plib::constants<value_type>::zero();
+ constexpr const auto one = plib::constants<value_type>::one();
+ for (const auto &rc : m_precompiled)
+ {
+ switch (rc.cmd())
+ {
+ OP(ADD, 1, ST2 + ST1)
+ OP(MULT, 1, ST2 * ST1)
+ OP(SUB, 1, ST2 - ST1)
+ OP(DIV, 1, ST2 / ST1)
+ OP(EQ, 1, ST2 == ST1 ? one : zero)
+ OP(NE, 1, ST2 != ST1 ? one : zero)
+ OP(GT, 1, ST2 > ST1 ? one : zero)
+ OP(LT, 1, ST2 < ST1 ? one : zero)
+ OP(LE, 1, ST2 <= ST1 ? one : zero)
+ OP(GE, 1, ST2 >= ST1 ? one : zero)
+ OP(IF, 2, (ST2 != zero) ? ST1 : ST0)
+ OP(NEG, 0, -ST2)
+ OP(POW, 1, plib::pow(ST2, ST1))
+ OP(LOG, 0, plib::log(ST2))
+ OP(SIN, 0, plib::sin(ST2))
+ OP(COS, 0, plib::cos(ST2))
+ OP(MAX, 1, std::max(ST2, ST1))
+ OP(MIN, 1, std::min(ST2, ST1))
+ OP(TRUNC, 0, plib::trunc(ST2))
+ OP0(RAND, lfsr_random<value_type>(m_lfsr))
+ OP0(PUSH_INPUT, values[rc.index()])
+ OP0(PUSH_CONST, rc.value())
+ // please compiler
+ case LP:
+ case RP:
+ break;
+ }
+ }
+ return *(ptr-1);
+ }
+
+#undef ST0
+#undef ST1
+#undef ST2
+#undef OP
+#undef OP0
+
+#define ST0 m_precompiled[ptr+0].value()
+#define ST1 m_precompiled[ptr-1].value()
+#define ST2 m_precompiled[ptr-2].value()
+
+#define OP(OP, ADJ, EXPR) \
+ case OP: \
+ if (ADJ == 2) {\
+ if (m_precompiled[ptr-3].cmd() == PUSH_CONST && m_precompiled[ptr-2].cmd() == PUSH_CONST && m_precompiled[ptr-1].cmd() == PUSH_CONST) \
+ { ptr--; m_precompiled[ptr-2] = rpn_inst(EXPR); n -= 3; ptr++; std::copy(m_precompiled.begin()+(ptr+1), m_precompiled.end(), m_precompiled.begin()+(ptr-2)); ptr-=2;} \
+ else { ptr++; } \
+ } else if (ADJ == 1) {\
+ if (m_precompiled[ptr-2].cmd() == PUSH_CONST && m_precompiled[ptr-1].cmd() == PUSH_CONST) \
+ { m_precompiled[ptr-2] = rpn_inst(EXPR); n -= 2; std::copy(m_precompiled.begin()+(ptr+1), m_precompiled.end(), m_precompiled.begin()+(ptr-1)); ptr--;} \
+ else { ptr++; } \
+ } else if (ADJ == 0) {\
+ if (m_precompiled[ptr-1].cmd() == PUSH_CONST) \
+ { ptr++; m_precompiled[ptr-2] = rpn_inst(EXPR); n -= 1; ptr--; std::copy(m_precompiled.begin()+(ptr+1), m_precompiled.end(), m_precompiled.begin()+(ptr)); } \
+ else { ptr++; } \
+ } else ptr++; \
+ break;
+
+#define OP0(OP, EXPR) \
+ case OP: \
+ ptr++; \
+ break;
+
+ template <typename NT>
+ void pfunction<NT>::compress()
+ {
+ constexpr const auto zero = plib::constants<value_type>::zero();
+ constexpr const auto one = plib::constants<value_type>::one();
unsigned ptr = 0;
- constexpr auto zero = plib::constants<value_type>::zero();
- constexpr auto one = plib::constants<value_type>::one();
- stack[0] = plib::constants<value_type>::zero();
- for (auto &rc : m_precompiled)
+ auto n = m_precompiled.size();
+ for (; ptr < n; )
{
- switch (rc.m_cmd)
+ switch (m_precompiled[ptr].cmd())
{
OP(ADD, 1, ST2 + ST1)
OP(MULT, 1, ST2 * ST1)
@@ -380,22 +458,17 @@ namespace plib {
OP(MAX, 1, std::max(ST2, ST1))
OP(MIN, 1, std::min(ST2, ST1))
OP(TRUNC, 0, plib::trunc(ST2))
- case RAND:
- stack[ptr++] = lfsr_random<value_type>(m_lfsr);
- break;
- case PUSH_INPUT:
- stack[ptr++] = values[rc.m_param.index];
- break;
- case PUSH_CONST:
- stack[ptr++] = rc.m_param.val;
- break;
+ OP0(RAND, lfsr_random<value_type>(m_lfsr))
+ OP0(PUSH_INPUT, values[rc.index()])
+ OP0(PUSH_CONST, rc.value())
// please compiler
case LP:
case RP:
break;
}
}
- return stack[ptr-1];
+ //printf("func %lld %lld\n", m_precompiled.size(), n);
+ m_precompiled.resize(n);
}
template class pfunction<float>;
diff --git a/src/lib/netlist/plib/pfunction.h b/src/lib/netlist/plib/pfunction.h
index 0178e81c04e..9c2450d427c 100644
--- a/src/lib/netlist/plib/pfunction.h
+++ b/src/lib/netlist/plib/pfunction.h
@@ -58,10 +58,32 @@ namespace plib {
{
struct rpn_inst
{
- rpn_inst() : m_cmd(ADD)
+ constexpr rpn_inst() : m_cmd(ADD)
{
m_param.val = plib::constants<NT>::zero();
}
+ constexpr rpn_inst(rpn_cmd cmd, std::size_t index = 0)
+ : m_cmd(cmd)
+ {
+ m_param.index = index;
+ }
+ constexpr rpn_inst(NT v) : m_cmd(PUSH_CONST)
+ {
+ m_param.val = v;
+ }
+ constexpr const rpn_cmd &cmd() const noexcept
+ {
+ return m_cmd;
+ }
+ constexpr const NT &value() const noexcept
+ {
+ return m_param.val; // NOLINT
+ }
+ constexpr const std::size_t &index() const noexcept
+ {
+ return m_param.index; // NOLINT
+ }
+ private:
rpn_cmd m_cmd;
union
{
@@ -138,6 +160,7 @@ namespace plib {
private:
+ void compress();
void compile_postfix(const inputs_container &inputs,
const std::vector<pstring> &cmds, const pstring &expr);
diff --git a/src/lib/netlist/plib/pgsl.h b/src/lib/netlist/plib/pgsl.h
index ab7798071a5..cb95ecc334c 100644
--- a/src/lib/netlist/plib/pgsl.h
+++ b/src/lib/netlist/plib/pgsl.h
@@ -25,6 +25,8 @@
#if defined(__has_builtin) // clang and gcc 10
#if __has_builtin(__builtin_unreachable)
#define gsl_Expects(e) ((e) ? static_cast<void>(0) : __builtin_unreachable())
+ #else
+ #define gsl_Expects(e) ((e) ? static_cast<void>(0) : static_cast<void>(0))
#endif
#elif defined(__GNUC__) && !(defined( __CUDACC__ ) && defined( __CUDA_ARCH__ ))
#define gsl_Expects(e) ((e) ? static_cast<void>(0) : __builtin_unreachable())
@@ -34,8 +36,24 @@
#define gsl_Expects(e) ((e) ? static_cast<void>(0) : static_cast<void>(0))
#endif
+#if 1
+// FIXME: __builtin_unreachable contrary to google sources does not seem to be of
+// any use and decreases performance slightly. Convert gsl_Expects to a noop
+// and revisit in the future.
#undef gsl_Expects
#define gsl_Expects(e) do {} while (0)
+
+#if 0
+// Alternative and c++ style implementation. Suffers from the same drawbacks
+// like __builtin_unreachable
+static constexpr inline void gsl_Expects(const bool &e)
+{
+ if (!e)
+ __builtin_unreachable();
+}
+#endif
+#endif
+
#define gsl_Ensures(e) gsl_Expects(e)
namespace plib {
@@ -52,7 +70,7 @@ namespace plib {
/// \brief perform a narrowing cast without checks
///
template <typename T, typename O>
- inline constexpr T narrow_cast(O && v) noexcept
+ constexpr T narrow_cast(O && v) noexcept
{
static_assert(plib::is_arithmetic<T>::value && std::is_convertible<std::remove_reference_t<O>, T>::value, "narrow cast expects conversion between arithmetic types");
return static_cast<T>(std::forward<O>(v));
@@ -62,7 +80,7 @@ namespace plib {
///
/// The c++ core guidelines require the narrow function to raise an error
/// This will make narrow noexcept(false). This has shown to have a
- /// measurable impact on performance and thus we deviate we deviate from
+ /// measurable impact on performance and thus we deviate from
/// the standard here.
///
template <typename T, typename O>
@@ -82,14 +100,14 @@ namespace plib {
} // namespace pgsl
- /// \brief downcast from base tpye to derived type
+ /// \brief downcast from base type to derived type
///
/// The cpp core guidelines require a very careful use of static cast
/// for downcast operations. This template is used to identify these uses
/// and later for debug builds use dynamic_cast.
///
template <typename D, typename B>
- inline constexpr D downcast(B && b) noexcept
+ constexpr D downcast(B && b) noexcept
{
static_assert(std::is_pointer<D>::value || std::is_reference<D>::value, "downcast only supports pointers or reference for derived");
static_assert(std::is_pointer<B>::value || std::is_reference<B>::value, "downcast only supports pointers or reference for base");
@@ -97,6 +115,15 @@ namespace plib {
}
using pgsl::narrow_cast;
+
+ /// \brief cast to void *
+ ///
+ /// The purpose here is to help identifiy casts to void in the code.
+ /// These case usuallyindicate some wizard assumptioms which should be easily
+ /// be easy to identify.
+ template <typename T>
+ constexpr void * void_ptr_cast(T *ptr) noexcept { return static_cast<void *>(ptr); }
+
} // namespace plib
//FIXME: This is the place to use more complete implementations
diff --git a/src/lib/netlist/plib/plists.h b/src/lib/netlist/plib/plists.h
index 328f0b1ad23..41f68d989c2 100755
--- a/src/lib/netlist/plib/plists.h
+++ b/src/lib/netlist/plib/plists.h
@@ -42,7 +42,11 @@ namespace plib {
//uninitialised_array_t() noexcept = default;
uninitialised_array() noexcept = default;
- PCOPYASSIGNMOVE(uninitialised_array, delete)
+ uninitialised_array(const uninitialised_array &) = default;
+ uninitialised_array &operator=(const uninitialised_array &) = default;
+ uninitialised_array(uninitialised_array &&) noexcept = default;
+ uninitialised_array &operator=(uninitialised_array &&) noexcept = default;
+
~uninitialised_array() noexcept = default;
constexpr size_t size() const noexcept { return N; }
@@ -111,7 +115,11 @@ namespace plib {
{
}
- PCOPYASSIGNMOVE(static_vector, delete)
+ static_vector(const static_vector &) = default;
+ static_vector &operator=(const static_vector &) = default;
+ static_vector(static_vector &&) noexcept = default;
+ static_vector &operator=(static_vector &&) noexcept = default;
+
~static_vector() noexcept
{
clear();
@@ -172,7 +180,7 @@ namespace plib {
/// \brief a simple linked list.
///
- /// The list allows insertions deletions whilst being processed.
+ /// The list allows insertions and deletions whilst being processed.
///
template <class LC>
class linkedlist_t
@@ -187,10 +195,13 @@ namespace plib {
constexpr element_t() : m_next(nullptr), m_prev(nullptr) {}
~element_t() noexcept = default;
- PCOPYASSIGNMOVE(element_t, delete)
+ element_t(const element_t &) = default; \
+ element_t &operator=(const element_t &) = default;
+ element_t(element_t &&) noexcept = default;
+ element_t &operator=(element_t &&) noexcept = default;
- constexpr LC *next() const noexcept { return m_next; }
- constexpr LC *prev() const noexcept { return m_prev; }
+ constexpr LC * &next() noexcept { return m_next; }
+ constexpr LC * &prev() noexcept { return m_prev; }
private:
LC * m_next;
LC * m_prev;
@@ -202,22 +213,14 @@ namespace plib {
LC* p;
public:
explicit constexpr iter_t(LC* x) noexcept : p(x) { }
- constexpr iter_t(iter_t &rhs) noexcept : p(rhs.p) { }
- iter_t(iter_t &&rhs) noexcept { std::swap(*this, rhs); }
-
- iter_t& operator=(const iter_t &rhs) noexcept // NOLINT(bugprone-unhandled-self-assignment, cert-oop54-cpp)
- {
- if (this == &rhs)
- return *this;
-
- p = rhs.p;
- return *this;
- }
+ constexpr iter_t(const iter_t &rhs) noexcept = default;
+ iter_t(iter_t &&rhs) noexcept = default;
- iter_t& operator=(iter_t &&rhs) noexcept { std::swap(*this, rhs); return *this; }
- ~iter_t() = default;
+ iter_t& operator=(const iter_t &rhs) noexcept = default;
+ iter_t& operator=(iter_t &&rhs) noexcept = default;
+ ~iter_t() noexcept = default;
- iter_t& operator++() noexcept { p = p->next();return *this; }
+ iter_t& operator++() noexcept { p = p->next(); return *this; }
// NOLINTNEXTLINE(cert-dcl21-cpp)
iter_t operator++(int) & noexcept { const iter_t tmp(*this); operator++(); return tmp; }
diff --git a/src/lib/netlist/plib/pmath.h b/src/lib/netlist/plib/pmath.h
index 02d634529a0..a59f566a91d 100644
--- a/src/lib/netlist/plib/pmath.h
+++ b/src/lib/netlist/plib/pmath.h
@@ -30,50 +30,50 @@ namespace plib
template <typename T>
struct constants
{
- static inline constexpr T zero() noexcept { return static_cast<T>(0); } // NOLINT
- static inline constexpr T half() noexcept { return static_cast<T>(0.5); } // NOLINT
- static inline constexpr T one() noexcept { return static_cast<T>(1); } // NOLINT
- static inline constexpr T two() noexcept { return static_cast<T>(2); } // NOLINT
- static inline constexpr T three() noexcept { return static_cast<T>(3); } // NOLINT
- static inline constexpr T four() noexcept { return static_cast<T>(4); } // NOLINT
- static inline constexpr T hundred()noexcept { return static_cast<T>(100); } // NOLINT
-
- static inline constexpr T one_thirds() noexcept { return fraction(one(), three()); }
- static inline constexpr T two_thirds() noexcept { return fraction(two(), three()); }
-
- static inline constexpr T ln2() noexcept { return static_cast<T>(0.6931471805599453094172321214581766L); } // NOLINT
- static inline constexpr T sqrt2() noexcept { return static_cast<T>(1.4142135623730950488016887242096982L); } // NOLINT
- static inline constexpr T sqrt3() noexcept { return static_cast<T>(1.7320508075688772935274463415058723L); } // NOLINT
- static inline constexpr T sqrt3_2() noexcept { return static_cast<T>(0.8660254037844386467637231707529362L); } // NOLINT
- static inline constexpr T pi() noexcept { return static_cast<T>(3.1415926535897932384626433832795029L); } // NOLINT
+ static constexpr T zero() noexcept { return static_cast<T>(0); } // NOLINT
+ static constexpr T half() noexcept { return static_cast<T>(0.5); } // NOLINT
+ static constexpr T one() noexcept { return static_cast<T>(1); } // NOLINT
+ static constexpr T two() noexcept { return static_cast<T>(2); } // NOLINT
+ static constexpr T three() noexcept { return static_cast<T>(3); } // NOLINT
+ static constexpr T four() noexcept { return static_cast<T>(4); } // NOLINT
+ static constexpr T hundred()noexcept { return static_cast<T>(100); } // NOLINT
+
+ static constexpr T one_thirds() noexcept { return fraction(one(), three()); }
+ static constexpr T two_thirds() noexcept { return fraction(two(), three()); }
+
+ static constexpr T ln2() noexcept { return static_cast<T>(0.6931471805599453094172321214581766L); } // NOLINT
+ static constexpr T sqrt2() noexcept { return static_cast<T>(1.4142135623730950488016887242096982L); } // NOLINT
+ static constexpr T sqrt3() noexcept { return static_cast<T>(1.7320508075688772935274463415058723L); } // NOLINT
+ static constexpr T sqrt3_2() noexcept { return static_cast<T>(0.8660254037844386467637231707529362L); } // NOLINT
+ static constexpr T pi() noexcept { return static_cast<T>(3.1415926535897932384626433832795029L); } // NOLINT
/// \brief Electric constant of vacuum
///
- static inline constexpr T eps_0() noexcept { return static_cast<T>(8.854187817e-12); } // NOLINT
+ static constexpr T eps_0() noexcept { return static_cast<T>(8.854187817e-12); } // NOLINT
// \brief Relative permittivity of Silicon dioxide
///
- static inline constexpr T eps_SiO2() noexcept { return static_cast<T>(3.9); } // NOLINT
+ static constexpr T eps_SiO2() noexcept { return static_cast<T>(3.9); } // NOLINT
/// \brief Relative permittivity of Silicon
///
- static inline constexpr T eps_Si() noexcept { return static_cast<T>(11.7); } // NOLINT
+ static constexpr T eps_Si() noexcept { return static_cast<T>(11.7); } // NOLINT
/// \brief Boltzmann constant
///
- static inline constexpr T k_b() noexcept { return static_cast<T>(1.38064852e-23); } // NOLINT
+ static constexpr T k_b() noexcept { return static_cast<T>(1.38064852e-23); } // NOLINT
/// \brief room temperature (gives VT = 0.02585 at T=300)
///
- static inline constexpr T T0() noexcept { return static_cast<T>(300); } // NOLINT
+ static constexpr T T0() noexcept { return static_cast<T>(300); } // NOLINT
/// \brief Elementary charge
///
- static inline constexpr T Q_e() noexcept { return static_cast<T>(1.6021765314e-19); } // NOLINT
+ static constexpr T Q_e() noexcept { return static_cast<T>(1.6021765314e-19); } // NOLINT
/// \brief Intrinsic carrier concentration in 1/m^3 of Silicon
///
- static inline constexpr T NiSi() noexcept { return static_cast<T>(1.45e16); } // NOLINT
+ static constexpr T NiSi() noexcept { return static_cast<T>(1.45e16); } // NOLINT
/// \brief clearly identify magic numbers in code
///
@@ -82,10 +82,10 @@ namespace plib
/// later.
///
template <typename V>
- static inline constexpr T magic(V &&v) noexcept { return static_cast<T>(v); }
+ static constexpr T magic(V &&v) noexcept { return static_cast<T>(v); }
template <typename V>
- static inline constexpr T fraction(V &&v1, V &&v2) noexcept { return static_cast<T>(v1 / v2); }
+ static constexpr T fraction(V &&v1, V &&v2) noexcept { return static_cast<T>(v1 / v2); }
};
/// \brief typesafe reciprocal function
@@ -95,7 +95,7 @@ namespace plib
/// \return reciprocal of argument
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
reciprocal(T v) noexcept
{
return constants<T>::one() / v;
@@ -108,7 +108,7 @@ namespace plib
/// \return absolute value of argument
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
abs(T v) noexcept
{
return std::abs(v);
@@ -121,7 +121,7 @@ namespace plib
/// \return absolute value of argument
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
sqrt(T v) noexcept
{
return std::sqrt(v);
@@ -135,7 +135,7 @@ namespace plib
/// \return sqrt(v1*v1+v2*v2)
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
hypot(T v1, T v2) noexcept
{
return std::hypot(v1, v2);
@@ -148,7 +148,7 @@ namespace plib
/// \return exp(v)
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
exp(T v) noexcept
{
return std::exp(v);
@@ -161,7 +161,7 @@ namespace plib
/// \return log(v)
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
log(T v) noexcept
{
return std::log(v);
@@ -174,7 +174,7 @@ namespace plib
/// \return tanh(v)
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
tanh(T v) noexcept
{
return std::tanh(v);
@@ -187,7 +187,7 @@ namespace plib
/// \return floor(v)
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
floor(T v) noexcept
{
return std::floor(v);
@@ -200,7 +200,7 @@ namespace plib
/// \return log(1 + v)
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
log1p(T v) noexcept
{
return std::log1p(v);
@@ -213,7 +213,7 @@ namespace plib
/// \return sin(v)
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
sin(T v) noexcept
{
return std::sin(v);
@@ -226,7 +226,7 @@ namespace plib
/// \return cos(v)
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
cos(T v) noexcept
{
return std::cos(v);
@@ -239,7 +239,7 @@ namespace plib
/// \return trunc(v)
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
trunc(T v) noexcept
{
return std::trunc(v);
@@ -253,7 +253,7 @@ namespace plib
/// \return signum(v)
///
template <typename T>
- static inline constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
+ static constexpr std::enable_if_t<std::is_floating_point<T>::value, T>
signum(T v, T r = static_cast<T>(1))
{
constexpr const auto z(static_cast<T>(0));
@@ -278,73 +278,73 @@ namespace plib
}
#if (PUSE_FLOAT128)
- static inline constexpr FLOAT128 reciprocal(FLOAT128 v) noexcept
+ static constexpr FLOAT128 reciprocal(FLOAT128 v) noexcept
{
return constants<FLOAT128>::one() / v;
}
- static inline FLOAT128 abs(FLOAT128 v) noexcept
+ static FLOAT128 abs(FLOAT128 v) noexcept
{
return fabsq(v);
}
- static inline FLOAT128 sqrt(FLOAT128 v) noexcept
+ static FLOAT128 sqrt(FLOAT128 v) noexcept
{
return sqrtq(v);
}
- static inline FLOAT128 hypot(FLOAT128 v1, FLOAT128 v2) noexcept
+ static FLOAT128 hypot(FLOAT128 v1, FLOAT128 v2) noexcept
{
return hypotq(v1, v2);
}
- static inline FLOAT128 exp(FLOAT128 v) noexcept
+ static FLOAT128 exp(FLOAT128 v) noexcept
{
return expq(v);
}
- static inline FLOAT128 log(FLOAT128 v) noexcept
+ static FLOAT128 log(FLOAT128 v) noexcept
{
return logq(v);
}
- static inline FLOAT128 tanh(FLOAT128 v) noexcept
+ static FLOAT128 tanh(FLOAT128 v) noexcept
{
return tanhq(v);
}
- static inline FLOAT128 floor(FLOAT128 v) noexcept
+ static FLOAT128 floor(FLOAT128 v) noexcept
{
return floorq(v);
}
- static inline FLOAT128 log1p(FLOAT128 v) noexcept
+ static FLOAT128 log1p(FLOAT128 v) noexcept
{
return log1pq(v);
}
- static inline FLOAT128 sin(FLOAT128 v) noexcept
+ static FLOAT128 sin(FLOAT128 v) noexcept
{
return sinq(v);
}
- static inline FLOAT128 cos(FLOAT128 v) noexcept
+ static FLOAT128 cos(FLOAT128 v) noexcept
{
return cosq(v);
}
- static inline FLOAT128 trunc(FLOAT128 v) noexcept
+ static FLOAT128 trunc(FLOAT128 v) noexcept
{
return truncq(v);
}
template <typename T>
- static inline FLOAT128 pow(FLOAT128 v, T p) noexcept
+ static FLOAT128 pow(FLOAT128 v, T p) noexcept
{
return powq(v, static_cast<FLOAT128>(p));
}
- static inline FLOAT128 pow(FLOAT128 v, int p) noexcept
+ static FLOAT128 pow(FLOAT128 v, int p) noexcept
{
if (p==2)
return v*v;
diff --git a/src/lib/netlist/plib/pmatrix2d.h b/src/lib/netlist/plib/pmatrix2d.h
index d0fbac26194..d0ce462ebfa 100755
--- a/src/lib/netlist/plib/pmatrix2d.h
+++ b/src/lib/netlist/plib/pmatrix2d.h
@@ -51,7 +51,10 @@ namespace plib
::new(&m_v[i]) T();
}
- PCOPYASSIGNMOVE(pmatrix2d, delete)
+ pmatrix2d(const pmatrix2d &) = delete;
+ pmatrix2d &operator=(const pmatrix2d &) = delete;
+ pmatrix2d(pmatrix2d &&) = delete;
+ pmatrix2d &operator=(pmatrix2d &&) = delete;
~pmatrix2d()
{
@@ -157,7 +160,11 @@ namespace plib
m_v.resize(N); //FIXME
}
- PCOPYASSIGNMOVE(pmatrix2d_vrl, default)
+ pmatrix2d_vrl(const pmatrix2d_vrl &) = default;
+ pmatrix2d_vrl &operator=(const pmatrix2d_vrl &) = default;
+ pmatrix2d_vrl(pmatrix2d_vrl &&) = default;
+ pmatrix2d_vrl &operator=(pmatrix2d_vrl &&) = default;
+
~pmatrix2d_vrl() = default;
void resize(size_type N, size_type M)
diff --git a/src/lib/netlist/plib/mat_cr.h b/src/lib/netlist/plib/pmatrix_cr.h
index 17ce140c6e5..05ba82f1b0e 100644
--- a/src/lib/netlist/plib/mat_cr.h
+++ b/src/lib/netlist/plib/pmatrix_cr.h
@@ -1,11 +1,11 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-#ifndef MAT_CR_H_
-#define MAT_CR_H_
+#ifndef PMATRIX_CR_H_
+#define PMATRIX_CR_H_
///
-/// \file mat_cr.h
+/// \file pmatrix_cr.h
///
/// Compressed row format matrices
///
@@ -16,9 +16,7 @@
#include "pmath.h"
#include "pmatrix2d.h"
#include "pomp.h"
-#include "pstate.h"
#include "ptypes.h"
-#include "putil.h"
#include <algorithm>
#include <array>
@@ -29,7 +27,7 @@ namespace plib
{
template<typename T, int N, typename C = uint16_t>
- struct pmatrix_cr_t
+ struct pmatrix_cr
{
using index_type = C;
using value_type = T;
@@ -37,7 +35,10 @@ namespace plib
static constexpr const int NSQ = (N < 0 ? -N * N : N * N);
static constexpr const int Np1 = (N == 0) ? 0 : (N < 0 ? N - 1 : N + 1);
- PCOPYASSIGNMOVE(pmatrix_cr_t, default)
+ pmatrix_cr(const pmatrix_cr &) = default;
+ pmatrix_cr &operator=(const pmatrix_cr &) = default;
+ pmatrix_cr(pmatrix_cr &&) noexcept(std::is_nothrow_move_constructible<parray<value_type, NSQ>>::value) = default;
+ pmatrix_cr &operator=(pmatrix_cr &&) noexcept(std::is_nothrow_move_assignable<parray<value_type, NSQ>>::value && std::is_nothrow_move_assignable<pmatrix2d_vrl<index_type>>::value) = default;
enum constants_e
{
@@ -56,7 +57,7 @@ namespace plib
// NOLINTNEXTLINE
std::size_t nz_num;
- explicit pmatrix_cr_t(std::size_t n)
+ explicit pmatrix_cr(std::size_t n)
: diag(n)
, row_idx(n+1)
, col_idx(n*n)
@@ -72,7 +73,7 @@ namespace plib
}
}
- ~pmatrix_cr_t() = default;
+ ~pmatrix_cr() = default;
constexpr std::size_t size() const noexcept { return (N>0) ? narrow_cast<std::size_t>(N) : m_size; }
@@ -149,17 +150,10 @@ namespace plib
for (std::size_t k=0; k < size(); k++)
{
-#if 0
- for (std::size_t j=k + 1; j < size(); j++)
- if (f[j][k] < FILL_INFINITY)
- m_nzbd[k].push_back(narrow_cast<C>(j));
- m_nzbd[k].push_back(0); // end of sequence
-#else
for (std::size_t j=k + 1; j < size(); j++)
if (f[j][k] < FILL_INFINITY)
m_nzbd.set(k, m_nzbd.colcount(k), narrow_cast<C>(j));
m_nzbd.set(k, m_nzbd.colcount(k), 0); // end of sequence
-#endif
}
}
@@ -169,17 +163,6 @@ namespace plib
{
// res = A * x
-#if 0
- //plib::omp::set_num_threads(4);
- plib::omp::for_static(0, constants<std::size_t>::zero(), m_size, [this, &res, &x](std::size_t row)
- {
- T tmp(0.0);
- const std::size_t e(row_idx[row+1]);
- for (std::size_t k = row_idx[row]; k < e; k++)
- tmp += A[k] * x[col_idx[k]];
- res[row] = tmp;
- });
-#else
// this is a bit faster than the version above
std::size_t row = 0;
std::size_t k = 0;
@@ -192,7 +175,6 @@ namespace plib
tmp += A[k] * x[col_idx[k]];
res[row++] = tmp;
}
-#endif
}
// throws error if P(source)>P(destination)
@@ -262,19 +244,22 @@ namespace plib
};
template<typename B>
- struct pGEmatrix_cr_t : public B
+ struct pGEmatrix_cr : public B
{
- using base = B;
- using index_type = typename base::index_type;
+ using base_type = B;
+ using index_type = typename base_type::index_type;
- PCOPYASSIGNMOVE(pGEmatrix_cr_t, default)
+ pGEmatrix_cr(const pGEmatrix_cr &) = default;
+ pGEmatrix_cr &operator=(const pGEmatrix_cr &) = default;
+ pGEmatrix_cr(pGEmatrix_cr &&) noexcept(std::is_nothrow_move_constructible<base_type>::value) = default;
+ pGEmatrix_cr &operator=(pGEmatrix_cr &&) noexcept(std::is_nothrow_move_assignable<base_type>::value) = default;
- explicit pGEmatrix_cr_t(std::size_t n)
+ explicit pGEmatrix_cr(std::size_t n)
: B(n)
{
}
- ~pGEmatrix_cr_t() = default;
+ ~pGEmatrix_cr() = default;
template <typename M>
std::pair<std::size_t, std::size_t> gaussian_extend_fill_mat(M &fill)
@@ -287,14 +272,14 @@ namespace plib
ops++; // 1/A(k,k)
for (std::size_t row = k + 1; row < fill.size(); row++)
{
- if (fill[row][k] < base::FILL_INFINITY)
+ if (fill[row][k] < base_type::FILL_INFINITY)
{
ops++;
for (std::size_t col = k + 1; col < fill[row].size(); col++)
//if (fill[k][col] < FILL_INFINITY)
{
auto f = std::min(fill[row][col], 1 + fill[row][k] + fill[k][col]);
- if (f < base::FILL_INFINITY)
+ if (f < base_type::FILL_INFINITY)
{
if (f > fill_max)
fill_max = f;
@@ -312,37 +297,37 @@ namespace plib
template <typename V>
void gaussian_elimination(V & RHS)
{
- const std::size_t iN = base::size();
+ const std::size_t iN = base_type::size();
for (std::size_t i = 0; i < iN - 1; i++)
{
std::size_t nzbdp = 0;
- std::size_t pi = base::diag[i];
- auto f = reciprocal(base::A[pi++]);
- const std::size_t piie = base::row_idx[i+1];
+ std::size_t pi = base_type::diag[i];
+ auto f = reciprocal(base_type::A[pi++]);
+ const std::size_t piie = base_type::row_idx[i+1];
- const auto *nz = base::m_nzbd[i];
+ const auto *nz = base_type::m_nzbd[i];
while (auto j = nz[nzbdp++]) // NOLINT(bugprone-infinite-loop)
{
// proceed to column i
- std::size_t pj = base::row_idx[j];
- std::size_t pje = base::row_idx[j+1];
+ std::size_t pj = base_type::row_idx[j];
+ std::size_t pje = base_type::row_idx[j+1];
- while (base::col_idx[pj] < i)
+ while (base_type::col_idx[pj] < i)
pj++;
- const typename base::value_type f1 = - base::A[pj++] * f;
+ const typename base_type::value_type f1 = - base_type::A[pj++] * f;
// subtract row i from j
// fill-in available assumed, i.e. matrix was prepared
for (std::size_t pii = pi; pii<piie && pj < pje; pii++)
{
- while (base::col_idx[pj] < base::col_idx[pii])
+ while (base_type::col_idx[pj] < base_type::col_idx[pii])
pj++;
- if (base::col_idx[pj] == base::col_idx[pii])
- base::A[pj++] += base::A[pii] * f1;
+ if (base_type::col_idx[pj] == base_type::col_idx[pii])
+ base_type::A[pj++] += base_type::A[pii] * f1;
}
RHS[j] += f1 * RHS[i];
@@ -363,35 +348,35 @@ namespace plib
{
//printf("omp: %ld %d %d\n", m_ge_par.size(), nz_num, (int)m_ge_par[m_ge_par.size()-2].size());
for (auto l = 0UL; l < m_ge_par.size(); l++)
- plib::omp::for_static(base::nz_num, 0UL, m_ge_par[l].size(), [this, &RHS, &l] (unsigned ll)
+ plib::omp::for_static(base_type::nz_num, 0UL, m_ge_par[l].size(), [this, &RHS, &l] (unsigned ll)
{
auto &i = m_ge_par[l][ll];
{
std::size_t nzbdp = 0;
- std::size_t pi = base::diag[i];
- const auto f = reciprocal(base::A[pi++]);
- const std::size_t piie = base::row_idx[i+1];
- const auto &nz = base::nzbd[i];
+ std::size_t pi = base_type::diag[i];
+ const auto f = reciprocal(base_type::A[pi++]);
+ const std::size_t piie = base_type::row_idx[i+1];
+ const auto &nz = base_type::nzbd[i];
while (auto j = nz[nzbdp++])
{
// proceed to column i
- std::size_t pj = base::row_idx[j];
+ std::size_t pj = base_type::row_idx[j];
- while (base::col_idx[pj] < i)
+ while (base_type::col_idx[pj] < i)
pj++;
- auto f1 = - base::A[pj++] * f;
+ auto f1 = - base_type::A[pj++] * f;
// subtract row i from j
// fill-in available assumed, i.e. matrix was prepared
for (std::size_t pii = pi; pii<piie; pii++)
{
- while (base::col_idx[pj] < base::col_idx[pii])
+ while (base_type::col_idx[pj] < base_type::col_idx[pii])
pj++;
- if (base::col_idx[pj] == base::col_idx[pii])
- base::A[pj++] += base::A[pii] * f1;
+ if (base_type::col_idx[pj] == base_type::col_idx[pii])
+ base_type::A[pj++] += base_type::A[pii] * f1;
}
RHS[j] += f1 * RHS[i];
}
@@ -402,36 +387,36 @@ namespace plib
template <typename V1, typename V2>
void gaussian_back_substitution(V1 &V, const V2 &RHS)
{
- const std::size_t iN = base::size();
+ const std::size_t iN = base_type::size();
// row n-1
- V[iN - 1] = RHS[iN - 1] / base::A[base::diag[iN - 1]];
+ V[iN - 1] = RHS[iN - 1] / base_type::A[base_type::diag[iN - 1]];
for (std::size_t j = iN - 1; j-- > 0;)
{
- typename base::value_type tmp = 0;
- const auto jdiag = base::diag[j];
- const std::size_t e = base::row_idx[j+1];
+ typename base_type::value_type tmp = 0;
+ const auto jdiag = base_type::diag[j];
+ const std::size_t e = base_type::row_idx[j+1];
for (std::size_t pk = jdiag + 1; pk < e; pk++)
- tmp += base::A[pk] * V[base::col_idx[pk]];
- V[j] = (RHS[j] - tmp) / base::A[jdiag];
+ tmp += base_type::A[pk] * V[base_type::col_idx[pk]];
+ V[j] = (RHS[j] - tmp) / base_type::A[jdiag];
}
}
template <typename V1>
void gaussian_back_substitution(V1 &V)
{
- const std::size_t iN = base::size();
+ const std::size_t iN = base_type::size();
// row n-1
- V[iN - 1] = V[iN - 1] / base::A[base::diag[iN - 1]];
+ V[iN - 1] = V[iN - 1] / base_type::A[base_type::diag[iN - 1]];
for (std::size_t j = iN - 1; j-- > 0;)
{
- typename base::value_type tmp = 0;
- const auto jdiag = base::diag[j];
- const std::size_t e = base::row_idx[j+1];
+ typename base_type::value_type tmp = 0;
+ const auto jdiag = base_type::diag[j];
+ const std::size_t e = base_type::row_idx[j+1];
for (std::size_t pk = jdiag + 1; pk < e; pk++)
- tmp += base::A[pk] * V[base::col_idx[pk]];
- V[j] = (V[j] - tmp) / base::A[jdiag];
+ tmp += base_type::A[pk] * V[base_type::col_idx[pk]];
+ V[j] = (V[j] - tmp) / base_type::A[jdiag];
}
}
@@ -440,27 +425,27 @@ namespace plib
void build_parallel_gaussian_execution_scheme(const M &fill)
{
// calculate parallel scheme for gaussian elimination
- std::vector<std::vector<std::size_t>> rt(base::size());
- for (std::size_t k = 0; k < base::size(); k++)
+ std::vector<std::vector<std::size_t>> rt(base_type::size());
+ for (std::size_t k = 0; k < base_type::size(); k++)
{
- for (std::size_t j = k+1; j < base::size(); j++)
+ for (std::size_t j = k+1; j < base_type::size(); j++)
{
- if (fill[j][k] < base::FILL_INFINITY)
+ if (fill[j][k] < base_type::FILL_INFINITY)
{
rt[k].push_back(j);
}
}
}
- std::vector<std::size_t> levGE(base::size(), 0);
+ std::vector<std::size_t> levGE(base_type::size(), 0);
std::size_t cl = 0;
- for (std::size_t k = 0; k < base::size(); k++ )
+ for (std::size_t k = 0; k < base_type::size(); k++ )
{
if (levGE[k] >= cl)
{
std::vector<std::size_t> t = rt[k];
- for (std::size_t j = k+1; j < base::size(); j++ )
+ for (std::size_t j = k+1; j < base_type::size(); j++ )
{
bool overlap = false;
// is there overlap
@@ -487,7 +472,7 @@ namespace plib
m_ge_par.clear();
m_ge_par.resize(cl+1);
- for (std::size_t k = 0; k < base::size(); k++)
+ for (std::size_t k = 0; k < base_type::size(); k++)
m_ge_par[levGE[k]].push_back(k);
//for (std::size_t k = 0; k < m_ge_par.size(); k++)
// printf("%d %d\n", (int) k, (int) m_ge_par[k].size());
@@ -496,21 +481,24 @@ namespace plib
};
template<typename B>
- struct pLUmatrix_cr_t : public B
+ struct pLUmatrix_cr : public B
{
- using base = B;
- using index_type = typename base::index_type;
+ using base_type = B;
+ using index_type = typename base_type::index_type;
- PCOPYASSIGNMOVE(pLUmatrix_cr_t, default)
+ pLUmatrix_cr(const pLUmatrix_cr &) = default;
+ pLUmatrix_cr &operator=(const pLUmatrix_cr &) = default;
+ pLUmatrix_cr(pLUmatrix_cr &&) noexcept(std::is_nothrow_move_constructible<base_type>::value) = default;
+ pLUmatrix_cr &operator=(pLUmatrix_cr &&) noexcept(std::is_nothrow_move_assignable<base_type>::value) = default;
- explicit pLUmatrix_cr_t(std::size_t n)
+ explicit pLUmatrix_cr(std::size_t n)
: B(n)
, ilu_rows(n+1)
, m_ILUp(0)
{
}
- ~pLUmatrix_cr_t() = default;
+ ~pLUmatrix_cr() = default;
template <typename M>
void build(M &fill, std::size_t ilup)
@@ -560,7 +548,7 @@ namespace plib
/// k=k+1
/// i=i+1
///
- void incomplete_LU_factorization(const base &mat)
+ void incomplete_LU_factorization(const base_type &mat)
{
if (m_ILUp < 1)
this->raw_copy_from(mat);
@@ -570,27 +558,27 @@ namespace plib
std::size_t p(0);
while (auto i = ilu_rows[p++]) // NOLINT(bugprone-infinite-loop)
{
- const auto p_i_end = base::row_idx[i + 1];
+ const auto p_i_end = base_type::row_idx[i + 1];
// loop over all columns k left of diag in row i
//if (row_idx[i] < diag[i])
// printf("occ %d\n", (int)i);
- for (auto i_k = base::row_idx[i]; i_k < base::diag[i]; i_k++)
+ for (auto i_k = base_type::row_idx[i]; i_k < base_type::diag[i]; i_k++)
{
- const auto k(base::col_idx[i_k]);
- const auto p_k_end(base::row_idx[k + 1]);
- const typename base::value_type LUp_i_k = base::A[i_k] = base::A[i_k] / base::A[base::diag[k]];
+ const auto k(base_type::col_idx[i_k]);
+ const auto p_k_end(base_type::row_idx[k + 1]);
+ const typename base_type::value_type LUp_i_k = base_type::A[i_k] = base_type::A[i_k] / base_type::A[base_type::diag[k]];
- std::size_t k_j(base::diag[k] + 1);
+ std::size_t k_j(base_type::diag[k] + 1);
std::size_t i_j(i_k + 1);
while (i_j < p_i_end && k_j < p_k_end ) // pj = (i, j)
{
// we can assume that within a row ja increases continuously
- const std::size_t c_i_j(base::col_idx[i_j]); // row i, column j
- const auto c_k_j(base::col_idx[k_j]); // row k, column j
+ const std::size_t c_i_j(base_type::col_idx[i_j]); // row i, column j
+ const auto c_k_j(base_type::col_idx[k_j]); // row k, column j
if (c_k_j == c_i_j)
- base::A[i_j] -= LUp_i_k * base::A[k_j];
+ base_type::A[i_j] -= LUp_i_k * base_type::A[k_j];
k_j += (c_k_j <= c_i_j ? 1 : 0);
i_j += (c_k_j >= c_i_j ? 1 : 0);
@@ -625,32 +613,32 @@ namespace plib
template <typename R>
void solveLU (R &r)
{
- for (std::size_t i = 1; i < base::size(); ++i )
+ for (std::size_t i = 1; i < base_type::size(); ++i )
{
- typename base::value_type tmp(0);
- const auto j1(base::row_idx[i]);
- const auto j2(base::diag[i]);
+ typename base_type::value_type tmp(0);
+ const auto j1(base_type::row_idx[i]);
+ const auto j2(base_type::diag[i]);
for (auto j = j1; j < j2; ++j )
- tmp += base::A[j] * r[base::col_idx[j]];
+ tmp += base_type::A[j] * r[base_type::col_idx[j]];
r[i] -= tmp;
}
// i now is equal to n;
- for (std::size_t i = base::size(); i-- > 0; )
+ for (std::size_t i = base_type::size(); i-- > 0; )
{
- typename base::value_type tmp(0);
- const auto di(base::diag[i]);
- const auto j2(base::row_idx[i+1]);
+ typename base_type::value_type tmp(0);
+ const auto di(base_type::diag[i]);
+ const auto j2(base_type::row_idx[i+1]);
for (std::size_t j = di + 1; j < j2; j++ )
- tmp += base::A[j] * r[base::col_idx[j]];
- r[i] = (r[i] - tmp) / base::A[di];
+ tmp += base_type::A[j] * r[base_type::col_idx[j]];
+ r[i] = (r[i] - tmp) / base_type::A[di];
}
}
private:
- parray<index_type, base::Np1> ilu_rows;
+ parray<index_type, base_type::Np1> ilu_rows;
std::size_t m_ILUp;
};
} // namespace plib
-#endif // MAT_CR_H_
+#endif // PMATRIX_CR_H_
diff --git a/src/lib/netlist/plib/pmempool.h b/src/lib/netlist/plib/pmempool.h
index 4e678cb09d6..b83f08e0f49 100644
--- a/src/lib/netlist/plib/pmempool.h
+++ b/src/lib/netlist/plib/pmempool.h
@@ -168,8 +168,11 @@ namespace plib {
struct info
{
info(block *b, size_type p) : m_block(b), m_pos(p) { }
+ info(const info &) = default;
+ info &operator=(const info &) = default;
+ info(info &&) noexcept = default;
+ info &operator=(info &&) noexcept = default;
~info() = default;
- PCOPYASSIGNMOVE(info, default)
block * m_block;
size_type m_pos;
diff --git a/src/lib/netlist/plib/pmulti_threading.h b/src/lib/netlist/plib/pmulti_threading.h
index 9f470054e2d..7c58a936636 100644
--- a/src/lib/netlist/plib/pmulti_threading.h
+++ b/src/lib/netlist/plib/pmulti_threading.h
@@ -23,9 +23,9 @@ namespace plib {
struct pspin_mutex
{
public:
- pspin_mutex() noexcept = default;
- void lock() noexcept{ while (m_lock.test_and_set(std::memory_order_acquire)) { } }
- void unlock() noexcept { m_lock.clear(std::memory_order_release); }
+ inline pspin_mutex() noexcept = default;
+ inline void lock() noexcept{ while (m_lock.test_and_set(std::memory_order_acquire)) { } }
+ inline void unlock() noexcept { m_lock.clear(std::memory_order_release); }
private:
PALIGNAS_CACHELINE()
std::atomic_flag m_lock = ATOMIC_FLAG_INIT;
@@ -35,8 +35,9 @@ namespace plib {
struct pspin_mutex<false>
{
public:
- void lock() const noexcept { }
- void unlock() const noexcept { }
+ inline pspin_mutex() noexcept = default;
+ static inline void lock() /*const*/ noexcept { }
+ static inline void unlock() /*const*/ noexcept { }
};
class psemaphore
diff --git a/src/lib/netlist/plib/poptions.h b/src/lib/netlist/plib/poptions.h
index 714a357da86..a0368ebdc09 100644
--- a/src/lib/netlist/plib/poptions.h
+++ b/src/lib/netlist/plib/poptions.h
@@ -261,12 +261,12 @@ namespace plib {
return nullptr;
}
- option *getopt_short(const pstring &arg) const;
- option *getopt_long(const pstring &arg) const;
+ option *getopt_short(const pstring &arg) const;
+ option *getopt_long(const pstring &arg) const;
- std::vector<option_base *> m_opts;
- pstring m_app;
- option_args * m_other_args;
+ std::vector<option_base *> m_opts;
+ pstring m_app;
+ option_args * m_other_args;
};
} // namespace plib
diff --git a/src/lib/netlist/plib/ppmf.h b/src/lib/netlist/plib/ppmf.h
index e86c94ff4c9..e37f970cc05 100644
--- a/src/lib/netlist/plib/ppmf.h
+++ b/src/lib/netlist/plib/ppmf.h
@@ -377,7 +377,7 @@ namespace plib {
bind<specific_member_function<O>>(object, &mftp);
}
- inline R operator()(Targs... args) const noexcept(true)
+ R operator()(Targs... args) const noexcept(true)
{
return this->call(std::forward<Targs>(args)...);
}
diff --git a/src/lib/netlist/plib/ppreprocessor.cpp b/src/lib/netlist/plib/ppreprocessor.cpp
index 320cbe23857..c203fea1753 100644
--- a/src/lib/netlist/plib/ppreprocessor.cpp
+++ b/src/lib/netlist/plib/ppreprocessor.cpp
@@ -245,10 +245,10 @@ namespace plib {
else
{
pstring tok=tmp[pi];
- if (tok.size() >= 2 && pi < tmp.size() - 2 )
+ if (tok.length() >= 2 && pi < tmp.size() - 2 )
{
auto sc=tok.substr(0,1);
- auto ec=tok.substr(tok.size()-1, 1);
+ auto ec=tok.substr(tok.length()-1, 1);
if ((sc == "." || (sc>="0" && sc<="9")) && (ec=="e" || ec=="E"))
{
// looks like an incomplete float due splitting by - or +
@@ -496,7 +496,7 @@ namespace plib {
{
bool line_cont = plib::right(line_in, 1) == "\\";
- pstring line = line_cont ? plib::left(line_in, line_in.size() - 1) : line_in;
+ pstring line = line_cont ? plib::left(line_in, line_in.length() - 1) : line_in;
if (m_state == LINE_CONTINUATION)
m_line += line;
diff --git a/src/lib/netlist/plib/prandom.h b/src/lib/netlist/plib/prandom.h
index b2f9c89a9cf..669228f23fe 100644
--- a/src/lib/netlist/plib/prandom.h
+++ b/src/lib/netlist/plib/prandom.h
@@ -101,7 +101,7 @@ namespace plib
}
private:
- void twist()
+ void twist() noexcept
{
const T lowest_w(~T(0) >> (sizeof(T)*8 - w));
const T lower_mask((T(1) << r) - 1); // That is, the binary number of r 1's
@@ -121,10 +121,10 @@ namespace plib
};
template <typename FT, typename T>
- FT normalize_uniform(T &p, FT m = constants<FT>::one(), FT b = constants<FT>::zero())
+ FT normalize_uniform(T &p, FT m = constants<FT>::one(), FT b = constants<FT>::zero()) noexcept
{
- const auto mmin(narrow_cast<FT>(p.min()));
- const auto mmax(narrow_cast<FT>(p.max()));
+ constexpr const auto mmin(narrow_cast<FT>(T::min()));
+ constexpr const auto mmax(narrow_cast<FT>(T::max()));
// -> 0 to a
return (narrow_cast<FT>(p())- mmin) / (mmax - mmin) * m - b;
}
diff --git a/src/lib/netlist/plib/pstream.h b/src/lib/netlist/plib/pstream.h
index 65d95293298..bdbcb34b099 100644
--- a/src/lib/netlist/plib/pstream.h
+++ b/src/lib/netlist/plib/pstream.h
@@ -28,7 +28,7 @@ namespace plib {
/// \brief wrapper around isteam read
///
template <typename S, typename T>
- static inline S & istream_read(S &is, T * data, size_t len)
+ static S & istream_read(S &is, T * data, size_t len)
{
using ct = typename S::char_type;
static_assert((sizeof(T) % sizeof(ct)) == 0, "istream_read sizeof issue");
@@ -39,7 +39,7 @@ namespace plib {
/// \brief wrapper around osteam write
///
template <typename S, typename T>
- static inline S & ostream_write(S &os, const T * data, size_t len)
+ static S & ostream_write(S &os, const T * data, size_t len)
{
using ct = typename S::char_type;
static_assert((sizeof(T) % sizeof(ct)) == 0, "ostream_write sizeof issue");
@@ -64,7 +64,7 @@ namespace plib {
}
istream_uptr(const istream_uptr &) = delete;
istream_uptr &operator=(const istream_uptr &) = delete;
- istream_uptr(istream_uptr &&rhs)
+ istream_uptr(istream_uptr &&rhs) noexcept
{
m_strm = std::move(rhs.m_strm);
m_filename = std::move(rhs.m_filename);
@@ -228,7 +228,7 @@ public:
// NOLINTNEXTLINE(performance-unnecessary-copy-initialization)
const putf8string conv_utf8(text);
//m_strm->write(conv_utf8.c_str(), static_cast<std::streamsize>(plib::strlen(conv_utf8.c_str() )));
- ostream_write(*m_strm, conv_utf8.c_str(), string_info<putf8string>::mem_size(conv_utf8));
+ ostream_write(*m_strm, conv_utf8.c_str(), conv_utf8.size());
}
void write(const pstring::value_type c) const
@@ -290,7 +290,7 @@ public:
{
const auto *sm = s.c_str();
//const auto sl(std::char_traits<pstring::mem_t>::length(sm));
- const auto sl(string_info<pstring>::mem_size(s));
+ const auto sl(s.size());
write(sl);
ostream_write(m_strm, sm, sl);
}
diff --git a/src/lib/netlist/plib/pstring.h b/src/lib/netlist/plib/pstring.h
index 9a58e75fbd3..6af155a640c 100644
--- a/src/lib/netlist/plib/pstring.h
+++ b/src/lib/netlist/plib/pstring.h
@@ -178,11 +178,23 @@ public:
const_iterator cend() const noexcept { return const_iterator(m_str.end()); }
// C string conversion helpers
- const mem_t *c_str() const noexcept { return static_cast<const mem_t *>(m_str.c_str()); }
- const mem_t *data() const noexcept { return c_str(); }
-
+ const mem_t *c_str() const noexcept { return static_cast<const mem_t *>(m_str.c_str()); }
+ const mem_t *data() const noexcept { return c_str(); }
+
+ /// \brief return number of codes in the string
+ ///
+ /// This may report a number less than what \ref size reports. pstrings
+ /// operate on character codes. In the case of utf pstrings thus the physical size
+ /// may be bigger than the logical size.
size_type length() const noexcept { return traits_type::len(m_str); }
- size_type size() const noexcept { return traits_type::len(m_str); }
+
+ /// \brief return number of memory units in the string
+ ///
+ /// This function returns the number of memory units used by a string.
+ /// Depending on the string type the size may be reported as bytes, words
+ /// or quad-words.
+ size_type size() const noexcept { return m_str.size(); }
+
bool empty() const noexcept { return m_str.empty(); }
void clear() noexcept { m_str.clear(); }
@@ -478,14 +490,18 @@ namespace plib
struct string_info<pstring_t<T>>
{
using mem_t = typename T::mem_t;
+#if 0
static std::size_t mem_size(const pstring_t<T> &s) { return s.mem_t_size(); }
+#endif
};
template<typename T>
struct string_info<std::basic_string<T>>
{
using mem_t = T;
+#if 0
static std::size_t mem_size(const std::basic_string<T> &s) { return s.size(); }
+#endif
};
} // namespace plib
diff --git a/src/lib/netlist/plib/ptests.h b/src/lib/netlist/plib/ptests.h
index 191233f26fa..b72ef38fc5c 100644
--- a/src/lib/netlist/plib/ptests.h
+++ b/src/lib/netlist/plib/ptests.h
@@ -83,8 +83,8 @@ namespace testing
Test(const Test &) = delete;
Test &operator=(const Test &) = delete;
- Test(Test &&) noexcept = delete;
- Test &operator=(Test &&) noexcept = delete;
+ Test(Test &&) = delete;
+ Test &operator=(Test &&) = delete;
virtual void run() {}
virtual void SetUp() {}
@@ -102,8 +102,8 @@ namespace testing
reg_entry_base(const reg_entry_base &) = delete;
reg_entry_base &operator=(const reg_entry_base &) = delete;
- reg_entry_base(reg_entry_base &&) noexcept = delete;
- reg_entry_base &operator=(reg_entry_base &&) noexcept = delete;
+ reg_entry_base(reg_entry_base &&) = delete;
+ reg_entry_base &operator=(reg_entry_base &&) = delete;
virtual ~reg_entry_base() = default;
diff --git a/src/lib/netlist/plib/ptime.h b/src/lib/netlist/plib/ptime.h
index 0f88449500b..528a0bbd503 100644
--- a/src/lib/netlist/plib/ptime.h
+++ b/src/lib/netlist/plib/ptime.h
@@ -53,12 +53,19 @@ namespace plib
constexpr explicit ptime(const internal_type nom, const internal_type den) noexcept
: m_time(nom * (RES / den)) { }
- template <typename O>
- constexpr explicit ptime(const ptime<O, RES> &rhs) noexcept
+ template <typename O, typename = std::enable_if_t<ptime_le<ptime<O, RES>, ptime>::value>>
+ constexpr ptime(const ptime<O, RES> &rhs) noexcept
: m_time(static_cast<TYPE>(rhs.m_time))
{
}
+ template <typename O, typename T = std::enable_if_t<!ptime_le<ptime<O, RES>, ptime>::value, int>>
+ constexpr explicit ptime(const ptime<O, RES> &rhs, T dummy = 0) noexcept
+ : m_time(static_cast<TYPE>(rhs.m_time))
+ {
+ plib::unused_var(dummy);
+ }
+
template <typename O>
constexpr ptime &operator+=(const ptime<O, RES> &rhs) noexcept
{
@@ -90,7 +97,7 @@ namespace plib
}
template <typename O>
- constexpr ptime operator+(const ptime<O, RES> &rhs) const noexcept
+ constexpr ptime operator+(ptime<O, RES> rhs) const noexcept
{
static_assert(ptime_le<ptime<O, RES>, ptime>::value, "Invalid ptime type");
return ptime(m_time + rhs.m_time);
@@ -128,7 +135,8 @@ namespace plib
template <typename O>
friend constexpr bool operator>(const ptime &lhs, const ptime<O, RES> &rhs) noexcept
{
- return (rhs < lhs);
+ static_assert(ptime_le<ptime<O, RES>, ptime>::value, "Invalid ptime type");
+ return (lhs.m_time > rhs.as_raw());
}
template <typename O>
@@ -146,7 +154,7 @@ namespace plib
template <typename O>
friend constexpr bool operator==(const ptime &lhs, const ptime<O, RES> &rhs) noexcept
{
- return lhs.m_time == rhs.m_time;
+ return lhs.m_time == rhs.as_raw();
}
template <typename O>
@@ -173,9 +181,7 @@ namespace plib
constexpr ptime shr(unsigned shift) const noexcept { return ptime(m_time >> shift); }
// for save states ....
-#if 0
- constexpr internal_type *get_internaltype_ptr() noexcept { return &m_time; }
-#endif
+
template <typename ST>
void save_state(ST &&st)
{
diff --git a/src/lib/netlist/plib/ptimed_queue.h b/src/lib/netlist/plib/ptimed_queue.h
index dc8db7c9bcc..33c14f3bdb9 100644
--- a/src/lib/netlist/plib/ptimed_queue.h
+++ b/src/lib/netlist/plib/ptimed_queue.h
@@ -36,9 +36,12 @@ namespace plib {
struct pqentry_t final
{
constexpr pqentry_t() noexcept : m_exec_time(), m_object(nullptr) { }
- constexpr pqentry_t(Time t, Element o) noexcept : m_exec_time(t), m_object(o) { }
+ constexpr pqentry_t(const Time &t, const Element &o) noexcept : m_exec_time(t), m_object(o) { }
- PCOPYASSIGNMOVE(pqentry_t, default)
+ pqentry_t(const pqentry_t &) = default;
+ pqentry_t &operator=(const pqentry_t &) = default;
+ pqentry_t(pqentry_t &&) noexcept = default;
+ pqentry_t &operator=(pqentry_t &&) noexcept = default;
~pqentry_t() = default;
@@ -64,8 +67,8 @@ namespace plib {
static constexpr pqentry_t never() noexcept { return pqentry_t(Time::never(), nullptr); }
- constexpr Time exec_time() const noexcept { return m_exec_time; }
- constexpr Element object() const noexcept { return m_object; }
+ constexpr const Time &exec_time() const noexcept { return m_exec_time; }
+ constexpr const Element &object() const noexcept { return m_object; }
private:
Time m_exec_time;
Element m_object;
@@ -147,6 +150,7 @@ namespace plib {
}
void pop() noexcept { --m_end; }
+
const T &top() const noexcept { return *(m_end-1); }
template <bool KEEPSTAT, class R>
@@ -165,34 +169,7 @@ namespace plib {
return;
}
}
- }
-
- template <bool KEEPSTAT, class R>
- void retime(R && elem) noexcept
- {
- // Lock
- lock_guard_type lck(m_lock);
- if (KEEPSTAT)
- m_prof_retime.inc();
-
- for (R * i = m_end - 1; i > &m_list[0]; --i)
- {
- if (*i == elem) // partial equal!
- {
- *i = std::forward<R>(elem);
- while (*(i-1) < *i)
- {
- std::swap(*(i-1), *i);
- --i;
- }
- while (i < m_end && *i < *(i+1))
- {
- std::swap(*(i+1), *i);
- ++i;
- }
- return;
- }
- }
+ //printf("Element not found in delete %s\n", elem->name().c_str());
}
void clear() noexcept
@@ -226,7 +203,6 @@ namespace plib {
pperfcount_t<true> m_prof_sortmove; // NOLINT
pperfcount_t<true> m_prof_call; // NOLINT
pperfcount_t<true> m_prof_remove; // NOLINT
- pperfcount_t<true> m_prof_retime; // NOLINT
};
template <class T, bool TS>
@@ -236,7 +212,7 @@ namespace plib {
struct compare
{
- constexpr bool operator()(const T &a, const T &b) const { return b <= a; }
+ constexpr bool operator()(const T &a, const T &b) const noexcept { return b <= a; }
};
explicit timed_queue_heap(const std::size_t list_size)
@@ -251,6 +227,17 @@ namespace plib {
std::size_t capacity() const noexcept { return m_list.capacity(); }
bool empty() const noexcept { return &m_list[0] == m_end; }
+ template<bool KEEPSTAT, typename... Args>
+ void emplace(Args&&... args) noexcept
+ {
+ // Lock
+ lock_guard_type lck(m_lock);
+ *m_end++ = T(std::forward<Args>(args)...);
+ std::push_heap(&m_list[0], m_end, compare());
+ if (KEEPSTAT)
+ m_prof_call.inc();
+ }
+
template <bool KEEPSTAT>
void push(T &&e) noexcept
{
@@ -262,12 +249,10 @@ namespace plib {
m_prof_call.inc();
}
- T pop() noexcept
+ void pop() noexcept
{
- T ret(m_list[0]);
std::pop_heap(&m_list[0], m_end, compare());
m_end--;
- return ret;
}
const T &top() const noexcept { return m_list[0]; }
@@ -291,24 +276,6 @@ namespace plib {
}
}
- template <bool KEEPSTAT>
- void retime(const T &elem) noexcept
- {
- // Lock
- lock_guard_type lck(m_lock);
- if (KEEPSTAT)
- m_prof_retime.inc();
- for (T * i = m_end - 1; i >= &m_list[0]; i--)
- {
- if (*i == elem) // partial equal!
- {
- *i = elem;
- std::make_heap(&m_list[0], m_end, compare());
- return;
- }
- }
- }
-
void clear()
{
lock_guard_type lck(m_lock);
@@ -325,19 +292,17 @@ namespace plib {
using mutex_type = pspin_mutex<TS>;
using lock_guard_type = std::lock_guard<mutex_type>;
- mutex_type m_lock;
- std::vector<T> m_list;
- T *m_end;
+ mutex_type m_lock;
+ T * m_end;
+ aligned_vector<T> m_list;
public:
// profiling
pperfcount_t<true> m_prof_sortmove; // NOLINT
pperfcount_t<true> m_prof_call; // NOLINT
pperfcount_t<true> m_prof_remove; // NOLINT
- pperfcount_t<true> m_prof_retime; // NOLINT
};
} // namespace plib
#endif // PTIMED_QUEUE_H_
-#include <cstdlib>
diff --git a/src/lib/netlist/plib/vector_ops.h b/src/lib/netlist/plib/vector_ops.h
index 6d20b9213a7..86c860b71cb 100644
--- a/src/lib/netlist/plib/vector_ops.h
+++ b/src/lib/netlist/plib/vector_ops.h
@@ -11,6 +11,7 @@
///
///
#include "pconfig.h"
+#include "pgsl.h"
#include "pmath.h"
#include <algorithm>
@@ -27,75 +28,76 @@
namespace plib
{
template<typename VT, typename T>
- void vec_set_scalar(const std::size_t n, VT &v, T && scalar) noexcept
+ void vec_set_scalar(VT &v, T && scalar) noexcept
{
+ const std::size_t n(v.size());
const typename std::remove_reference<decltype(v[0])>::type s(std::forward<T>(scalar));
for ( std::size_t i = 0; i < n; i++ )
v[i] = s;
}
template<typename VT, typename VS>
- void vec_set(const std::size_t n, VT &v, const VS & source) noexcept
+ void vec_set(VT &v, const VS & source) noexcept
{
+ const std::size_t n(v.size());
+ gsl_Expects(n <= source.size());
for ( std::size_t i = 0; i < n; i++ )
v[i] = source[i];
}
template<typename T, typename V1, typename V2>
- T vec_mult(const std::size_t n, const V1 & v1, const V2 & v2 ) noexcept
+ T vec_mult(const V1 & v1, const V2 & v2 ) noexcept
{
- using b8 = std::array<T, 8>; // NOLINT
- PALIGNAS_VECTOROPT() b8 value = {0};
+ const std::size_t n(v1.size());
+ gsl_Expects(n <= v2.size());
+ T ret(plib::constants<T>::zero());
for (std::size_t i = 0; i < n ; i++ )
{
- value[i & 7] += v1[i] * v2[i]; // NOLINT
+ ret += v1[i] * v2[i]; // NOLINT
}
- return value[0] + value[1] + value[2] + value[3] + value[4] + value[5] + value[6] + value[7]; // NOLINT
+ return ret;
}
template<typename T, typename VT>
- T vec_mult2(const std::size_t n, const VT &v) noexcept
+ T vec_mult2(const VT &v) noexcept
{
- using b8 = std::array<T, 8>;
- PALIGNAS_VECTOROPT() b8 value = {0};
+ const std::size_t n(v.size());
+ T ret(plib::constants<T>::zero());
for (std::size_t i = 0; i < n ; i++ )
{
- value[i & 7] += v[i] * v[i];
+ ret += v[i] * v[i];
}
- return value[0] + value[1] + value[2] + value[3] + value[4] + value[5] + value[6] + value[7];
+ return ret;
}
template<typename T, typename VT>
- T vec_sum(const std::size_t n, const VT &v) noexcept
+ T vec_sum(const VT &v) noexcept
{
- if (n<8)
+ const std::size_t n(v.size());
+ T ret(plib::constants<T>::zero());
+ for (std::size_t i = 0; i < n ; i++ )
{
- T value(0);
- for (std::size_t i = 0; i < n ; i++ )
- value += v[i];
-
- return value;
+ ret += v[i];
}
- using b8 = std::array<T, 8>;
- PALIGNAS_VECTOROPT() b8 value = {0};
- for (std::size_t i = 0; i < n ; i++ )
- value[i & 7] += v[i];
-
- return ((value[0] + value[1]) + (value[2] + value[3])) + ((value[4] + value[5]) + (value[6] + value[7]));
+ return ret;
}
template<typename VV, typename T, typename VR>
- void vec_mult_scalar(const std::size_t n, VR & result, const VV & v, T && scalar) noexcept
+ void vec_mult_scalar(VR & result, const VV & v, T && scalar) noexcept
{
+ const std::size_t n(result.size());
+ gsl_Expects(n <= v.size());
const typename std::remove_reference<decltype(v[0])>::type s(std::forward<T>(scalar));
for ( std::size_t i = 0; i < n; i++ )
result[i] = s * v[i];
}
template<typename VR, typename VV, typename T>
- void vec_add_mult_scalar(const std::size_t n, VR & result, const VV & v, T && scalar) noexcept
+ void vec_add_mult_scalar(VR & result, const VV & v, T && scalar) noexcept
{
+ const std::size_t n(result.size());
+ gsl_Expects(n <= v.size());
const typename std::remove_reference<decltype(v[0])>::type s(std::forward<T>(scalar));
for ( std::size_t i = 0; i < n; i++ )
result[i] += s * v[i];
@@ -109,31 +111,38 @@ namespace plib
}
template<typename R, typename V>
- void vec_add_ip(const std::size_t n, R & result, const V & v) noexcept
+ void vec_add_ip(R & result, const V & v) noexcept
{
+ const std::size_t n(result.size());
+ gsl_Expects(n <= v.size());
for ( std::size_t i = 0; i < n; i++ )
result[i] += v[i];
}
template<typename VR, typename V1, typename V2>
- void vec_sub(const std::size_t n, VR & result, const V1 &v1, const V2 & v2) noexcept
+ void vec_sub(VR & result, const V1 &v1, const V2 & v2) noexcept
{
+ const std::size_t n(result.size());
+ gsl_Expects(n <= v1.size());
+ gsl_Expects(n <= v2.size());
for ( std::size_t i = 0; i < n; i++ )
result[i] = v1[i] - v2[i];
}
template<typename V, typename T>
- void vec_scale(const std::size_t n, V & v, T &&scalar) noexcept
+ void vec_scale(V & v, T &&scalar) noexcept
{
+ const std::size_t n(v.size());
const typename std::remove_reference<decltype(v[0])>::type s(std::forward<T>(scalar));
for ( std::size_t i = 0; i < n; i++ )
v[i] *= s;
}
template<typename T, typename V>
- T vec_maxabs(const std::size_t n, const V & v) noexcept
+ T vec_maxabs(const V & v) noexcept
{
- T ret = 0.0;
+ const std::size_t n(v.size());
+ T ret(plib::constants<T>::zero());
for ( std::size_t i = 0; i < n; i++ )
ret = std::max(ret, plib::abs(v[i]));
diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp
index 44b96bf0d6d..21f1f0725fa 100644
--- a/src/lib/netlist/prg/nltool.cpp
+++ b/src/lib/netlist/prg/nltool.cpp
@@ -82,7 +82,6 @@ public:
opt_type(*this, "y", "type", 0, std::vector<pstring>({"spice","eagle","rinf"}), "type of file to be converted: spice,eagle,rinf"),
opt_grp6(*this, "Options for validate command", "These options are only used by the validate command."),
- opt_extended_validation(*this, "", "extended", "Identify issues with power terminals."),
opt_grp7(*this, "Options for header command", "These options are only used by the header command."),
opt_tabwidth(*this, "", "tab-width", 4, "Tab width for output."),
@@ -153,7 +152,6 @@ private:
plib::option_str_limit<unsigned> opt_type;
plib::option_group opt_grp6;
- plib::option_bool opt_extended_validation;
plib::option_group opt_grp7;
plib::option_num<unsigned> opt_tabwidth;
plib::option_num<unsigned> opt_linewidth;
@@ -548,8 +546,6 @@ void tool_app_t::validate()
m_errors = 0;
m_warnings = 0;
- nt.set_extended_validation(opt_extended_validation());
-
try
{
nt.read_netlist(opt_files()[0], opt_name(),
@@ -707,7 +703,7 @@ void tool_app_t::static_compile()
for (auto &e : map)
{
sout << "// " << putf8string(e.second.m_module) << "\n";
- sout << "\t{\"" << putf8string(e.first) << "\", reinterpret_cast<void *>(&" << putf8string(e.first) << ")},\n";
+ sout << "\t{\"" << putf8string(e.first) << "\", reinterpret_cast<void *>(&" << putf8string(e.first) << ")}, // NOLINT\n";
}
sout << "#endif\n\n";
sout << "{\"\", nullptr}\n";
@@ -1178,7 +1174,7 @@ void tool_app_t::listmodels()
{
auto model = nt.setup().models().get_model(e);
- elems.push_back({model.type(), e});
+ elems.emplace_back(model.type(), e);
}
std::sort(elems.begin(), elems.end(), comp);
diff --git a/src/lib/netlist/solver/nld_matrix_solver.cpp b/src/lib/netlist/solver/nld_matrix_solver.cpp
index 4076de4bd12..944234fa8c8 100644
--- a/src/lib/netlist/solver/nld_matrix_solver.cpp
+++ b/src/lib/netlist/solver/nld_matrix_solver.cpp
@@ -86,15 +86,15 @@ namespace solver
for (std::size_t k = 0; k < nets.size(); k++)
{
- analog_net_t *net = nets[k];
+ analog_net_t &net = *nets[k];
- log().debug("adding net with {1} populated connections\n", net->core_terms().size());
+ log().debug("adding net with {1} populated connections\n", setup.nlstate().core_terms(net).size());
- net->set_solver(this);
+ net.set_solver(this);
- for (auto &p : net->core_terms())
+ for (auto &p : setup.nlstate().core_terms(net))
{
- log().debug("{1} {2} {3}\n", p->name(), net->name(), net->is_rail_net());
+ log().debug("{1} {2} {3}\n", p->name(), net.name(), net.is_rail_net());
switch (p->type())
{
case detail::terminal_type::TERMINAL:
@@ -476,7 +476,7 @@ namespace solver
resched = solve_nr_base();
// update timestep calculation
next_time_step = compute_next_timestep(m_params.m_min_ts_ts(), m_params.m_min_ts_ts(), m_params.m_max_timestep);
- delta -= netlist_time_ext::from_fp(m_params.m_min_ts_ts());
+ delta -= netlist_time::from_fp(m_params.m_min_ts_ts());
}
// try remaining time using compute_next_timestep
while (delta > netlist_time::zero())
@@ -507,13 +507,13 @@ namespace solver
netlist_time matrix_solver_t::solve(netlist_time_ext now, const char *source)
{
- netlist_time_ext delta = now - m_last_step();
+ netlist_time delta = static_cast<netlist_time>(now - m_last_step());
PFDEBUG(printf("solve %.10f\n", delta.as_double());)
plib::unused_var(source);
// We are already up to date. Avoid oscillations.
// FIXME: Make this a parameter!
- if (delta < netlist_time_ext::quantum())
+ if (delta < netlist_time::quantum())
{
//printf("solve return %s at %f\n", source, now.as_double());
return timestep_device_count() > 0 ? netlist_time::from_fp(m_params.m_min_timestep) : netlist_time::zero();
diff --git a/src/lib/netlist/solver/nld_matrix_solver.h b/src/lib/netlist/solver/nld_matrix_solver.h
index 4e392c88770..1ba3b99e012 100644
--- a/src/lib/netlist/solver/nld_matrix_solver.h
+++ b/src/lib/netlist/solver/nld_matrix_solver.h
@@ -10,10 +10,10 @@
#include "nl_base.h"
#include "nl_errstr.h"
-#include "plib/mat_cr.h"
#include "plib/palloc.h"
#include "plib/penum.h"
#include "plib/pmatrix2d.h"
+#include "plib/pmatrix_cr.h"
#include "plib/pmempool.h"
#include "plib/putil.h"
#include "plib/vector_ops.h"
@@ -74,7 +74,7 @@ namespace solver
constexpr nl_fptype m_vntol() { return nlconst::magic(1e-7); }
constexpr nl_fptype m_accuracy() { return nlconst::magic(1e-7); }
constexpr std::size_t m_nr_loops() { return 250; }
- constexpr std::size_t m_gs_loops() { return 9; }
+ constexpr std::size_t m_gs_loops() { return 50; }
// general parameters
constexpr nl_fptype m_gmin() { return nlconst::magic(1e-9); }
diff --git a/src/lib/netlist/solver/nld_ms_gcr.h b/src/lib/netlist/solver/nld_ms_gcr.h
index 61bfa012fa7..73f9eb83c0d 100644
--- a/src/lib/netlist/solver/nld_ms_gcr.h
+++ b/src/lib/netlist/solver/nld_ms_gcr.h
@@ -10,12 +10,10 @@
/// Gaussian elimination using compressed row format.
///
-#include "plib/mat_cr.h"
-
-//#include "nld_ms_direct.h"
#include "nld_matrix_solver_ext.h"
#include "nld_solver.h"
#include "plib/pdynlib.h"
+#include "plib/pmatrix_cr.h"
#include "plib/pstream.h"
#include "plib/vector_ops.h"
@@ -31,7 +29,7 @@ namespace solver
{
public:
- using mat_type = plib::pGEmatrix_cr_t<plib::pmatrix_cr_t<FT, SIZE>>;
+ using mat_type = plib::pGEmatrix_cr<plib::pmatrix_cr<FT, SIZE>>;
using base_type = matrix_solver_ext_t<FT, SIZE>;
using fptype = typename base_type::fptype;
@@ -95,10 +93,7 @@ namespace solver
// FIXME: Move me
//
- // During extended validation there is no reason to check for
- // differences in the generated code since during
- // extended validation this will be different (and non-functional)
- if (!this->state().is_extended_validation() && this->state().static_solver_lib().isLoaded())
+ if (this->state().static_solver_lib().isLoaded())
{
pstring symname = static_compile_name();
m_proc.load(this->state().static_solver_lib(), symname);
@@ -119,7 +114,7 @@ namespace solver
private:
- using mat_index_type = typename plib::pmatrix_cr_t<FT, SIZE>::index_type;
+ using mat_index_type = typename plib::pmatrix_cr<FT, SIZE>::index_type;
void generate_code(plib::putf8_fmt_writer &strm);
diff --git a/src/lib/netlist/solver/nld_ms_gmres.h b/src/lib/netlist/solver/nld_ms_gmres.h
index c702d2e3ba6..da18050dca8 100644
--- a/src/lib/netlist/solver/nld_ms_gmres.h
+++ b/src/lib/netlist/solver/nld_ms_gmres.h
@@ -12,8 +12,8 @@
#include "nld_ms_direct.h"
#include "nld_solver.h"
#include "plib/gmres.h"
-#include "plib/mat_cr.h"
#include "plib/parray.h"
+#include "plib/pmatrix_cr.h"
#include "plib/vector_ops.h"
#include <algorithm>
@@ -83,7 +83,7 @@ namespace solver
private:
- using mattype = typename plib::pmatrix_cr_t<FT, SIZE>::index_type;
+ using mattype = typename plib::pmatrix_cr<FT, SIZE>::index_type;
//plib::mat_precondition_none<FT, SIZE> m_ops;
plib::mat_precondition_ILU<FT, SIZE> m_ops;
diff --git a/src/lib/netlist/solver/nld_solver.cpp b/src/lib/netlist/solver/nld_solver.cpp
index 9ea31925b98..b475b282eb8 100644
--- a/src/lib/netlist/solver/nld_solver.cpp
+++ b/src/lib/netlist/solver/nld_solver.cpp
@@ -4,6 +4,7 @@
#include "nl_factory.h"
#include "core/setup.h"
+#include "nl_errstr.h"
#include "nl_setup.h" // FIXME: only needed for splitter code
#include "nld_matrix_solver.h"
#include "nld_ms_direct.h"
@@ -33,7 +34,7 @@ namespace devices
NETLIB_RESET(solver)
{
- if (exec().use_stats())
+ if (exec().stats_enabled())
m_fb_step.set_delegate(NETLIB_DELEGATE(fb_step<true>));
for (auto &s : m_mat_solvers)
s->reset();
@@ -113,7 +114,7 @@ namespace devices
}
}
if (!m_queue.empty())
- m_Q_step.net().toggle_and_push_to_queue(m_queue.top().exec_time() - now);
+ m_Q_step.net().toggle_and_push_to_queue(static_cast<netlist_time>(m_queue.top().exec_time() - now));
}
void NETLIB_NAME(solver) :: reschedule(solver::matrix_solver_t *solv, netlist_time ts)
@@ -277,20 +278,20 @@ namespace devices
struct net_splitter
{
- void run(netlist_state_t &netlist)
+ void run(netlist_state_t &nlstate)
{
- for (auto & net : netlist.nets())
+ for (auto & net : nlstate.nets())
{
- netlist.log().verbose("processing {1}", net->name());
- if (!net->is_rail_net() && net->has_connections())
+ nlstate.log().verbose("processing {1}", net->name());
+ if (!net->is_rail_net() && !nlstate.core_terms(*net).empty())
{
- netlist.log().verbose(" ==> not a rail net");
+ nlstate.log().verbose(" ==> not a rail net");
// Must be an analog net
auto &n = dynamic_cast<analog_net_t &>(*net);
if (!already_processed(n))
{
groupspre.emplace_back(NETLIB_NAME(solver)::net_list_t());
- process_net(netlist, n);
+ process_net(nlstate, n);
}
}
}
@@ -343,27 +344,31 @@ namespace devices
}
// NOLINTNEXTLINE(misc-no-recursion)
- void process_net(netlist_state_t &netlist, analog_net_t &n)
+ void process_net(netlist_state_t &nlstate, analog_net_t &n)
{
// ignore empty nets. FIXME: print a warning message
- netlist.log().verbose("Net {}", n.name());
- if (n.has_connections())
+ nlstate.log().verbose("Net {}", n.name());
+ if (!nlstate.core_terms(n).empty())
{
// add the net
groupspre.back().push_back(&n);
// process all terminals connected to this net
- for (auto &term : n.core_terms())
+ for (auto &term : nlstate.core_terms(n))
{
- netlist.log().verbose("Term {} {}", term->name(), static_cast<int>(term->type()));
+ nlstate.log().verbose("Term {} {}", term->name(), static_cast<int>(term->type()));
// only process analog terminals
if (term->is_type(detail::terminal_type::TERMINAL))
{
auto &pt = dynamic_cast<terminal_t &>(*term);
// check the connected terminal
- analog_net_t &connected_net = netlist.setup().get_connected_terminal(pt)->net();
- netlist.log().verbose(" Connected net {}", connected_net.name());
- if (!check_if_processed_and_join(connected_net))
- process_net(netlist, connected_net);
+ const auto *const connected_terminals = nlstate.setup().get_connected_terminals(pt);
+ for (auto ct = connected_terminals->begin(); *ct != nullptr; ct++)
+ {
+ analog_net_t &connected_net = (*ct)->net();
+ nlstate.log().verbose(" Connected net {}", connected_net.name());
+ if (!check_if_processed_and_join(connected_net))
+ process_net(nlstate, connected_net);
+ }
}
}
}
@@ -380,9 +385,55 @@ namespace devices
net_splitter splitter;
splitter.run(state());
+ log().verbose("Found {1} net groups in {2} nets\n", splitter.groups.size(), state().nets().size());
+
+ int num_errors = 0;
+
+ log().verbose("checking net consistency ...");
+ for (const auto &grp : splitter.groups)
+ {
+ int railterms = 0;
+ pstring nets_in_grp;
+ for (const auto &n : grp)
+ {
+ nets_in_grp += (n->name() + " ");
+ if (!n->is_analog())
+ {
+ state().log().error(ME_SOLVER_CONSISTENCY_NOT_ANALOG_NET(n->name()));
+ num_errors++;
+ }
+ if (n->is_rail_net())
+ {
+ state().log().error(ME_SOLVER_CONSISTENCY_RAIL_NET(n->name()));
+ num_errors++;
+ }
+ for (const auto &t : state().core_terms(*n))
+ {
+ if (!t->has_net())
+ {
+ state().log().error(ME_SOLVER_TERMINAL_NO_NET(t->name()));
+ num_errors++;
+ }
+ else
+ {
+ auto *otherterm = dynamic_cast<terminal_t *>(t);
+ if (otherterm != nullptr)
+ if (state().setup().get_connected_terminal(*otherterm)->net().is_rail_net())
+ railterms++;
+ }
+ }
+ }
+ if (railterms == 0)
+ {
+ state().log().error(ME_SOLVER_NO_RAIL_TERMINAL(nets_in_grp));
+ num_errors++;
+ }
+ }
+ if (num_errors > 0)
+ throw nl_exception(MF_SOLVER_CONSISTENCY_ERRORS(num_errors));
+
// setup the solvers
- log().verbose("Found {1} net groups in {2} nets\n", splitter.groups.size(), state().nets().size());
for (auto & grp : splitter.groups)
{
solver_ptr ms;
@@ -421,9 +472,9 @@ namespace devices
for (auto &n : grp)
{
log().verbose("Net {1}", n->name());
- for (const auto &pcore : n->core_terms())
+ for (const auto &t : state().core_terms(*n))
{
- log().verbose(" {1}", pcore->name());
+ log().verbose(" {1}", t->name());
}
}
diff --git a/src/lib/netlist/tests/test_pfunction.cpp b/src/lib/netlist/tests/test_pfunction.cpp
index 56923be8149..21dc33f28ac 100644
--- a/src/lib/netlist/tests/test_pfunction.cpp
+++ b/src/lib/netlist/tests/test_pfunction.cpp
@@ -50,6 +50,11 @@ PTEST(pfunction, unary_minus)
PFUNCEXPECT("3*-trunc(3.2)", -9.0);
PFUNCEXPECT("3*-(3*2)", -18.0);
PFUNCEXPECT("3*-(2*1)^2", -12.0);
+ PEXPECT_NO_THROW(plib::pfunction<double>("(-3)")()); // fail
+}
+PTEST(pfunction, expect_throw)
+{
PEXPECT_THROW(plib::pfunction<double>("(3, 4)")(), plib::pexception);
- PEXPECT_NO_THROW(plib::pfunction<double>("(3)")()); // fail
+ PEXPECT_THROW(plib::pfunction<double>("((3)")(), plib::pexception);
+ PEXPECT_THROW(plib::pfunction<double>("(3))")(), plib::pexception);
}
diff --git a/src/lib/util/avhuff.cpp b/src/lib/util/avhuff.cpp
index 50eea9f24dc..ac5cea71526 100644
--- a/src/lib/util/avhuff.cpp
+++ b/src/lib/util/avhuff.cpp
@@ -691,24 +691,19 @@ avhuff_decoder::avhuff_decoder()
}
/**
- * @fn void avhuff_decoder::configure(const avhuff_decompress_config &config)
+ * @fn void avhuff_decoder::configure(const config &cfg)
*
* @brief -------------------------------------------------
* configure - configure decompression parameters
* -------------------------------------------------.
*
- * @param config The configuration.
+ * @param cfg The configuration.
*/
-void avhuff_decoder::configure(const avhuff_decompress_config &config)
+void avhuff_decoder::configure(const config &cfg)
{
- m_config.video.wrap(config.video, config.video.cliprect());
- m_config.maxsamples = config.maxsamples;
- m_config.actsamples = config.actsamples;
- memcpy(m_config.audio, config.audio, sizeof(m_config.audio));
- m_config.maxmetalength = config.maxmetalength;
- m_config.actmetalength = config.actmetalength;
- m_config.metadata = config.metadata;
+ m_video.wrap(*cfg.video, cfg.video->cliprect());
+ m_config = cfg;
}
/**
@@ -792,9 +787,9 @@ avhuff_error avhuff_decoder::decode_data(const uint8_t *source, uint32_t complen
// determine the start of each piece of data
metastart = m_config.metadata;
for (int chnum = 0; chnum < channels; chnum++)
- audiostart[chnum] = (uint8_t *)m_config.audio[chnum];
- videostart = (m_config.video.valid()) ? reinterpret_cast<uint8_t *>(&m_config.video.pix(0)) : nullptr;
- videostride = (m_config.video.valid()) ? m_config.video.rowpixels() * 2 : 0;
+ audiostart[chnum] = reinterpret_cast<uint8_t *>(m_config.audio[chnum]);
+ videostart = m_video.valid() ? reinterpret_cast<uint8_t *>(&m_video.pix(0)) : nullptr;
+ videostride = m_video.valid() ? m_video.rowpixels() * 2 : 0;
// data is assumed to be native-endian
uint16_t betest = 0;
@@ -802,7 +797,7 @@ avhuff_error avhuff_decoder::decode_data(const uint8_t *source, uint32_t complen
audioxor = videoxor = (betest == 1) ? 1 : 0;
// verify against sizes
- if (m_config.video.valid() && (m_config.video.width() < width || m_config.video.height() < height))
+ if (m_video.valid() && (m_video.width() < width || m_video.height() < height))
return AVHERR_VIDEO_TOO_LARGE;
for (int chnum = 0; chnum < channels; chnum++)
if (m_config.audio[chnum] != nullptr && m_config.maxsamples < samples)
diff --git a/src/lib/util/avhuff.h b/src/lib/util/avhuff.h
index 90ef43e977f..83b46195d6b 100644
--- a/src/lib/util/avhuff.h
+++ b/src/lib/util/avhuff.h
@@ -19,6 +19,8 @@
#include "huffman.h"
#include "flac.h"
+#include <algorithm>
+
//**************************************************************************
// CONSTANTS
@@ -49,32 +51,6 @@ enum avhuff_error
// TYPE DEFINITIONS
//**************************************************************************
-// ======================> av_codec_decompress_config
-
-// decompression configuration
-class avhuff_decompress_config
-{
-public:
- avhuff_decompress_config()
- : maxsamples(0),
- actsamples(nullptr),
- maxmetalength(0),
- actmetalength(nullptr),
- metadata(nullptr)
- {
- memset(audio, 0, sizeof(audio));
- }
-
- bitmap_yuy16 video; // pointer to video bitmap
- uint32_t maxsamples; // maximum number of samples per channel
- uint32_t * actsamples; // actual number of samples per channel
- int16_t * audio[16]; // pointer to individual audio channels
- uint32_t maxmetalength; // maximum length of metadata
- uint32_t * actmetalength; // actual length of metadata
- uint8_t * metadata; // pointer to metadata buffer
-};
-
-
// ======================> avhuff_encoder
// core state for the codec
@@ -98,8 +74,7 @@ private:
{
public:
// construction/destruction
- deltarle_encoder()
- : m_rlecount(0) { }
+ deltarle_encoder() { }
// histogramming
uint16_t *rle_and_histo_bitmap(const uint8_t *source, uint32_t items_per_row, uint32_t item_advance, uint32_t row_count);
@@ -111,7 +86,7 @@ private:
private:
// internal state
- int m_rlecount;
+ int m_rlecount = 0;
huffman_encoder<256 + 16> m_encoder;
std::vector<uint16_t> m_rlebuffer;
};
@@ -143,11 +118,30 @@ private:
class avhuff_decoder
{
public:
+ // decompression configuration
+ class config
+ {
+ public:
+ config()
+ {
+ std::fill(std::begin(audio), std::end(audio), nullptr);
+ }
+
+ bitmap_yuy16 * video = nullptr; // pointer to video bitmap
+ uint32_t maxsamples = 0; // maximum number of samples per channel
+ uint32_t * actsamples = nullptr; // actual number of samples per channel
+ int16_t * audio[16]; // pointer to individual audio channels
+ uint32_t maxmetalength = 0; // maximum length of metadata
+ uint32_t * actmetalength = nullptr; // actual length of metadata
+ uint8_t * metadata = nullptr; // pointer to metadata buffer
+ };
+
+
// construction/destruction
avhuff_decoder();
// configuration
- void configure(const avhuff_decompress_config &config);
+ void configure(const config &cfg);
// encode/decode
avhuff_error decode_data(const uint8_t *source, uint32_t complength, uint8_t *dest);
@@ -158,8 +152,7 @@ private:
{
public:
// construction/destruction
- deltarle_decoder()
- : m_rlecount(0), m_prevdata(0) { }
+ deltarle_decoder() { }
// general
void reset() { m_rlecount = m_prevdata = 0; }
@@ -171,8 +164,8 @@ private:
private:
// internal state
- int m_rlecount;
- uint8_t m_prevdata;
+ int m_rlecount = 0;
+ uint8_t m_prevdata = 0;
huffman_decoder<256 + 16> m_decoder;
};
@@ -183,7 +176,8 @@ private:
avhuff_error decode_video_lossless(int width, int height, const uint8_t *source, uint32_t complength, uint8_t *dest, uint32_t dstride, uint32_t dxor);
// internal state
- avhuff_decompress_config m_config;
+ bitmap_yuy16 m_video;
+ config m_config;
// video decoding contexts
deltarle_decoder m_ycontext;
diff --git a/src/lib/util/aviio.cpp b/src/lib/util/aviio.cpp
index 8722017d3e8..7f74920f06b 100644
--- a/src/lib/util/aviio.cpp
+++ b/src/lib/util/aviio.cpp
@@ -999,7 +999,7 @@ avi_file::error avi_stream::rgb32_compress_to_rgb(const bitmap_rgb32 &bitmap, st
/* compressed video */
for (y = 0; y < height; y++)
{
- const std::uint32_t *source = &bitmap.pix32(y);
+ const std::uint32_t *source = &bitmap.pix(y);
std::uint8_t *dest = data + (m_height - 1 - y) * m_width * 3;
for (x = 0; x < width && dest < dataend; x++)
@@ -1062,7 +1062,7 @@ avi_file::error avi_stream::yuv_decompress_to_yuy16(const std::uint8_t *data, st
for (y = 0; y < m_height; y++)
{
const std::uint16_t *source = reinterpret_cast<const std::uint16_t *>(data) + y * m_width;
- std::uint16_t *dest = &bitmap.pix16(y);
+ std::uint16_t *dest = &bitmap.pix(y);
/* switch off the compression */
switch (m_format)
@@ -1113,7 +1113,7 @@ avi_file::error avi_stream::yuy16_compress_to_yuy(const bitmap_yuy16 &bitmap, st
/* compressed video */
for (y = 0; y < m_height; y++)
{
- const std::uint16_t *source = &bitmap.pix16(y);
+ const std::uint16_t *source = &bitmap.pix(y);
std::uint16_t *dest = reinterpret_cast<std::uint16_t *>(data) + y * m_width;
/* switch off the compression */
@@ -1298,7 +1298,7 @@ avi_file::error avi_stream::huffyuv_decompress_to_yuy16(const std::uint8_t *data
/* compressed video */
for (y = 0; y < m_height; y++)
{
- std::uint16_t *dest = &bitmap.pix16(y);
+ std::uint16_t *dest = &bitmap.pix(y);
/* handle the first four bytes independently */
x = 0;
@@ -1386,8 +1386,8 @@ avi_file::error avi_stream::huffyuv_decompress_to_yuy16(const std::uint8_t *data
lastprevy = lastprevcb = lastprevcr = 0;
for (y = 0; y < m_height; y++)
{
- std::uint16_t *prevrow = &bitmap.pix16(y - prevlines);
- std::uint16_t *dest = &bitmap.pix16(y);
+ std::uint16_t *prevrow = &bitmap.pix(y - prevlines);
+ std::uint16_t *dest = &bitmap.pix(y);
/* handle the first four bytes independently */
x = 0;
@@ -1500,7 +1500,7 @@ avi_file::error avi_stream::uncompressed_rgb24_to_argb32(const std::uint8_t *dat
/* uncompressed video */
for (int y = 0; y < m_height; y++)
{
- std::uint32_t *dest = &bitmap.pix32(y);
+ std::uint32_t *dest = &bitmap.pix(y);
/* loop over pixels */
for (int x = 0; x < m_width; x++)
@@ -1530,7 +1530,7 @@ avi_file::error avi_stream::uncompressed_yuv420p_to_argb32(const std::uint8_t *d
/* uncompressed video */
for (int y = 0; y < m_height; y++)
{
- std::uint32_t *dest = &bitmap.pix32(y);
+ std::uint32_t *dest = &bitmap.pix(y);
/* loop over pixels */
for (int x = 0; x < m_width; x++)
diff --git a/src/lib/util/bitmap.cpp b/src/lib/util/bitmap.cpp
index ed814aae218..fc05b89f1b6 100644
--- a/src/lib/util/bitmap.cpp
+++ b/src/lib/util/bitmap.cpp
@@ -8,14 +8,12 @@
***************************************************************************/
-#include <cassert>
-
#include "bitmap.h"
+#include <cassert>
#include <new>
-
//**************************************************************************
// INLINE HELPERS
//**************************************************************************
@@ -361,7 +359,7 @@ void bitmap_t::wrap(void *base, int width, int height, int rowpixels)
* @param subrect The subrect.
*/
-void bitmap_t::wrap(const bitmap_t &source, const rectangle &subrect)
+void bitmap_t::wrap(bitmap_t &source, const rectangle &subrect)
{
assert(m_format == source.m_format);
assert(m_bpp == source.m_bpp);
@@ -407,7 +405,7 @@ void bitmap_t::set_palette(palette_t *palette)
}
/**
- * @fn void bitmap_t::fill(uint32_t color, const rectangle &cliprect)
+ * @fn void bitmap_t::fill(uint64_t color, const rectangle &bounds)
*
* @brief -------------------------------------------------
* fill -- fill a bitmap with a solid color
@@ -417,93 +415,45 @@ void bitmap_t::set_palette(palette_t *palette)
* @param cliprect The cliprect.
*/
-void bitmap_t::fill(uint32_t color, const rectangle &cliprect)
+void bitmap_t::fill(uint64_t color, const rectangle &bounds)
{
// if we have a cliprect, intersect with that
- rectangle fill = cliprect;
+ rectangle fill(bounds);
fill &= m_cliprect;
- if (fill.empty())
- return;
-
- // based on the bpp go from there
- switch (m_bpp)
+ if (!fill.empty())
{
+ // based on the bpp go from there
+ switch (m_bpp)
+ {
case 8:
- // 8bpp always uses memset
for (int32_t y = fill.top(); y <= fill.bottom(); y++)
- memset(raw_pixptr(y, fill.left()), uint8_t(color), fill.width());
+ std::fill_n(&pixt<uint8_t>(y, fill.left()), fill.width(), uint8_t(color));
break;
case 16:
- // 16bpp can use memset if the bytes are equal
- if (uint8_t(color >> 8) == uint8_t(color))
- {
- for (int32_t y = fill.top(); y <= fill.bottom(); y++)
- memset(raw_pixptr(y, fill.left()), uint8_t(color), fill.width() * 2);
- }
- else
- {
- // Fill the first line the hard way
- uint16_t *destrow = &pixt<uint16_t>(fill.top());
- for (int32_t x = fill.left(); x <= fill.right(); x++)
- destrow[x] = uint16_t(color);
-
- // For the other lines, just copy the first one
- void *destrow0 = &pixt<uint16_t>(fill.top(), fill.left());
- for (int32_t y = fill.top() + 1; y <= fill.bottom(); y++)
- {
- destrow = &pixt<uint16_t>(y, fill.left());
- memcpy(destrow, destrow0, fill.width() * 2);
- }
- }
+ for (int32_t y = fill.top(); y <= fill.bottom(); ++y)
+ std::fill_n(&pixt<uint16_t>(y, fill.left()), fill.width(), uint16_t(color));
break;
case 32:
- // 32bpp can use memset if the bytes are equal
- if ((uint8_t)(color >> 8) == (uint8_t)color && (uint16_t)(color >> 16) == (uint16_t)color)
- {
- for (int32_t y = fill.top(); y <= fill.bottom(); y++)
- memset(&pixt<uint32_t>(y, fill.left()), uint8_t(color), fill.width() * 4);
- }
- else
- {
- // Fill the first line the hard way
- uint32_t *destrow = &pixt<uint32_t>(fill.top());
- for (int32_t x = fill.left(); x <= fill.right(); x++)
- destrow[x] = uint32_t(color);
-
- // For the other lines, just copy the first one
- uint32_t *destrow0 = &pixt<uint32_t>(fill.top(), fill.left());
- for (int32_t y = fill.top() + 1; y <= fill.bottom(); y++)
- {
- destrow = &pixt<uint32_t>(y, fill.left());
- memcpy(destrow, destrow0, fill.width() * 4);
- }
- }
+ for (int32_t y = fill.top(); y <= fill.bottom(); ++y)
+ std::fill_n(&pixt<uint32_t>(y, fill.left()), fill.width(), uint32_t(color));
break;
case 64:
- // 64bpp can use memset if the bytes are equal
- if (uint8_t(color >> 8) == uint8_t(color) && uint16_t(color >> 16) == uint16_t(color)) // FIXME: really? wat about the upper bits that would be zeroed when done the "hard way"?
- {
- for (int32_t y = fill.top(); y <= fill.bottom(); y++)
- memset(&pixt<uint64_t>(y, fill.left()), uint8_t(color), fill.width() * 8);
- }
- else
- {
- // Fill the first line the hard way
- uint64_t *destrow = &pixt<uint64_t>(fill.top());
- for (int32_t x = fill.left(); x <= fill.right(); x++)
- destrow[x] = uint64_t(color);
-
- // For the other lines, just copy the first one
- uint64_t *destrow0 = &pixt<uint64_t>(fill.top(), fill.left());
- for (int32_t y = fill.top() + 1; y <= fill.bottom(); y++)
- {
- destrow = &pixt<uint64_t>(y, fill.left());
- memcpy(destrow, destrow0, fill.width() * 8);
- }
- }
+ for (int32_t y = fill.top(); y <= fill.bottom(); ++y)
+ std::fill_n(&pixt<uint64_t>(y, fill.left()), fill.width(), uint64_t(color));
break;
+ }
}
}
+
+
+//**************************************************************************
+// EXPLICIT TEMPLATE INSTANTIATIONS
+//**************************************************************************
+
+template class bitmap_specific<uint8_t>;
+template class bitmap_specific<uint16_t>;
+template class bitmap_specific<uint32_t>;
+template class bitmap_specific<uint64_t>;
diff --git a/src/lib/util/bitmap.h b/src/lib/util/bitmap.h
index ed6a5382a61..57ed0bc1775 100644
--- a/src/lib/util/bitmap.h
+++ b/src/lib/util/bitmap.h
@@ -16,6 +16,9 @@
#include "osdcore.h"
#include "palette.h"
+#include <algorithm>
+#include <memory>
+
//**************************************************************************
// TYPE DEFINITIONS
@@ -151,23 +154,23 @@ public:
// operations
void set_palette(palette_t *palette);
- void fill(uint32_t color) { fill(color, m_cliprect); }
- void fill(uint32_t color, const rectangle &cliprect);
- void plot_box(int x, int y, int width, int height, uint32_t color)
+ void fill(uint64_t color) { fill(color, m_cliprect); }
+ void fill(uint64_t color, const rectangle &bounds);
+ void plot_box(int32_t x, int32_t y, int32_t width, int32_t height, uint64_t color)
{
- rectangle clip(x, x + width - 1, y, y + height - 1);
- fill(color, clip);
+ fill(color, rectangle(x, x + width - 1, y, y + height - 1));
}
// pixel access
- template<typename PixelType>
- PixelType &pixt(int32_t y, int32_t x = 0) const { return *(reinterpret_cast<PixelType *>(m_base) + y * m_rowpixels + x); }
- void *raw_pixptr(int32_t y, int32_t x = 0) const { return reinterpret_cast<uint8_t *>(m_base) + (y * m_rowpixels + x) * m_bpp / 8; }
+ void *raw_pixptr(int32_t y, int32_t x = 0) { return reinterpret_cast<uint8_t *>(m_base) + (y * m_rowpixels + x) * m_bpp / 8; }
+ void const *raw_pixptr(int32_t y, int32_t x = 0) const { return reinterpret_cast<uint8_t *>(m_base) + (y * m_rowpixels + x) * m_bpp / 8; }
protected:
// for use by subclasses only to ensure type correctness
+ template <typename PixelType> PixelType &pixt(int32_t y, int32_t x = 0) { return *(reinterpret_cast<PixelType *>(m_base) + y * m_rowpixels + x); }
+ template <typename PixelType> PixelType const &pixt(int32_t y, int32_t x = 0) const { return *(reinterpret_cast<PixelType *>(m_base) + y * m_rowpixels + x); }
void wrap(void *base, int width, int height, int rowpixels);
- void wrap(const bitmap_t &source, const rectangle &subrect);
+ void wrap(bitmap_t &source, const rectangle &subrect);
private:
// internal helpers
@@ -191,17 +194,17 @@ private:
// ======================> bitmap_specific, bitmap8_t, bitmap16_t, bitmap32_t, bitmap64_t
-template<typename PixelType>
+template <typename PixelType>
class bitmap_specific : public bitmap_t
{
- static constexpr int PixelBits = 8 * sizeof(PixelType);
+ static constexpr int PIXEL_BITS = 8 * sizeof(PixelType);
protected:
// construction/destruction -- subclasses only
bitmap_specific(bitmap_specific<PixelType> &&) = default;
- bitmap_specific(bitmap_format format, int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap_t(format, PixelBits, width, height, xslop, yslop) { }
- bitmap_specific(bitmap_format format, PixelType *base, int width, int height, int rowpixels) : bitmap_t(format, PixelBits, base, width, height, rowpixels) { }
- bitmap_specific(bitmap_format format, bitmap_specific<PixelType> &source, const rectangle &subrect) : bitmap_t(format, PixelBits, source, subrect) { }
+ bitmap_specific(bitmap_format format, int width = 0, int height = 0, int xslop = 0, int yslop = 0) : bitmap_t(format, PIXEL_BITS, width, height, xslop, yslop) { }
+ bitmap_specific(bitmap_format format, PixelType *base, int width, int height, int rowpixels) : bitmap_t(format, PIXEL_BITS, base, width, height, rowpixels) { }
+ bitmap_specific(bitmap_format format, bitmap_specific<PixelType> &source, const rectangle &subrect) : bitmap_t(format, PIXEL_BITS, source, subrect) { }
bitmap_specific<PixelType> &operator=(bitmap_specific<PixelType> &&) = default;
@@ -209,27 +212,46 @@ public:
using pixel_t = PixelType;
// getters
- uint8_t bpp() const { return PixelBits; }
+ uint8_t bpp() const { return PIXEL_BITS; }
// pixel accessors
- PixelType &pix(int32_t y, int32_t x = 0) const { return pixt<PixelType>(y, x); }
- PixelType &pix8(int32_t y, int32_t x = 0) const { static_assert(PixelBits == 8, "must be 8bpp"); return pixt<PixelType>(y, x); }
- PixelType &pix16(int32_t y, int32_t x = 0) const { static_assert(PixelBits == 16, "must be 16bpp"); return pixt<PixelType>(y, x); }
- PixelType &pix32(int32_t y, int32_t x = 0) const { static_assert(PixelBits == 32, "must be 32bpp"); return pixt<PixelType>(y, x); }
- PixelType &pix64(int32_t y, int32_t x = 0) const { static_assert(PixelBits == 64, "must be 64bpp"); return pixt<PixelType>(y, x); }
+ PixelType &pix(int32_t y, int32_t x = 0) { return pixt<PixelType>(y, x); }
+ PixelType const &pix(int32_t y, int32_t x = 0) const { return pixt<PixelType>(y, x); }
+
+ // operations
+ void fill(PixelType color) { fill(color, cliprect()); }
+ void fill(PixelType color, const rectangle &bounds)
+ {
+ // if we have a cliprect, intersect with that
+ rectangle fill(bounds);
+ fill &= cliprect();
+ if (!fill.empty())
+ {
+ for (int32_t y = fill.top(); y <= fill.bottom(); y++)
+ std::fill_n(&pix(y, fill.left()), fill.width(), color);
+ }
+ }
+ void plot_box(int32_t x, int32_t y, int32_t width, int32_t height, PixelType color)
+ {
+ fill(color, rectangle(x, x + width - 1, y, y + height - 1));
+ }
};
// 8bpp bitmaps
using bitmap8_t = bitmap_specific<uint8_t>;
+extern template class bitmap_specific<uint8_t>;
// 16bpp bitmaps
using bitmap16_t = bitmap_specific<uint16_t>;
+extern template class bitmap_specific<uint16_t>;
// 32bpp bitmaps
using bitmap32_t = bitmap_specific<uint32_t>;
+extern template class bitmap_specific<uint32_t>;
// 64bpp bitmaps
using bitmap64_t = bitmap_specific<uint64_t>;
+extern template class bitmap_specific<uint64_t>;
// ======================> bitmap_ind8, bitmap_ind16, bitmap_ind32, bitmap_ind64
@@ -246,7 +268,7 @@ public:
bitmap_ind8(uint8_t *base, int width, int height, int rowpixels) : bitmap8_t(k_bitmap_format, base, width, height, rowpixels) { }
bitmap_ind8(bitmap_ind8 &source, const rectangle &subrect) : bitmap8_t(k_bitmap_format, source, subrect) { }
void wrap(uint8_t *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); }
- void wrap(const bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<const bitmap_t &>(source), subrect); }
+ void wrap(bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); }
// getters
bitmap_format format() const { return k_bitmap_format; }
@@ -266,7 +288,7 @@ public:
bitmap_ind16(uint16_t *base, int width, int height, int rowpixels) : bitmap16_t(k_bitmap_format, base, width, height, rowpixels) { }
bitmap_ind16(bitmap_ind16 &source, const rectangle &subrect) : bitmap16_t(k_bitmap_format, source, subrect) { }
void wrap(uint16_t *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); }
- void wrap(const bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<const bitmap_t &>(source), subrect); }
+ void wrap(bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); }
// getters
bitmap_format format() const { return k_bitmap_format; }
@@ -286,7 +308,7 @@ public:
bitmap_ind32(uint32_t *base, int width, int height, int rowpixels) : bitmap32_t(k_bitmap_format, base, width, height, rowpixels) { }
bitmap_ind32(bitmap_ind32 &source, const rectangle &subrect) : bitmap32_t(k_bitmap_format, source, subrect) { }
void wrap(uint32_t *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); }
- void wrap(const bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<const bitmap_t &>(source), subrect); }
+ void wrap(bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); }
// getters
bitmap_format format() const { return k_bitmap_format; }
@@ -306,7 +328,7 @@ public:
bitmap_ind64(uint64_t *base, int width, int height, int rowpixels) : bitmap64_t(k_bitmap_format, base, width, height, rowpixels) { }
bitmap_ind64(bitmap_ind64 &source, const rectangle &subrect) : bitmap64_t(k_bitmap_format, source, subrect) { }
void wrap(uint64_t *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); }
- void wrap(const bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<const bitmap_t &>(source), subrect); }
+ void wrap(bitmap_ind8 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); }
// getters
bitmap_format format() const { return k_bitmap_format; }
@@ -329,7 +351,7 @@ public:
bitmap_yuy16(uint16_t *base, int width, int height, int rowpixels) : bitmap16_t(k_bitmap_format, base, width, height, rowpixels) { }
bitmap_yuy16(bitmap_yuy16 &source, const rectangle &subrect) : bitmap16_t(k_bitmap_format, source, subrect) { }
void wrap(uint16_t *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); }
- void wrap(const bitmap_yuy16 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<const bitmap_t &>(source), subrect); }
+ void wrap(bitmap_yuy16 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); }
// getters
bitmap_format format() const { return k_bitmap_format; }
@@ -349,7 +371,7 @@ public:
bitmap_rgb32(uint32_t *base, int width, int height, int rowpixels) : bitmap32_t(k_bitmap_format, base, width, height, rowpixels) { }
bitmap_rgb32(bitmap_rgb32 &source, const rectangle &subrect) : bitmap32_t(k_bitmap_format, source, subrect) { }
void wrap(uint32_t *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); }
- void wrap(const bitmap_rgb32 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<const bitmap_t &>(source), subrect); }
+ void wrap(bitmap_rgb32 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); }
// getters
bitmap_format format() const { return k_bitmap_format; }
@@ -369,7 +391,7 @@ public:
bitmap_argb32(uint32_t *base, int width, int height, int rowpixels) : bitmap32_t(k_bitmap_format, base, width, height, rowpixels) { }
bitmap_argb32(bitmap_argb32 &source, const rectangle &subrect) : bitmap32_t(k_bitmap_format, source, subrect) { }
void wrap(uint32_t *base, int width, int height, int rowpixels) { bitmap_t::wrap(base, width, height, rowpixels); }
- void wrap(const bitmap_argb32 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<const bitmap_t &>(source), subrect); }
+ void wrap(bitmap_argb32 &source, const rectangle &subrect) { bitmap_t::wrap(static_cast<bitmap_t &>(source), subrect); }
// getters
bitmap_format format() const { return k_bitmap_format; }
@@ -377,5 +399,4 @@ public:
bitmap_argb32 &operator=(bitmap_argb32 &&) = default;
};
-
-#endif // MAME_UTIL_BITMAP_H
+#endif // MAME_UTIL_BITMAP_H
diff --git a/src/lib/util/chdcodec.cpp b/src/lib/util/chdcodec.cpp
index 58f7b4291db..7f6e0f018cd 100644
--- a/src/lib/util/chdcodec.cpp
+++ b/src/lib/util/chdcodec.cpp
@@ -1786,7 +1786,7 @@ void chd_avhuff_decompressor::configure(int param, void *config)
{
// if we're getting the decompression configuration, apply it now
if (param == AVHUFF_CODEC_DECOMPRESS_CONFIG)
- m_decoder.configure(*reinterpret_cast<avhuff_decompress_config *>(config));
+ m_decoder.configure(*reinterpret_cast<avhuff_decoder::config const *>(config));
// anything else is invalid
else
diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h
index 5d1f055e19b..db8aacf6cb2 100644
--- a/src/lib/util/corealloc.h
+++ b/src/lib/util/corealloc.h
@@ -8,54 +8,24 @@
***************************************************************************/
-#pragma once
-
#ifndef MAME_LIB_UTIL_COREALLOC_H
#define MAME_LIB_UTIL_COREALLOC_H
-#include "osdcore.h"
+#pragma once
-#include <cstdlib>
+#include "osdcore.h"
#include <cstddef>
+#include <cstdlib>
#include <cstring>
-#include <new>
#include <memory>
+#include <new>
#include <type_traits>
#include <utility>
-//**************************************************************************
-// MACROS
-//**************************************************************************
-
-// global allocation helpers -- use these instead of new and delete
-#define global_alloc(Type) new Type
-#define global_alloc_array(Type, Num) new Type[Num]
-#define global_free(Ptr) do { delete Ptr; } while (0)
-#define global_free_array(Ptr) do { delete[] Ptr; } while (0)
-
-
-
-template<typename T, typename... Params>
-inline T* global_alloc_clear(Params &&... args)
-{
- void *const ptr = ::operator new(sizeof(T)); // allocate memory
- std::memset(ptr, 0, sizeof(T));
- return new(ptr) T(std::forward<Params>(args)...);
-}
-
-template<typename T>
-inline T* global_alloc_array_clear(std::size_t num)
-{
- auto const size = sizeof(T) * num;
- void *const ptr = new unsigned char[size]; // allocate memory
- std::memset(ptr, 0, size);
- return new(ptr) T[num]();
-}
-
-
+// global allocation helpers
template<typename Tp> struct MakeUniqClearT { typedef std::unique_ptr<Tp> single_object; };
diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h
index 95d8230f565..a06c4fb8a46 100644
--- a/src/lib/util/coretmpl.h
+++ b/src/lib/util/coretmpl.h
@@ -202,7 +202,7 @@ public:
if (m_tail == &toreplace)
m_tail = &object;
object.m_next = toreplace.m_next;
- global_free(&toreplace);
+ delete &toreplace;
return object;
}
return append(object);
@@ -253,7 +253,7 @@ public:
// remove the given object and free its memory
void remove(ElementType &object) noexcept
{
- global_free(&detach(object));
+ delete &detach(object);
}
// find an object by index in the list
@@ -305,7 +305,7 @@ public:
{
ItemType *result = m_freelist.detach_head();
if (result == nullptr)
- result = global_alloc(ItemType);
+ result = new ItemType;
return result;
}
diff --git a/src/lib/util/msdib.cpp b/src/lib/util/msdib.cpp
new file mode 100644
index 00000000000..a1ae5eaddf0
--- /dev/null
+++ b/src/lib/util/msdib.cpp
@@ -0,0 +1,642 @@
+// license:BSD-3-Clause
+// copyright-holders:Vas Crabb
+/***************************************************************************
+
+ msdib.h
+
+ Microsoft Device-Independent Bitmap file loading.
+
+***************************************************************************/
+
+#include "msdib.h"
+
+#include "eminline.h"
+
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
+
+
+#define LOG_GENERAL (1U << 0)
+#define LOG_DIB (1U << 1)
+
+//#define VERBOSE (LOG_GENERAL | LOG_DIB)
+
+#define LOG_OUTPUT_FUNC osd_printf_verbose
+
+#ifndef VERBOSE
+#define VERBOSE 0
+#endif
+
+#define LOGMASKED(mask, ...) do { if (VERBOSE & (mask)) (LOG_OUTPUT_FUNC)(__VA_ARGS__); } while (false)
+
+#define LOG(...) LOGMASKED(LOG_GENERAL, __VA_ARGS__)
+
+
+namespace util {
+
+namespace {
+
+// DIB compression schemes
+enum : std::uint32_t
+{
+ DIB_COMP_NONE = 0,
+ DIB_COMP_RLE8 = 1,
+ DIB_COMP_RLE4 = 2,
+ DIB_COMP_BITFIELDS = 3
+};
+
+
+// file header doesn't use natural alignment
+using bitmap_file_header = std::uint8_t [14];
+
+
+// old-style DIB header
+struct bitmap_core_header
+{
+ std::uint32_t size; // size of the header (12, 16 or 64)
+ std::int16_t width; // width of bitmap in pixels
+ std::int16_t height; // height of the image in pixels
+ std::uint16_t planes; // number of colour planes (must be 1)
+ std::uint16_t bpp; // bits per pixel
+};
+
+// new-style DIB header
+struct bitmap_info_header
+{
+ std::uint32_t size; // size of the header
+ std::int32_t width; // width of bitmap in pixels
+ std::int32_t height; // height of bitmap in pixels
+ std::uint16_t planes; // number of colour planes (must be 1)
+ std::uint16_t bpp; // bits per pixel
+ std::uint32_t comp; // compression method
+ std::uint32_t rawsize; // size of bitmap data after decompression or 0 if uncompressed
+ std::int32_t hres; // horizontal resolution in pixels/metre
+ std::int32_t vres; // horizontal resolution in pixels/metre
+ std::uint32_t colors; // number of colours or 0 for 1 << bpp
+ std::uint32_t important; // number of important colours or 0 if all important
+ std::uint32_t red; // red field mask - must be contiguous
+ std::uint32_t green; // green field mask - must be contiguous
+ std::uint32_t blue; // blue field mask - must be contiguous
+ std::uint32_t alpha; // alpha field mask - must be contiguous
+};
+
+
+union bitmap_headers
+{
+ bitmap_core_header core;
+ bitmap_info_header info;
+};
+
+
+bool dib_parse_mask(uint32_t mask, unsigned &shift, unsigned &bits)
+{
+ shift = count_leading_zeros(mask);
+ mask <<= shift;
+ bits = count_leading_ones(mask);
+ mask <<= shift;
+ shift = 32 - shift - bits;
+ return !mask;
+}
+
+
+void dib_truncate_channel(unsigned &shift, unsigned &bits)
+{
+ if (8U < bits)
+ {
+ unsigned const excess(bits - 8);
+ shift += excess;
+ bits -= excess;
+ }
+}
+
+
+uint8_t dib_splat_sample(uint8_t val, unsigned bits)
+{
+ assert(8U >= bits);
+ for (val <<= (8U - bits); bits && (8U > bits); bits <<= 1)
+ val |= val >> bits;
+ return val;
+}
+
+
+msdib_error dib_read_file_header(core_file &fp, std::uint32_t &filelen)
+{
+ // the bitmap file header doesn't use natural alignment
+ bitmap_file_header file_header;
+ if (fp.read(file_header, sizeof(file_header)) != sizeof(file_header))
+ {
+ LOG("Error reading DIB file header\n");
+ return msdib_error::FILE_TRUNCATED;
+ }
+
+ // only support Windows bitmaps for now
+ if ((0x42 != file_header[0]) || (0x4d != file_header[1]))
+ return msdib_error::BAD_SIGNATURE;
+
+ // do a very basic check on the file length
+ std::uint32_t const file_length(
+ (std::uint32_t(file_header[2]) << 0) |
+ (std::uint32_t(file_header[3]) << 8) |
+ (std::uint32_t(file_header[4]) << 16) |
+ (std::uint32_t(file_header[5]) << 24));
+ if ((sizeof(file_header) + sizeof(bitmap_core_header)) > file_length)
+ return msdib_error::FILE_CORRUPT;
+
+ // check that the offset to the pixel data looks half sane
+ std::uint32_t const pixel_offset(
+ (std::uint32_t(file_header[10]) << 0) |
+ (std::uint32_t(file_header[11]) << 8) |
+ (std::uint32_t(file_header[12]) << 16) |
+ (std::uint32_t(file_header[13]) << 24));
+ if (((sizeof(file_header) + sizeof(bitmap_core_header)) > pixel_offset) || (file_length < pixel_offset))
+ return msdib_error::FILE_CORRUPT;
+
+ // looks OK enough
+ filelen = file_length;
+ return msdib_error::NONE;
+}
+
+
+msdib_error dib_read_bitmap_header(
+ core_file &fp,
+ bitmap_headers &header,
+ unsigned &palette_bytes,
+ bool &indexed,
+ std::size_t &palette_entries,
+ std::size_t &palette_size,
+ std::size_t &row_bytes,
+ std::uint32_t length)
+{
+ // check that these things haven't been padded somehow
+ static_assert(sizeof(bitmap_core_header) == 12U, "compiler has applied padding to bitmap_core_header");
+ static_assert(sizeof(bitmap_info_header) == 56U, "compiler has applied padding to bitmap_info_header");
+
+ // ensure the header fits in the space for the image data
+ assert(&header.core.size == &header.info.size);
+ if (sizeof(header.core) > length)
+ return msdib_error::FILE_TRUNCATED;
+ std::memset(&header, 0, sizeof(header));
+ if (fp.read(&header.core.size, sizeof(header.core.size)) != sizeof(header.core.size))
+ {
+ LOG("Error reading DIB header size (length %u)\n", length);
+ return msdib_error::FILE_TRUNCATED;
+ }
+ header.core.size = little_endianize_int32(header.core.size);
+ if (length < header.core.size)
+ {
+ LOG("DIB image data (%u bytes) is too small for DIB header (%u bytes)\n", length, header.core.size);
+ return msdib_error::FILE_CORRUPT;
+ }
+
+ // identify and read the header - convert OS/2 headers to Windows 3 format
+ palette_bytes = 4U;
+ switch (header.core.size)
+ {
+ case 16U:
+ case 64U:
+ // extended OS/2 bitmap header with support for compression
+ LOG(
+ "DIB image data (%u bytes) uses unsupported OS/2 DIB header (size %u)\n",
+ length,
+ header.core.size);
+ return msdib_error::UNSUPPORTED_FORMAT;
+
+ case 12U:
+ // introduced in OS/2 and Windows 2.0
+ {
+ palette_bytes = 3U;
+ std::uint32_t const header_read(std::min<std::uint32_t>(header.core.size, sizeof(header.core)) - sizeof(header.core.size));
+ if (fp.read(&header.core.width, header_read) != header_read)
+ {
+ LOG("Error reading DIB core header from image data (%u bytes)\n", length);
+ return msdib_error::FILE_TRUNCATED;
+ }
+ fp.seek(header.core.size - sizeof(header.core.size) - header_read, SEEK_CUR);
+ header.core.width = little_endianize_int16(header.core.width);
+ header.core.height = little_endianize_int16(header.core.height);
+ header.core.planes = little_endianize_int16(header.core.planes);
+ header.core.bpp = little_endianize_int16(header.core.bpp);
+ LOGMASKED(
+ LOG_DIB,
+ "Read DIB core header from image data : %d*%d, %u planes, %u bpp\n",
+ header.core.width,
+ header.core.height,
+ header.core.planes,
+ header.core.bpp);
+
+ // this works because the core header only aliases the width/height of the info header
+ header.info.bpp = header.core.bpp;
+ header.info.planes = header.core.planes;
+ header.info.height = header.core.height;
+ header.info.width = header.core.width;
+ header.info.size = 40U;
+ }
+ break;
+
+ default:
+ // the next version will be longer
+ if (124U >= header.core.size)
+ {
+ LOG(
+ "DIB image data (%u bytes) uses unsupported DIB header format (size %u)\n",
+ length,
+ header.core.size);
+ return msdib_error::UNSUPPORTED_FORMAT;
+ }
+ // fall through
+ case 40U:
+ case 52U:
+ case 56U:
+ case 108U:
+ case 124U:
+ // the Windows 3 bitmap header with optional extensions
+ {
+ palette_bytes = 4U;
+ std::uint32_t const header_read(std::min<std::uint32_t>(header.info.size, sizeof(header.info)) - sizeof(header.info.size));
+ if (fp.read(&header.info.width, header_read) != header_read)
+ {
+ LOG("Error reading DIB info header from image data (%u bytes)\n", length);
+ return msdib_error::FILE_TRUNCATED;
+ }
+ fp.seek(header.info.size - sizeof(header.info.size) - header_read, SEEK_CUR);
+ header.info.width = little_endianize_int32(header.info.width);
+ header.info.height = little_endianize_int32(header.info.height);
+ header.info.planes = little_endianize_int16(header.info.planes);
+ header.info.bpp = little_endianize_int16(header.info.bpp);
+ header.info.comp = little_endianize_int32(header.info.comp);
+ header.info.rawsize = little_endianize_int32(header.info.rawsize);
+ header.info.hres = little_endianize_int32(header.info.hres);
+ header.info.vres = little_endianize_int32(header.info.vres);
+ header.info.colors = little_endianize_int32(header.info.colors);
+ header.info.important = little_endianize_int32(header.info.important);
+ header.info.red = little_endianize_int32(header.info.red);
+ header.info.green = little_endianize_int32(header.info.green);
+ header.info.blue = little_endianize_int32(header.info.blue);
+ header.info.alpha = little_endianize_int32(header.info.alpha);
+ LOGMASKED(
+ LOG_DIB,
+ "Read DIB info header from image data: %d*%d (%d*%d ppm), %u planes, %u bpp %u/%s%u colors\n",
+ header.info.width,
+ header.info.height,
+ header.info.hres,
+ header.info.vres,
+ header.info.planes,
+ header.info.bpp,
+ header.info.important,
+ header.info.colors ? "" : "2^",
+ header.info.colors ? header.info.colors : header.info.bpp);
+ }
+ break;
+ }
+
+ // check for unsupported planes/bit depth
+ if ((1U != header.info.planes) || !header.info.bpp || (32U < header.info.bpp) || ((8U < header.info.bpp) ? (header.info.bpp % 8) : (8 % header.info.bpp)))
+ {
+ LOG("DIB image data uses unsupported planes/bits per pixel %u*%u\n", header.info.planes, header.info.bpp);
+ return msdib_error::UNSUPPORTED_FORMAT;
+ }
+
+ // check dimensions
+ if ((0 >= header.info.width) || (0 == header.info.height))
+ {
+ LOG("DIB image data has invalid dimensions %u*%u\n", header.info.width, header.info.height);
+ return msdib_error::FILE_CORRUPT;
+ }
+
+ // ensure compression scheme is supported
+ bool no_palette(false);
+ indexed = true;
+ switch (header.info.comp)
+ {
+ case DIB_COMP_NONE:
+ // uncompressed - direct colour with implied bitfields if more than eight bits/pixel
+ indexed = 8U >= header.info.bpp;
+ if (indexed)
+ {
+ if ((1U << header.info.bpp) < header.info.colors)
+ {
+ osd_printf_verbose(
+ "DIB image data has oversized palette with %u entries for %u bits per pixel\n",
+ header.info.colors,
+ header.info.bpp);
+ }
+ }
+ if (!indexed)
+ {
+ no_palette = true;
+ switch(header.info.bpp)
+ {
+ case 16U:
+ header.info.red = 0x00007c00;
+ header.info.green = 0x000003e0;
+ header.info.blue = 0x0000001f;
+ header.info.alpha = 0x00000000;
+ break;
+ case 24U:
+ case 32U:
+ header.info.red = 0x00ff0000;
+ header.info.green = 0x0000ff00;
+ header.info.blue = 0x000000ff;
+ header.info.alpha = 0x00000000;
+ break;
+ }
+ }
+ break;
+
+ case DIB_COMP_BITFIELDS:
+ // uncompressed direct colour with explicitly-specified bitfields
+ indexed = false;
+ if (offsetof(bitmap_info_header, alpha) > header.info.size)
+ {
+ osd_printf_verbose(
+ "DIB image data specifies bit masks but is too small (size %u)\n",
+ header.info.size);
+ return msdib_error::FILE_CORRUPT;
+ }
+ break;
+
+ default:
+ LOG("DIB image data uses unsupported compression scheme %u\n", header.info.comp);
+ return msdib_error::UNSUPPORTED_FORMAT;
+ }
+
+ // we can now calculate the size of the palette and row data
+ palette_entries =
+ indexed
+ ? ((1U == header.info.bpp) ? 2U : header.info.colors ? header.info.colors : (1U << header.info.bpp))
+ : (no_palette ? 0U : header.info.colors);
+ palette_size = palette_bytes * palette_entries;
+ row_bytes = ((31 + (header.info.width * header.info.bpp)) >> 5) << 2;
+
+ // header looks OK
+ return msdib_error::NONE;
+}
+
+} // anonymous namespace
+
+
+
+msdib_error msdib_verify_header(core_file &fp)
+{
+ msdib_error err;
+
+ // file header
+ std::uint32_t file_length;
+ err = dib_read_file_header(fp, file_length);
+ if (msdib_error::NONE != err)
+ return err;
+
+ // bitmap header
+ bitmap_headers header;
+ unsigned palette_bytes;
+ bool indexed;
+ std::size_t palette_entries, palette_size, row_bytes;
+ err = dib_read_bitmap_header(
+ fp,
+ header,
+ palette_bytes,
+ indexed,
+ palette_entries,
+ palette_size,
+ row_bytes,
+ file_length - sizeof(bitmap_file_header));
+ if (msdib_error::NONE != err)
+ return err;
+
+ // check length
+ std::size_t const required_size(
+ sizeof(bitmap_file_header) +
+ header.info.size +
+ palette_size +
+ (row_bytes * std::abs(header.info.height)));
+ if (required_size > file_length)
+ return msdib_error::FILE_TRUNCATED;
+
+ // good chance this file is supported
+ return msdib_error::NONE;
+}
+
+
+msdib_error msdib_read_bitmap(core_file &fp, bitmap_argb32 &bitmap)
+{
+ std::uint32_t file_length;
+ msdib_error const headerr(dib_read_file_header(fp, file_length));
+ if (msdib_error::NONE != headerr)
+ return headerr;
+
+ return msdib_read_bitmap_data(fp, bitmap, file_length - sizeof(bitmap_file_header), 0U);
+}
+
+
+msdib_error msdib_read_bitmap_data(core_file &fp, bitmap_argb32 &bitmap, std::uint32_t length, std::uint32_t dirheight)
+{
+ // read the bitmap header
+ bitmap_headers header;
+ unsigned palette_bytes;
+ bool indexed;
+ std::size_t palette_entries, palette_size, row_bytes;
+ msdib_error const head_error(dib_read_bitmap_header(fp, header, palette_bytes, indexed, palette_entries, palette_size, row_bytes, length));
+ if (msdib_error::NONE != head_error)
+ return head_error;
+
+ // check dimensions
+ bool const top_down(0 > header.info.height);
+ if (top_down)
+ header.info.height = -header.info.height;
+ bool have_and_mask((2 * dirheight) == header.info.height);
+ if (!have_and_mask && (0 < dirheight) && (dirheight != header.info.height))
+ {
+ osd_printf_verbose(
+ "DIB image data height %d doesn't match directory height %u with or without AND mask\n",
+ header.info.height,
+ dirheight);
+ return msdib_error::UNSUPPORTED_FORMAT;
+ }
+ if (have_and_mask)
+ header.info.height >>= 1;
+
+ // we can now calculate the size of the image data
+ std::size_t const mask_row_bytes(((31 + header.info.width) >> 5) << 2);
+ std::size_t const required_size(
+ header.info.size +
+ palette_size +
+ ((row_bytes + (have_and_mask ? mask_row_bytes : 0U)) * header.info.height));
+ if (required_size > length)
+ {
+ LOG("DIB image data (%u bytes) smaller than calculated DIB data size (%u bytes)\n", length, required_size);
+ return msdib_error::FILE_TRUNCATED;
+ }
+
+ // load the palette for indexed colour formats or the shifts for direct colour formats
+ unsigned red_shift(0), green_shift(0), blue_shift(0), alpha_shift(0);
+ unsigned red_bits(0), green_bits(0), blue_bits(0), alpha_bits(0);
+ std::unique_ptr<rgb_t []> palette;
+ if (indexed)
+ {
+ // read palette and convert
+ std::unique_ptr<std::uint8_t []> palette_data;
+ try { palette_data.reset(new std::uint8_t [palette_size]); }
+ catch (std::bad_alloc const &) { return msdib_error::OUT_OF_MEMORY; }
+ if (fp.read(palette_data.get(), palette_size) != palette_size)
+ {
+ LOG("Error reading palette from DIB image data (%u bytes)\n", length);
+ return msdib_error::FILE_TRUNCATED;
+ }
+ std::size_t const palette_usable(std::min<std::size_t>(palette_entries, std::size_t(1) << header.info.bpp));
+ try { palette.reset(new rgb_t [palette_usable]); }
+ catch (std::bad_alloc const &) { return msdib_error::OUT_OF_MEMORY; }
+ std::uint8_t const *ptr(palette_data.get());
+ for (std::size_t i = 0; palette_usable > i; ++i, ptr += palette_bytes)
+ palette[i] = rgb_t(ptr[2], ptr[1], ptr[0]);
+ }
+ else
+ {
+ // skip over the palette if necessary
+ if (palette_entries)
+ fp.seek(palette_bytes * palette_entries, SEEK_CUR);
+
+ // convert masks to shifts
+ bool const masks_contiguous(
+ dib_parse_mask(header.info.red, red_shift, red_bits) &&
+ dib_parse_mask(header.info.green, green_shift, green_bits) &&
+ dib_parse_mask(header.info.blue, blue_shift, blue_bits) &&
+ dib_parse_mask(header.info.alpha, alpha_shift, alpha_bits));
+ if (!masks_contiguous)
+ {
+ osd_printf_verbose(
+ "DIB image data specifies non-contiguous channel masks 0x%x | 0x%x | 0x%x | 0x%x\n",
+ header.info.red,
+ header.info.green,
+ header.info.blue,
+ header.info.alpha);
+ }
+ if ((32U != header.info.bpp) && ((header.info.red | header.info.green | header.info.blue | header.info.alpha) >> header.info.bpp))
+ {
+ LOG(
+ "DIB image data specifies channel masks 0x%x | 0x%x | 0x%x | 0x%x that exceed %u bits per pixel\n",
+ header.info.red,
+ header.info.green,
+ header.info.blue,
+ header.info.alpha,
+ header.info.bpp);
+ return msdib_error::FILE_CORRUPT;
+ }
+ LOGMASKED(
+ LOG_DIB,
+ "DIB image data using channels: R((x >> %2$u) & 0x%3$0*1$x) G((x >> %4$u) & 0x%5$0*1$x) B((x >> %6$u) & 0x%7$0*1$x) A((x >> %8$u) & 0x%9$0*1$x)\n",
+ (header.info.bpp + 3) >> 2,
+ red_shift,
+ (std::uint32_t(1) << red_bits) - 1,
+ green_shift,
+ (std::uint32_t(1) << green_bits) - 1,
+ blue_shift,
+ (std::uint32_t(1) << blue_bits) - 1,
+ alpha_shift,
+ (std::uint32_t(1) << alpha_bits) - 1);
+
+ // the MAME bitmap only supports 8 bits/sample maximum
+ dib_truncate_channel(red_shift, red_bits);
+ dib_truncate_channel(green_shift, green_bits);
+ dib_truncate_channel(blue_shift, blue_bits);
+ dib_truncate_channel(alpha_shift, alpha_bits);
+ }
+
+ // allocate the bitmap and process row data
+ std::unique_ptr<std::uint8_t []> row_data;
+ try {row_data.reset(new std::uint8_t [row_bytes]); }
+ catch (std::bad_alloc const &) { return msdib_error::OUT_OF_MEMORY; }
+ bitmap.allocate(header.info.width, header.info.height);
+ int const y_inc(top_down ? 1 : -1);
+ for (std::int32_t i = 0, y = top_down ? 0 : (header.info.height - 1); header.info.height > i; ++i, y += y_inc)
+ {
+ if (fp.read(row_data.get(), row_bytes) != row_bytes)
+ {
+ LOG("Error reading DIB row %d data from image data\n", i);
+ return msdib_error::FILE_TRUNCATED;
+ }
+ std::uint8_t *src(row_data.get());
+ std::uint32_t *dest(&bitmap.pix(y));
+ unsigned shift(0U);
+ for (std::int32_t x = 0; header.info.width > x; ++x, ++dest)
+ {
+ // extract or compose a pixel
+ std::uint32_t pix(0U);
+ if (8U >= header.info.bpp)
+ {
+ assert(8U > shift);
+ pix = *src >> (8U - header.info.bpp);
+ *src <<= header.info.bpp;
+ shift += header.info.bpp;
+ if (8U <= shift)
+ {
+ shift = 0U;
+ ++src;
+ }
+ }
+ else for (shift = 0; header.info.bpp > shift; shift += 8U, ++src)
+ {
+ pix |= std::uint32_t(*src) << shift;
+ }
+
+ // convert to RGB
+ if (indexed)
+ {
+ if (palette_entries > pix)
+ {
+ *dest = palette[pix];
+ }
+ else
+ {
+ *dest = rgb_t::transparent();
+ osd_printf_verbose(
+ "DIB image data has out-of-range color %u at (%d, %d) with %u palette entries\n",
+ pix,
+ x,
+ y,
+ palette_entries);
+ }
+ }
+ else
+ {
+ std::uint8_t r(dib_splat_sample((pix >> red_shift) & ((std::uint32_t(1) << red_bits) - 1), red_bits));
+ std::uint8_t g(dib_splat_sample((pix >> green_shift) & ((std::uint32_t(1) << green_bits) - 1), green_bits));
+ std::uint8_t b(dib_splat_sample((pix >> blue_shift) & ((std::uint32_t(1) << blue_bits) - 1), blue_bits));
+ std::uint8_t a(dib_splat_sample((pix >> alpha_shift) & ((std::uint32_t(1) << alpha_bits) - 1), alpha_bits));
+ *dest = rgb_t(alpha_bits ? a : 255, r, g, b);
+ }
+ }
+ }
+
+ // process the AND mask if present
+ if (have_and_mask)
+ {
+ for (std::int32_t i = 0, y = top_down ? 0 : (header.info.height - 1); header.info.height > i; ++i, y += y_inc)
+ {
+ if (fp.read(row_data.get(), mask_row_bytes) != mask_row_bytes)
+ {
+ LOG("Error reading DIB mask row %d data from image data\n", i);
+ return msdib_error::FILE_TRUNCATED;
+ }
+ std::uint8_t *src(row_data.get());
+ std::uint32_t *dest(&bitmap.pix(y));
+ unsigned shift(0U);
+ for (std::int32_t x = 0; header.info.width > x; ++x, ++dest)
+ {
+ assert(8U > shift);
+ rgb_t pix(*dest);
+ *dest = pix.set_a(BIT(*src, 7U - shift) ? 0U : pix.a());
+ if (8U <= ++shift)
+ {
+ shift = 0U;
+ ++src;
+ }
+ }
+ }
+ }
+
+ // we're done!
+ return msdib_error::NONE;
+}
+
+} // namespace util
diff --git a/src/lib/util/msdib.h b/src/lib/util/msdib.h
new file mode 100644
index 00000000000..54767e216fb
--- /dev/null
+++ b/src/lib/util/msdib.h
@@ -0,0 +1,46 @@
+// license:BSD-3-Clause
+// copyright-holders:Vas Crabb
+/***************************************************************************
+
+ msdib.h
+
+ Microsoft Device-Independent Bitmap file loading.
+
+***************************************************************************/
+#ifndef MAME_LIB_UTIL_MSDIB_H
+#define MAME_LIB_UTIL_MSDIB_H
+
+#pragma once
+
+#include "bitmap.h"
+#include "corefile.h"
+#include "osdcore.h"
+
+#include <cstdint>
+
+
+namespace util {
+
+/***************************************************************************
+ CONSTANTS
+***************************************************************************/
+
+// Error types
+enum class msdib_error
+{
+ NONE,
+ OUT_OF_MEMORY,
+ FILE_ERROR,
+ BAD_SIGNATURE,
+ FILE_TRUNCATED,
+ FILE_CORRUPT,
+ UNSUPPORTED_FORMAT
+};
+
+msdib_error msdib_verify_header(core_file &fp);
+msdib_error msdib_read_bitmap(core_file &fp, bitmap_argb32 &bitmap);
+msdib_error msdib_read_bitmap_data(core_file &fp, bitmap_argb32 &bitmap, std::uint32_t length, std::uint32_t dirheight = 0U);
+
+} // namespace util
+
+#endif // MAME_LIB_UTIL_MSDIB_H
diff --git a/src/lib/util/nanosvg.cpp b/src/lib/util/nanosvg.cpp
index 09973865675..0cb05308d19 100644
--- a/src/lib/util/nanosvg.cpp
+++ b/src/lib/util/nanosvg.cpp
@@ -1,6 +1,10 @@
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+#define NANOSVG_ALL_COLOR_KEYWORDS
#define NANOSVG_IMPLEMENTATION
#define NANOSVGRAST_IMPLEMENTATION
-#define NANOSVG_ALL_COLOR_KEYWORDS
#include <nanosvg/src/nanosvg.h>
#include <nanosvg/src/nanosvgrast.h>
diff --git a/src/lib/util/nanosvg.h b/src/lib/util/nanosvg.h
new file mode 100644
index 00000000000..49940f0b9be
--- /dev/null
+++ b/src/lib/util/nanosvg.h
@@ -0,0 +1,33 @@
+// license:BSD-3-Clause
+// copyright-holders:Vas Crabb
+/***************************************************************************
+
+ nanosvg.h
+
+ NanoSVG helpers.
+
+***************************************************************************/
+#ifndef MAME_LIB_UTIL_NANOSVG_H
+#define MAME_LIB_UTIL_NANOSVG_H
+
+#include <nanosvg/src/nanosvg.h>
+#include <nanosvg/src/nanosvgrast.h>
+
+#include <memory>
+
+
+namespace util {
+
+struct nsvg_deleter
+{
+ void operator()(NSVGimage *ptr) const { nsvgDelete(ptr); }
+ void operator()(NSVGrasterizer *ptr) const { nsvgDeleteRasterizer(ptr); }
+};
+
+
+using nsvg_image_ptr = std::unique_ptr<NSVGimage, nsvg_deleter>;
+using nsvg_rasterizer_ptr = std::unique_ptr<NSVGrasterizer, nsvg_deleter>;
+
+} // namespace util
+
+#endif // MAME_LIB_UTIL_NANOSVG_H
diff --git a/src/lib/util/png.cpp b/src/lib/util/png.cpp
index 6b59436750c..50aeb28c5fe 100644
--- a/src/lib/util/png.cpp
+++ b/src/lib/util/png.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Aaron Giles, Vas Crabb
/*********************************************************************
- png.c
+ png.cpp
PNG reading functions.
@@ -16,34 +16,13 @@
#include <algorithm>
#include <cassert>
-#include <cstdint>
-#include <cstring>
-#include <cmath>
-#include <new>
-
#include <cmath>
#include <cstdlib>
+#include <cstring>
+#include <new>
-
-/***************************************************************************
- GLOBAL VARIABLES
-***************************************************************************/
-
-static const int samples[] = { 1, 0, 3, 1, 2, 0, 4 };
-
-
-
-/***************************************************************************
- INLINE FUNCTIONS
-***************************************************************************/
-
-static inline int compute_rowbytes(const png_info &pnginfo)
-{
- return (pnginfo.width * samples[pnginfo.color_type] * pnginfo.bit_depth + 7) / 8;
-}
-
-
+namespace util {
/***************************************************************************
GENERAL FUNCTIONS
@@ -66,6 +45,12 @@ void png_info::free_data()
namespace {
+/***************************************************************************
+ GLOBAL VARIABLES
+***************************************************************************/
+
+constexpr int samples[] = { 1, 0, 3, 1, 2, 0, 4 };
+
constexpr std::uint8_t PNG_SIGNATURE[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a };
#define MNG_Signature "\x8A\x4D\x4E\x47\x0D\x0A\x1A\x0A"
@@ -101,6 +86,12 @@ constexpr std::uint8_t PNG_PF_Average = 3;
constexpr std::uint8_t PNG_PF_Paeth = 4;
+/***************************************************************************
+ INLINE FUNCTIONS
+***************************************************************************/
+
+inline int compute_rowbytes(const png_info &pnginfo) { return (pnginfo.width * samples[pnginfo.color_type] * pnginfo.bit_depth + 7) / 8; }
+
inline uint8_t fetch_8bit(uint8_t const *v) { return *v; }
inline uint16_t fetch_16bit(uint8_t const *v) { return big_endianize_int16(*reinterpret_cast<uint16_t const *>(v)); }
inline uint32_t fetch_32bit(uint8_t const *v) { return big_endianize_int32(*reinterpret_cast<uint32_t const *>(v)); }
@@ -132,11 +123,11 @@ private:
{
// do some basic checks for unsupported images
if (!pnginfo.bit_depth || (ARRAY_LENGTH(samples) <= pnginfo.color_type) || !samples[pnginfo.color_type])
- return PNGERR_UNSUPPORTED_FORMAT; // unknown colour format
+ return png_error::UNSUPPORTED_FORMAT; // unknown colour format
if ((0 != pnginfo.interlace_method) && (1 != pnginfo.interlace_method))
- return PNGERR_UNSUPPORTED_FORMAT; // unknown interlace method
+ return png_error::UNSUPPORTED_FORMAT; // unknown interlace method
if ((3 == pnginfo.color_type) && (!pnginfo.num_palette || !pnginfo.palette))
- return PNGERR_FILE_CORRUPT; // indexed colour with no palette
+ return png_error::FILE_CORRUPT; // indexed colour with no palette
// calculate the offset for each pass of the interlace
unsigned const pass_count(get_pass_count());
@@ -146,13 +137,13 @@ private:
// allocate memory for the filtered image
try { pnginfo.image.reset(new std::uint8_t [pass_offset[pass_count]]); }
- catch (std::bad_alloc const &) { return PNGERR_OUT_OF_MEMORY; }
+ catch (std::bad_alloc const &) { return png_error::OUT_OF_MEMORY; }
// decompress image data
- png_error error = PNGERR_NONE;
+ png_error error = png_error::NONE;
error = decompress(idata, pass_offset[pass_count]);
std::uint32_t const bpp(get_bytes_per_pixel());
- for (unsigned pass = 0; (pass_count > pass) && (PNGERR_NONE == error); ++pass)
+ for (unsigned pass = 0; (pass_count > pass) && (png_error::NONE == error); ++pass)
{
// compute some basic parameters
std::pair<std::uint32_t, std::uint32_t> const dimensions(get_pass_dimensions(pass));
@@ -161,7 +152,7 @@ private:
// we de-filter in place, stripping the filter bytes off the rows
uint8_t *dst(&pnginfo.image[pass_offset[pass]]);
uint8_t const *src(dst);
- for (std::uint32_t y = 0; (dimensions.second > y) && (PNGERR_NONE == error); ++y)
+ for (std::uint32_t y = 0; (dimensions.second > y) && (png_error::NONE == error); ++y)
{
// first byte of each row is the filter type
uint8_t const filter(*src++);
@@ -172,7 +163,7 @@ private:
}
// if we errored, free the image data
- if (error != PNGERR_NONE)
+ if (error != png_error::NONE)
pnginfo.image.reset();
return error;
@@ -182,7 +173,7 @@ private:
{
// only deflate is permitted
if (0 != pnginfo.compression_method)
- return PNGERR_DECOMPRESS_ERROR;
+ return png_error::DECOMPRESS_ERROR;
// allocate zlib stream
z_stream stream;
@@ -195,7 +186,7 @@ private:
stream.next_in = Z_NULL;
zerr = inflateInit(&stream);
if (Z_OK != zerr)
- return PNGERR_DECOMPRESS_ERROR;
+ return png_error::DECOMPRESS_ERROR;
// decompress IDAT blocks
stream.next_out = pnginfo.image.get();
@@ -217,28 +208,28 @@ private:
// it's all good if we got end-of-stream or we have with no data remaining
if ((Z_OK == inflateEnd(&stream)) && ((Z_STREAM_END == zerr) || ((Z_OK == zerr) && (idata.end() == it) && !stream.avail_in)))
- return PNGERR_NONE;
+ return png_error::NONE;
else
- return PNGERR_DECOMPRESS_ERROR;
+ return png_error::DECOMPRESS_ERROR;
}
png_error unfilter_row(std::uint8_t type, uint8_t const *src, uint8_t *dst, uint8_t const *dstprev, int bpp, std::uint32_t rowbytes)
{
if (0 != pnginfo.filter_method)
- return PNGERR_UNKNOWN_FILTER;
+ return png_error::UNKNOWN_FILTER;
switch (type)
{
case PNG_PF_None: // no filter, just copy
std::copy_n(src, rowbytes, dst);
- return PNGERR_NONE;
+ return png_error::NONE;
case PNG_PF_Sub: // SUB = previous pixel
dst = std::copy_n(src, bpp, dst);
src += bpp;
for (std::uint32_t x = bpp; rowbytes > x; ++x, ++src, ++dst)
*dst = *src + dst[-bpp];
- return PNGERR_NONE;
+ return png_error::NONE;
case PNG_PF_Up: // UP = pixel above
if (dstprev)
@@ -250,7 +241,7 @@ private:
{
std::copy_n(src, rowbytes, dst);
}
- return PNGERR_NONE;
+ return png_error::NONE;
case PNG_PF_Average: // AVERAGE = average of pixel above and previous pixel
if (dstprev)
@@ -267,7 +258,7 @@ private:
for (std::uint32_t x = bpp; rowbytes > x; ++x, ++src, ++dst)
*dst = *src + (dst[-bpp] >> 1);
}
- return PNGERR_NONE;
+ return png_error::NONE;
case PNG_PF_Paeth: // PAETH = special filter
for (std::uint32_t x = 0; rowbytes > x; ++x, ++src, ++dst)
@@ -281,10 +272,10 @@ private:
int32_t const dc(std::abs(prediction - pc));
*dst = ((da <= db) && (da <= dc)) ? (*src + pa) : (db <= dc) ? (*src + pb) : (*src + pc);
}
- return PNGERR_NONE;
+ return png_error::NONE;
default: // unknown filter type
- return PNGERR_UNKNOWN_FILTER;
+ return png_error::UNKNOWN_FILTER;
}
}
@@ -294,7 +285,7 @@ private:
{
case PNG_CN_IHDR: // image header
if (13 > length)
- return PNGERR_FILE_CORRUPT;
+ return png_error::FILE_CORRUPT;
pnginfo.width = fetch_32bit(&data[0]);
pnginfo.height = fetch_32bit(&data[4]);
pnginfo.bit_depth = fetch_8bit(&data[8]);
@@ -307,31 +298,31 @@ private:
case PNG_CN_PLTE: // palette
pnginfo.num_palette = length / 3;
if ((length % 3) || ((3 == pnginfo.color_type) && ((1 << pnginfo.bit_depth) < pnginfo.num_palette)))
- return PNGERR_FILE_CORRUPT;
+ return png_error::FILE_CORRUPT;
pnginfo.palette = std::move(data);
break;
case PNG_CN_tRNS: // transparency information
if (((0 == pnginfo.color_type) && (2 > length)) || ((2 == pnginfo.color_type) && (6 > length)))
- return PNGERR_FILE_CORRUPT;
+ return png_error::FILE_CORRUPT;
pnginfo.num_trans = length;
pnginfo.trans = std::move(data);
break;
case PNG_CN_IDAT: // image data
try { idata.emplace_back(length, std::move(data)); }
- catch (std::bad_alloc const &) { return PNGERR_OUT_OF_MEMORY; }
+ catch (std::bad_alloc const &) { return png_error::OUT_OF_MEMORY; }
break;
case PNG_CN_gAMA: // gamma
if (4 > length)
- return PNGERR_FILE_CORRUPT;
+ return png_error::FILE_CORRUPT;
pnginfo.source_gamma = fetch_32bit(data.get()) / 100000.0;
break;
case PNG_CN_pHYs: // physical information
if (9 > length)
- return PNGERR_FILE_CORRUPT;
+ return png_error::FILE_CORRUPT;
pnginfo.xres = fetch_32bit(&data[0]);
pnginfo.yres = fetch_32bit(&data[4]);
pnginfo.resolution_unit = fetch_8bit(&data[8]);
@@ -361,17 +352,17 @@ private:
}
catch (std::bad_alloc const &)
{
- return PNGERR_OUT_OF_MEMORY;
+ return png_error::OUT_OF_MEMORY;
}
break;
/* anything else */
default:
if ((type & 0x20000000) == 0)
- return PNGERR_UNKNOWN_CHUNK;
+ return png_error::UNKNOWN_CHUNK;
break;
}
- return PNGERR_NONE;
+ return png_error::NONE;
}
unsigned get_pass_count() const
@@ -413,23 +404,23 @@ private:
return ((samples[pnginfo.color_type] * pnginfo.bit_depth) + 7) >> 3;
}
- static png_error read_chunk(util::core_file &fp, std::unique_ptr<std::uint8_t []> &data, std::uint32_t &type, std::uint32_t &length)
+ static png_error read_chunk(core_file &fp, std::unique_ptr<std::uint8_t []> &data, std::uint32_t &type, std::uint32_t &length)
{
std::uint8_t tempbuff[4];
/* fetch the length of this chunk */
if (fp.read(tempbuff, 4) != 4)
- return PNGERR_FILE_TRUNCATED;
+ return png_error::FILE_TRUNCATED;
length = fetch_32bit(tempbuff);
/* fetch the type of this chunk */
if (fp.read(tempbuff, 4) != 4)
- return PNGERR_FILE_TRUNCATED;
+ return png_error::FILE_TRUNCATED;
type = fetch_32bit(tempbuff);
/* stop when we hit an IEND chunk */
if (type == PNG_CN_IEND)
- return PNGERR_NONE;
+ return png_error::NONE;
/* start the CRC with the chunk type (but not the length) */
std::uint32_t crc = crc32(0, tempbuff, 4);
@@ -439,13 +430,13 @@ private:
{
/* allocate memory for this chunk */
try { data.reset(new std::uint8_t [length]); }
- catch (std::bad_alloc const &) { return PNGERR_OUT_OF_MEMORY; }
+ catch (std::bad_alloc const &) { return png_error::OUT_OF_MEMORY; }
/* read the data from the file */
if (fp.read(data.get(), length) != length)
{
data.reset();
- return PNGERR_FILE_TRUNCATED;
+ return png_error::FILE_TRUNCATED;
}
/* update the CRC */
@@ -456,7 +447,7 @@ private:
if (fp.read(tempbuff, 4) != 4)
{
data.reset();
- return PNGERR_FILE_TRUNCATED;
+ return png_error::FILE_TRUNCATED;
}
std::uint32_t const chunk_crc = fetch_32bit(tempbuff);
@@ -464,10 +455,10 @@ private:
if (crc != chunk_crc)
{
data.reset();
- return PNGERR_FILE_CORRUPT;
+ return png_error::FILE_CORRUPT;
}
- return PNGERR_NONE;
+ return png_error::NONE;
}
png_info & pnginfo;
@@ -481,13 +472,13 @@ public:
{
// do some basic checks for unsupported images
if ((8 > pnginfo.bit_depth) || (pnginfo.bit_depth % 8))
- return PNGERR_UNSUPPORTED_FORMAT; // only do multiples of 8bps here - expand lower bit depth first
+ return png_error::UNSUPPORTED_FORMAT; // only do multiples of 8bps here - expand lower bit depth first
if ((ARRAY_LENGTH(samples) <= pnginfo.color_type) || !samples[pnginfo.color_type])
- return PNGERR_UNSUPPORTED_FORMAT; // unknown colour sample format
+ return png_error::UNSUPPORTED_FORMAT; // unknown colour sample format
if ((0 != pnginfo.interlace_method) && (1 != pnginfo.interlace_method))
- return PNGERR_UNSUPPORTED_FORMAT; // unknown interlace method
+ return png_error::UNSUPPORTED_FORMAT; // unknown interlace method
if ((3 == pnginfo.color_type) && (8 != pnginfo.bit_depth))
- return PNGERR_UNSUPPORTED_FORMAT; // indexed colour must be exactly 8bpp
+ return png_error::UNSUPPORTED_FORMAT; // indexed colour must be exactly 8bpp
// everything looks sane, allocate the bitmap and deinterlace into it
bitmap.allocate(pnginfo.width, pnginfo.height);
@@ -519,7 +510,7 @@ public:
accumalpha &= alpha;
std::uint16_t const paloffs(std::uint16_t(*src) * 3);
rgb_t const pix(alpha, pnginfo.palette[paloffs], pnginfo.palette[paloffs + 1], pnginfo.palette[paloffs + 2]);
- bitmap.pix32((y << y_shift) + y_offs, (x << x_shift) + x_offs) = pix;
+ bitmap.pix((y << y_shift) + y_offs, (x << x_shift) + x_offs) = pix;
}
}
}
@@ -537,7 +528,7 @@ public:
std::uint8_t const a_val((pnginfo.trans && (transpen == i_val)) ? 0x00 : 0xff);
i_val >>= samp_shift;
accumalpha &= a_val;
- bitmap.pix32((y << y_shift) + y_offs, (x << x_shift) + x_offs) = rgb_t(a_val, i_val, i_val, i_val);
+ bitmap.pix((y << y_shift) + y_offs, (x << x_shift) + x_offs) = rgb_t(a_val, i_val, i_val, i_val);
}
}
}
@@ -552,7 +543,7 @@ public:
{
accumalpha &= src[a];
rgb_t const pix(src[a], src[i], src[i], src[i]);
- bitmap.pix32((y << y_shift) + y_offs, (x << x_shift) + x_offs) = pix;
+ bitmap.pix((y << y_shift) + y_offs, (x << x_shift) + x_offs) = pix;
}
}
}
@@ -578,7 +569,7 @@ public:
g_val >>= samp_shift;
b_val >>= samp_shift;
accumalpha &= a_val;
- bitmap.pix32((y << y_shift) + y_offs, (x << x_shift) + x_offs) = rgb_t(a_val, r_val, g_val, b_val);
+ bitmap.pix((y << y_shift) + y_offs, (x << x_shift) + x_offs) = rgb_t(a_val, r_val, g_val, b_val);
}
}
}
@@ -595,7 +586,7 @@ public:
{
accumalpha &= src[a];
rgb_t const pix(src[a], src[r], src[g], src[b]);
- bitmap.pix32((y << y_shift) + y_offs, (x << x_shift) + x_offs) = pix;
+ bitmap.pix((y << y_shift) + y_offs, (x << x_shift) + x_offs) = pix;
}
}
}
@@ -603,22 +594,22 @@ public:
// set hasalpha flag and return
hasalpha = 0xffU != accumalpha;
- return PNGERR_NONE;
+ return png_error::NONE;
}
png_error expand_buffer_8bit()
{
// nothing to do if we're at 8 or greater already
if (pnginfo.bit_depth >= 8)
- return PNGERR_NONE;
+ return png_error::NONE;
// do some basic checks for unsupported images
if (!pnginfo.bit_depth || (8 % pnginfo.bit_depth))
- return PNGERR_UNSUPPORTED_FORMAT; // bit depth must be a factor of eight
+ return png_error::UNSUPPORTED_FORMAT; // bit depth must be a factor of eight
if ((0 != pnginfo.color_type) && (3 != pnginfo.color_type))
- return PNGERR_UNSUPPORTED_FORMAT; // only upsample monochrome and indexed colour
+ return png_error::UNSUPPORTED_FORMAT; // only upsample monochrome and indexed colour
if ((0 != pnginfo.interlace_method) && (1 != pnginfo.interlace_method))
- return PNGERR_UNSUPPORTED_FORMAT; // unknown interlace method
+ return png_error::UNSUPPORTED_FORMAT; // unknown interlace method
// calculate the offset for each pass of the interlace on the input and output
unsigned const pass_count(get_pass_count());
@@ -633,7 +624,7 @@ public:
// allocate a new buffer at 8-bit
std::unique_ptr<std::uint8_t []> outbuf;
try { outbuf.reset(new std::uint8_t [outp_offset[pass_count]]); }
- catch (std::bad_alloc const &) { return PNGERR_OUT_OF_MEMORY; }
+ catch (std::bad_alloc const &) { return png_error::OUT_OF_MEMORY; }
// upsample bitmap
std::uint8_t const bytesamples(8 / pnginfo.bit_depth);
@@ -687,13 +678,13 @@ public:
pnginfo.image = std::move(outbuf);
pnginfo.bit_depth = 8;
- return PNGERR_NONE;
+ return png_error::NONE;
}
- png_error read_file(util::core_file &fp)
+ png_error read_file(core_file &fp)
{
// initialize the data structures
- png_error error = PNGERR_NONE;
+ png_error error = png_error::NONE;
pnginfo.reset();
std::list<image_data_chunk> idata;
@@ -701,13 +692,13 @@ public:
error = verify_header(fp);
// loop until we hit an IEND chunk
- while (PNGERR_NONE == error)
+ while (png_error::NONE == error)
{
// read a chunk
std::unique_ptr<std::uint8_t []> chunk_data;
std::uint32_t chunk_type = 0, chunk_length;
error = read_chunk(fp, chunk_data, chunk_type, chunk_length);
- if (PNGERR_NONE == error)
+ if (png_error::NONE == error)
{
if (chunk_type == PNG_CN_IEND)
break; // stop when we hit an IEND chunk
@@ -717,29 +708,29 @@ public:
}
// finish processing the image
- if (PNGERR_NONE == error)
+ if (png_error::NONE == error)
error = process(idata);
// if we have an error, free all the output data
- if (error != PNGERR_NONE)
+ if (error != png_error::NONE)
pnginfo.reset();
return error;
}
- static png_error verify_header(util::core_file &fp)
+ static png_error verify_header(core_file &fp)
{
EQUIVALENT_ARRAY(PNG_SIGNATURE, std::uint8_t) signature;
// read 8 bytes
if (fp.read(signature, sizeof(signature)) != sizeof(signature))
- return PNGERR_FILE_TRUNCATED;
+ return png_error::FILE_TRUNCATED;
// return an error if we don't match
if (std::memcmp(signature, PNG_SIGNATURE, sizeof(PNG_SIGNATURE)))
- return PNGERR_BAD_SIGNATURE;
+ return png_error::BAD_SIGNATURE;
- return PNGERR_NONE;
+ return png_error::NONE;
}
};
@@ -760,7 +751,7 @@ constexpr unsigned png_private::ADAM7_Y_OFFS[7];
core stream
-------------------------------------------------*/
-png_error png_info::verify_header(util::core_file &fp)
+png_error png_info::verify_header(core_file &fp)
{
return png_private::verify_header(fp);
}
@@ -770,7 +761,7 @@ png_error png_info::verify_header(util::core_file &fp)
read_file - read a PNG from a core stream
-------------------------------------------------*/
-png_error png_info::read_file(util::core_file &fp)
+png_error png_info::read_file(core_file &fp)
{
return png_private(*this).read_file(fp);
}
@@ -781,7 +772,7 @@ png_error png_info::read_file(util::core_file &fp)
bitmap
-------------------------------------------------*/
-png_error png_read_bitmap(util::core_file &fp, bitmap_argb32 &bitmap)
+png_error png_read_bitmap(core_file &fp, bitmap_argb32 &bitmap)
{
png_error result;
png_info pnginfo;
@@ -789,12 +780,12 @@ png_error png_read_bitmap(util::core_file &fp, bitmap_argb32 &bitmap)
// read the PNG data
result = png.read_file(fp);
- if (PNGERR_NONE != result)
+ if (png_error::NONE != result)
return result;
// resample to 8bpp if necessary
result = png.expand_buffer_8bit();
- if (PNGERR_NONE != result)
+ if (png_error::NONE != result)
{
pnginfo.free_data();
return result;
@@ -848,13 +839,13 @@ png_error png_info::add_text(const char *keyword, const char *text)
char32_t ch;
int const len(uchar_from_utf8(&ch, ptr, kwend - ptr));
if ((0 >= len) || (32 > ch) || (255 < ch) || ((126 < ch) && (161 > ch)) || (((32 == prev) || (keyword == ptr)) && (32 == ch)))
- return PNGERR_UNSUPPORTED_FORMAT;
+ return png_error::UNSUPPORTED_FORMAT;
prev = ch;
++cnt;
ptr += len;
}
if ((32 == prev) || (1 > cnt) || (79 < cnt))
- return PNGERR_UNSUPPORTED_FORMAT;
+ return png_error::UNSUPPORTED_FORMAT;
// apply rules to text
char const *const textend(text + std::strlen(text));
@@ -863,14 +854,14 @@ png_error png_info::add_text(const char *keyword, const char *text)
char32_t ch;
int const len(uchar_from_utf8(&ch, ptr, textend - ptr));
if ((0 >= len) || (1 > ch) || (255 < ch))
- return PNGERR_UNSUPPORTED_FORMAT;
+ return png_error::UNSUPPORTED_FORMAT;
ptr += len;
}
// allocate a new text element
try { textlist.emplace_back(std::piecewise_construct, std::forward_as_tuple(keyword, kwend), std::forward_as_tuple(text, textend)); }
- catch (std::bad_alloc const &) { return PNGERR_OUT_OF_MEMORY; }
- return PNGERR_NONE;
+ catch (std::bad_alloc const &) { return png_error::OUT_OF_MEMORY; }
+ return png_error::NONE;
}
@@ -879,7 +870,7 @@ png_error png_info::add_text(const char *keyword, const char *text)
the given file
-------------------------------------------------*/
-static png_error write_chunk(util::core_file &fp, const uint8_t *data, uint32_t type, uint32_t length)
+static png_error write_chunk(core_file &fp, const uint8_t *data, uint32_t type, uint32_t length)
{
uint8_t tempbuff[8];
uint32_t crc;
@@ -891,22 +882,22 @@ static png_error write_chunk(util::core_file &fp, const uint8_t *data, uint32_t
/* write that data */
if (fp.write(tempbuff, 8) != 8)
- return PNGERR_FILE_ERROR;
+ return png_error::FILE_ERROR;
/* append the actual data */
if (length > 0)
{
if (fp.write(data, length) != length)
- return PNGERR_FILE_ERROR;
+ return png_error::FILE_ERROR;
crc = crc32(crc, data, length);
}
/* write the CRC */
put_32bit(tempbuff, crc);
if (fp.write(tempbuff, 4) != 4)
- return PNGERR_FILE_ERROR;
+ return png_error::FILE_ERROR;
- return PNGERR_NONE;
+ return png_error::NONE;
}
@@ -915,7 +906,7 @@ static png_error write_chunk(util::core_file &fp, const uint8_t *data, uint32_t
chunk to the given file by deflating it
-------------------------------------------------*/
-static png_error write_deflated_chunk(util::core_file &fp, uint8_t *data, uint32_t type, uint32_t length)
+static png_error write_deflated_chunk(core_file &fp, uint8_t *data, uint32_t type, uint32_t length)
{
uint64_t lengthpos = fp.tell();
uint8_t tempbuff[8192];
@@ -931,7 +922,7 @@ static png_error write_deflated_chunk(util::core_file &fp, uint8_t *data, uint32
/* write that data */
if (fp.write(tempbuff, 8) != 8)
- return PNGERR_FILE_ERROR;
+ return png_error::FILE_ERROR;
/* initialize the stream */
memset(&stream, 0, sizeof(stream));
@@ -939,7 +930,7 @@ static png_error write_deflated_chunk(util::core_file &fp, uint8_t *data, uint32
stream.avail_in = length;
zerr = deflateInit(&stream, Z_DEFAULT_COMPRESSION);
if (zerr != Z_OK)
- return PNGERR_COMPRESS_ERROR;
+ return png_error::COMPRESS_ERROR;
/* now loop until we run out of data */
for ( ; ; )
@@ -956,7 +947,7 @@ static png_error write_deflated_chunk(util::core_file &fp, uint8_t *data, uint32
if (fp.write(tempbuff, bytes) != bytes)
{
deflateEnd(&stream);
- return PNGERR_FILE_ERROR;
+ return png_error::FILE_ERROR;
}
crc = crc32(crc, tempbuff, bytes);
zlength += bytes;
@@ -970,29 +961,29 @@ static png_error write_deflated_chunk(util::core_file &fp, uint8_t *data, uint32
if (zerr != Z_OK)
{
deflateEnd(&stream);
- return PNGERR_COMPRESS_ERROR;
+ return png_error::COMPRESS_ERROR;
}
}
/* clean up deflater(maus) */
zerr = deflateEnd(&stream);
if (zerr != Z_OK)
- return PNGERR_COMPRESS_ERROR;
+ return png_error::COMPRESS_ERROR;
/* write the CRC */
put_32bit(tempbuff, crc);
if (fp.write(tempbuff, 4) != 4)
- return PNGERR_FILE_ERROR;
+ return png_error::FILE_ERROR;
/* seek back and update the length */
fp.seek(lengthpos, SEEK_SET);
put_32bit(tempbuff + 0, zlength);
if (fp.write(tempbuff, 4) != 4)
- return PNGERR_FILE_ERROR;
+ return png_error::FILE_ERROR;
/* return to the end */
fp.seek(lengthpos + 8 + zlength + 4, SEEK_SET);
- return PNGERR_NONE;
+ return png_error::NONE;
}
@@ -1016,7 +1007,7 @@ static png_error convert_bitmap_to_image_palette(png_info &pnginfo, const bitmap
/* allocate memory for the palette */
try { pnginfo.palette.reset(new std::uint8_t [3 * 256]); }
- catch (std::bad_alloc const &) { return PNGERR_OUT_OF_MEMORY; }
+ catch (std::bad_alloc const &) { return png_error::OUT_OF_MEMORY; }
/* build the palette */
std::fill_n(pnginfo.palette.get(), 3 * 256, 0);
@@ -1036,13 +1027,13 @@ static png_error convert_bitmap_to_image_palette(png_info &pnginfo, const bitmap
catch (std::bad_alloc const &)
{
pnginfo.palette.reset();
- return PNGERR_OUT_OF_MEMORY;
+ return png_error::OUT_OF_MEMORY;
}
/* copy in the pixels, specifying a nullptr filter */
for (y = 0; y < pnginfo.height; y++)
{
- auto *src = reinterpret_cast<uint16_t *>(bitmap.raw_pixptr(y));
+ uint16_t const *src = reinterpret_cast<uint16_t const *>(bitmap.raw_pixptr(y));
uint8_t *dst = &pnginfo.image[y * (rowbytes + 1)];
/* store the filter byte, then copy the data */
@@ -1051,7 +1042,7 @@ static png_error convert_bitmap_to_image_palette(png_info &pnginfo, const bitmap
*dst++ = *src++;
}
- return PNGERR_NONE;
+ return png_error::NONE;
}
@@ -1075,7 +1066,7 @@ static png_error convert_bitmap_to_image_rgb(png_info &pnginfo, const bitmap_t &
/* allocate memory for the image */
try { pnginfo.image.reset(new std::uint8_t [pnginfo.height * (rowbytes + 1)]); }
- catch (std::bad_alloc const &) { return PNGERR_OUT_OF_MEMORY; }
+ catch (std::bad_alloc const &) { return png_error::OUT_OF_MEMORY; }
/* copy in the pixels, specifying a nullptr filter */
for (y = 0; y < pnginfo.height; y++)
@@ -1088,7 +1079,7 @@ static png_error convert_bitmap_to_image_rgb(png_info &pnginfo, const bitmap_t &
/* 16bpp palettized format */
if (bitmap.format() == BITMAP_FORMAT_IND16)
{
- auto *src16 = reinterpret_cast<uint16_t *>(bitmap.raw_pixptr(y));
+ uint16_t const *src16 = reinterpret_cast<uint16_t const *>(bitmap.raw_pixptr(y));
for (x = 0; x < pnginfo.width; x++)
{
rgb_t color = palette[*src16++];
@@ -1101,7 +1092,7 @@ static png_error convert_bitmap_to_image_rgb(png_info &pnginfo, const bitmap_t &
/* 32-bit RGB direct */
else if (bitmap.format() == BITMAP_FORMAT_RGB32)
{
- auto *src32 = reinterpret_cast<uint32_t *>(bitmap.raw_pixptr(y));
+ uint32_t const *src32 = reinterpret_cast<uint32_t const *>(bitmap.raw_pixptr(y));
for (x = 0; x < pnginfo.width; x++)
{
rgb_t raw = *src32++;
@@ -1114,7 +1105,7 @@ static png_error convert_bitmap_to_image_rgb(png_info &pnginfo, const bitmap_t &
/* 32-bit ARGB direct */
else if (bitmap.format() == BITMAP_FORMAT_ARGB32)
{
- auto *src32 = reinterpret_cast<uint32_t *>(bitmap.raw_pixptr(y));
+ uint32_t const *src32 = reinterpret_cast<uint32_t const *>(bitmap.raw_pixptr(y));
for (x = 0; x < pnginfo.width; x++)
{
rgb_t raw = *src32++;
@@ -1127,10 +1118,10 @@ static png_error convert_bitmap_to_image_rgb(png_info &pnginfo, const bitmap_t &
/* unsupported format */
else
- return PNGERR_UNSUPPORTED_FORMAT;
+ return png_error::UNSUPPORTED_FORMAT;
}
- return PNGERR_NONE;
+ return png_error::NONE;
}
@@ -1139,7 +1130,7 @@ static png_error convert_bitmap_to_image_rgb(png_info &pnginfo, const bitmap_t &
chunks to the given file
-------------------------------------------------*/
-static png_error write_png_stream(util::core_file &fp, png_info &pnginfo, const bitmap_t &bitmap, int palette_length, const rgb_t *palette)
+static png_error write_png_stream(core_file &fp, png_info &pnginfo, const bitmap_t &bitmap, int palette_length, const rgb_t *palette)
{
uint8_t tempbuff[16];
png_error error;
@@ -1149,7 +1140,7 @@ static png_error write_png_stream(util::core_file &fp, png_info &pnginfo, const
error = convert_bitmap_to_image_palette(pnginfo, bitmap, palette_length, palette);
else
error = convert_bitmap_to_image_rgb(pnginfo, bitmap, palette_length, palette);
- if (error != PNGERR_NONE)
+ if (error != png_error::NONE)
return error;
// if we wanted to get clever and do filtering, we would do it here
@@ -1163,18 +1154,18 @@ static png_error write_png_stream(util::core_file &fp, png_info &pnginfo, const
put_8bit(tempbuff + 11, pnginfo.filter_method);
put_8bit(tempbuff + 12, pnginfo.interlace_method);
error = write_chunk(fp, tempbuff, PNG_CN_IHDR, 13);
- if (error != PNGERR_NONE)
+ if (error != png_error::NONE)
return error;
// write the PLTE chunk
if (pnginfo.num_palette > 0)
error = write_chunk(fp, pnginfo.palette.get(), PNG_CN_PLTE, pnginfo.num_palette * 3);
- if (error != PNGERR_NONE)
+ if (error != png_error::NONE)
return error;
- // write a single IDAT chunk */
+ // write a single IDAT chunk
error = write_deflated_chunk(fp, pnginfo.image.get(), PNG_CN_IDAT, pnginfo.height * (compute_rowbytes(pnginfo) + 1));
- if (error != PNGERR_NONE)
+ if (error != png_error::NONE)
return error;
// write TEXT chunks
@@ -1182,7 +1173,7 @@ static png_error write_png_stream(util::core_file &fp, png_info &pnginfo, const
for (png_info::png_text const &text : pnginfo.textlist)
{
try { textbuf.resize(text.first.length() + 1 + text.second.length()); }
- catch (std::bad_alloc const &) { return PNGERR_OUT_OF_MEMORY; }
+ catch (std::bad_alloc const &) { return png_error::OUT_OF_MEMORY; }
std::uint8_t *dst(&textbuf[0]);
// convert keyword to ISO-8859-1
@@ -1213,7 +1204,7 @@ static png_error write_png_stream(util::core_file &fp, png_info &pnginfo, const
}
error = write_chunk(fp, &textbuf[0], PNG_CN_tEXt, dst - &textbuf[0]);
- if (error != PNGERR_NONE)
+ if (error != png_error::NONE)
return error;
}
@@ -1222,7 +1213,7 @@ static png_error write_png_stream(util::core_file &fp, png_info &pnginfo, const
}
-png_error png_write_bitmap(util::core_file &fp, png_info *info, bitmap_t const &bitmap, int palette_length, const rgb_t *palette)
+png_error png_write_bitmap(core_file &fp, png_info *info, bitmap_t const &bitmap, int palette_length, const rgb_t *palette)
{
// use a dummy pnginfo if none passed to us
png_info pnginfo;
@@ -1231,7 +1222,7 @@ png_error png_write_bitmap(util::core_file &fp, png_info *info, bitmap_t const &
// write the PNG signature
if (fp.write(PNG_SIGNATURE, sizeof(PNG_SIGNATURE)) != sizeof(PNG_SIGNATURE))
- return PNGERR_FILE_ERROR;
+ return png_error::FILE_ERROR;
/* write the rest of the PNG data */
return write_png_stream(fp, *info, bitmap, palette_length, palette);
@@ -1246,7 +1237,7 @@ png_error png_write_bitmap(util::core_file &fp, png_info *info, bitmap_t const &
********************************************************************************/
/**
- * @fn png_error mng_capture_start(util::core_file &fp, bitmap_t &bitmap, unsigned rate)
+ * @fn png_error mng_capture_start(core_file &fp, bitmap_t &bitmap, unsigned rate)
*
* @brief Mng capture start.
*
@@ -1257,12 +1248,12 @@ png_error png_write_bitmap(util::core_file &fp, png_info *info, bitmap_t const &
* @return A png_error.
*/
-png_error mng_capture_start(util::core_file &fp, bitmap_t &bitmap, unsigned rate)
+png_error mng_capture_start(core_file &fp, bitmap_t &bitmap, unsigned rate)
{
uint8_t mhdr[28];
if (fp.write(MNG_Signature, 8) != 8)
- return PNGERR_FILE_ERROR;
+ return png_error::FILE_ERROR;
memset(mhdr, 0, 28);
put_32bit(mhdr + 0, bitmap.width());
@@ -1273,7 +1264,7 @@ png_error mng_capture_start(util::core_file &fp, bitmap_t &bitmap, unsigned rate
}
/**
- * @fn png_error mng_capture_frame(util::core_file &fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette)
+ * @fn png_error mng_capture_frame(core_file &fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette)
*
* @brief Mng capture frame.
*
@@ -1286,13 +1277,13 @@ png_error mng_capture_start(util::core_file &fp, bitmap_t &bitmap, unsigned rate
* @return A png_error.
*/
-png_error mng_capture_frame(util::core_file &fp, png_info &info, bitmap_t const &bitmap, int palette_length, const rgb_t *palette)
+png_error mng_capture_frame(core_file &fp, png_info &info, bitmap_t const &bitmap, int palette_length, const rgb_t *palette)
{
return write_png_stream(fp, info, bitmap, palette_length, palette);
}
/**
- * @fn png_error mng_capture_stop(util::core_file &fp)
+ * @fn png_error mng_capture_stop(core_file &fp)
*
* @brief Mng capture stop.
*
@@ -1301,7 +1292,9 @@ png_error mng_capture_frame(util::core_file &fp, png_info &info, bitmap_t const
* @return A png_error.
*/
-png_error mng_capture_stop(util::core_file &fp)
+png_error mng_capture_stop(core_file &fp)
{
return write_chunk(fp, nullptr, MNG_CN_MEND, 0);
}
+
+} // namespace util
diff --git a/src/lib/util/png.h b/src/lib/util/png.h
index 5f852fd8c16..784c92646e6 100644
--- a/src/lib/util/png.h
+++ b/src/lib/util/png.h
@@ -17,31 +17,33 @@
#include "corefile.h"
#include "osdcore.h"
+#include <cstdint>
#include <list>
#include <memory>
#include <string>
#include <utility>
+namespace util {
/***************************************************************************
CONSTANTS
***************************************************************************/
/* Error types */
-enum png_error
+enum class png_error
{
- PNGERR_NONE,
- PNGERR_OUT_OF_MEMORY,
- PNGERR_UNKNOWN_FILTER,
- PNGERR_FILE_ERROR,
- PNGERR_BAD_SIGNATURE,
- PNGERR_DECOMPRESS_ERROR,
- PNGERR_FILE_TRUNCATED,
- PNGERR_FILE_CORRUPT,
- PNGERR_UNKNOWN_CHUNK,
- PNGERR_COMPRESS_ERROR,
- PNGERR_UNSUPPORTED_FORMAT
+ NONE,
+ OUT_OF_MEMORY,
+ UNKNOWN_FILTER,
+ FILE_ERROR,
+ BAD_SIGNATURE,
+ DECOMPRESS_ERROR,
+ FILE_TRUNCATED,
+ FILE_CORRUPT,
+ UNKNOWN_CHUNK,
+ COMPRESS_ERROR,
+ UNSUPPORTED_FORMAT
};
@@ -57,7 +59,7 @@ public:
~png_info() { free_data(); }
- png_error read_file(util::core_file &fp);
+ png_error read_file(core_file &fp);
png_error copy_to_bitmap(bitmap_argb32 &bitmap, bool &hasalpha);
png_error expand_buffer_8bit();
@@ -66,7 +68,7 @@ public:
void free_data();
void reset() { free_data(); operator=(png_info()); }
- static png_error verify_header(util::core_file &fp);
+ static png_error verify_header(core_file &fp);
std::unique_ptr<std::uint8_t []> image;
std::uint32_t width, height;
@@ -99,12 +101,14 @@ private:
FUNCTION PROTOTYPES
***************************************************************************/
-png_error png_read_bitmap(util::core_file &fp, bitmap_argb32 &bitmap);
+png_error png_read_bitmap(core_file &fp, bitmap_argb32 &bitmap);
-png_error png_write_bitmap(util::core_file &fp, png_info *info, bitmap_t const &bitmap, int palette_length, const rgb_t *palette);
+png_error png_write_bitmap(core_file &fp, png_info *info, bitmap_t const &bitmap, int palette_length, const rgb_t *palette);
-png_error mng_capture_start(util::core_file &fp, bitmap_t &bitmap, unsigned rate);
-png_error mng_capture_frame(util::core_file &fp, png_info &info, bitmap_t const &bitmap, int palette_length, const rgb_t *palette);
-png_error mng_capture_stop(util::core_file &fp);
+png_error mng_capture_start(core_file &fp, bitmap_t &bitmap, unsigned rate);
+png_error mng_capture_frame(core_file &fp, png_info &info, bitmap_t const &bitmap, int palette_length, const rgb_t *palette);
+png_error mng_capture_stop(core_file &fp);
+
+} // namespace util
#endif // MAME_LIB_UTIL_PNG_H
diff --git a/src/lib/util/xmlfile.cpp b/src/lib/util/xmlfile.cpp
index a61c20d2e3c..8ee3c33fe26 100644
--- a/src/lib/util/xmlfile.cpp
+++ b/src/lib/util/xmlfile.cpp
@@ -31,7 +31,6 @@ namespace {
***************************************************************************/
constexpr unsigned TEMP_BUFFER_SIZE(4096U);
-std::locale const f_portable_locale("C");
/***************************************************************************
@@ -629,7 +628,7 @@ long long data_node::get_attribute_int(const char *attribute, long long defvalue
return defvalue;
std::istringstream stream;
- stream.imbue(f_portable_locale);
+ stream.imbue(std::locale::classic());
long long result;
if (string[0] == '$')
{
@@ -694,7 +693,7 @@ float data_node::get_attribute_float(const char *attribute, float defvalue) cons
return defvalue;
std::istringstream stream(string);
- stream.imbue(f_portable_locale);
+ stream.imbue(std::locale::classic());
float result;
return (stream >> result) ? result : defvalue;
}
@@ -732,7 +731,7 @@ void data_node::set_attribute(const char *name, const char *value)
void data_node::set_attribute_int(const char *name, long long value)
{
- set_attribute(name, string_format(f_portable_locale, "%d", value).c_str());
+ set_attribute(name, string_format(std::locale::classic(), "%d", value).c_str());
}
@@ -743,7 +742,7 @@ void data_node::set_attribute_int(const char *name, long long value)
void data_node::set_attribute_float(const char *name, float value)
{
- set_attribute(name, string_format(f_portable_locale, "%f", value).c_str());
+ set_attribute(name, string_format(std::locale::classic(), "%f", value).c_str());
}