carray 3.0.0 → 3.0.1

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.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/CHANGELOG.md +325 -3
  4. data/{NEWS.md → CHANGELOG.v1.md} +1 -1
  5. data/README.md +32 -32
  6. data/carray.gemspec +12 -8
  7. data/ext/ca_axis_group.c +55 -19
  8. data/ext/ca_binop_dispatch.c +5 -6
  9. data/ext/ca_binop_dispatch.h +0 -7
  10. data/ext/ca_categorical_iterator.c +13 -13
  11. data/ext/ca_for_each_element.h +6 -8
  12. data/ext/ca_group_iter.c +1 -1
  13. data/ext/ca_kernel_iterator.c +69 -23
  14. data/ext/ca_kernel_iterator.h +3 -10
  15. data/ext/ca_obj_bincmp.c +57 -27
  16. data/ext/ca_obj_binop.c +86 -30
  17. data/ext/ca_obj_const_string.c +3 -1
  18. data/ext/ca_obj_face.c +80 -0
  19. data/ext/ca_obj_face.h +33 -1
  20. data/ext/ca_obj_fake.c +11 -0
  21. data/ext/ca_obj_fixlen_string.c +3 -1
  22. data/ext/ca_obj_grid.c +11 -3
  23. data/ext/ca_obj_meld.c +13 -8
  24. data/ext/ca_obj_moncmp.c +33 -14
  25. data/ext/ca_obj_monop.c +19 -7
  26. data/ext/ca_obj_object.c +99 -4
  27. data/ext/ca_obj_record.c +3 -1
  28. data/ext/ca_obj_refer.c +30 -6
  29. data/ext/ca_obj_roll.c +13 -5
  30. data/ext/ca_obj_select_axis.c +16 -6
  31. data/ext/ca_obj_shift.c +3 -3
  32. data/ext/ca_obj_stride.c +106 -23
  33. data/ext/ca_obj_string.c +3 -1
  34. data/ext/ca_obj_tile.c +13 -5
  35. data/ext/ca_obj_time.c +3 -1
  36. data/ext/ca_obj_timedelta.c +3 -1
  37. data/ext/ca_obj_transpose.c +1 -1
  38. data/ext/ca_obj_triop.c +62 -23
  39. data/ext/ca_obj_window.c +86 -17
  40. data/ext/ca_op_cmplx64.h +123 -0
  41. data/ext/ca_op_ipower.c +0 -3
  42. data/ext/ca_sort_kernels.h +5 -5
  43. data/ext/ca_sweep_engine.c +78 -35
  44. data/ext/ca_sweep_engine.h +13 -4
  45. data/ext/ca_transform_common.c +7 -0
  46. data/ext/carray.h +127 -130
  47. data/ext/carray_access.c +56 -34
  48. data/ext/carray_bincount.c +8 -8
  49. data/ext/carray_broadcast.c +99 -6
  50. data/ext/carray_build_flags.h +3 -0
  51. data/ext/carray_call_cfunc.c +1491 -0
  52. data/ext/carray_call_cfunc.h +153 -0
  53. data/ext/carray_cast.c +69 -31
  54. data/ext/carray_conversion.c +22 -22
  55. data/ext/carray_copy.c +12 -2
  56. data/ext/carray_core.c +57 -10
  57. data/ext/carray_count.c +1 -1
  58. data/ext/carray_element.c +7 -7
  59. data/ext/carray_factorize.c +28 -28
  60. data/ext/carray_hold.c +1 -1
  61. data/ext/carray_index_classifier.c +7 -21
  62. data/ext/carray_internal.h +19 -3
  63. data/ext/carray_kernels_bincmp.c +1 -0
  64. data/ext/carray_kernels_binop.c +320 -298
  65. data/ext/carray_kernels_init.c +1095 -0
  66. data/ext/carray_kernels_map.c +1 -0
  67. data/ext/carray_kernels_moncmp.c +1 -0
  68. data/ext/carray_kernels_monop.c +412 -411
  69. data/ext/carray_kernels_reduce_aggregate.c +88 -87
  70. data/ext/carray_kernels_reduce_boolean.c +1 -0
  71. data/ext/carray_kernels_reduce_cumulative.c +54 -53
  72. data/ext/carray_kernels_reduce_extreme.c +51 -50
  73. data/ext/carray_kernels_reduce_variance.c +1 -0
  74. data/ext/carray_kernels_scan.c +1 -0
  75. data/ext/carray_kernels_search.c +93 -92
  76. data/ext/carray_kernels_sort.c +1 -0
  77. data/ext/carray_kernels_triop.c +1 -0
  78. data/ext/carray_lazy.c +175 -5
  79. data/ext/carray_mask.c +6 -5
  80. data/ext/carray_median_percentile.c +1 -1
  81. data/ext/carray_memory_view.c +46 -21
  82. data/ext/carray_operator.c +46 -49
  83. data/ext/carray_partition.c +4 -4
  84. data/ext/carray_random.c +7 -7
  85. data/ext/carray_scatter.c +1 -1
  86. data/ext/carray_sort.c +3 -3
  87. data/ext/carray_sort_kernel.c +10 -10
  88. data/ext/carray_test.c +1 -1
  89. data/ext/extconf.rb +18 -0
  90. data/ext/mk_call_cfunc.rb +243 -52
  91. data/ext/mkkernel.rb +354 -100
  92. data/ext/ruby_carray.c +18 -16
  93. data/ext/version.h +4 -4
  94. data/lib/carray/autoload_carray.rb +19 -0
  95. data/lib/carray/autoload_method_extension.rb +2 -1
  96. data/lib/carray/axis_group.rb +7 -7
  97. data/lib/carray/basics.rb +59 -59
  98. data/lib/carray/bincount_nd.rb +12 -12
  99. data/lib/carray/block_iterator.rb +24 -14
  100. data/lib/carray/categorical.rb +4 -4
  101. data/lib/carray/categorical_iterator.rb +98 -76
  102. data/lib/carray/conditional.rb +14 -14
  103. data/lib/carray/construct.rb +21 -0
  104. data/lib/carray/core_extensions.rb +62 -5
  105. data/lib/carray/data_type_extension.rb +18 -1
  106. data/lib/carray/frame/concat.rb +3 -3
  107. data/lib/carray/frame/convert.rb +1 -1
  108. data/lib/carray/frame/frame.rb +4 -11
  109. data/lib/carray/frame/io.rb +159 -2
  110. data/lib/carray/frame/sort.rb +1 -1
  111. data/lib/carray/frame/verbs.rb +18 -1
  112. data/lib/carray/fuse_source.rb +123 -0
  113. data/lib/carray/fusion.rb +218 -0
  114. data/lib/carray/histogram.rb +16 -16
  115. data/lib/carray/inspect.rb +1 -7
  116. data/lib/carray/iterator.rb +4 -3
  117. data/lib/carray/lazy.rb +125 -73
  118. data/lib/carray/meld_reduce.rb +2 -2
  119. data/lib/carray/methods/align_addr.rb +1 -1
  120. data/lib/carray/methods/composition.rb +1 -1
  121. data/lib/carray/methods/is_in.rb +12 -12
  122. data/lib/carray/methods/locate_addr.rb +6 -1
  123. data/lib/carray/methods/mask_duplicates.rb +1 -1
  124. data/lib/carray/methods/meshgrid.rb +4 -5
  125. data/lib/carray/methods/mode.rb +2 -2
  126. data/lib/carray/methods/nunique.rb +1 -1
  127. data/lib/carray/methods/snap.rb +7 -2
  128. data/lib/carray/methods/unique.rb +3 -3
  129. data/lib/carray/methods/value_counts.rb +2 -2
  130. data/lib/carray/runtime.rb +0 -19
  131. data/lib/carray/slab_iterator.rb +20 -7
  132. data/lib/carray/string_operation_extension.rb +5 -5
  133. data/lib/carray/time.rb +890 -491
  134. data/lib/carray/window_iterator.rb +285 -13
  135. data/lib/carray.rb +5 -5
  136. data/yard-stubs/ca_obj_array.rb +385 -0
  137. data/yard-stubs/ca_obj_bitarray.rb +38 -0
  138. data/yard-stubs/ca_obj_bitfield.rb +43 -0
  139. data/yard-stubs/ca_obj_block.rb +73 -0
  140. data/yard-stubs/ca_obj_byte_swap.rb +56 -0
  141. data/yard-stubs/ca_obj_fake.rb +31 -0
  142. data/yard-stubs/ca_obj_farray.rb +32 -0
  143. data/yard-stubs/ca_obj_field.rb +45 -0
  144. data/yard-stubs/ca_obj_grid.rb +35 -0
  145. data/yard-stubs/ca_obj_refer.rb +72 -0
  146. data/yard-stubs/ca_obj_roll.rb +45 -0
  147. data/yard-stubs/ca_obj_shift.rb +43 -0
  148. data/yard-stubs/ca_obj_stride.rb +181 -0
  149. data/yard-stubs/ca_obj_tile.rb +29 -0
  150. data/yard-stubs/ca_obj_transpose.rb +40 -0
  151. data/yard-stubs/ca_obj_window.rb +49 -0
  152. data/yard-stubs/carray_access.rb +131 -0
  153. data/yard-stubs/carray_attribute.rb +246 -0
  154. data/yard-stubs/carray_broadcast.rb +37 -0
  155. data/yard-stubs/carray_cast.rb +489 -0
  156. data/yard-stubs/carray_class.rb +65 -0
  157. data/yard-stubs/carray_conversion.rb +76 -0
  158. data/yard-stubs/carray_copy.rb +79 -0
  159. data/yard-stubs/carray_core.rb +114 -0
  160. data/yard-stubs/carray_count.rb +79 -0
  161. data/yard-stubs/carray_element.rb +108 -0
  162. data/yard-stubs/carray_generate.rb +66 -0
  163. data/yard-stubs/carray_lazy.rb +23 -0
  164. data/yard-stubs/carray_loop.rb +140 -0
  165. data/yard-stubs/carray_mask.rb +259 -0
  166. data/yard-stubs/carray_math.rb +132 -0
  167. data/yard-stubs/carray_mathfunc.rb +45 -0
  168. data/yard-stubs/carray_median_percentile.rb +89 -0
  169. data/yard-stubs/carray_memory_view.rb +163 -0
  170. data/yard-stubs/carray_order.rb +312 -0
  171. data/yard-stubs/carray_random.rb +89 -0
  172. data/yard-stubs/carray_scatter.rb +106 -0
  173. data/yard-stubs/carray_slab.rb +57 -0
  174. data/yard-stubs/carray_sort.rb +163 -0
  175. data/yard-stubs/carray_test.rb +85 -0
  176. data/yard-stubs/carray_undef.rb +64 -0
  177. data/yard-stubs/carray_utils.rb +97 -0
  178. data/yard-stubs/ruby_carray.rb +193 -0
  179. metadata +59 -10
  180. data/ext/ca_obj_unbound_repeat.c +0 -496
@@ -34,6 +34,7 @@ static inline VALUE BOOL2VAL (boolean8_t x) { return x ? Qtrue : Qfalse; }
34
34
  #endif
35
35
 
36
36
  #include "ca_op_powi.h"
37
+ #include "ca_op_cmplx64.h"
37
38
 
38
39
  /* ===== count_ki ============================================ */
39
40
 
@@ -368,8 +369,8 @@ count_ki_native_i8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
368
369
  write stride 1 (= contig output tail) both preserved -> SIMD
369
370
  tile reduce + write maintained.
370
371
 
371
- Performance characteristic (deliver-via-view, per the CLAUDE.md
372
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
372
+ Performance characteristic (deliver-via-view -- the surface
373
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
373
374
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
374
375
  = 2.38x slow. Root cause is the multi-parent data layout
375
376
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -873,8 +874,8 @@ count_ki_native_u8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
873
874
  write stride 1 (= contig output tail) both preserved -> SIMD
874
875
  tile reduce + write maintained.
875
876
 
876
- Performance characteristic (deliver-via-view, per the CLAUDE.md
877
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
877
+ Performance characteristic (deliver-via-view -- the surface
878
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
878
879
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
879
880
  = 2.38x slow. Root cause is the multi-parent data layout
880
881
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -1378,8 +1379,8 @@ count_ki_native_i16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, in
1378
1379
  write stride 1 (= contig output tail) both preserved -> SIMD
1379
1380
  tile reduce + write maintained.
1380
1381
 
1381
- Performance characteristic (deliver-via-view, per the CLAUDE.md
1382
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
1382
+ Performance characteristic (deliver-via-view -- the surface
1383
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
1383
1384
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
1384
1385
  = 2.38x slow. Root cause is the multi-parent data layout
1385
1386
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -1883,8 +1884,8 @@ count_ki_native_u16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, in
1883
1884
  write stride 1 (= contig output tail) both preserved -> SIMD
1884
1885
  tile reduce + write maintained.
1885
1886
 
1886
- Performance characteristic (deliver-via-view, per the CLAUDE.md
1887
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
1887
+ Performance characteristic (deliver-via-view -- the surface
1888
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
1888
1889
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
1889
1890
  = 2.38x slow. Root cause is the multi-parent data layout
1890
1891
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -2388,8 +2389,8 @@ count_ki_native_i32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, in
2388
2389
  write stride 1 (= contig output tail) both preserved -> SIMD
2389
2390
  tile reduce + write maintained.
2390
2391
 
2391
- Performance characteristic (deliver-via-view, per the CLAUDE.md
2392
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
2392
+ Performance characteristic (deliver-via-view -- the surface
2393
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
2393
2394
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
2394
2395
  = 2.38x slow. Root cause is the multi-parent data layout
2395
2396
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -2893,8 +2894,8 @@ count_ki_native_u32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, in
2893
2894
  write stride 1 (= contig output tail) both preserved -> SIMD
2894
2895
  tile reduce + write maintained.
2895
2896
 
2896
- Performance characteristic (deliver-via-view, per the CLAUDE.md
2897
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
2897
+ Performance characteristic (deliver-via-view -- the surface
2898
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
2898
2899
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
2899
2900
  = 2.38x slow. Root cause is the multi-parent data layout
2900
2901
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -3398,8 +3399,8 @@ count_ki_native_i64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, in
3398
3399
  write stride 1 (= contig output tail) both preserved -> SIMD
3399
3400
  tile reduce + write maintained.
3400
3401
 
3401
- Performance characteristic (deliver-via-view, per the CLAUDE.md
3402
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
3402
+ Performance characteristic (deliver-via-view -- the surface
3403
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
3403
3404
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
3404
3405
  = 2.38x slow. Root cause is the multi-parent data layout
3405
3406
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -3903,8 +3904,8 @@ count_ki_native_u64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, in
3903
3904
  write stride 1 (= contig output tail) both preserved -> SIMD
3904
3905
  tile reduce + write maintained.
3905
3906
 
3906
- Performance characteristic (deliver-via-view, per the CLAUDE.md
3907
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
3907
+ Performance characteristic (deliver-via-view -- the surface
3908
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
3908
3909
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
3909
3910
  = 2.38x slow. Root cause is the multi-parent data layout
3910
3911
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -4408,8 +4409,8 @@ count_ki_native_f32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, in
4408
4409
  write stride 1 (= contig output tail) both preserved -> SIMD
4409
4410
  tile reduce + write maintained.
4410
4411
 
4411
- Performance characteristic (deliver-via-view, per the CLAUDE.md
4412
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
4412
+ Performance characteristic (deliver-via-view -- the surface
4413
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
4413
4414
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
4414
4415
  = 2.38x slow. Root cause is the multi-parent data layout
4415
4416
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -4913,8 +4914,8 @@ count_ki_native_f64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, in
4913
4914
  write stride 1 (= contig output tail) both preserved -> SIMD
4914
4915
  tile reduce + write maintained.
4915
4916
 
4916
- Performance characteristic (deliver-via-view, per the CLAUDE.md
4917
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
4917
+ Performance characteristic (deliver-via-view -- the surface
4918
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
4918
4919
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
4919
4920
  = 2.38x slow. Root cause is the multi-parent data layout
4920
4921
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -5466,8 +5467,8 @@ accumulate_ki_native_i8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes
5466
5467
  write stride 1 (= contig output tail) both preserved -> SIMD
5467
5468
  tile reduce + write maintained.
5468
5469
 
5469
- Performance characteristic (deliver-via-view, per the CLAUDE.md
5470
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
5470
+ Performance characteristic (deliver-via-view -- the surface
5471
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
5471
5472
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
5472
5473
  = 2.38x slow. Root cause is the multi-parent data layout
5473
5474
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -5985,8 +5986,8 @@ accumulate_ki_native_u8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes
5985
5986
  write stride 1 (= contig output tail) both preserved -> SIMD
5986
5987
  tile reduce + write maintained.
5987
5988
 
5988
- Performance characteristic (deliver-via-view, per the CLAUDE.md
5989
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
5989
+ Performance characteristic (deliver-via-view -- the surface
5990
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
5990
5991
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
5991
5992
  = 2.38x slow. Root cause is the multi-parent data layout
5992
5993
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -6504,8 +6505,8 @@ accumulate_ki_native_i16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxe
6504
6505
  write stride 1 (= contig output tail) both preserved -> SIMD
6505
6506
  tile reduce + write maintained.
6506
6507
 
6507
- Performance characteristic (deliver-via-view, per the CLAUDE.md
6508
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
6508
+ Performance characteristic (deliver-via-view -- the surface
6509
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
6509
6510
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
6510
6511
  = 2.38x slow. Root cause is the multi-parent data layout
6511
6512
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -7023,8 +7024,8 @@ accumulate_ki_native_u16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxe
7023
7024
  write stride 1 (= contig output tail) both preserved -> SIMD
7024
7025
  tile reduce + write maintained.
7025
7026
 
7026
- Performance characteristic (deliver-via-view, per the CLAUDE.md
7027
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
7027
+ Performance characteristic (deliver-via-view -- the surface
7028
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
7028
7029
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
7029
7030
  = 2.38x slow. Root cause is the multi-parent data layout
7030
7031
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -7542,8 +7543,8 @@ accumulate_ki_native_i32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxe
7542
7543
  write stride 1 (= contig output tail) both preserved -> SIMD
7543
7544
  tile reduce + write maintained.
7544
7545
 
7545
- Performance characteristic (deliver-via-view, per the CLAUDE.md
7546
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
7546
+ Performance characteristic (deliver-via-view -- the surface
7547
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
7547
7548
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
7548
7549
  = 2.38x slow. Root cause is the multi-parent data layout
7549
7550
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -8061,8 +8062,8 @@ accumulate_ki_native_u32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxe
8061
8062
  write stride 1 (= contig output tail) both preserved -> SIMD
8062
8063
  tile reduce + write maintained.
8063
8064
 
8064
- Performance characteristic (deliver-via-view, per the CLAUDE.md
8065
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
8065
+ Performance characteristic (deliver-via-view -- the surface
8066
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
8066
8067
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
8067
8068
  = 2.38x slow. Root cause is the multi-parent data layout
8068
8069
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -8580,8 +8581,8 @@ accumulate_ki_native_i64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxe
8580
8581
  write stride 1 (= contig output tail) both preserved -> SIMD
8581
8582
  tile reduce + write maintained.
8582
8583
 
8583
- Performance characteristic (deliver-via-view, per the CLAUDE.md
8584
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
8584
+ Performance characteristic (deliver-via-view -- the surface
8585
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
8585
8586
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
8586
8587
  = 2.38x slow. Root cause is the multi-parent data layout
8587
8588
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -9099,8 +9100,8 @@ accumulate_ki_native_u64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxe
9099
9100
  write stride 1 (= contig output tail) both preserved -> SIMD
9100
9101
  tile reduce + write maintained.
9101
9102
 
9102
- Performance characteristic (deliver-via-view, per the CLAUDE.md
9103
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
9103
+ Performance characteristic (deliver-via-view -- the surface
9104
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
9104
9105
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
9105
9106
  = 2.38x slow. Root cause is the multi-parent data layout
9106
9107
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -9618,8 +9619,8 @@ accumulate_ki_native_f32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxe
9618
9619
  write stride 1 (= contig output tail) both preserved -> SIMD
9619
9620
  tile reduce + write maintained.
9620
9621
 
9621
- Performance characteristic (deliver-via-view, per the CLAUDE.md
9622
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
9622
+ Performance characteristic (deliver-via-view -- the surface
9623
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
9623
9624
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
9624
9625
  = 2.38x slow. Root cause is the multi-parent data layout
9625
9626
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -10137,8 +10138,8 @@ accumulate_ki_native_f64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxe
10137
10138
  write stride 1 (= contig output tail) both preserved -> SIMD
10138
10139
  tile reduce + write maintained.
10139
10140
 
10140
- Performance characteristic (deliver-via-view, per the CLAUDE.md
10141
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
10141
+ Performance characteristic (deliver-via-view -- the surface
10142
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
10142
10143
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
10143
10144
  = 2.38x slow. Root cause is the multi-parent data layout
10144
10145
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -10656,8 +10657,8 @@ accumulate_ki_native_cmplx64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t
10656
10657
  write stride 1 (= contig output tail) both preserved -> SIMD
10657
10658
  tile reduce + write maintained.
10658
10659
 
10659
- Performance characteristic (deliver-via-view, per the CLAUDE.md
10660
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
10660
+ Performance characteristic (deliver-via-view -- the surface
10661
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
10661
10662
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
10662
10663
  = 2.38x slow. Root cause is the multi-parent data layout
10663
10664
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -11175,8 +11176,8 @@ accumulate_ki_native_cmplx128 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t
11175
11176
  write stride 1 (= contig output tail) both preserved -> SIMD
11176
11177
  tile reduce + write maintained.
11177
11178
 
11178
- Performance characteristic (deliver-via-view, per the CLAUDE.md
11179
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
11179
+ Performance characteristic (deliver-via-view -- the surface
11180
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
11180
11181
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
11181
11182
  = 2.38x slow. Root cause is the multi-parent data layout
11182
11183
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -11694,8 +11695,8 @@ accumulate_ki_native_bool (VALUE self, CArray *ca, int8_t *slab_axes, int8_t nax
11694
11695
  write stride 1 (= contig output tail) both preserved -> SIMD
11695
11696
  tile reduce + write maintained.
11696
11697
 
11697
- Performance characteristic (deliver-via-view, per the CLAUDE.md
11698
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
11698
+ Performance characteristic (deliver-via-view -- the surface
11699
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
11699
11700
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
11700
11701
  = 2.38x slow. Root cause is the multi-parent data layout
11701
11702
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -11908,7 +11909,7 @@ accumulate_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t n
11908
11909
  ca_size_t masked_cnt = 0; /* unused on streaming (no mask) */
11909
11910
  (void) masked_cnt;
11910
11911
  ca_lazy_arena_enter();
11911
- VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire(__chunk_elems * sizeof(VALUE));
11912
+ VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire_object(__chunk_elems);
11912
11913
  while ( __outer_off < __outer ) {
11913
11914
  ca_size_t __r = (__outer - __outer_off < __rows) ? (__outer - __outer_off) : __rows;
11914
11915
  ca_size_t __n = __r * __inner;
@@ -12211,8 +12212,8 @@ accumulate_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t n
12211
12212
  write stride 1 (= contig output tail) both preserved -> SIMD
12212
12213
  tile reduce + write maintained.
12213
12214
 
12214
- Performance characteristic (deliver-via-view, per the CLAUDE.md
12215
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
12215
+ Performance characteristic (deliver-via-view -- the surface
12216
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
12216
12217
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
12217
12218
  = 2.38x slow. Root cause is the multi-parent data layout
12218
12219
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -12828,8 +12829,8 @@ count_true_ki_native_bool (VALUE self, CArray *ca, int8_t *slab_axes, int8_t nax
12828
12829
  write stride 1 (= contig output tail) both preserved -> SIMD
12829
12830
  tile reduce + write maintained.
12830
12831
 
12831
- Performance characteristic (deliver-via-view, per the CLAUDE.md
12832
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
12832
+ Performance characteristic (deliver-via-view -- the surface
12833
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
12833
12834
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
12834
12835
  = 2.38x slow. Root cause is the multi-parent data layout
12835
12836
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -13395,8 +13396,8 @@ count_false_ki_native_bool (VALUE self, CArray *ca, int8_t *slab_axes, int8_t na
13395
13396
  write stride 1 (= contig output tail) both preserved -> SIMD
13396
13397
  tile reduce + write maintained.
13397
13398
 
13398
- Performance characteristic (deliver-via-view, per the CLAUDE.md
13399
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
13399
+ Performance characteristic (deliver-via-view -- the surface
13400
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
13400
13401
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
13401
13402
  = 2.38x slow. Root cause is the multi-parent data layout
13402
13403
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -34,6 +34,7 @@ static inline VALUE BOOL2VAL (boolean8_t x) { return x ? Qtrue : Qfalse; }
34
34
  #endif
35
35
 
36
36
  #include "ca_op_powi.h"
37
+ #include "ca_op_cmplx64.h"
37
38
 
38
39
  /* ===== min_ki ============================================ */
39
40
 
@@ -370,8 +371,8 @@ min_ki_native_i8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int k
370
371
  write stride 1 (= contig output tail) both preserved -> SIMD
371
372
  tile reduce + write maintained.
372
373
 
373
- Performance characteristic (deliver-via-view, per the CLAUDE.md
374
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
374
+ Performance characteristic (deliver-via-view -- the surface
375
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
375
376
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
376
377
  = 2.38x slow. Root cause is the multi-parent data layout
377
378
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -889,8 +890,8 @@ min_ki_native_u8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int k
889
890
  write stride 1 (= contig output tail) both preserved -> SIMD
890
891
  tile reduce + write maintained.
891
892
 
892
- Performance characteristic (deliver-via-view, per the CLAUDE.md
893
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
893
+ Performance characteristic (deliver-via-view -- the surface
894
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
894
895
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
895
896
  = 2.38x slow. Root cause is the multi-parent data layout
896
897
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -1408,8 +1409,8 @@ min_ki_native_i16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
1408
1409
  write stride 1 (= contig output tail) both preserved -> SIMD
1409
1410
  tile reduce + write maintained.
1410
1411
 
1411
- Performance characteristic (deliver-via-view, per the CLAUDE.md
1412
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
1412
+ Performance characteristic (deliver-via-view -- the surface
1413
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
1413
1414
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
1414
1415
  = 2.38x slow. Root cause is the multi-parent data layout
1415
1416
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -1927,8 +1928,8 @@ min_ki_native_u16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
1927
1928
  write stride 1 (= contig output tail) both preserved -> SIMD
1928
1929
  tile reduce + write maintained.
1929
1930
 
1930
- Performance characteristic (deliver-via-view, per the CLAUDE.md
1931
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
1931
+ Performance characteristic (deliver-via-view -- the surface
1932
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
1932
1933
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
1933
1934
  = 2.38x slow. Root cause is the multi-parent data layout
1934
1935
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -2446,8 +2447,8 @@ min_ki_native_i32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
2446
2447
  write stride 1 (= contig output tail) both preserved -> SIMD
2447
2448
  tile reduce + write maintained.
2448
2449
 
2449
- Performance characteristic (deliver-via-view, per the CLAUDE.md
2450
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
2450
+ Performance characteristic (deliver-via-view -- the surface
2451
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
2451
2452
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
2452
2453
  = 2.38x slow. Root cause is the multi-parent data layout
2453
2454
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -2965,8 +2966,8 @@ min_ki_native_u32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
2965
2966
  write stride 1 (= contig output tail) both preserved -> SIMD
2966
2967
  tile reduce + write maintained.
2967
2968
 
2968
- Performance characteristic (deliver-via-view, per the CLAUDE.md
2969
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
2969
+ Performance characteristic (deliver-via-view -- the surface
2970
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
2970
2971
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
2971
2972
  = 2.38x slow. Root cause is the multi-parent data layout
2972
2973
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -3484,8 +3485,8 @@ min_ki_native_i64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
3484
3485
  write stride 1 (= contig output tail) both preserved -> SIMD
3485
3486
  tile reduce + write maintained.
3486
3487
 
3487
- Performance characteristic (deliver-via-view, per the CLAUDE.md
3488
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
3488
+ Performance characteristic (deliver-via-view -- the surface
3489
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
3489
3490
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
3490
3491
  = 2.38x slow. Root cause is the multi-parent data layout
3491
3492
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -4003,8 +4004,8 @@ min_ki_native_u64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
4003
4004
  write stride 1 (= contig output tail) both preserved -> SIMD
4004
4005
  tile reduce + write maintained.
4005
4006
 
4006
- Performance characteristic (deliver-via-view, per the CLAUDE.md
4007
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
4007
+ Performance characteristic (deliver-via-view -- the surface
4008
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
4008
4009
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
4009
4010
  = 2.38x slow. Root cause is the multi-parent data layout
4010
4011
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -4522,8 +4523,8 @@ min_ki_native_f32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
4522
4523
  write stride 1 (= contig output tail) both preserved -> SIMD
4523
4524
  tile reduce + write maintained.
4524
4525
 
4525
- Performance characteristic (deliver-via-view, per the CLAUDE.md
4526
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
4526
+ Performance characteristic (deliver-via-view -- the surface
4527
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
4527
4528
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
4528
4529
  = 2.38x slow. Root cause is the multi-parent data layout
4529
4530
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -5041,8 +5042,8 @@ min_ki_native_f64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
5041
5042
  write stride 1 (= contig output tail) both preserved -> SIMD
5042
5043
  tile reduce + write maintained.
5043
5044
 
5044
- Performance characteristic (deliver-via-view, per the CLAUDE.md
5045
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
5045
+ Performance characteristic (deliver-via-view -- the surface
5046
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
5046
5047
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
5047
5048
  = 2.38x slow. Root cause is the multi-parent data layout
5048
5049
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -5560,8 +5561,8 @@ min_ki_native_bool (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
5560
5561
  write stride 1 (= contig output tail) both preserved -> SIMD
5561
5562
  tile reduce + write maintained.
5562
5563
 
5563
- Performance characteristic (deliver-via-view, per the CLAUDE.md
5564
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
5564
+ Performance characteristic (deliver-via-view -- the surface
5565
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
5565
5566
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
5566
5567
  = 2.38x slow. Root cause is the multi-parent data layout
5567
5568
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -5776,7 +5777,7 @@ min_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, i
5776
5777
  ca_size_t masked_cnt = 0; /* unused on streaming (no mask) */
5777
5778
  (void) masked_cnt;
5778
5779
  ca_lazy_arena_enter();
5779
- VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire(__chunk_elems * sizeof(VALUE));
5780
+ VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire_object(__chunk_elems);
5780
5781
  while ( __outer_off < __outer ) {
5781
5782
  ca_size_t __r = (__outer - __outer_off < __rows) ? (__outer - __outer_off) : __rows;
5782
5783
  ca_size_t __n = __r * __inner;
@@ -6079,8 +6080,8 @@ min_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, i
6079
6080
  write stride 1 (= contig output tail) both preserved -> SIMD
6080
6081
  tile reduce + write maintained.
6081
6082
 
6082
- Performance characteristic (deliver-via-view, per the CLAUDE.md
6083
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
6083
+ Performance characteristic (deliver-via-view -- the surface
6084
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
6084
6085
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
6085
6086
  = 2.38x slow. Root cause is the multi-parent data layout
6086
6087
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -6806,8 +6807,8 @@ max_ki_native_i8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int k
6806
6807
  write stride 1 (= contig output tail) both preserved -> SIMD
6807
6808
  tile reduce + write maintained.
6808
6809
 
6809
- Performance characteristic (deliver-via-view, per the CLAUDE.md
6810
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
6810
+ Performance characteristic (deliver-via-view -- the surface
6811
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
6811
6812
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
6812
6813
  = 2.38x slow. Root cause is the multi-parent data layout
6813
6814
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -7325,8 +7326,8 @@ max_ki_native_u8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int k
7325
7326
  write stride 1 (= contig output tail) both preserved -> SIMD
7326
7327
  tile reduce + write maintained.
7327
7328
 
7328
- Performance characteristic (deliver-via-view, per the CLAUDE.md
7329
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
7329
+ Performance characteristic (deliver-via-view -- the surface
7330
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
7330
7331
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
7331
7332
  = 2.38x slow. Root cause is the multi-parent data layout
7332
7333
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -7844,8 +7845,8 @@ max_ki_native_i16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
7844
7845
  write stride 1 (= contig output tail) both preserved -> SIMD
7845
7846
  tile reduce + write maintained.
7846
7847
 
7847
- Performance characteristic (deliver-via-view, per the CLAUDE.md
7848
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
7848
+ Performance characteristic (deliver-via-view -- the surface
7849
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
7849
7850
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
7850
7851
  = 2.38x slow. Root cause is the multi-parent data layout
7851
7852
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -8363,8 +8364,8 @@ max_ki_native_u16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
8363
8364
  write stride 1 (= contig output tail) both preserved -> SIMD
8364
8365
  tile reduce + write maintained.
8365
8366
 
8366
- Performance characteristic (deliver-via-view, per the CLAUDE.md
8367
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
8367
+ Performance characteristic (deliver-via-view -- the surface
8368
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
8368
8369
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
8369
8370
  = 2.38x slow. Root cause is the multi-parent data layout
8370
8371
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -8882,8 +8883,8 @@ max_ki_native_i32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
8882
8883
  write stride 1 (= contig output tail) both preserved -> SIMD
8883
8884
  tile reduce + write maintained.
8884
8885
 
8885
- Performance characteristic (deliver-via-view, per the CLAUDE.md
8886
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
8886
+ Performance characteristic (deliver-via-view -- the surface
8887
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
8887
8888
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
8888
8889
  = 2.38x slow. Root cause is the multi-parent data layout
8889
8890
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -9401,8 +9402,8 @@ max_ki_native_u32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
9401
9402
  write stride 1 (= contig output tail) both preserved -> SIMD
9402
9403
  tile reduce + write maintained.
9403
9404
 
9404
- Performance characteristic (deliver-via-view, per the CLAUDE.md
9405
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
9405
+ Performance characteristic (deliver-via-view -- the surface
9406
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
9406
9407
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
9407
9408
  = 2.38x slow. Root cause is the multi-parent data layout
9408
9409
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -9920,8 +9921,8 @@ max_ki_native_i64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
9920
9921
  write stride 1 (= contig output tail) both preserved -> SIMD
9921
9922
  tile reduce + write maintained.
9922
9923
 
9923
- Performance characteristic (deliver-via-view, per the CLAUDE.md
9924
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
9924
+ Performance characteristic (deliver-via-view -- the surface
9925
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
9925
9926
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
9926
9927
  = 2.38x slow. Root cause is the multi-parent data layout
9927
9928
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -10439,8 +10440,8 @@ max_ki_native_u64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
10439
10440
  write stride 1 (= contig output tail) both preserved -> SIMD
10440
10441
  tile reduce + write maintained.
10441
10442
 
10442
- Performance characteristic (deliver-via-view, per the CLAUDE.md
10443
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
10443
+ Performance characteristic (deliver-via-view -- the surface
10444
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
10444
10445
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
10445
10446
  = 2.38x slow. Root cause is the multi-parent data layout
10446
10447
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -10958,8 +10959,8 @@ max_ki_native_f32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
10958
10959
  write stride 1 (= contig output tail) both preserved -> SIMD
10959
10960
  tile reduce + write maintained.
10960
10961
 
10961
- Performance characteristic (deliver-via-view, per the CLAUDE.md
10962
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
10962
+ Performance characteristic (deliver-via-view -- the surface
10963
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
10963
10964
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
10964
10965
  = 2.38x slow. Root cause is the multi-parent data layout
10965
10966
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -11477,8 +11478,8 @@ max_ki_native_f64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
11477
11478
  write stride 1 (= contig output tail) both preserved -> SIMD
11478
11479
  tile reduce + write maintained.
11479
11480
 
11480
- Performance characteristic (deliver-via-view, per the CLAUDE.md
11481
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
11481
+ Performance characteristic (deliver-via-view -- the surface
11482
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
11482
11483
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
11483
11484
  = 2.38x slow. Root cause is the multi-parent data layout
11484
11485
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -11996,8 +11997,8 @@ max_ki_native_bool (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
11996
11997
  write stride 1 (= contig output tail) both preserved -> SIMD
11997
11998
  tile reduce + write maintained.
11998
11999
 
11999
- Performance characteristic (deliver-via-view, per the CLAUDE.md
12000
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
12000
+ Performance characteristic (deliver-via-view -- the surface
12001
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
12001
12002
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
12002
12003
  = 2.38x slow. Root cause is the multi-parent data layout
12003
12004
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -12212,7 +12213,7 @@ max_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, i
12212
12213
  ca_size_t masked_cnt = 0; /* unused on streaming (no mask) */
12213
12214
  (void) masked_cnt;
12214
12215
  ca_lazy_arena_enter();
12215
- VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire(__chunk_elems * sizeof(VALUE));
12216
+ VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire_object(__chunk_elems);
12216
12217
  while ( __outer_off < __outer ) {
12217
12218
  ca_size_t __r = (__outer - __outer_off < __rows) ? (__outer - __outer_off) : __rows;
12218
12219
  ca_size_t __n = __r * __inner;
@@ -12515,8 +12516,8 @@ max_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, i
12515
12516
  write stride 1 (= contig output tail) both preserved -> SIMD
12516
12517
  tile reduce + write maintained.
12517
12518
 
12518
- Performance characteristic (deliver-via-view, per the CLAUDE.md
12519
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
12519
+ Performance characteristic (deliver-via-view -- the surface
12520
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
12520
12521
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
12521
12522
  = 2.38x slow. Root cause is the multi-parent data layout
12522
12523
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -34,6 +34,7 @@ static inline VALUE BOOL2VAL (boolean8_t x) { return x ? Qtrue : Qfalse; }
34
34
  #endif
35
35
 
36
36
  #include "ca_op_powi.h"
37
+ #include "ca_op_cmplx64.h"
37
38
 
38
39
  /* ===== variancep_ki ============================================ */
39
40
 
@@ -34,6 +34,7 @@ static inline VALUE BOOL2VAL (boolean8_t x) { return x ? Qtrue : Qfalse; }
34
34
  #endif
35
35
 
36
36
  #include "ca_op_powi.h"
37
+ #include "ca_op_cmplx64.h"
37
38
 
38
39
  /* ===== cumsum_ki ============================================ */
39
40