@danielsimonjr/mathts-wasm 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,34 +13,34 @@
13
13
  (type $11 (func (param f64) (result i32)))
14
14
  (type $12 (func (param i32 i32 i32 i32) (result i32)))
15
15
  (type $13 (func (param i32 f64 i32)))
16
- (type $14 (func (param f64 f64) (result i32)))
17
- (type $15 (func (param f64 f64 f64) (result f64)))
18
- (type $16 (func (param i32 i32 i32 i32 i32)))
19
- (type $17 (func (param i32 i32 i32 f64) (result i32)))
20
- (type $18 (func (param i64 i64) (result i64)))
21
- (type $19 (func (param i32 f64) (result f64)))
22
- (type $20 (func (param i32)))
23
- (type $21 (func (param i32 f64 f64) (result i32)))
24
- (type $22 (func (param i32 i32 f64)))
25
- (type $23 (func (param i32 i32 f64) (result i32)))
26
- (type $24 (func (param i32 i32 i32 i32 i32) (result i32)))
16
+ (type $14 (func))
17
+ (type $15 (func (param f64 f64) (result i32)))
18
+ (type $16 (func (param f64 f64 f64) (result f64)))
19
+ (type $17 (func (param i32 i32 i32 i32 i32)))
20
+ (type $18 (func (param i32 i32 i32 f64) (result i32)))
21
+ (type $19 (func (param i64 i64) (result i64)))
22
+ (type $20 (func (param i32 f64) (result f64)))
23
+ (type $21 (func (param i32)))
24
+ (type $22 (func (param i32 f64 f64) (result i32)))
25
+ (type $23 (func (param i32 i32 f64)))
26
+ (type $24 (func (param i32 i32 f64) (result i32)))
27
27
  (type $25 (func (param i32 f64) (result i32)))
28
28
  (type $26 (func (param f64 i32) (result f64)))
29
29
  (type $27 (func (param f64 f64 i32) (result f64)))
30
30
  (type $28 (func (param i32 i32 i32 i32 i32 i32)))
31
31
  (type $29 (func (param i32 i32 i32) (result f64)))
32
- (type $30 (func))
33
- (type $31 (func (param f64 i64) (result i32)))
34
- (type $32 (func (param f64 i32 f64 i32 i32)))
35
- (type $33 (func (param i32 f64 f64)))
36
- (type $34 (func (param i32 i32 i32 i32) (result f64)))
37
- (type $35 (func (param i32 i32 i32 i32 f64)))
38
- (type $36 (func (param f64 i32 i32)))
39
- (type $37 (func (param f64 i32 i32 i32 i32 i32 f64 i32)))
40
- (type $38 (func (param f64 i32 i32 i32 i32 f64 i32)))
41
- (type $39 (func (param i32 f64 f64) (result f64)))
42
- (type $40 (func (param i32 i32 f64 f64 f64 f64) (result i32)))
43
- (type $41 (func (param i32 i32 i32 i32 i32 i32) (result i32)))
32
+ (type $30 (func (param i32 i32 i32 i32 i32) (result i32)))
33
+ (type $31 (func (param i32 i32 i32 i32 i32 i32) (result i32)))
34
+ (type $32 (func (param f64 i64) (result i32)))
35
+ (type $33 (func (param f64 i32 f64 i32 i32)))
36
+ (type $34 (func (param i32 f64 f64)))
37
+ (type $35 (func (param i32 i32 i32 i32) (result f64)))
38
+ (type $36 (func (param i32 i32 i32 i32 f64)))
39
+ (type $37 (func (param f64 i32 i32)))
40
+ (type $38 (func (param f64 i32 i32 i32 i32 i32 f64 i32)))
41
+ (type $39 (func (param f64 i32 i32 i32 i32 f64 i32)))
42
+ (type $40 (func (param i32 f64 f64) (result f64)))
43
+ (type $41 (func (param i32 i32 f64 f64 f64 f64) (result i32)))
44
44
  (type $42 (func (param f64 f64 f64 f64) (result f64)))
45
45
  (type $43 (func (param i32 i32 f64 f64)))
46
46
  (type $44 (func (param i32 f64 f64 i32)))
@@ -89,8 +89,8 @@
89
89
  (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1))
90
90
  (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2))
91
91
  (global $~lib/native/ASC_RUNTIME i32 (i32.const 0))
92
- (global $~lib/rt/__rtti_base i32 (i32.const 13056))
93
- (global $~lib/memory/__heap_base i32 (i32.const 13100))
92
+ (global $~lib/rt/__rtti_base i32 (i32.const 13264))
93
+ (global $~lib/memory/__heap_base i32 (i32.const 13308))
94
94
  (memory $0 1)
95
95
  (data $0 (i32.const 12) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00\00\00\00\00")
96
96
  (data $1 (i32.const 76) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00s\00t\00u\00b\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
@@ -105,11 +105,14 @@
105
105
  (data $10 (i32.const 12684) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00\00\00\00\00\00\00")
106
106
  (data $11 (i32.const 12748) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00\00\00\00\00\00\00\00\00")
107
107
  (data $12 (i32.const 12812) "<\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00$\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00\00\00\00\00\00\00")
108
- (data $13 (i32.const 12876) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00")
109
- (data $14 (i32.const 12924) "|\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
110
- (data $15 (i32.const 13056) "\n\00\00\00 \00\00\00 \00\00\00 \00\00\00\00\00\00\00 \00\00\00\01\1a\00\00\01\t\00\00\02\1a\00\00\02\t\00\00\02A\00\00")
108
+ (data $13 (i32.const 12876) "|\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00^\00\00\00U\00n\00e\00x\00p\00e\00c\00t\00e\00d\00 \00\'\00n\00u\00l\00l\00\'\00 \00(\00n\00o\00t\00 \00a\00s\00s\00i\00g\00n\00e\00d\00 \00o\00r\00 \00f\00a\00i\00l\00e\00d\00 \00c\00a\00s\00t\00)\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
109
+ (data $14 (i32.const 13004) "L\00\00\00\00\00\00\00\00\00\00\00\02\00\00\008\00\00\00s\00r\00c\00/\00a\00l\00g\00e\00b\00r\00a\00/\00d\00e\00c\00o\00m\00p\00o\00s\00i\00t\00i\00o\00n\00.\00t\00s\00\00\00\00\00")
110
+ (data $15 (i32.const 13084) ",\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00\00\00")
111
+ (data $16 (i32.const 13132) "|\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
112
+ (data $17 (i32.const 13264) "\n\00\00\00 \00\00\00 \00\00\00 \00\00\00\00\00\00\00 \00\00\00\01\1a\00\00\01\t\00\00\02\1a\00\00\02\t\00\00\02A\00\00")
111
113
  (table $0 1 1 funcref)
112
114
  (elem $0 (i32.const 1))
115
+ (export "heap_reset" (func $src/heap/heap_reset))
113
116
  (export "complex" (func $src/types/complex/complex))
114
117
  (export "complexFromPolar" (func $src/types/complex/complexFromPolar))
115
118
  (export "add_f64" (func $src/ops/scalar/add_f64))
@@ -437,6 +440,13 @@
437
440
  (export "__rtti_base" (global $~lib/rt/__rtti_base))
438
441
  (export "memory" (memory $0))
439
442
  (start $~start)
443
+ (func $~lib/rt/stub/__reset
444
+ global.get $~lib/rt/stub/startOffset
445
+ global.set $~lib/rt/stub/offset
446
+ )
447
+ (func $src/heap/heap_reset
448
+ call $~lib/rt/stub/__reset
449
+ )
440
450
  (func $src/types/complex/Complex#set:re (param $this i32) (param $re f64)
441
451
  local.get $this
442
452
  local.get $re
@@ -11296,11 +11306,7 @@
11296
11306
  (local $x|22 f64)
11297
11307
  (local $i|23 i32)
11298
11308
  (local $j|24 i32)
11299
- i32.const 0
11300
- local.get $n
11301
- local.get $n
11302
- i32.mul
11303
- call $~lib/typedarray/Float64Array#constructor
11309
+ local.get $u_out
11304
11310
  local.set $work
11305
11311
  i32.const 0
11306
11312
  local.set $i
@@ -11612,7 +11618,7 @@
11612
11618
  i32.mul
11613
11619
  local.get $j|24
11614
11620
  i32.add
11615
- local.get $work
11621
+ local.get $u_out
11616
11622
  local.get $i|23
11617
11623
  local.get $n
11618
11624
  i32.mul
@@ -11641,20 +11647,6 @@
11641
11647
  i32.add
11642
11648
  f64.const 1
11643
11649
  call $~lib/typedarray/Float64Array#__set
11644
- local.get $u_out
11645
- local.get $i|23
11646
- local.get $n
11647
- i32.mul
11648
- local.get $j|24
11649
- i32.add
11650
- local.get $work
11651
- local.get $i|23
11652
- local.get $n
11653
- i32.mul
11654
- local.get $j|24
11655
- i32.add
11656
- call $~lib/typedarray/Float64Array#__get
11657
- call $~lib/typedarray/Float64Array#__set
11658
11650
  else
11659
11651
  local.get $l_out
11660
11652
  local.get $i|23
@@ -11664,20 +11656,6 @@
11664
11656
  i32.add
11665
11657
  f64.const 0
11666
11658
  call $~lib/typedarray/Float64Array#__set
11667
- local.get $u_out
11668
- local.get $i|23
11669
- local.get $n
11670
- i32.mul
11671
- local.get $j|24
11672
- i32.add
11673
- local.get $work
11674
- local.get $i|23
11675
- local.get $n
11676
- i32.mul
11677
- local.get $j|24
11678
- i32.add
11679
- call $~lib/typedarray/Float64Array#__get
11680
- call $~lib/typedarray/Float64Array#__set
11681
11659
  end
11682
11660
  end
11683
11661
  local.get $j|24
@@ -11697,35 +11675,35 @@
11697
11675
  i32.const 0
11698
11676
  return
11699
11677
  )
11700
- (func $src/algebra/decomposition/matrix_qr_decompose (param $a i32) (param $m i32) (param $n i32) (param $q_out i32) (param $r_out i32) (result i32)
11678
+ (func $src/algebra/decomposition/matrix_qr_decompose (param $a i32) (param $m i32) (param $n i32) (param $q_out i32) (param $r_out i32) (param $v_work i32) (result i32)
11701
11679
  (local $i i32)
11702
- (local $i|6 i32)
11703
11680
  (local $i|7 i32)
11681
+ (local $i|8 i32)
11704
11682
  (local $minDim i32)
11705
11683
  (local $vBuf i32)
11706
11684
  (local $k i32)
11707
11685
  (local $norm f64)
11708
- (local $i|12 i32)
11686
+ (local $i|13 i32)
11709
11687
  (local $v f64)
11710
11688
  (local $x f64)
11711
11689
  (local $akk f64)
11712
11690
  (local $sign f64)
11713
11691
  (local $u1 f64)
11714
11692
  (local $vDotV f64)
11715
- (local $i|19 i32)
11693
+ (local $i|20 i32)
11716
11694
  (local $vi f64)
11717
11695
  (local $tau f64)
11718
11696
  (local $j i32)
11719
11697
  (local $vDotCol f64)
11720
- (local $i|24 i32)
11698
+ (local $i|25 i32)
11721
11699
  (local $factor f64)
11722
- (local $i|26 i32)
11723
- (local $j|27 i32)
11724
- (local $vDotCol|28 f64)
11725
- (local $i|29 i32)
11726
- (local $factor|30 f64)
11727
- (local $i|31 i32)
11700
+ (local $i|27 i32)
11701
+ (local $j|28 i32)
11702
+ (local $vDotCol|29 f64)
11703
+ (local $i|30 i32)
11704
+ (local $factor|31 f64)
11728
11705
  (local $i|32 i32)
11706
+ (local $i|33 i32)
11729
11707
  i32.const 0
11730
11708
  local.set $i
11731
11709
  loop $for-loop|0
@@ -11749,44 +11727,44 @@
11749
11727
  end
11750
11728
  end
11751
11729
  i32.const 0
11752
- local.set $i|6
11730
+ local.set $i|7
11753
11731
  loop $for-loop|1
11754
- local.get $i|6
11732
+ local.get $i|7
11755
11733
  local.get $m
11756
11734
  local.get $m
11757
11735
  i32.mul
11758
11736
  i32.lt_s
11759
11737
  if
11760
11738
  local.get $q_out
11761
- local.get $i|6
11739
+ local.get $i|7
11762
11740
  f64.const 0
11763
11741
  call $~lib/typedarray/Float64Array#__set
11764
- local.get $i|6
11742
+ local.get $i|7
11765
11743
  i32.const 1
11766
11744
  i32.add
11767
- local.set $i|6
11745
+ local.set $i|7
11768
11746
  br $for-loop|1
11769
11747
  end
11770
11748
  end
11771
11749
  i32.const 0
11772
- local.set $i|7
11750
+ local.set $i|8
11773
11751
  loop $for-loop|2
11774
- local.get $i|7
11752
+ local.get $i|8
11775
11753
  local.get $m
11776
11754
  i32.lt_s
11777
11755
  if
11778
11756
  local.get $q_out
11779
- local.get $i|7
11757
+ local.get $i|8
11780
11758
  local.get $m
11781
11759
  i32.mul
11782
- local.get $i|7
11760
+ local.get $i|8
11783
11761
  i32.add
11784
11762
  f64.const 1
11785
11763
  call $~lib/typedarray/Float64Array#__set
11786
- local.get $i|7
11764
+ local.get $i|8
11787
11765
  i32.const 1
11788
11766
  i32.add
11789
- local.set $i|7
11767
+ local.set $i|8
11790
11768
  br $for-loop|2
11791
11769
  end
11792
11770
  end
@@ -11799,9 +11777,24 @@
11799
11777
  local.get $n
11800
11778
  end
11801
11779
  local.set $minDim
11780
+ local.get $v_work
11802
11781
  i32.const 0
11803
- local.get $m
11804
- call $~lib/typedarray/Float64Array#constructor
11782
+ i32.ne
11783
+ if (result i32)
11784
+ local.get $v_work
11785
+ call $~lib/typedarray/Float64Array#get:length
11786
+ local.get $m
11787
+ i32.ge_s
11788
+ else
11789
+ i32.const 0
11790
+ end
11791
+ if (result i32)
11792
+ local.get $v_work
11793
+ else
11794
+ i32.const 0
11795
+ local.get $m
11796
+ call $~lib/typedarray/Float64Array#constructor
11797
+ end
11805
11798
  local.set $vBuf
11806
11799
  i32.const 0
11807
11800
  local.set $k
@@ -11814,14 +11807,14 @@
11814
11807
  f64.const 0
11815
11808
  local.set $norm
11816
11809
  local.get $k
11817
- local.set $i|12
11810
+ local.set $i|13
11818
11811
  loop $for-loop|4
11819
- local.get $i|12
11812
+ local.get $i|13
11820
11813
  local.get $m
11821
11814
  i32.lt_s
11822
11815
  if
11823
11816
  local.get $r_out
11824
- local.get $i|12
11817
+ local.get $i|13
11825
11818
  local.get $n
11826
11819
  i32.mul
11827
11820
  local.get $k
@@ -11834,10 +11827,10 @@
11834
11827
  f64.mul
11835
11828
  f64.add
11836
11829
  local.set $norm
11837
- local.get $i|12
11830
+ local.get $i|13
11838
11831
  i32.const 1
11839
11832
  i32.add
11840
- local.set $i|12
11833
+ local.set $i|13
11841
11834
  br $for-loop|4
11842
11835
  end
11843
11836
  end
@@ -11885,9 +11878,9 @@
11885
11878
  f64.const 1
11886
11879
  local.set $vDotV
11887
11880
  i32.const 1
11888
- local.set $i|19
11881
+ local.set $i|20
11889
11882
  loop $for-loop|5
11890
- local.get $i|19
11883
+ local.get $i|20
11891
11884
  local.get $m
11892
11885
  local.get $k
11893
11886
  i32.sub
@@ -11895,7 +11888,7 @@
11895
11888
  if
11896
11889
  local.get $r_out
11897
11890
  local.get $k
11898
- local.get $i|19
11891
+ local.get $i|20
11899
11892
  i32.add
11900
11893
  local.get $n
11901
11894
  i32.mul
@@ -11906,7 +11899,7 @@
11906
11899
  f64.div
11907
11900
  local.set $vi
11908
11901
  local.get $vBuf
11909
- local.get $i|19
11902
+ local.get $i|20
11910
11903
  local.get $vi
11911
11904
  call $~lib/typedarray/Float64Array#__set
11912
11905
  local.get $vDotV
@@ -11915,10 +11908,10 @@
11915
11908
  f64.mul
11916
11909
  f64.add
11917
11910
  local.set $vDotV
11918
- local.get $i|19
11911
+ local.get $i|20
11919
11912
  i32.const 1
11920
11913
  i32.add
11921
- local.set $i|19
11914
+ local.set $i|20
11922
11915
  br $for-loop|5
11923
11916
  end
11924
11917
  end
@@ -11936,9 +11929,9 @@
11936
11929
  f64.const 0
11937
11930
  local.set $vDotCol
11938
11931
  i32.const 0
11939
- local.set $i|24
11932
+ local.set $i|25
11940
11933
  loop $for-loop|7
11941
- local.get $i|24
11934
+ local.get $i|25
11942
11935
  local.get $m
11943
11936
  local.get $k
11944
11937
  i32.sub
@@ -11946,11 +11939,11 @@
11946
11939
  if
11947
11940
  local.get $vDotCol
11948
11941
  local.get $vBuf
11949
- local.get $i|24
11942
+ local.get $i|25
11950
11943
  call $~lib/typedarray/Float64Array#__get
11951
11944
  local.get $r_out
11952
11945
  local.get $k
11953
- local.get $i|24
11946
+ local.get $i|25
11954
11947
  i32.add
11955
11948
  local.get $n
11956
11949
  i32.mul
@@ -11960,10 +11953,10 @@
11960
11953
  f64.mul
11961
11954
  f64.add
11962
11955
  local.set $vDotCol
11963
- local.get $i|24
11956
+ local.get $i|25
11964
11957
  i32.const 1
11965
11958
  i32.add
11966
- local.set $i|24
11959
+ local.set $i|25
11967
11960
  br $for-loop|7
11968
11961
  end
11969
11962
  end
@@ -11972,9 +11965,9 @@
11972
11965
  f64.mul
11973
11966
  local.set $factor
11974
11967
  i32.const 0
11975
- local.set $i|26
11968
+ local.set $i|27
11976
11969
  loop $for-loop|8
11977
- local.get $i|26
11970
+ local.get $i|27
11978
11971
  local.get $m
11979
11972
  local.get $k
11980
11973
  i32.sub
@@ -11982,7 +11975,7 @@
11982
11975
  if
11983
11976
  local.get $r_out
11984
11977
  local.get $k
11985
- local.get $i|26
11978
+ local.get $i|27
11986
11979
  i32.add
11987
11980
  local.get $n
11988
11981
  i32.mul
@@ -11990,7 +11983,7 @@
11990
11983
  i32.add
11991
11984
  local.get $r_out
11992
11985
  local.get $k
11993
- local.get $i|26
11986
+ local.get $i|27
11994
11987
  i32.add
11995
11988
  local.get $n
11996
11989
  i32.mul
@@ -11999,15 +11992,15 @@
11999
11992
  call $~lib/typedarray/Float64Array#__get
12000
11993
  local.get $factor
12001
11994
  local.get $vBuf
12002
- local.get $i|26
11995
+ local.get $i|27
12003
11996
  call $~lib/typedarray/Float64Array#__get
12004
11997
  f64.mul
12005
11998
  f64.sub
12006
11999
  call $~lib/typedarray/Float64Array#__set
12007
- local.get $i|26
12000
+ local.get $i|27
12008
12001
  i32.const 1
12009
12002
  i32.add
12010
- local.set $i|26
12003
+ local.set $i|27
12011
12004
  br $for-loop|8
12012
12005
  end
12013
12006
  end
@@ -12019,54 +12012,54 @@
12019
12012
  end
12020
12013
  end
12021
12014
  i32.const 0
12022
- local.set $j|27
12015
+ local.set $j|28
12023
12016
  loop $for-loop|9
12024
- local.get $j|27
12017
+ local.get $j|28
12025
12018
  local.get $m
12026
12019
  i32.lt_s
12027
12020
  if
12028
12021
  f64.const 0
12029
- local.set $vDotCol|28
12022
+ local.set $vDotCol|29
12030
12023
  i32.const 0
12031
- local.set $i|29
12024
+ local.set $i|30
12032
12025
  loop $for-loop|10
12033
- local.get $i|29
12026
+ local.get $i|30
12034
12027
  local.get $m
12035
12028
  local.get $k
12036
12029
  i32.sub
12037
12030
  i32.lt_s
12038
12031
  if
12039
- local.get $vDotCol|28
12032
+ local.get $vDotCol|29
12040
12033
  local.get $vBuf
12041
- local.get $i|29
12034
+ local.get $i|30
12042
12035
  call $~lib/typedarray/Float64Array#__get
12043
12036
  local.get $q_out
12044
12037
  local.get $k
12045
- local.get $i|29
12038
+ local.get $i|30
12046
12039
  i32.add
12047
12040
  local.get $m
12048
12041
  i32.mul
12049
- local.get $j|27
12042
+ local.get $j|28
12050
12043
  i32.add
12051
12044
  call $~lib/typedarray/Float64Array#__get
12052
12045
  f64.mul
12053
12046
  f64.add
12054
- local.set $vDotCol|28
12055
- local.get $i|29
12047
+ local.set $vDotCol|29
12048
+ local.get $i|30
12056
12049
  i32.const 1
12057
12050
  i32.add
12058
- local.set $i|29
12051
+ local.set $i|30
12059
12052
  br $for-loop|10
12060
12053
  end
12061
12054
  end
12062
12055
  local.get $tau
12063
- local.get $vDotCol|28
12056
+ local.get $vDotCol|29
12064
12057
  f64.mul
12065
- local.set $factor|30
12058
+ local.set $factor|31
12066
12059
  i32.const 0
12067
- local.set $i|31
12060
+ local.set $i|32
12068
12061
  loop $for-loop|11
12069
- local.get $i|31
12062
+ local.get $i|32
12070
12063
  local.get $m
12071
12064
  local.get $k
12072
12065
  i32.sub
@@ -12074,63 +12067,63 @@
12074
12067
  if
12075
12068
  local.get $q_out
12076
12069
  local.get $k
12077
- local.get $i|31
12070
+ local.get $i|32
12078
12071
  i32.add
12079
12072
  local.get $m
12080
12073
  i32.mul
12081
- local.get $j|27
12074
+ local.get $j|28
12082
12075
  i32.add
12083
12076
  local.get $q_out
12084
12077
  local.get $k
12085
- local.get $i|31
12078
+ local.get $i|32
12086
12079
  i32.add
12087
12080
  local.get $m
12088
12081
  i32.mul
12089
- local.get $j|27
12082
+ local.get $j|28
12090
12083
  i32.add
12091
12084
  call $~lib/typedarray/Float64Array#__get
12092
- local.get $factor|30
12085
+ local.get $factor|31
12093
12086
  local.get $vBuf
12094
- local.get $i|31
12087
+ local.get $i|32
12095
12088
  call $~lib/typedarray/Float64Array#__get
12096
12089
  f64.mul
12097
12090
  f64.sub
12098
12091
  call $~lib/typedarray/Float64Array#__set
12099
- local.get $i|31
12092
+ local.get $i|32
12100
12093
  i32.const 1
12101
12094
  i32.add
12102
- local.set $i|31
12095
+ local.set $i|32
12103
12096
  br $for-loop|11
12104
12097
  end
12105
12098
  end
12106
- local.get $j|27
12099
+ local.get $j|28
12107
12100
  i32.const 1
12108
12101
  i32.add
12109
- local.set $j|27
12102
+ local.set $j|28
12110
12103
  br $for-loop|9
12111
12104
  end
12112
12105
  end
12113
12106
  local.get $k
12114
12107
  i32.const 1
12115
12108
  i32.add
12116
- local.set $i|32
12109
+ local.set $i|33
12117
12110
  loop $for-loop|12
12118
- local.get $i|32
12111
+ local.get $i|33
12119
12112
  local.get $m
12120
12113
  i32.lt_s
12121
12114
  if
12122
12115
  local.get $r_out
12123
- local.get $i|32
12116
+ local.get $i|33
12124
12117
  local.get $n
12125
12118
  i32.mul
12126
12119
  local.get $k
12127
12120
  i32.add
12128
12121
  f64.const 0
12129
12122
  call $~lib/typedarray/Float64Array#__set
12130
- local.get $i|32
12123
+ local.get $i|33
12131
12124
  i32.const 1
12132
12125
  i32.add
12133
- local.set $i|32
12126
+ local.set $i|33
12134
12127
  br $for-loop|12
12135
12128
  end
12136
12129
  end
@@ -12307,37 +12300,41 @@
12307
12300
  )
12308
12301
  (func $src/algebra/decomposition/matrix_inverse (param $a i32) (param $n i32) (param $result i32) (param $work i32) (result i32)
12309
12302
  (local $i i32)
12310
- (local $perm i32)
12311
- (local $i|6 i32)
12303
+ (local $permInWork i32)
12304
+ (local $permFallback i32)
12305
+ (local $permBase i32)
12306
+ (local $i|8 i32)
12307
+ (local $9 i32)
12312
12308
  (local $k i32)
12313
12309
  (local $x f64)
12314
12310
  (local $maxVal f64)
12315
12311
  (local $pivotRow i32)
12316
- (local $i|11 i32)
12317
- (local $x|12 f64)
12318
- (local $v f64)
12319
12312
  (local $i|14 i32)
12313
+ (local $x|15 f64)
12314
+ (local $v f64)
12315
+ (local $i|17 i32)
12320
12316
  (local $j i32)
12321
12317
  (local $tmp f64)
12322
- (local $tmp|17 i32)
12318
+ (local $tmp|20 f64)
12319
+ (local $21 i32)
12320
+ (local $fb i32)
12321
+ (local $tmp|23 i32)
12323
12322
  (local $pivot f64)
12324
- (local $i|19 i32)
12323
+ (local $i|25 i32)
12325
12324
  (local $factor f64)
12326
- (local $j|21 i32)
12327
- (local $x|22 f64)
12328
- (local $i|23 i32)
12329
- (local $b i32)
12330
- (local $x|25 i32)
12325
+ (local $j|27 i32)
12326
+ (local $x|28 f64)
12327
+ (local $i|29 i32)
12331
12328
  (local $col i32)
12332
- (local $i|27 i32)
12333
- (local $i|28 i32)
12329
+ (local $i|31 i32)
12330
+ (local $32 i32)
12331
+ (local $p i32)
12334
12332
  (local $sum f64)
12335
- (local $j|30 i32)
12333
+ (local $j|35 i32)
12336
12334
  (local $ii i32)
12337
- (local $i|32 i32)
12338
- (local $sum|33 f64)
12339
- (local $j|34 i32)
12340
- (local $i|35 i32)
12335
+ (local $i|37 i32)
12336
+ (local $sum|38 f64)
12337
+ (local $j|39 i32)
12341
12338
  i32.const 0
12342
12339
  local.set $i
12343
12340
  loop $for-loop|0
@@ -12360,25 +12357,65 @@
12360
12357
  br $for-loop|0
12361
12358
  end
12362
12359
  end
12363
- i32.const 0
12360
+ local.get $work
12361
+ call $~lib/typedarray/Float64Array#get:length
12364
12362
  local.get $n
12365
- call $~lib/typedarray/Int32Array#constructor
12366
- local.set $perm
12363
+ local.get $n
12364
+ i32.mul
12365
+ local.get $n
12366
+ i32.add
12367
+ i32.ge_s
12368
+ local.set $permInWork
12369
+ local.get $permInWork
12370
+ if (result i32)
12371
+ i32.const 0
12372
+ else
12373
+ i32.const 0
12374
+ local.get $n
12375
+ call $~lib/typedarray/Int32Array#constructor
12376
+ end
12377
+ local.set $permFallback
12378
+ local.get $n
12379
+ local.get $n
12380
+ i32.mul
12381
+ local.set $permBase
12367
12382
  i32.const 0
12368
- local.set $i|6
12383
+ local.set $i|8
12369
12384
  loop $for-loop|1
12370
- local.get $i|6
12385
+ local.get $i|8
12371
12386
  local.get $n
12372
12387
  i32.lt_s
12373
12388
  if
12374
- local.get $perm
12375
- local.get $i|6
12376
- local.get $i|6
12377
- call $~lib/typedarray/Int32Array#__set
12378
- local.get $i|6
12389
+ local.get $permInWork
12390
+ if
12391
+ local.get $work
12392
+ local.get $permBase
12393
+ local.get $i|8
12394
+ i32.add
12395
+ local.get $i|8
12396
+ f64.convert_i32_s
12397
+ call $~lib/typedarray/Float64Array#__set
12398
+ else
12399
+ local.get $permFallback
12400
+ local.tee $9
12401
+ if (result i32)
12402
+ local.get $9
12403
+ else
12404
+ i32.const 12896
12405
+ i32.const 13024
12406
+ i32.const 290
12407
+ i32.const 10
12408
+ call $~lib/builtins/abort
12409
+ unreachable
12410
+ end
12411
+ local.get $i|8
12412
+ local.get $i|8
12413
+ call $~lib/typedarray/Int32Array#__set
12414
+ end
12415
+ local.get $i|8
12379
12416
  i32.const 1
12380
12417
  i32.add
12381
- local.set $i|6
12418
+ local.set $i|8
12382
12419
  br $for-loop|1
12383
12420
  end
12384
12421
  end
@@ -12410,22 +12447,22 @@
12410
12447
  local.get $k
12411
12448
  i32.const 1
12412
12449
  i32.add
12413
- local.set $i|11
12450
+ local.set $i|14
12414
12451
  loop $for-loop|3
12415
- local.get $i|11
12452
+ local.get $i|14
12416
12453
  local.get $n
12417
12454
  i32.lt_s
12418
12455
  if
12419
12456
  block $~lib/math/NativeMath.abs|inlined.4 (result f64)
12420
12457
  local.get $work
12421
- local.get $i|11
12458
+ local.get $i|14
12422
12459
  local.get $n
12423
12460
  i32.mul
12424
12461
  local.get $k
12425
12462
  i32.add
12426
12463
  call $~lib/typedarray/Float64Array#__get
12427
- local.set $x|12
12428
- local.get $x|12
12464
+ local.set $x|15
12465
+ local.get $x|15
12429
12466
  f64.abs
12430
12467
  br $~lib/math/NativeMath.abs|inlined.4
12431
12468
  end
@@ -12436,13 +12473,13 @@
12436
12473
  if
12437
12474
  local.get $v
12438
12475
  local.set $maxVal
12439
- local.get $i|11
12476
+ local.get $i|14
12440
12477
  local.set $pivotRow
12441
12478
  end
12442
- local.get $i|11
12479
+ local.get $i|14
12443
12480
  i32.const 1
12444
12481
  i32.add
12445
- local.set $i|11
12482
+ local.set $i|14
12446
12483
  br $for-loop|3
12447
12484
  end
12448
12485
  end
@@ -12451,22 +12488,22 @@
12451
12488
  f64.lt
12452
12489
  if
12453
12490
  i32.const 0
12454
- local.set $i|14
12491
+ local.set $i|17
12455
12492
  loop $for-loop|4
12456
- local.get $i|14
12493
+ local.get $i|17
12457
12494
  local.get $n
12458
12495
  local.get $n
12459
12496
  i32.mul
12460
12497
  i32.lt_s
12461
12498
  if
12462
12499
  local.get $result
12463
- local.get $i|14
12500
+ local.get $i|17
12464
12501
  f64.const 0
12465
12502
  call $~lib/typedarray/Float64Array#__set
12466
- local.get $i|14
12503
+ local.get $i|17
12467
12504
  i32.const 1
12468
12505
  i32.add
12469
- local.set $i|14
12506
+ local.set $i|17
12470
12507
  br $for-loop|4
12471
12508
  end
12472
12509
  end
@@ -12521,20 +12558,59 @@
12521
12558
  br $for-loop|5
12522
12559
  end
12523
12560
  end
12524
- local.get $perm
12525
- local.get $k
12526
- call $~lib/typedarray/Int32Array#__get
12527
- local.set $tmp|17
12528
- local.get $perm
12529
- local.get $k
12530
- local.get $perm
12531
- local.get $pivotRow
12532
- call $~lib/typedarray/Int32Array#__get
12533
- call $~lib/typedarray/Int32Array#__set
12534
- local.get $perm
12535
- local.get $pivotRow
12536
- local.get $tmp|17
12537
- call $~lib/typedarray/Int32Array#__set
12561
+ local.get $permInWork
12562
+ if
12563
+ local.get $work
12564
+ local.get $permBase
12565
+ local.get $k
12566
+ i32.add
12567
+ call $~lib/typedarray/Float64Array#__get
12568
+ local.set $tmp|20
12569
+ local.get $work
12570
+ local.get $permBase
12571
+ local.get $k
12572
+ i32.add
12573
+ local.get $work
12574
+ local.get $permBase
12575
+ local.get $pivotRow
12576
+ i32.add
12577
+ call $~lib/typedarray/Float64Array#__get
12578
+ call $~lib/typedarray/Float64Array#__set
12579
+ local.get $work
12580
+ local.get $permBase
12581
+ local.get $pivotRow
12582
+ i32.add
12583
+ local.get $tmp|20
12584
+ call $~lib/typedarray/Float64Array#__set
12585
+ else
12586
+ local.get $permFallback
12587
+ local.tee $21
12588
+ if (result i32)
12589
+ local.get $21
12590
+ else
12591
+ i32.const 12896
12592
+ i32.const 13024
12593
+ i32.const 321
12594
+ i32.const 20
12595
+ call $~lib/builtins/abort
12596
+ unreachable
12597
+ end
12598
+ local.set $fb
12599
+ local.get $fb
12600
+ local.get $k
12601
+ call $~lib/typedarray/Int32Array#__get
12602
+ local.set $tmp|23
12603
+ local.get $fb
12604
+ local.get $k
12605
+ local.get $fb
12606
+ local.get $pivotRow
12607
+ call $~lib/typedarray/Int32Array#__get
12608
+ call $~lib/typedarray/Int32Array#__set
12609
+ local.get $fb
12610
+ local.get $pivotRow
12611
+ local.get $tmp|23
12612
+ call $~lib/typedarray/Int32Array#__set
12613
+ end
12538
12614
  end
12539
12615
  local.get $work
12540
12616
  local.get $k
@@ -12547,14 +12623,14 @@
12547
12623
  local.get $k
12548
12624
  i32.const 1
12549
12625
  i32.add
12550
- local.set $i|19
12626
+ local.set $i|25
12551
12627
  loop $for-loop|6
12552
- local.get $i|19
12628
+ local.get $i|25
12553
12629
  local.get $n
12554
12630
  i32.lt_s
12555
12631
  if
12556
12632
  local.get $work
12557
- local.get $i|19
12633
+ local.get $i|25
12558
12634
  local.get $n
12559
12635
  i32.mul
12560
12636
  local.get $k
@@ -12564,7 +12640,7 @@
12564
12640
  f64.div
12565
12641
  local.set $factor
12566
12642
  local.get $work
12567
- local.get $i|19
12643
+ local.get $i|25
12568
12644
  local.get $n
12569
12645
  i32.mul
12570
12646
  local.get $k
@@ -12574,23 +12650,23 @@
12574
12650
  local.get $k
12575
12651
  i32.const 1
12576
12652
  i32.add
12577
- local.set $j|21
12653
+ local.set $j|27
12578
12654
  loop $for-loop|7
12579
- local.get $j|21
12655
+ local.get $j|27
12580
12656
  local.get $n
12581
12657
  i32.lt_s
12582
12658
  if
12583
12659
  local.get $work
12584
- local.get $i|19
12660
+ local.get $i|25
12585
12661
  local.get $n
12586
12662
  i32.mul
12587
- local.get $j|21
12663
+ local.get $j|27
12588
12664
  i32.add
12589
12665
  local.get $work
12590
- local.get $i|19
12666
+ local.get $i|25
12591
12667
  local.get $n
12592
12668
  i32.mul
12593
- local.get $j|21
12669
+ local.get $j|27
12594
12670
  i32.add
12595
12671
  call $~lib/typedarray/Float64Array#__get
12596
12672
  local.get $factor
@@ -12598,23 +12674,23 @@
12598
12674
  local.get $k
12599
12675
  local.get $n
12600
12676
  i32.mul
12601
- local.get $j|21
12677
+ local.get $j|27
12602
12678
  i32.add
12603
12679
  call $~lib/typedarray/Float64Array#__get
12604
12680
  f64.mul
12605
12681
  f64.sub
12606
12682
  call $~lib/typedarray/Float64Array#__set
12607
- local.get $j|21
12683
+ local.get $j|27
12608
12684
  i32.const 1
12609
12685
  i32.add
12610
- local.set $j|21
12686
+ local.set $j|27
12611
12687
  br $for-loop|7
12612
12688
  end
12613
12689
  end
12614
- local.get $i|19
12690
+ local.get $i|25
12615
12691
  i32.const 1
12616
12692
  i32.add
12617
- local.set $i|19
12693
+ local.set $i|25
12618
12694
  br $for-loop|6
12619
12695
  end
12620
12696
  end
@@ -12637,8 +12713,8 @@
12637
12713
  i32.sub
12638
12714
  i32.add
12639
12715
  call $~lib/typedarray/Float64Array#__get
12640
- local.set $x|22
12641
- local.get $x|22
12716
+ local.set $x|28
12717
+ local.get $x|28
12642
12718
  f64.abs
12643
12719
  br $~lib/math/NativeMath.abs|inlined.5
12644
12720
  end
@@ -12646,22 +12722,22 @@
12646
12722
  f64.lt
12647
12723
  if
12648
12724
  i32.const 0
12649
- local.set $i|23
12725
+ local.set $i|29
12650
12726
  loop $for-loop|8
12651
- local.get $i|23
12727
+ local.get $i|29
12652
12728
  local.get $n
12653
12729
  local.get $n
12654
12730
  i32.mul
12655
12731
  i32.lt_s
12656
12732
  if
12657
12733
  local.get $result
12658
- local.get $i|23
12734
+ local.get $i|29
12659
12735
  f64.const 0
12660
12736
  call $~lib/typedarray/Float64Array#__set
12661
- local.get $i|23
12737
+ local.get $i|29
12662
12738
  i32.const 1
12663
12739
  i32.add
12664
- local.set $i|23
12740
+ local.set $i|29
12665
12741
  br $for-loop|8
12666
12742
  end
12667
12743
  end
@@ -12669,14 +12745,6 @@
12669
12745
  return
12670
12746
  end
12671
12747
  i32.const 0
12672
- local.get $n
12673
- call $~lib/typedarray/Float64Array#constructor
12674
- local.set $b
12675
- i32.const 0
12676
- local.get $n
12677
- call $~lib/typedarray/Float64Array#constructor
12678
- local.set $x|25
12679
- i32.const 0
12680
12748
  local.set $col
12681
12749
  loop $for-loop|9
12682
12750
  local.get $col
@@ -12684,15 +12752,38 @@
12684
12752
  i32.lt_s
12685
12753
  if
12686
12754
  i32.const 0
12687
- local.set $i|27
12755
+ local.set $i|31
12688
12756
  loop $for-loop|10
12689
- local.get $i|27
12757
+ local.get $i|31
12690
12758
  local.get $n
12691
12759
  i32.lt_s
12692
12760
  if
12693
- local.get $b
12694
- local.get $i|27
12695
- local.get $i|27
12761
+ local.get $permInWork
12762
+ if (result i32)
12763
+ local.get $work
12764
+ local.get $permBase
12765
+ local.get $i|31
12766
+ i32.add
12767
+ call $~lib/typedarray/Float64Array#__get
12768
+ i32.trunc_sat_f64_s
12769
+ else
12770
+ local.get $permFallback
12771
+ local.tee $32
12772
+ if (result i32)
12773
+ local.get $32
12774
+ else
12775
+ i32.const 12896
12776
+ i32.const 13024
12777
+ i32.const 349
12778
+ i32.const 61
12779
+ call $~lib/builtins/abort
12780
+ unreachable
12781
+ end
12782
+ local.get $i|31
12783
+ call $~lib/typedarray/Int32Array#__get
12784
+ end
12785
+ local.set $p
12786
+ local.get $p
12696
12787
  local.get $col
12697
12788
  i32.eq
12698
12789
  if (result f64)
@@ -12700,69 +12791,57 @@
12700
12791
  else
12701
12792
  f64.const 0
12702
12793
  end
12703
- call $~lib/typedarray/Float64Array#__set
12704
- local.get $i|27
12705
- i32.const 1
12706
- i32.add
12707
- local.set $i|27
12708
- br $for-loop|10
12709
- end
12710
- end
12711
- i32.const 0
12712
- local.set $i|28
12713
- loop $for-loop|11
12714
- local.get $i|28
12715
- local.get $n
12716
- i32.lt_s
12717
- if
12718
- local.get $b
12719
- local.get $perm
12720
- local.get $i|28
12721
- call $~lib/typedarray/Int32Array#__get
12722
- call $~lib/typedarray/Float64Array#__get
12723
12794
  local.set $sum
12724
12795
  i32.const 0
12725
- local.set $j|30
12726
- loop $for-loop|12
12727
- local.get $j|30
12728
- local.get $i|28
12796
+ local.set $j|35
12797
+ loop $for-loop|11
12798
+ local.get $j|35
12799
+ local.get $i|31
12729
12800
  i32.lt_s
12730
12801
  if
12731
12802
  local.get $sum
12732
12803
  local.get $work
12733
- local.get $i|28
12804
+ local.get $i|31
12734
12805
  local.get $n
12735
12806
  i32.mul
12736
- local.get $j|30
12807
+ local.get $j|35
12737
12808
  i32.add
12738
12809
  call $~lib/typedarray/Float64Array#__get
12739
- local.get $x|25
12740
- local.get $j|30
12810
+ local.get $result
12811
+ local.get $j|35
12812
+ local.get $n
12813
+ i32.mul
12814
+ local.get $col
12815
+ i32.add
12741
12816
  call $~lib/typedarray/Float64Array#__get
12742
12817
  f64.mul
12743
12818
  f64.sub
12744
12819
  local.set $sum
12745
- local.get $j|30
12820
+ local.get $j|35
12746
12821
  i32.const 1
12747
12822
  i32.add
12748
- local.set $j|30
12749
- br $for-loop|12
12823
+ local.set $j|35
12824
+ br $for-loop|11
12750
12825
  end
12751
12826
  end
12752
- local.get $x|25
12753
- local.get $i|28
12827
+ local.get $result
12828
+ local.get $i|31
12829
+ local.get $n
12830
+ i32.mul
12831
+ local.get $col
12832
+ i32.add
12754
12833
  local.get $sum
12755
12834
  call $~lib/typedarray/Float64Array#__set
12756
- local.get $i|28
12835
+ local.get $i|31
12757
12836
  i32.const 1
12758
12837
  i32.add
12759
- local.set $i|28
12760
- br $for-loop|11
12838
+ local.set $i|31
12839
+ br $for-loop|10
12761
12840
  end
12762
12841
  end
12763
12842
  i32.const 0
12764
12843
  local.set $ii
12765
- loop $for-loop|13
12844
+ loop $for-loop|12
12766
12845
  local.get $ii
12767
12846
  local.get $n
12768
12847
  i32.lt_s
@@ -12772,49 +12851,61 @@
12772
12851
  i32.sub
12773
12852
  local.get $ii
12774
12853
  i32.sub
12775
- local.set $i|32
12776
- local.get $x|25
12777
- local.get $i|32
12854
+ local.set $i|37
12855
+ local.get $result
12856
+ local.get $i|37
12857
+ local.get $n
12858
+ i32.mul
12859
+ local.get $col
12860
+ i32.add
12778
12861
  call $~lib/typedarray/Float64Array#__get
12779
- local.set $sum|33
12780
- local.get $i|32
12862
+ local.set $sum|38
12863
+ local.get $i|37
12781
12864
  i32.const 1
12782
12865
  i32.add
12783
- local.set $j|34
12784
- loop $for-loop|14
12785
- local.get $j|34
12866
+ local.set $j|39
12867
+ loop $for-loop|13
12868
+ local.get $j|39
12786
12869
  local.get $n
12787
12870
  i32.lt_s
12788
12871
  if
12789
- local.get $sum|33
12872
+ local.get $sum|38
12790
12873
  local.get $work
12791
- local.get $i|32
12874
+ local.get $i|37
12792
12875
  local.get $n
12793
12876
  i32.mul
12794
- local.get $j|34
12877
+ local.get $j|39
12795
12878
  i32.add
12796
12879
  call $~lib/typedarray/Float64Array#__get
12797
- local.get $x|25
12798
- local.get $j|34
12880
+ local.get $result
12881
+ local.get $j|39
12882
+ local.get $n
12883
+ i32.mul
12884
+ local.get $col
12885
+ i32.add
12799
12886
  call $~lib/typedarray/Float64Array#__get
12800
12887
  f64.mul
12801
12888
  f64.sub
12802
- local.set $sum|33
12803
- local.get $j|34
12889
+ local.set $sum|38
12890
+ local.get $j|39
12804
12891
  i32.const 1
12805
12892
  i32.add
12806
- local.set $j|34
12807
- br $for-loop|14
12893
+ local.set $j|39
12894
+ br $for-loop|13
12808
12895
  end
12809
12896
  end
12810
- local.get $x|25
12811
- local.get $i|32
12812
- local.get $sum|33
12897
+ local.get $result
12898
+ local.get $i|37
12899
+ local.get $n
12900
+ i32.mul
12901
+ local.get $col
12902
+ i32.add
12903
+ local.get $sum|38
12813
12904
  local.get $work
12814
- local.get $i|32
12905
+ local.get $i|37
12815
12906
  local.get $n
12816
12907
  i32.mul
12817
- local.get $i|32
12908
+ local.get $i|37
12818
12909
  i32.add
12819
12910
  call $~lib/typedarray/Float64Array#__get
12820
12911
  f64.div
@@ -12823,31 +12914,7 @@
12823
12914
  i32.const 1
12824
12915
  i32.add
12825
12916
  local.set $ii
12826
- br $for-loop|13
12827
- end
12828
- end
12829
- i32.const 0
12830
- local.set $i|35
12831
- loop $for-loop|15
12832
- local.get $i|35
12833
- local.get $n
12834
- i32.lt_s
12835
- if
12836
- local.get $result
12837
- local.get $i|35
12838
- local.get $n
12839
- i32.mul
12840
- local.get $col
12841
- i32.add
12842
- local.get $x|25
12843
- local.get $i|35
12844
- call $~lib/typedarray/Float64Array#__get
12845
- call $~lib/typedarray/Float64Array#__set
12846
- local.get $i|35
12847
- i32.const 1
12848
- i32.add
12849
- local.set $i|35
12850
- br $for-loop|15
12917
+ br $for-loop|12
12851
12918
  end
12852
12919
  end
12853
12920
  local.get $col
@@ -12862,24 +12929,22 @@
12862
12929
  )
12863
12930
  (func $src/algebra/decomposition/matrix_determinant (param $a i32) (param $n i32) (param $work i32) (result f64)
12864
12931
  (local $i i32)
12865
- (local $perm i32)
12866
- (local $i|5 i32)
12867
12932
  (local $swaps i32)
12868
12933
  (local $k i32)
12869
12934
  (local $x f64)
12870
12935
  (local $maxVal f64)
12871
12936
  (local $pivotRow i32)
12872
- (local $i|11 i32)
12873
- (local $x|12 f64)
12937
+ (local $i|9 i32)
12938
+ (local $x|10 f64)
12874
12939
  (local $v f64)
12875
12940
  (local $j i32)
12876
12941
  (local $tmp f64)
12877
12942
  (local $pivot f64)
12878
- (local $i|17 i32)
12943
+ (local $i|15 i32)
12879
12944
  (local $factor f64)
12880
- (local $j|19 i32)
12945
+ (local $j|17 i32)
12881
12946
  (local $det f64)
12882
- (local $i|21 i32)
12947
+ (local $i|19 i32)
12883
12948
  i32.const 0
12884
12949
  local.set $i
12885
12950
  loop $for-loop|0
@@ -12903,32 +12968,10 @@
12903
12968
  end
12904
12969
  end
12905
12970
  i32.const 0
12906
- local.get $n
12907
- call $~lib/typedarray/Int32Array#constructor
12908
- local.set $perm
12909
- i32.const 0
12910
- local.set $i|5
12911
- loop $for-loop|1
12912
- local.get $i|5
12913
- local.get $n
12914
- i32.lt_s
12915
- if
12916
- local.get $perm
12917
- local.get $i|5
12918
- local.get $i|5
12919
- call $~lib/typedarray/Int32Array#__set
12920
- local.get $i|5
12921
- i32.const 1
12922
- i32.add
12923
- local.set $i|5
12924
- br $for-loop|1
12925
- end
12926
- end
12927
- i32.const 0
12928
12971
  local.set $swaps
12929
12972
  i32.const 0
12930
12973
  local.set $k
12931
- loop $for-loop|2
12974
+ loop $for-loop|1
12932
12975
  local.get $k
12933
12976
  local.get $n
12934
12977
  i32.const 1
@@ -12954,22 +12997,22 @@
12954
12997
  local.get $k
12955
12998
  i32.const 1
12956
12999
  i32.add
12957
- local.set $i|11
12958
- loop $for-loop|3
12959
- local.get $i|11
13000
+ local.set $i|9
13001
+ loop $for-loop|2
13002
+ local.get $i|9
12960
13003
  local.get $n
12961
13004
  i32.lt_s
12962
13005
  if
12963
13006
  block $~lib/math/NativeMath.abs|inlined.7 (result f64)
12964
13007
  local.get $work
12965
- local.get $i|11
13008
+ local.get $i|9
12966
13009
  local.get $n
12967
13010
  i32.mul
12968
13011
  local.get $k
12969
13012
  i32.add
12970
13013
  call $~lib/typedarray/Float64Array#__get
12971
- local.set $x|12
12972
- local.get $x|12
13014
+ local.set $x|10
13015
+ local.get $x|10
12973
13016
  f64.abs
12974
13017
  br $~lib/math/NativeMath.abs|inlined.7
12975
13018
  end
@@ -12980,14 +13023,14 @@
12980
13023
  if
12981
13024
  local.get $v
12982
13025
  local.set $maxVal
12983
- local.get $i|11
13026
+ local.get $i|9
12984
13027
  local.set $pivotRow
12985
13028
  end
12986
- local.get $i|11
13029
+ local.get $i|9
12987
13030
  i32.const 1
12988
13031
  i32.add
12989
- local.set $i|11
12990
- br $for-loop|3
13032
+ local.set $i|9
13033
+ br $for-loop|2
12991
13034
  end
12992
13035
  end
12993
13036
  local.get $maxVal
@@ -13003,7 +13046,7 @@
13003
13046
  if
13004
13047
  i32.const 0
13005
13048
  local.set $j
13006
- loop $for-loop|4
13049
+ loop $for-loop|3
13007
13050
  local.get $j
13008
13051
  local.get $n
13009
13052
  i32.lt_s
@@ -13042,7 +13085,7 @@
13042
13085
  i32.const 1
13043
13086
  i32.add
13044
13087
  local.set $j
13045
- br $for-loop|4
13088
+ br $for-loop|3
13046
13089
  end
13047
13090
  end
13048
13091
  local.get $swaps
@@ -13061,14 +13104,14 @@
13061
13104
  local.get $k
13062
13105
  i32.const 1
13063
13106
  i32.add
13064
- local.set $i|17
13065
- loop $for-loop|5
13066
- local.get $i|17
13107
+ local.set $i|15
13108
+ loop $for-loop|4
13109
+ local.get $i|15
13067
13110
  local.get $n
13068
13111
  i32.lt_s
13069
13112
  if
13070
13113
  local.get $work
13071
- local.get $i|17
13114
+ local.get $i|15
13072
13115
  local.get $n
13073
13116
  i32.mul
13074
13117
  local.get $k
@@ -13078,7 +13121,7 @@
13078
13121
  f64.div
13079
13122
  local.set $factor
13080
13123
  local.get $work
13081
- local.get $i|17
13124
+ local.get $i|15
13082
13125
  local.get $n
13083
13126
  i32.mul
13084
13127
  local.get $k
@@ -13088,23 +13131,23 @@
13088
13131
  local.get $k
13089
13132
  i32.const 1
13090
13133
  i32.add
13091
- local.set $j|19
13092
- loop $for-loop|6
13093
- local.get $j|19
13134
+ local.set $j|17
13135
+ loop $for-loop|5
13136
+ local.get $j|17
13094
13137
  local.get $n
13095
13138
  i32.lt_s
13096
13139
  if
13097
13140
  local.get $work
13098
- local.get $i|17
13141
+ local.get $i|15
13099
13142
  local.get $n
13100
13143
  i32.mul
13101
- local.get $j|19
13144
+ local.get $j|17
13102
13145
  i32.add
13103
13146
  local.get $work
13104
- local.get $i|17
13147
+ local.get $i|15
13105
13148
  local.get $n
13106
13149
  i32.mul
13107
- local.get $j|19
13150
+ local.get $j|17
13108
13151
  i32.add
13109
13152
  call $~lib/typedarray/Float64Array#__get
13110
13153
  local.get $factor
@@ -13112,31 +13155,31 @@
13112
13155
  local.get $k
13113
13156
  local.get $n
13114
13157
  i32.mul
13115
- local.get $j|19
13158
+ local.get $j|17
13116
13159
  i32.add
13117
13160
  call $~lib/typedarray/Float64Array#__get
13118
13161
  f64.mul
13119
13162
  f64.sub
13120
13163
  call $~lib/typedarray/Float64Array#__set
13121
- local.get $j|19
13164
+ local.get $j|17
13122
13165
  i32.const 1
13123
13166
  i32.add
13124
- local.set $j|19
13125
- br $for-loop|6
13167
+ local.set $j|17
13168
+ br $for-loop|5
13126
13169
  end
13127
13170
  end
13128
- local.get $i|17
13171
+ local.get $i|15
13129
13172
  i32.const 1
13130
13173
  i32.add
13131
- local.set $i|17
13132
- br $for-loop|5
13174
+ local.set $i|15
13175
+ br $for-loop|4
13133
13176
  end
13134
13177
  end
13135
13178
  local.get $k
13136
13179
  i32.const 1
13137
13180
  i32.add
13138
13181
  local.set $k
13139
- br $for-loop|2
13182
+ br $for-loop|1
13140
13183
  end
13141
13184
  end
13142
13185
  local.get $swaps
@@ -13151,27 +13194,27 @@
13151
13194
  end
13152
13195
  local.set $det
13153
13196
  i32.const 0
13154
- local.set $i|21
13155
- loop $for-loop|7
13156
- local.get $i|21
13197
+ local.set $i|19
13198
+ loop $for-loop|6
13199
+ local.get $i|19
13157
13200
  local.get $n
13158
13201
  i32.lt_s
13159
13202
  if
13160
13203
  local.get $det
13161
13204
  local.get $work
13162
- local.get $i|21
13205
+ local.get $i|19
13163
13206
  local.get $n
13164
13207
  i32.mul
13165
- local.get $i|21
13208
+ local.get $i|19
13166
13209
  i32.add
13167
13210
  call $~lib/typedarray/Float64Array#__get
13168
13211
  f64.mul
13169
13212
  local.set $det
13170
- local.get $i|21
13213
+ local.get $i|19
13171
13214
  i32.const 1
13172
13215
  i32.add
13173
- local.set $i|21
13174
- br $for-loop|7
13216
+ local.set $i|19
13217
+ br $for-loop|6
13175
13218
  end
13176
13219
  end
13177
13220
  local.get $det
@@ -15465,7 +15508,7 @@
15465
15508
  i32.gt_u
15466
15509
  if
15467
15510
  i32.const 12656
15468
- i32.const 12896
15511
+ i32.const 13104
15469
15512
  i32.const 70
15470
15513
  i32.const 60
15471
15514
  call $~lib/builtins/abort
@@ -15699,7 +15742,7 @@
15699
15742
  i32.gt_u
15700
15743
  if
15701
15744
  i32.const 12656
15702
- i32.const 12896
15745
+ i32.const 13104
15703
15746
  i32.const 19
15704
15747
  i32.const 48
15705
15748
  call $~lib/builtins/abort
@@ -15791,7 +15834,7 @@
15791
15834
  i32.lt_s
15792
15835
  if
15793
15836
  i32.const 12768
15794
- i32.const 12896
15837
+ i32.const 13104
15795
15838
  i32.const 130
15796
15839
  i32.const 22
15797
15840
  call $~lib/builtins/abort
@@ -15866,7 +15909,7 @@
15866
15909
  i32.ge_u
15867
15910
  if
15868
15911
  i32.const 12768
15869
- i32.const 12896
15912
+ i32.const 13104
15870
15913
  i32.const 114
15871
15914
  i32.const 42
15872
15915
  call $~lib/builtins/abort
@@ -16296,7 +16339,7 @@
16296
16339
  i32.gt_u
16297
16340
  if
16298
16341
  i32.const 12656
16299
- i32.const 12896
16342
+ i32.const 13104
16300
16343
  i32.const 70
16301
16344
  i32.const 60
16302
16345
  call $~lib/builtins/abort
@@ -16358,7 +16401,7 @@
16358
16401
  i32.lt_s
16359
16402
  if
16360
16403
  i32.const 12768
16361
- i32.const 12896
16404
+ i32.const 13104
16362
16405
  i32.const 130
16363
16406
  i32.const 22
16364
16407
  call $~lib/builtins/abort
@@ -16593,7 +16636,7 @@
16593
16636
  i32.ge_u
16594
16637
  if
16595
16638
  i32.const 12768
16596
- i32.const 12896
16639
+ i32.const 13104
16597
16640
  i32.const 114
16598
16641
  i32.const 42
16599
16642
  call $~lib/builtins/abort
@@ -16615,8 +16658,8 @@
16615
16658
  local.get $value
16616
16659
  i32.eqz
16617
16660
  if
16618
- i32.const 12944
16619
- i32.const 12896
16661
+ i32.const 13152
16662
+ i32.const 13104
16620
16663
  i32.const 118
16621
16664
  i32.const 40
16622
16665
  call $~lib/builtins/abort