kumi 0.0.23 → 0.0.25
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/golden/array_element/expected/schema_ruby.rb +1 -1
- data/golden/array_index/expected/schema_ruby.rb +1 -1
- data/golden/array_operations/expected/schema_ruby.rb +1 -1
- data/golden/cascade_logic/expected/lir_02_inlined.txt +8 -8
- data/golden/cascade_logic/expected/schema_ruby.rb +1 -1
- data/golden/chained_fusion/expected/lir_02_inlined.txt +36 -36
- data/golden/chained_fusion/expected/lir_03_cse.txt +23 -23
- data/golden/chained_fusion/expected/lir_04_1_loop_fusion.txt +25 -25
- data/golden/chained_fusion/expected/lir_04_loop_invcm.txt +23 -23
- data/golden/chained_fusion/expected/lir_06_const_prop.txt +23 -23
- data/golden/chained_fusion/expected/schema_javascript.mjs +23 -23
- data/golden/chained_fusion/expected/schema_ruby.rb +28 -28
- data/golden/element_arrays/expected/schema_ruby.rb +1 -1
- data/golden/empty_and_null_inputs/expected/lir_02_inlined.txt +18 -18
- data/golden/empty_and_null_inputs/expected/lir_03_cse.txt +17 -17
- data/golden/empty_and_null_inputs/expected/lir_04_1_loop_fusion.txt +17 -17
- data/golden/empty_and_null_inputs/expected/lir_04_loop_invcm.txt +17 -17
- data/golden/empty_and_null_inputs/expected/lir_06_const_prop.txt +17 -17
- data/golden/empty_and_null_inputs/expected/schema_javascript.mjs +13 -13
- data/golden/empty_and_null_inputs/expected/schema_ruby.rb +18 -18
- data/golden/game_of_life/expected/lir_00_unoptimized.txt +33 -33
- data/golden/game_of_life/expected/lir_01_hoist_scalar_references.txt +33 -33
- data/golden/game_of_life/expected/lir_02_inlined.txt +1370 -1370
- data/golden/game_of_life/expected/lir_03_cse.txt +448 -448
- data/golden/game_of_life/expected/lir_04_1_loop_fusion.txt +448 -448
- data/golden/game_of_life/expected/lir_04_loop_invcm.txt +448 -448
- data/golden/game_of_life/expected/lir_06_const_prop.txt +448 -448
- data/golden/game_of_life/expected/schema_javascript.mjs +85 -85
- data/golden/game_of_life/expected/schema_ruby.rb +86 -86
- data/golden/hash_keys/expected/schema_ruby.rb +1 -1
- data/golden/hash_keys/schema.kumi +4 -5
- data/golden/hash_value/expected/schema_ruby.rb +1 -1
- data/golden/hierarchical_complex/expected/lir_02_inlined.txt +15 -15
- data/golden/hierarchical_complex/expected/lir_03_cse.txt +1 -1
- data/golden/hierarchical_complex/expected/lir_04_1_loop_fusion.txt +1 -1
- data/golden/hierarchical_complex/expected/lir_04_loop_invcm.txt +1 -1
- data/golden/hierarchical_complex/expected/lir_06_const_prop.txt +1 -1
- data/golden/hierarchical_complex/expected/schema_javascript.mjs +1 -1
- data/golden/hierarchical_complex/expected/schema_ruby.rb +2 -2
- data/golden/inline_rename_scope_leak/expected/ast.txt +48 -0
- data/golden/inline_rename_scope_leak/expected/input_plan.txt +10 -0
- data/golden/inline_rename_scope_leak/expected/lir_00_unoptimized.txt +35 -0
- data/golden/inline_rename_scope_leak/expected/lir_01_hoist_scalar_references.txt +35 -0
- data/golden/inline_rename_scope_leak/expected/lir_02_inlined.txt +49 -0
- data/golden/inline_rename_scope_leak/expected/lir_03_cse.txt +49 -0
- data/golden/inline_rename_scope_leak/expected/lir_04_1_loop_fusion.txt +49 -0
- data/golden/inline_rename_scope_leak/expected/lir_04_loop_invcm.txt +49 -0
- data/golden/inline_rename_scope_leak/expected/lir_06_const_prop.txt +49 -0
- data/golden/inline_rename_scope_leak/expected/nast.txt +31 -0
- data/golden/inline_rename_scope_leak/expected/schema_javascript.mjs +51 -0
- data/golden/inline_rename_scope_leak/expected/schema_ruby.rb +82 -0
- data/golden/inline_rename_scope_leak/expected/snast.txt +31 -0
- data/golden/inline_rename_scope_leak/expected.json +7 -0
- data/golden/inline_rename_scope_leak/input.json +4 -0
- data/golden/inline_rename_scope_leak/schema.kumi +24 -0
- data/golden/input_reference/expected/schema_ruby.rb +1 -1
- data/golden/interleaved_fusion/expected/lir_02_inlined.txt +35 -35
- data/golden/interleaved_fusion/expected/lir_03_cse.txt +26 -26
- data/golden/interleaved_fusion/expected/lir_04_1_loop_fusion.txt +27 -26
- data/golden/interleaved_fusion/expected/lir_04_loop_invcm.txt +26 -26
- data/golden/interleaved_fusion/expected/lir_06_const_prop.txt +26 -26
- data/golden/interleaved_fusion/expected/schema_javascript.mjs +23 -23
- data/golden/interleaved_fusion/expected/schema_ruby.rb +29 -29
- data/golden/let_inline/expected/schema_ruby.rb +1 -1
- data/golden/loop_fusion/expected/lir_02_inlined.txt +17 -17
- data/golden/loop_fusion/expected/lir_03_cse.txt +14 -14
- data/golden/loop_fusion/expected/lir_04_1_loop_fusion.txt +14 -14
- data/golden/loop_fusion/expected/lir_04_loop_invcm.txt +14 -14
- data/golden/loop_fusion/expected/lir_06_const_prop.txt +14 -14
- data/golden/loop_fusion/expected/schema_javascript.mjs +12 -12
- data/golden/loop_fusion/expected/schema_ruby.rb +16 -16
- data/golden/min_reduce_scope/expected/schema_ruby.rb +1 -1
- data/golden/mixed_dimensions/expected/lir_02_inlined.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_03_cse.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_04_1_loop_fusion.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_04_loop_invcm.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_06_const_prop.txt +5 -5
- data/golden/mixed_dimensions/expected/schema_javascript.mjs +3 -3
- data/golden/mixed_dimensions/expected/schema_ruby.rb +6 -6
- data/golden/multirank_hoisting/expected/lir_02_inlined.txt +48 -48
- data/golden/multirank_hoisting/expected/lir_03_cse.txt +35 -35
- data/golden/multirank_hoisting/expected/lir_04_1_loop_fusion.txt +35 -35
- data/golden/multirank_hoisting/expected/lir_04_loop_invcm.txt +35 -35
- data/golden/multirank_hoisting/expected/lir_06_const_prop.txt +35 -35
- data/golden/multirank_hoisting/expected/schema_javascript.mjs +34 -34
- data/golden/multirank_hoisting/expected/schema_ruby.rb +36 -36
- data/golden/nested_hash/expected/schema_ruby.rb +1 -1
- data/golden/reduction_broadcast/expected/lir_02_inlined.txt +30 -30
- data/golden/reduction_broadcast/expected/lir_03_cse.txt +22 -22
- data/golden/reduction_broadcast/expected/lir_04_1_loop_fusion.txt +22 -22
- data/golden/reduction_broadcast/expected/lir_04_loop_invcm.txt +22 -22
- data/golden/reduction_broadcast/expected/lir_06_const_prop.txt +22 -22
- data/golden/reduction_broadcast/expected/schema_javascript.mjs +18 -18
- data/golden/reduction_broadcast/expected/schema_ruby.rb +23 -23
- data/golden/roll/expected/lir_00_unoptimized.txt +8 -8
- data/golden/roll/expected/lir_01_hoist_scalar_references.txt +8 -8
- data/golden/roll/expected/lir_02_inlined.txt +8 -8
- data/golden/roll/expected/lir_03_cse.txt +8 -8
- data/golden/roll/expected/lir_04_1_loop_fusion.txt +8 -8
- data/golden/roll/expected/lir_04_loop_invcm.txt +8 -8
- data/golden/roll/expected/lir_06_const_prop.txt +8 -8
- data/golden/roll/expected/schema_ruby.rb +1 -1
- data/golden/shift/expected/lir_00_unoptimized.txt +12 -12
- data/golden/shift/expected/lir_01_hoist_scalar_references.txt +12 -12
- data/golden/shift/expected/lir_02_inlined.txt +12 -12
- data/golden/shift/expected/lir_03_cse.txt +12 -12
- data/golden/shift/expected/lir_04_1_loop_fusion.txt +12 -12
- data/golden/shift/expected/lir_04_loop_invcm.txt +12 -12
- data/golden/shift/expected/lir_06_const_prop.txt +12 -12
- data/golden/shift/expected/schema_ruby.rb +1 -1
- data/golden/shift_2d/expected/lir_00_unoptimized.txt +48 -48
- data/golden/shift_2d/expected/lir_01_hoist_scalar_references.txt +48 -48
- data/golden/shift_2d/expected/lir_02_inlined.txt +48 -48
- data/golden/shift_2d/expected/lir_03_cse.txt +48 -48
- data/golden/shift_2d/expected/lir_04_1_loop_fusion.txt +48 -48
- data/golden/shift_2d/expected/lir_04_loop_invcm.txt +48 -48
- data/golden/shift_2d/expected/lir_06_const_prop.txt +48 -48
- data/golden/shift_2d/expected/schema_ruby.rb +1 -1
- data/golden/simple_math/expected/schema_ruby.rb +1 -1
- data/golden/streaming_basics/expected/lir_02_inlined.txt +25 -25
- data/golden/streaming_basics/expected/lir_03_cse.txt +13 -13
- data/golden/streaming_basics/expected/lir_04_1_loop_fusion.txt +13 -13
- data/golden/streaming_basics/expected/lir_04_loop_invcm.txt +13 -13
- data/golden/streaming_basics/expected/lir_06_const_prop.txt +13 -13
- data/golden/streaming_basics/expected/schema_javascript.mjs +13 -13
- data/golden/streaming_basics/expected/schema_ruby.rb +14 -14
- data/golden/tuples/expected/lir_00_unoptimized.txt +4 -4
- data/golden/tuples/expected/lir_01_hoist_scalar_references.txt +4 -4
- data/golden/tuples/expected/lir_02_inlined.txt +4 -4
- data/golden/tuples/expected/lir_03_cse.txt +4 -4
- data/golden/tuples/expected/lir_04_1_loop_fusion.txt +4 -4
- data/golden/tuples/expected/lir_04_loop_invcm.txt +4 -4
- data/golden/tuples/expected/lir_06_const_prop.txt +4 -4
- data/golden/tuples/expected/schema_ruby.rb +1 -1
- data/golden/tuples_and_arrays/expected/lir_00_unoptimized.txt +1 -1
- data/golden/tuples_and_arrays/expected/lir_01_hoist_scalar_references.txt +1 -1
- data/golden/tuples_and_arrays/expected/lir_02_inlined.txt +17 -17
- data/golden/tuples_and_arrays/expected/lir_03_cse.txt +14 -14
- data/golden/tuples_and_arrays/expected/lir_04_1_loop_fusion.txt +14 -14
- data/golden/tuples_and_arrays/expected/lir_04_loop_invcm.txt +14 -14
- data/golden/tuples_and_arrays/expected/lir_06_const_prop.txt +14 -14
- data/golden/tuples_and_arrays/expected/schema_javascript.mjs +13 -13
- data/golden/tuples_and_arrays/expected/schema_ruby.rb +14 -14
- data/golden/us_tax_2024/expected/ast.txt +865 -0
- data/golden/us_tax_2024/expected/input_plan.txt +61 -0
- data/golden/us_tax_2024/expected/lir_00_unoptimized.txt +901 -0
- data/golden/us_tax_2024/expected/lir_01_hoist_scalar_references.txt +901 -0
- data/golden/us_tax_2024/expected/lir_02_inlined.txt +5178 -0
- data/golden/us_tax_2024/expected/lir_03_cse.txt +2499 -0
- data/golden/us_tax_2024/expected/lir_04_1_loop_fusion.txt +2519 -0
- data/golden/us_tax_2024/expected/lir_04_loop_invcm.txt +2499 -0
- data/golden/us_tax_2024/expected/lir_06_const_prop.txt +2499 -0
- data/golden/us_tax_2024/expected/nast.txt +976 -0
- data/golden/us_tax_2024/expected/schema_javascript.mjs +584 -0
- data/golden/us_tax_2024/expected/schema_ruby.rb +639 -0
- data/golden/us_tax_2024/expected/snast.txt +976 -0
- data/golden/us_tax_2024/expected.json +1 -0
- data/golden/us_tax_2024/input.json +168 -0
- data/golden/us_tax_2024/schema.kumi +203 -0
- data/golden/with_constants/expected/schema_ruby.rb +1 -1
- data/lib/kumi/core/analyzer/passes/lir/inline_declarations_pass.rb +227 -107
- data/lib/kumi/version.rb +1 -1
- metadata +33 -1
@@ -11,7 +11,7 @@
|
|
11
11
|
%t6 = load_input "rows" :: array
|
12
12
|
loop rows id=L3 in %t6 as el=%rows_el_7, idx=%rows_i_8
|
13
13
|
loop col id=L4 in %rows_el_7 as el=%col_el_9, idx=%col_i_10
|
14
|
-
%t11 =
|
14
|
+
%t11 = length %t6 :: integer
|
15
15
|
%t12 = const -1 :: integer
|
16
16
|
%t13 = call core.sub(%rows_i_8, %t12) :: integer
|
17
17
|
%t14 = const 0 :: integer
|
@@ -22,12 +22,12 @@
|
|
22
22
|
%t19 = call core.sub(%t11, %t18) :: integer
|
23
23
|
%t20 = const 0 :: integer
|
24
24
|
%t21 = call core.clamp(%t13, %t20, %t19) :: integer
|
25
|
-
%t22 =
|
26
|
-
%t23 =
|
25
|
+
%t22 = gather %t6, %t21 :: any
|
26
|
+
%t23 = length %t22 :: integer
|
27
27
|
%t24 = call core.mod(%col_i_10, %t23) :: integer
|
28
28
|
%t25 = call core.add(%t24, %t23) :: integer
|
29
29
|
%t26 = call core.mod(%t25, %t23) :: integer
|
30
|
-
%t27 =
|
30
|
+
%t27 = gather %t22, %t26 :: integer
|
31
31
|
%t28 = const 0 :: integer
|
32
32
|
%t29 = select %t17, %t27, %t28 :: integer
|
33
33
|
yield %t29
|
@@ -38,7 +38,7 @@
|
|
38
38
|
%t30 = load_input "rows" :: array
|
39
39
|
loop rows id=L5 in %t30 as el=%rows_el_31, idx=%rows_i_32
|
40
40
|
loop col id=L6 in %rows_el_31 as el=%col_el_33, idx=%col_i_34
|
41
|
-
%t35 =
|
41
|
+
%t35 = length %t30 :: integer
|
42
42
|
%t36 = const 1 :: integer
|
43
43
|
%t37 = call core.sub(%rows_i_32, %t36) :: integer
|
44
44
|
%t38 = const 0 :: integer
|
@@ -49,12 +49,12 @@
|
|
49
49
|
%t43 = call core.sub(%t35, %t42) :: integer
|
50
50
|
%t44 = const 0 :: integer
|
51
51
|
%t45 = call core.clamp(%t37, %t44, %t43) :: integer
|
52
|
-
%t46 =
|
53
|
-
%t47 =
|
52
|
+
%t46 = gather %t30, %t45 :: any
|
53
|
+
%t47 = length %t46 :: integer
|
54
54
|
%t48 = call core.mod(%col_i_34, %t47) :: integer
|
55
55
|
%t49 = call core.add(%t48, %t47) :: integer
|
56
56
|
%t50 = call core.mod(%t49, %t47) :: integer
|
57
|
-
%t51 =
|
57
|
+
%t51 = gather %t46, %t50 :: integer
|
58
58
|
%t52 = const 0 :: integer
|
59
59
|
%t53 = select %t41, %t51, %t52 :: integer
|
60
60
|
yield %t53
|
@@ -65,12 +65,12 @@
|
|
65
65
|
%t54 = load_input "rows" :: array
|
66
66
|
loop rows id=L7 in %t54 as el=%rows_el_55, idx=%rows_i_56
|
67
67
|
loop col id=L8 in %rows_el_55 as el=%col_el_57, idx=%col_i_58
|
68
|
-
%t59 =
|
68
|
+
%t59 = length %t54 :: integer
|
69
69
|
%t60 = call core.mod(%rows_i_56, %t59) :: integer
|
70
70
|
%t61 = call core.add(%t60, %t59) :: integer
|
71
71
|
%t62 = call core.mod(%t61, %t59) :: integer
|
72
|
-
%t63 =
|
73
|
-
%t64 =
|
72
|
+
%t63 = gather %t54, %t62 :: any
|
73
|
+
%t64 = length %t63 :: integer
|
74
74
|
%t65 = const -1 :: integer
|
75
75
|
%t66 = call core.sub(%col_i_58, %t65) :: integer
|
76
76
|
%t67 = const 0 :: integer
|
@@ -81,7 +81,7 @@
|
|
81
81
|
%t72 = call core.sub(%t64, %t71) :: integer
|
82
82
|
%t73 = const 0 :: integer
|
83
83
|
%t74 = call core.clamp(%t66, %t73, %t72) :: integer
|
84
|
-
%t75 =
|
84
|
+
%t75 = gather %t63, %t74 :: integer
|
85
85
|
%t76 = const 0 :: integer
|
86
86
|
%t77 = select %t70, %t75, %t76 :: integer
|
87
87
|
yield %t77
|
@@ -92,12 +92,12 @@
|
|
92
92
|
%t78 = load_input "rows" :: array
|
93
93
|
loop rows id=L9 in %t78 as el=%rows_el_79, idx=%rows_i_80
|
94
94
|
loop col id=L10 in %rows_el_79 as el=%col_el_81, idx=%col_i_82
|
95
|
-
%t83 =
|
95
|
+
%t83 = length %t78 :: integer
|
96
96
|
%t84 = call core.mod(%rows_i_80, %t83) :: integer
|
97
97
|
%t85 = call core.add(%t84, %t83) :: integer
|
98
98
|
%t86 = call core.mod(%t85, %t83) :: integer
|
99
|
-
%t87 =
|
100
|
-
%t88 =
|
99
|
+
%t87 = gather %t78, %t86 :: any
|
100
|
+
%t88 = length %t87 :: integer
|
101
101
|
%t89 = const 1 :: integer
|
102
102
|
%t90 = call core.sub(%col_i_82, %t89) :: integer
|
103
103
|
%t91 = const 0 :: integer
|
@@ -108,7 +108,7 @@
|
|
108
108
|
%t96 = call core.sub(%t88, %t95) :: integer
|
109
109
|
%t97 = const 0 :: integer
|
110
110
|
%t98 = call core.clamp(%t90, %t97, %t96) :: integer
|
111
|
-
%t99 =
|
111
|
+
%t99 = gather %t87, %t98 :: integer
|
112
112
|
%t100 = const 0 :: integer
|
113
113
|
%t101 = select %t94, %t99, %t100 :: integer
|
114
114
|
yield %t101
|
@@ -119,7 +119,7 @@
|
|
119
119
|
%t102 = load_input "rows" :: array
|
120
120
|
loop rows id=L11 in %t102 as el=%rows_el_103, idx=%rows_i_104
|
121
121
|
loop col id=L12 in %rows_el_103 as el=%col_el_105, idx=%col_i_106
|
122
|
-
%t107 =
|
122
|
+
%t107 = length %t102 :: integer
|
123
123
|
%t108 = const -1 :: integer
|
124
124
|
%t109 = call core.sub(%rows_i_104, %t108) :: integer
|
125
125
|
%t110 = const 0 :: integer
|
@@ -130,8 +130,8 @@
|
|
130
130
|
%t115 = call core.sub(%t107, %t114) :: integer
|
131
131
|
%t116 = const 0 :: integer
|
132
132
|
%t117 = call core.clamp(%t109, %t116, %t115) :: integer
|
133
|
-
%t118 =
|
134
|
-
%t119 =
|
133
|
+
%t118 = gather %t102, %t117 :: any
|
134
|
+
%t119 = length %t118 :: integer
|
135
135
|
%t120 = const -1 :: integer
|
136
136
|
%t121 = call core.sub(%col_i_106, %t120) :: integer
|
137
137
|
%t122 = const 0 :: integer
|
@@ -143,7 +143,7 @@
|
|
143
143
|
%t128 = call core.sub(%t119, %t127) :: integer
|
144
144
|
%t129 = const 0 :: integer
|
145
145
|
%t130 = call core.clamp(%t121, %t129, %t128) :: integer
|
146
|
-
%t131 =
|
146
|
+
%t131 = gather %t118, %t130 :: integer
|
147
147
|
%t132 = const 0 :: integer
|
148
148
|
%t133 = select %t126, %t131, %t132 :: integer
|
149
149
|
yield %t133
|
@@ -154,7 +154,7 @@
|
|
154
154
|
%t134 = load_input "rows" :: array
|
155
155
|
loop rows id=L13 in %t134 as el=%rows_el_135, idx=%rows_i_136
|
156
156
|
loop col id=L14 in %rows_el_135 as el=%col_el_137, idx=%col_i_138
|
157
|
-
%t139 =
|
157
|
+
%t139 = length %t134 :: integer
|
158
158
|
%t140 = const -1 :: integer
|
159
159
|
%t141 = call core.sub(%rows_i_136, %t140) :: integer
|
160
160
|
%t142 = const 0 :: integer
|
@@ -165,8 +165,8 @@
|
|
165
165
|
%t147 = call core.sub(%t139, %t146) :: integer
|
166
166
|
%t148 = const 0 :: integer
|
167
167
|
%t149 = call core.clamp(%t141, %t148, %t147) :: integer
|
168
|
-
%t150 =
|
169
|
-
%t151 =
|
168
|
+
%t150 = gather %t134, %t149 :: any
|
169
|
+
%t151 = length %t150 :: integer
|
170
170
|
%t152 = const 1 :: integer
|
171
171
|
%t153 = call core.sub(%col_i_138, %t152) :: integer
|
172
172
|
%t154 = const 0 :: integer
|
@@ -178,7 +178,7 @@
|
|
178
178
|
%t160 = call core.sub(%t151, %t159) :: integer
|
179
179
|
%t161 = const 0 :: integer
|
180
180
|
%t162 = call core.clamp(%t153, %t161, %t160) :: integer
|
181
|
-
%t163 =
|
181
|
+
%t163 = gather %t150, %t162 :: integer
|
182
182
|
%t164 = const 0 :: integer
|
183
183
|
%t165 = select %t158, %t163, %t164 :: integer
|
184
184
|
yield %t165
|
@@ -189,7 +189,7 @@
|
|
189
189
|
%t166 = load_input "rows" :: array
|
190
190
|
loop rows id=L15 in %t166 as el=%rows_el_167, idx=%rows_i_168
|
191
191
|
loop col id=L16 in %rows_el_167 as el=%col_el_169, idx=%col_i_170
|
192
|
-
%t171 =
|
192
|
+
%t171 = length %t166 :: integer
|
193
193
|
%t172 = const 1 :: integer
|
194
194
|
%t173 = call core.sub(%rows_i_168, %t172) :: integer
|
195
195
|
%t174 = const 0 :: integer
|
@@ -200,8 +200,8 @@
|
|
200
200
|
%t179 = call core.sub(%t171, %t178) :: integer
|
201
201
|
%t180 = const 0 :: integer
|
202
202
|
%t181 = call core.clamp(%t173, %t180, %t179) :: integer
|
203
|
-
%t182 =
|
204
|
-
%t183 =
|
203
|
+
%t182 = gather %t166, %t181 :: any
|
204
|
+
%t183 = length %t182 :: integer
|
205
205
|
%t184 = const -1 :: integer
|
206
206
|
%t185 = call core.sub(%col_i_170, %t184) :: integer
|
207
207
|
%t186 = const 0 :: integer
|
@@ -213,7 +213,7 @@
|
|
213
213
|
%t192 = call core.sub(%t183, %t191) :: integer
|
214
214
|
%t193 = const 0 :: integer
|
215
215
|
%t194 = call core.clamp(%t185, %t193, %t192) :: integer
|
216
|
-
%t195 =
|
216
|
+
%t195 = gather %t182, %t194 :: integer
|
217
217
|
%t196 = const 0 :: integer
|
218
218
|
%t197 = select %t190, %t195, %t196 :: integer
|
219
219
|
yield %t197
|
@@ -224,7 +224,7 @@
|
|
224
224
|
%t198 = load_input "rows" :: array
|
225
225
|
loop rows id=L17 in %t198 as el=%rows_el_199, idx=%rows_i_200
|
226
226
|
loop col id=L18 in %rows_el_199 as el=%col_el_201, idx=%col_i_202
|
227
|
-
%t203 =
|
227
|
+
%t203 = length %t198 :: integer
|
228
228
|
%t204 = const 1 :: integer
|
229
229
|
%t205 = call core.sub(%rows_i_200, %t204) :: integer
|
230
230
|
%t206 = const 0 :: integer
|
@@ -235,8 +235,8 @@
|
|
235
235
|
%t211 = call core.sub(%t203, %t210) :: integer
|
236
236
|
%t212 = const 0 :: integer
|
237
237
|
%t213 = call core.clamp(%t205, %t212, %t211) :: integer
|
238
|
-
%t214 =
|
239
|
-
%t215 =
|
238
|
+
%t214 = gather %t198, %t213 :: any
|
239
|
+
%t215 = length %t214 :: integer
|
240
240
|
%t216 = const 1 :: integer
|
241
241
|
%t217 = call core.sub(%col_i_202, %t216) :: integer
|
242
242
|
%t218 = const 0 :: integer
|
@@ -248,7 +248,7 @@
|
|
248
248
|
%t224 = call core.sub(%t215, %t223) :: integer
|
249
249
|
%t225 = const 0 :: integer
|
250
250
|
%t226 = call core.clamp(%t217, %t225, %t224) :: integer
|
251
|
-
%t227 =
|
251
|
+
%t227 = gather %t214, %t226 :: integer
|
252
252
|
%t228 = const 0 :: integer
|
253
253
|
%t229 = select %t222, %t227, %t228 :: integer
|
254
254
|
yield %t229
|
@@ -268,7 +268,7 @@
|
|
268
268
|
%t241 = load_decl sw axes=[rows, col] :: integer
|
269
269
|
%t242 = load_decl se axes=[rows, col] :: integer
|
270
270
|
%t243 = make_tuple(%t235, %t236, %t237, %t238, %t239, %t240, %t241, %t242) :: tuple<integer>
|
271
|
-
%t244 =
|
271
|
+
%t244 = fold %t243 fn="agg.sum" ::
|
272
272
|
yield %t244
|
273
273
|
end_loop
|
274
274
|
end_loop
|