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
  /* ===== sum_ki ============================================ */
39
40
 
@@ -370,8 +371,8 @@ sum_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 @@ sum_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 @@ sum_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 @@ sum_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 @@ sum_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 @@ sum_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 @@ sum_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 @@ sum_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 @@ sum_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 @@ sum_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 @@ sum_ki_native_cmplx64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes,
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),
@@ -6079,8 +6080,8 @@ sum_ki_native_cmplx128 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes,
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),
@@ -6598,8 +6599,8 @@ sum_ki_native_bool (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
6598
6599
  write stride 1 (= contig output tail) both preserved -> SIMD
6599
6600
  tile reduce + write maintained.
6600
6601
 
6601
- Performance characteristic (deliver-via-view, per the CLAUDE.md
6602
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
6602
+ Performance characteristic (deliver-via-view -- the surface
6603
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
6603
6604
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
6604
6605
  = 2.38x slow. Root cause is the multi-parent data layout
6605
6606
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -6814,7 +6815,7 @@ sum_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, i
6814
6815
  ca_size_t masked_cnt = 0; /* unused on streaming (no mask) */
6815
6816
  (void) masked_cnt;
6816
6817
  ca_lazy_arena_enter();
6817
- VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire(__chunk_elems * sizeof(VALUE));
6818
+ VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire_object(__chunk_elems);
6818
6819
  while ( __outer_off < __outer ) {
6819
6820
  ca_size_t __r = (__outer - __outer_off < __rows) ? (__outer - __outer_off) : __rows;
6820
6821
  ca_size_t __n = __r * __inner;
@@ -7117,8 +7118,8 @@ sum_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, i
7117
7118
  write stride 1 (= contig output tail) both preserved -> SIMD
7118
7119
  tile reduce + write maintained.
7119
7120
 
7120
- Performance characteristic (deliver-via-view, per the CLAUDE.md
7121
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
7121
+ Performance characteristic (deliver-via-view -- the surface
7122
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
7122
7123
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
7123
7124
  = 2.38x slow. Root cause is the multi-parent data layout
7124
7125
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -7734,8 +7735,8 @@ prod_ki_native_i8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
7734
7735
  write stride 1 (= contig output tail) both preserved -> SIMD
7735
7736
  tile reduce + write maintained.
7736
7737
 
7737
- Performance characteristic (deliver-via-view, per the CLAUDE.md
7738
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
7738
+ Performance characteristic (deliver-via-view -- the surface
7739
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
7739
7740
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
7740
7741
  = 2.38x slow. Root cause is the multi-parent data layout
7741
7742
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -8253,8 +8254,8 @@ prod_ki_native_u8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
8253
8254
  write stride 1 (= contig output tail) both preserved -> SIMD
8254
8255
  tile reduce + write maintained.
8255
8256
 
8256
- Performance characteristic (deliver-via-view, per the CLAUDE.md
8257
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
8257
+ Performance characteristic (deliver-via-view -- the surface
8258
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
8258
8259
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
8259
8260
  = 2.38x slow. Root cause is the multi-parent data layout
8260
8261
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -8772,8 +8773,8 @@ prod_ki_native_i16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
8772
8773
  write stride 1 (= contig output tail) both preserved -> SIMD
8773
8774
  tile reduce + write maintained.
8774
8775
 
8775
- Performance characteristic (deliver-via-view, per the CLAUDE.md
8776
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
8776
+ Performance characteristic (deliver-via-view -- the surface
8777
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
8777
8778
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
8778
8779
  = 2.38x slow. Root cause is the multi-parent data layout
8779
8780
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -9291,8 +9292,8 @@ prod_ki_native_u16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
9291
9292
  write stride 1 (= contig output tail) both preserved -> SIMD
9292
9293
  tile reduce + write maintained.
9293
9294
 
9294
- Performance characteristic (deliver-via-view, per the CLAUDE.md
9295
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
9295
+ Performance characteristic (deliver-via-view -- the surface
9296
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
9296
9297
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
9297
9298
  = 2.38x slow. Root cause is the multi-parent data layout
9298
9299
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -9810,8 +9811,8 @@ prod_ki_native_i32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
9810
9811
  write stride 1 (= contig output tail) both preserved -> SIMD
9811
9812
  tile reduce + write maintained.
9812
9813
 
9813
- Performance characteristic (deliver-via-view, per the CLAUDE.md
9814
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
9814
+ Performance characteristic (deliver-via-view -- the surface
9815
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
9815
9816
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
9816
9817
  = 2.38x slow. Root cause is the multi-parent data layout
9817
9818
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -10329,8 +10330,8 @@ prod_ki_native_u32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
10329
10330
  write stride 1 (= contig output tail) both preserved -> SIMD
10330
10331
  tile reduce + write maintained.
10331
10332
 
10332
- Performance characteristic (deliver-via-view, per the CLAUDE.md
10333
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
10333
+ Performance characteristic (deliver-via-view -- the surface
10334
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
10334
10335
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
10335
10336
  = 2.38x slow. Root cause is the multi-parent data layout
10336
10337
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -10848,8 +10849,8 @@ prod_ki_native_i64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
10848
10849
  write stride 1 (= contig output tail) both preserved -> SIMD
10849
10850
  tile reduce + write maintained.
10850
10851
 
10851
- Performance characteristic (deliver-via-view, per the CLAUDE.md
10852
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
10852
+ Performance characteristic (deliver-via-view -- the surface
10853
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
10853
10854
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
10854
10855
  = 2.38x slow. Root cause is the multi-parent data layout
10855
10856
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -11367,8 +11368,8 @@ prod_ki_native_u64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
11367
11368
  write stride 1 (= contig output tail) both preserved -> SIMD
11368
11369
  tile reduce + write maintained.
11369
11370
 
11370
- Performance characteristic (deliver-via-view, per the CLAUDE.md
11371
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
11371
+ Performance characteristic (deliver-via-view -- the surface
11372
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
11372
11373
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
11373
11374
  = 2.38x slow. Root cause is the multi-parent data layout
11374
11375
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -11886,8 +11887,8 @@ prod_ki_native_f32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
11886
11887
  write stride 1 (= contig output tail) both preserved -> SIMD
11887
11888
  tile reduce + write maintained.
11888
11889
 
11889
- Performance characteristic (deliver-via-view, per the CLAUDE.md
11890
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
11890
+ Performance characteristic (deliver-via-view -- the surface
11891
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
11891
11892
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
11892
11893
  = 2.38x slow. Root cause is the multi-parent data layout
11893
11894
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -12405,8 +12406,8 @@ prod_ki_native_f64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
12405
12406
  write stride 1 (= contig output tail) both preserved -> SIMD
12406
12407
  tile reduce + write maintained.
12407
12408
 
12408
- Performance characteristic (deliver-via-view, per the CLAUDE.md
12409
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
12409
+ Performance characteristic (deliver-via-view -- the surface
12410
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
12410
12411
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
12411
12412
  = 2.38x slow. Root cause is the multi-parent data layout
12412
12413
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -12924,8 +12925,8 @@ prod_ki_native_cmplx64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes,
12924
12925
  write stride 1 (= contig output tail) both preserved -> SIMD
12925
12926
  tile reduce + write maintained.
12926
12927
 
12927
- Performance characteristic (deliver-via-view, per the CLAUDE.md
12928
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
12928
+ Performance characteristic (deliver-via-view -- the surface
12929
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
12929
12930
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
12930
12931
  = 2.38x slow. Root cause is the multi-parent data layout
12931
12932
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -13443,8 +13444,8 @@ prod_ki_native_cmplx128 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes
13443
13444
  write stride 1 (= contig output tail) both preserved -> SIMD
13444
13445
  tile reduce + write maintained.
13445
13446
 
13446
- Performance characteristic (deliver-via-view, per the CLAUDE.md
13447
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
13447
+ Performance characteristic (deliver-via-view -- the surface
13448
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
13448
13449
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
13449
13450
  = 2.38x slow. Root cause is the multi-parent data layout
13450
13451
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -13962,8 +13963,8 @@ prod_ki_native_bool (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, in
13962
13963
  write stride 1 (= contig output tail) both preserved -> SIMD
13963
13964
  tile reduce + write maintained.
13964
13965
 
13965
- Performance characteristic (deliver-via-view, per the CLAUDE.md
13966
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
13966
+ Performance characteristic (deliver-via-view -- the surface
13967
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
13967
13968
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
13968
13969
  = 2.38x slow. Root cause is the multi-parent data layout
13969
13970
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -14178,7 +14179,7 @@ prod_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes,
14178
14179
  ca_size_t masked_cnt = 0; /* unused on streaming (no mask) */
14179
14180
  (void) masked_cnt;
14180
14181
  ca_lazy_arena_enter();
14181
- VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire(__chunk_elems * sizeof(VALUE));
14182
+ VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire_object(__chunk_elems);
14182
14183
  while ( __outer_off < __outer ) {
14183
14184
  ca_size_t __r = (__outer - __outer_off < __rows) ? (__outer - __outer_off) : __rows;
14184
14185
  ca_size_t __n = __r * __inner;
@@ -14481,8 +14482,8 @@ prod_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes,
14481
14482
  write stride 1 (= contig output tail) both preserved -> SIMD
14482
14483
  tile reduce + write maintained.
14483
14484
 
14484
- Performance characteristic (deliver-via-view, per the CLAUDE.md
14485
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
14485
+ Performance characteristic (deliver-via-view -- the surface
14486
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
14486
14487
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
14487
14488
  = 2.38x slow. Root cause is the multi-parent data layout
14488
14489
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -15099,8 +15100,8 @@ mean_ki_native_i8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
15099
15100
  write stride 1 (= contig output tail) both preserved -> SIMD
15100
15101
  tile reduce + write maintained.
15101
15102
 
15102
- Performance characteristic (deliver-via-view, per the CLAUDE.md
15103
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
15103
+ Performance characteristic (deliver-via-view -- the surface
15104
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
15104
15105
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
15105
15106
  = 2.38x slow. Root cause is the multi-parent data layout
15106
15107
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -15621,8 +15622,8 @@ mean_ki_native_u8 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
15621
15622
  write stride 1 (= contig output tail) both preserved -> SIMD
15622
15623
  tile reduce + write maintained.
15623
15624
 
15624
- Performance characteristic (deliver-via-view, per the CLAUDE.md
15625
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
15625
+ Performance characteristic (deliver-via-view -- the surface
15626
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
15626
15627
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
15627
15628
  = 2.38x slow. Root cause is the multi-parent data layout
15628
15629
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -16143,8 +16144,8 @@ mean_ki_native_i16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
16143
16144
  write stride 1 (= contig output tail) both preserved -> SIMD
16144
16145
  tile reduce + write maintained.
16145
16146
 
16146
- Performance characteristic (deliver-via-view, per the CLAUDE.md
16147
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
16147
+ Performance characteristic (deliver-via-view -- the surface
16148
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
16148
16149
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
16149
16150
  = 2.38x slow. Root cause is the multi-parent data layout
16150
16151
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -16665,8 +16666,8 @@ mean_ki_native_u16 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
16665
16666
  write stride 1 (= contig output tail) both preserved -> SIMD
16666
16667
  tile reduce + write maintained.
16667
16668
 
16668
- Performance characteristic (deliver-via-view, per the CLAUDE.md
16669
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
16669
+ Performance characteristic (deliver-via-view -- the surface
16670
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
16670
16671
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
16671
16672
  = 2.38x slow. Root cause is the multi-parent data layout
16672
16673
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -17187,8 +17188,8 @@ mean_ki_native_i32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
17187
17188
  write stride 1 (= contig output tail) both preserved -> SIMD
17188
17189
  tile reduce + write maintained.
17189
17190
 
17190
- Performance characteristic (deliver-via-view, per the CLAUDE.md
17191
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
17191
+ Performance characteristic (deliver-via-view -- the surface
17192
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
17192
17193
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
17193
17194
  = 2.38x slow. Root cause is the multi-parent data layout
17194
17195
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -17709,8 +17710,8 @@ mean_ki_native_u32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
17709
17710
  write stride 1 (= contig output tail) both preserved -> SIMD
17710
17711
  tile reduce + write maintained.
17711
17712
 
17712
- Performance characteristic (deliver-via-view, per the CLAUDE.md
17713
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
17713
+ Performance characteristic (deliver-via-view -- the surface
17714
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
17714
17715
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
17715
17716
  = 2.38x slow. Root cause is the multi-parent data layout
17716
17717
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -18231,8 +18232,8 @@ mean_ki_native_i64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
18231
18232
  write stride 1 (= contig output tail) both preserved -> SIMD
18232
18233
  tile reduce + write maintained.
18233
18234
 
18234
- Performance characteristic (deliver-via-view, per the CLAUDE.md
18235
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
18235
+ Performance characteristic (deliver-via-view -- the surface
18236
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
18236
18237
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
18237
18238
  = 2.38x slow. Root cause is the multi-parent data layout
18238
18239
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -18753,8 +18754,8 @@ mean_ki_native_u64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
18753
18754
  write stride 1 (= contig output tail) both preserved -> SIMD
18754
18755
  tile reduce + write maintained.
18755
18756
 
18756
- Performance characteristic (deliver-via-view, per the CLAUDE.md
18757
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
18757
+ Performance characteristic (deliver-via-view -- the surface
18758
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
18758
18759
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
18759
18760
  = 2.38x slow. Root cause is the multi-parent data layout
18760
18761
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -19275,8 +19276,8 @@ mean_ki_native_f32 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
19275
19276
  write stride 1 (= contig output tail) both preserved -> SIMD
19276
19277
  tile reduce + write maintained.
19277
19278
 
19278
- Performance characteristic (deliver-via-view, per the CLAUDE.md
19279
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
19279
+ Performance characteristic (deliver-via-view -- the surface
19280
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
19280
19281
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
19281
19282
  = 2.38x slow. Root cause is the multi-parent data layout
19282
19283
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -19797,8 +19798,8 @@ mean_ki_native_f64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, int
19797
19798
  write stride 1 (= contig output tail) both preserved -> SIMD
19798
19799
  tile reduce + write maintained.
19799
19800
 
19800
- Performance characteristic (deliver-via-view, per the CLAUDE.md
19801
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
19801
+ Performance characteristic (deliver-via-view -- the surface
19802
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
19802
19803
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
19803
19804
  = 2.38x slow. Root cause is the multi-parent data layout
19804
19805
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -20319,8 +20320,8 @@ mean_ki_native_cmplx64 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes,
20319
20320
  write stride 1 (= contig output tail) both preserved -> SIMD
20320
20321
  tile reduce + write maintained.
20321
20322
 
20322
- Performance characteristic (deliver-via-view, per the CLAUDE.md
20323
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
20323
+ Performance characteristic (deliver-via-view -- the surface
20324
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
20324
20325
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
20325
20326
  = 2.38x slow. Root cause is the multi-parent data layout
20326
20327
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -20841,8 +20842,8 @@ mean_ki_native_cmplx128 (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes
20841
20842
  write stride 1 (= contig output tail) both preserved -> SIMD
20842
20843
  tile reduce + write maintained.
20843
20844
 
20844
- Performance characteristic (deliver-via-view, per the CLAUDE.md
20845
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
20845
+ Performance characteristic (deliver-via-view -- the surface
20846
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
20846
20847
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
20847
20848
  = 2.38x slow. Root cause is the multi-parent data layout
20848
20849
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -21363,8 +21364,8 @@ mean_ki_native_bool (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes, in
21363
21364
  write stride 1 (= contig output tail) both preserved -> SIMD
21364
21365
  tile reduce + write maintained.
21365
21366
 
21366
- Performance characteristic (deliver-via-view, per the CLAUDE.md
21367
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
21367
+ Performance characteristic (deliver-via-view -- the surface
21368
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
21368
21369
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
21369
21370
  = 2.38x slow. Root cause is the multi-parent data layout
21370
21371
  (= 5 separate 9 MB regions instead of one contig 46 MB),
@@ -21582,7 +21583,7 @@ mean_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes,
21582
21583
  ca_size_t masked_cnt = 0; /* unused on streaming (no mask) */
21583
21584
  (void) masked_cnt;
21584
21585
  ca_lazy_arena_enter();
21585
- VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire(__chunk_elems * sizeof(VALUE));
21586
+ VALUE *__chunk = (VALUE *) ca_lazy_arena_acquire_object(__chunk_elems);
21586
21587
  while ( __outer_off < __outer ) {
21587
21588
  ca_size_t __r = (__outer - __outer_off < __rows) ? (__outer - __outer_off) : __rows;
21588
21589
  ca_size_t __n = __r * __inner;
@@ -21885,8 +21886,8 @@ mean_ki_native_object (VALUE self, CArray *ca, int8_t *slab_axes, int8_t naxes,
21885
21886
  write stride 1 (= contig output tail) both preserved -> SIMD
21886
21887
  tile reduce + write maintained.
21887
21888
 
21888
- Performance characteristic (deliver-via-view, per the CLAUDE.md
21889
- "deliver the materials" principle): bench (b2 pattern, M=200, K=5, eff_INNER
21889
+ Performance characteristic (deliver-via-view -- the surface
21890
+ prioritises delivering the cells over avoiding a copy): bench (b2 pattern, M=200, K=5, eff_INNER
21890
21891
  =360, INNER_pre_K=16) yields 3674 us vs eager-entity 1545 us
21891
21892
  = 2.38x slow. Root cause is the multi-parent data layout
21892
21893
  (= 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
  /* ===== all_ki ============================================ */
39
40