carray 3.0.4 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +438 -0
- data/README.md +1 -1
- data/carray.gemspec +3 -2
- data/ext/ca_array_pool.c +25 -1
- data/ext/ca_axis_dispatch.c +19 -20
- data/ext/ca_axis_group.c +1 -1
- data/ext/ca_categorical_iterator.c +34 -27
- data/ext/ca_compare.c +4 -4
- data/ext/ca_composite_dispatch.c +9 -9
- data/ext/ca_kernel_iterator.c +122 -237
- data/ext/ca_kernel_iterator.h +522 -337
- data/ext/ca_obj_array.c +69 -19
- data/ext/ca_obj_bincmp.c +10 -1
- data/ext/ca_obj_binop.c +11 -1
- data/ext/ca_obj_bitarray.c +5 -1
- data/ext/ca_obj_bitfield.c +60 -43
- data/ext/ca_obj_byte_swap.c +4 -1
- data/ext/ca_obj_const_string.c +15 -3
- data/ext/ca_obj_face.c +44 -1
- data/ext/ca_obj_fake.c +3 -1
- data/ext/ca_obj_field.c +13 -3
- data/ext/ca_obj_grid.c +219 -17
- data/ext/ca_obj_meld.c +69 -113
- data/ext/ca_obj_moncmp.c +9 -1
- data/ext/ca_obj_monop.c +86 -12
- data/ext/ca_obj_object.c +118 -32
- data/ext/ca_obj_record.c +3 -0
- data/ext/ca_obj_reduce.c +19 -1
- data/ext/ca_obj_refer.c +80 -26
- data/ext/ca_obj_remap.c +69 -10
- data/ext/ca_obj_roll.c +27 -6
- data/ext/ca_obj_select.c +38 -6
- data/ext/ca_obj_select_axis.c +1 -0
- data/ext/ca_obj_shift.c +32 -7
- data/ext/ca_obj_stack.c +311 -111
- data/ext/ca_obj_stride.c +159 -64
- data/ext/ca_obj_string.c +27 -2
- data/ext/ca_obj_tile.c +28 -7
- data/ext/ca_obj_transpose.c +8 -4
- data/ext/ca_obj_triop.c +12 -1
- data/ext/ca_obj_window.c +80 -50
- data/ext/ca_op_ipower.c +12 -12
- data/ext/ca_sort_kernels.h +6 -3
- data/ext/caframe_csv_reader.c +1 -1
- data/ext/carray.h +35 -1
- data/ext/carray_access.c +43 -67
- data/ext/carray_address_basis.c +134 -0
- data/ext/carray_attribute.c +32 -0
- data/ext/carray_broadcast.c +3 -4
- data/ext/carray_build_flags.h +1 -1
- data/ext/carray_cast.c +251 -93
- data/ext/carray_cast_func.rb +56 -26
- data/ext/carray_conversion.c +11 -7
- data/ext/carray_core.c +814 -72
- data/ext/carray_count.c +6 -0
- data/ext/carray_element.c +22 -13
- data/ext/carray_factorize.c +20 -20
- data/ext/carray_generate.c +8 -2
- data/ext/carray_histogram.c +26 -4
- data/ext/carray_index_classifier.c +4 -4
- data/ext/carray_internal.h +159 -12
- data/ext/carray_kernels_bincmp.c +2174 -170
- data/ext/carray_kernels_binop.c +25653 -5487
- data/ext/carray_kernels_init.c +8 -8
- data/ext/carray_kernels_moncmp.c +96 -96
- data/ext/carray_kernels_monop.c +12253 -5235
- data/ext/carray_kernels_reduce_aggregate.c +6150 -2423
- data/ext/carray_kernels_reduce_boolean.c +1533 -15
- data/ext/carray_kernels_reduce_cumulative.c +2442 -882
- data/ext/carray_kernels_reduce_extreme.c +5658 -1661
- data/ext/carray_kernels_reduce_variance.c +2534 -402
- data/ext/carray_kernels_scan.c +368 -368
- data/ext/carray_kernels_search.c +4551 -604
- data/ext/carray_kernels_sort.c +659 -751
- data/ext/carray_kernels_triop.c +114 -114
- data/ext/carray_key_windows.c +4 -0
- data/ext/carray_lazy.c +47 -0
- data/ext/carray_loop.c +1 -1
- data/ext/carray_mask.c +175 -161
- data/ext/carray_median_percentile.c +4 -4
- data/ext/carray_memory_view.c +15 -9
- data/ext/carray_operator.c +152 -49
- data/ext/carray_order.c +230 -10
- data/ext/carray_random.c +22 -19
- data/ext/carray_scatter.c +24 -7
- data/ext/carray_slab.c +128 -29
- data/ext/carray_sort.c +224 -16
- data/ext/carray_sort_kernel.c +5 -7
- data/ext/carray_struct.c +35 -43
- data/ext/carray_test.c +74 -19
- data/ext/carray_time_text.c +6 -4
- data/ext/carray_utils.c +63 -21
- data/ext/extconf.rb +11 -0
- data/ext/mkkernel.rb +546 -199
- data/ext/ruby_carray.c +4 -1
- data/ext/version.h +4 -4
- data/lib/carray/attribute.rb +42 -5
- data/lib/carray/autoload_carray.rb +3 -3
- data/lib/carray/autoload_method_extension.rb +5 -3
- data/lib/carray/axis_group.rb +13 -7
- data/lib/carray/basics.rb +28 -8
- data/lib/carray/block_iterator.rb +17 -3
- data/lib/carray/categorical.rb +35 -23
- data/lib/carray/categorical_iterator.rb +8 -8
- data/lib/carray/complex.rb +2 -2
- data/lib/carray/conditional.rb +3 -2
- data/lib/carray/const_string.rb +10 -0
- data/lib/carray/data_type_extension.rb +8 -1
- data/lib/carray/fixlen_string.rb +41 -2
- data/lib/carray/frame/column_verbs.rb +48 -16
- data/lib/carray/frame/concat.rb +17 -3
- data/lib/carray/frame/convert.rb +19 -0
- data/lib/carray/frame/csv_parser.rb +32 -32
- data/lib/carray/frame/describe.rb +4 -2
- data/lib/carray/frame/frame.rb +405 -85
- data/lib/carray/frame/group.rb +777 -64
- data/lib/carray/frame/io.rb +212 -72
- data/lib/carray/frame/join.rb +146 -37
- data/lib/carray/frame/records.rb +3 -3
- data/lib/carray/frame/reshape.rb +89 -11
- data/lib/carray/frame/sort.rb +57 -9
- data/lib/carray/frame/verbs.rb +384 -49
- data/lib/carray/frame/windows.rb +44 -6
- data/lib/carray/fuse_source.rb +31 -2
- data/lib/carray/inspect.rb +7 -2
- data/lib/carray/iterator.rb +32 -0
- data/lib/carray/lazy.rb +52 -8
- data/lib/carray/mask_gap_fill.rb +37 -17
- data/lib/carray/meld_reduce.rb +1 -1
- data/lib/carray/methods/choose.rb +3 -2
- data/lib/carray/methods/is_in.rb +8 -1
- data/lib/carray/methods/meshgrid.rb +3 -1
- data/lib/carray/runtime.rb +47 -8
- data/lib/carray/segment_iterator.rb +35 -16
- data/lib/carray/serialize.rb +53 -19
- data/lib/carray/stack.rb +33 -18
- data/lib/carray/string.rb +8 -0
- data/lib/carray/string_operation_extension.rb +13 -5
- data/lib/carray/struct_builder.rb +5 -3
- data/lib/carray/time.rb +112 -68
- data/lib/carray/window_iterator.rb +16 -4
- data/yard-stubs/ca_obj_array.rb +26 -1
- data/yard-stubs/ca_obj_transpose.rb +5 -4
- data/yard-stubs/carray_attribute.rb +3 -1
- data/yard-stubs/carray_cast.rb +10 -5
- data/yard-stubs/carray_conversion.rb +13 -3
- data/yard-stubs/carray_element.rb +7 -6
- data/yard-stubs/carray_mask.rb +28 -4
- data/yard-stubs/carray_math.rb +45 -20
- data/yard-stubs/carray_memory_view.rb +7 -0
- data/yard-stubs/carray_order.rb +100 -4
- data/yard-stubs/carray_scatter.rb +7 -5
- data/yard-stubs/carray_test.rb +7 -4
- metadata +18 -4
data/ext/carray_internal.h
CHANGED
|
@@ -35,6 +35,18 @@
|
|
|
35
35
|
CArray#initialize_dup / #initialize_clone. */
|
|
36
36
|
void ca_keep_chain_flags (CArray *view, CArray *src);
|
|
37
37
|
|
|
38
|
+
/* A reshape / flatten folded onto the root of its source (CA_FLAG_FOLDED,
|
|
39
|
+
ca_obj_refer.c). The source is not on the view's C parent chain, so a
|
|
40
|
+
read-only flag it takes after the view is made would not be seen by
|
|
41
|
+
ca_is_readonly. The view records its source here; ca_is_readonly asks the
|
|
42
|
+
source of a view that carries the flag. The source stays alive while the
|
|
43
|
+
view does (the view's @parent). ca_fold_source answers NULL for a view
|
|
44
|
+
with no record; ca_fold_forget drops the record when the view is freed. */
|
|
45
|
+
#define CA_FLAG_FOLDED 8192
|
|
46
|
+
void ca_fold_note_source (CArray *view, CArray *src);
|
|
47
|
+
CArray *ca_fold_source (CArray *view);
|
|
48
|
+
void ca_fold_forget (CArray *view);
|
|
49
|
+
|
|
38
50
|
/* ---- bulk bit pack / unpack (ca_obj_bitarray.c) --------------------------
|
|
39
51
|
|
|
40
52
|
Drive the CABitarray whole-view xfer_all / xfer_addrs fast paths, which
|
|
@@ -188,9 +200,24 @@ ca_mask_from_bytes (CArray *ca, const boolean8_t *m)
|
|
|
188
200
|
|
|
189
201
|
void ca_attach_all (CArray **list, int32_t n);
|
|
190
202
|
void ca_sync_all (CArray **list, int32_t n);
|
|
203
|
+
void ca_sync_carry_on (CArray *ca, volatile VALUE *error);
|
|
191
204
|
VALUE ca_attach_window (int32_t n, CArray **list, const char *modes,
|
|
192
205
|
VALUE (*body)(VALUE), VALUE arg);
|
|
193
206
|
|
|
207
|
+
/* A window that yields to a block can be left open for good: Ruby does not
|
|
208
|
+
run the ensure of a suspended Fiber that is collected (an Enumerator
|
|
209
|
+
stopped with #next and dropped). ca_window_guard_arm makes a guard that
|
|
210
|
+
runs cleanup(arg) from a finalizer when that happens; the window disarms
|
|
211
|
+
it when it closes normally. arg is heap memory the guard frees, and
|
|
212
|
+
mark marks the VALUEs it holds. ca_attach_window_yielding is
|
|
213
|
+
ca_attach_window with such a guard; owners keeps the arrays alive. */
|
|
214
|
+
VALUE ca_window_guard_arm (void (*cleanup)(void *), void (*mark)(void *),
|
|
215
|
+
void *arg, VALUE *sentinel);
|
|
216
|
+
void ca_window_guard_disarm (VALUE guard, VALUE sentinel);
|
|
217
|
+
VALUE ca_attach_window_yielding (VALUE owners, int32_t n, CArray **list,
|
|
218
|
+
const char *modes, VALUE (*body)(VALUE),
|
|
219
|
+
VALUE arg);
|
|
220
|
+
|
|
194
221
|
/* ---- Filling a result Ruby does not own yet (carray_copy.c) ---------------
|
|
195
222
|
|
|
196
223
|
A C builder that allocates its result with carray_new / ca_template and
|
|
@@ -272,6 +299,8 @@ int ca_shares_root (void *ap, void *aq);
|
|
|
272
299
|
view's shape (carray_mask.c). Installed directly in operation tables. */
|
|
273
300
|
|
|
274
301
|
void ca_view_func_create_mask (void *ap);
|
|
302
|
+
void ca_view_sync_mask_after_parent (void *ap);
|
|
303
|
+
void ca_view_pass_mask_to_parent (void *ap);
|
|
275
304
|
|
|
276
305
|
/* Running count of the present cells of any data type along axis (Qnil:
|
|
277
306
|
the flattened array), read off the mask alone (carray_mask.c). The
|
|
@@ -307,6 +336,21 @@ int ca_lazy_req_is_packed (const ca_lazy_req_t *req, void *view);
|
|
|
307
336
|
void ca_lazy_req_pull (void *operand, const ca_lazy_req_t *req,
|
|
308
337
|
void *buf, int dir);
|
|
309
338
|
boolean8_t *ca_lazy_req_mask (const ca_lazy_req_t *req, int n, CArray **ops);
|
|
339
|
+
|
|
340
|
+
/* Runs eval(node, req, data, dir), the evaluation of a lazy node over the
|
|
341
|
+
cells req names. When the node or one of its operands ops[0..n) is an
|
|
342
|
+
object array, the evaluation calls Ruby on each cell, and a cell holding
|
|
343
|
+
an expression over the node comes back into it: the node, and the nodes
|
|
344
|
+
of its chain in chain[0..nchain), are then recorded as computed over
|
|
345
|
+
(ca_computing_run_nodes), so coming back is refused as cyclic. The
|
|
346
|
+
operands are not recorded: an expression over the same operand that does
|
|
347
|
+
not need the node is no cycle. Otherwise eval runs as it is. */
|
|
348
|
+
typedef void (*ca_lazy_eval_fn) (void *node, const ca_lazy_req_t *req,
|
|
349
|
+
void *data, int dir);
|
|
350
|
+
void ca_lazy_eval_recorded (void *node, int n, CArray **ops,
|
|
351
|
+
int nchain, CArray **chain,
|
|
352
|
+
ca_lazy_eval_fn eval, const ca_lazy_req_t *req,
|
|
353
|
+
void *data, int dir);
|
|
310
354
|
VALUE ca_lazy_settle_scalar (VALUE operand, int was_scalar);
|
|
311
355
|
|
|
312
356
|
/* Non-zero iff the array a view's cells come from -- the parent, or the
|
|
@@ -393,6 +437,10 @@ VALUE rb_ary_flatten_for_elements (VALUE ary, ca_size_t elements, void *ap);
|
|
|
393
437
|
const char *ca_calling_method_name (void);
|
|
394
438
|
VALUE ca_answer_as_caller (VALUE (*body)(VALUE), VALUE arg);
|
|
395
439
|
long ca_integer_arg (VALUE v, const char *arg, const char *name);
|
|
440
|
+
/* 1 with the position of an index key (an Integer, or a Float with no
|
|
441
|
+
fraction while exact), 2 for an Integer past int64, 0 otherwise. */
|
|
442
|
+
int ca_index_key_position (VALUE v, ca_size_t *out);
|
|
443
|
+
void ca_refuse_without_common_type (VALUE self, VALUE other);
|
|
396
444
|
ca_size_t ca_shape_elements (int8_t ndim, const ca_size_t *dim, ca_size_t bytes);
|
|
397
445
|
void ca_check_index_array (VALUE v);
|
|
398
446
|
VALUE ca_order_key (VALUE v, const char *name);
|
|
@@ -414,6 +462,34 @@ NORETURN(void ca_op_refuse_unimplemented (VALUE operand, int8_t data_type,
|
|
|
414
462
|
void ca_check_rank_fits (long ndim, const char *name);
|
|
415
463
|
/* The checks of carray.h inside the library, each naming the method the
|
|
416
464
|
user called; the public ones stay as they are for extensions. */
|
|
465
|
+
/* A wrap of a caller's buffer lent to a CAObject hook (CA_FLAG_LENT), and
|
|
466
|
+
the mark that a view was taken of it while it was lent
|
|
467
|
+
(CA_FLAG_LENT_VIEWED). rb_ca_set_parent sets the second; the hook's
|
|
468
|
+
caller reads both when it takes the buffer back (ca_obj_object.c). */
|
|
469
|
+
#define CA_FLAG_LENT 2048
|
|
470
|
+
#define CA_FLAG_LENT_VIEWED 4096
|
|
471
|
+
|
|
472
|
+
/* A computation over object arrays. A cell whose value is the array
|
|
473
|
+
itself or a view of it makes the kernel call back into a computation
|
|
474
|
+
over the same cells; entering an array that the same method is already
|
|
475
|
+
computing over, in this thread and fiber, is refused as cyclic, as
|
|
476
|
+
reading such a cell is (ca_test_cyclic_check). ca_computing_run runs
|
|
477
|
+
body(arg) with the object arrays among ops[0..n) recorded
|
|
478
|
+
(rb_exec_recursive, carray_core.c); nothing is written to the arrays. */
|
|
479
|
+
VALUE ca_computing_run (int n, CArray **ops, VALUE (*body)(VALUE), VALUE arg);
|
|
480
|
+
VALUE ca_computing_run_nodes (int n, CArray **ops, VALUE (*body)(VALUE), VALUE arg);
|
|
481
|
+
/* Refuses as cyclic a cell among cells[0..n) that is an array reaching a
|
|
482
|
+
lazy node being evaluated: computing it would come back into the node. */
|
|
483
|
+
void ca_refuse_cells_reaching_evaluation (ca_size_t n, const VALUE *cells);
|
|
484
|
+
|
|
485
|
+
/* Registers a view type whose transfers only move cells between its parents
|
|
486
|
+
and the caller (an index view: CAGrid, CASelect, CAWindow, CAStack, ...),
|
|
487
|
+
calling no Ruby. A transfer through such views down to entities cannot
|
|
488
|
+
come back into an array, and is not recorded (ca_with_cyclic_check). */
|
|
489
|
+
void ca_register_cell_moving_view (int8_t obj_type);
|
|
490
|
+
VALUE ca_iter_ensure_computing (CArray *ca, int32_t n, ca_iter_state *states,
|
|
491
|
+
VALUE (*body)(VALUE), VALUE arg);
|
|
492
|
+
|
|
417
493
|
#define CA_CHECK_DATA_TYPE_GIVEN(data_type) \
|
|
418
494
|
do { \
|
|
419
495
|
int ca_dt_ = (data_type); \
|
|
@@ -685,19 +761,41 @@ CArray *ca_multi_parent_mask (CArray *p, CArray **standin);
|
|
|
685
761
|
void ca_multi_parent_mask_refresh (CArray *mask, CArray **parents,
|
|
686
762
|
CArray **standins, int32_t n);
|
|
687
763
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
764
|
+
void ca_multi_parent_check_part (CArray *part, const char *name);
|
|
765
|
+
|
|
766
|
+
/* A write to a stack or meld goes to its parts one after another, and a
|
|
767
|
+
part that converts the value on its way (a writable cast) can refuse it
|
|
768
|
+
after the parts before it were written. ca_multi_parent_value_trial
|
|
769
|
+
gives a stack or meld laid out as `ca` over scratch arrays standing for
|
|
770
|
+
its parts (held by `keep`), to run the write against first, when
|
|
771
|
+
ca_multi_parent_value_needs_trial says such a part is there. */
|
|
772
|
+
int ca_multi_parent_value_needs_trial (CArray *ca);
|
|
773
|
+
CArray *ca_multi_parent_value_trial (CArray *ca, VALUE keep);
|
|
774
|
+
|
|
775
|
+
/* A write through the view `ca` that reaches a stack or meld needing the
|
|
776
|
+
trial, in pieces: ca_multi_parent_value_trial_below gives the stack or
|
|
777
|
+
meld, and ca_multi_parent_value_trial_through runs the write against its
|
|
778
|
+
stand-ins first. */
|
|
779
|
+
CArray *ca_multi_parent_value_trial_below (CArray *ca);
|
|
780
|
+
void ca_multi_parent_value_trial_through (CArray *m, VALUE (*body)(VALUE),
|
|
781
|
+
VALUE arg);
|
|
782
|
+
|
|
783
|
+
#define CA_MULTI_PARENT_VALUE_TRIAL(ap, t, call) \
|
|
784
|
+
do { \
|
|
785
|
+
if ( ca_multi_parent_value_needs_trial((CArray *) (ap)) ) { \
|
|
786
|
+
volatile VALUE keep_ = rb_ary_new(); \
|
|
787
|
+
CArray *t = ca_multi_parent_value_trial((CArray *) (ap), keep_); \
|
|
788
|
+
call; \
|
|
789
|
+
RB_GC_GUARD(keep_); \
|
|
790
|
+
} \
|
|
791
|
+
} while (0)
|
|
792
|
+
int ca_monop_writable_cast_target (CArray *ca, int8_t *target);
|
|
793
|
+
|
|
794
|
+
void ca_multi_parent_mask_adopt (CArray *mask, CArray **parents,
|
|
795
|
+
CArray **standins, int32_t n);
|
|
698
796
|
|
|
699
797
|
/* ca_mask_standin_settle for each part of a multi-parent view's mask
|
|
700
|
-
still reading its stand-in
|
|
798
|
+
still reading its stand-in. */
|
|
701
799
|
void ca_multi_parent_mask_settle (CArray *mask, CArray **parents,
|
|
702
800
|
CArray **standins, int32_t n);
|
|
703
801
|
|
|
@@ -728,6 +826,7 @@ int ca_op_raises_on_cell (int kind, int op_id, int8_t dt);
|
|
|
728
826
|
gate first, and a string reference compares in its own type, padding
|
|
729
827
|
included. */
|
|
730
828
|
int8_t ca_query_match_type (int8_t ref, VALUE query);
|
|
829
|
+
VALUE ca_fixlen_widen_for_query (VALUE self, VALUE query);
|
|
731
830
|
|
|
732
831
|
static inline int
|
|
733
832
|
ca_query_match_applies (CArray *ref, VALUE query)
|
|
@@ -762,7 +861,7 @@ ca_obj_equal (VALUE a, VALUE b)
|
|
|
762
861
|
/* ---- fast paths (carray_core.c) --------------------------------------------
|
|
763
862
|
|
|
764
863
|
A fast path answers what a general path also answers, by a different
|
|
765
|
-
algorithm. Each one tests
|
|
864
|
+
algorithm. Each one tests ca_fast_path(CA_SC_name) alongside its own
|
|
766
865
|
condition, so a development build run with CARRAY_GENERAL_PATH=1 in the
|
|
767
866
|
environment takes the general path everywhere and the test suite
|
|
768
867
|
compares the two. A release build has no switch: the test is the
|
|
@@ -782,13 +881,61 @@ ca_obj_equal (VALUE a, VALUE b)
|
|
|
782
881
|
|
|
783
882
|
---------------------------------------------------------------------------- */
|
|
784
883
|
|
|
884
|
+
/* The number of obj_types carray installs for itself (carray_core.c). */
|
|
885
|
+
extern int ca_obj_num_builtin;
|
|
886
|
+
|
|
887
|
+
/* Each fast path has a name, so that a development build can switch it off
|
|
888
|
+
alone: CARRAY_SHORTCUTS_OFF=stack,stack_outer_k in the environment turns
|
|
889
|
+
off the ones named, CARRAY_GENERAL_PATH=1 all of them. A fast path tests
|
|
890
|
+
ca_fast_path(CA_SC_name) alongside its own condition. The names are in
|
|
891
|
+
ca_shortcut_names (carray_core.c) in this order; the Ruby ones are asked
|
|
892
|
+
through CArray.__fast_paths_enabled__(:name). */
|
|
893
|
+
enum ca_shortcut {
|
|
894
|
+
CA_SC_SHIFT_WHOLE_VIEW,
|
|
895
|
+
CA_SC_STACK,
|
|
896
|
+
CA_SC_STACK_OUTER_K,
|
|
897
|
+
CA_SC_FIBER_FUSED_CONVERSION,
|
|
898
|
+
CA_SC_PER_SLAB_HOIST,
|
|
899
|
+
CA_SC_PROTECT_ONLY_MAY_RAISE,
|
|
900
|
+
CA_SC_STACK_ADDRS_K0,
|
|
901
|
+
CA_SC_STACK_STRIDE_BOX,
|
|
902
|
+
CA_SC_STACK_STRIDE_RELOC,
|
|
903
|
+
CA_SC_STACK_PARENTS_K0,
|
|
904
|
+
CA_SC_STACK_FOLD,
|
|
905
|
+
CA_SC_MELD_STRIDE_BOX,
|
|
906
|
+
CA_SC_MELD_PARENTS_AXIS0,
|
|
907
|
+
CA_SC_MEDIAN_PARTITION,
|
|
908
|
+
CA_SC_PERCENTILE_PARTITION,
|
|
909
|
+
CA_SC_LOOP_INTERCHANGE,
|
|
910
|
+
CA_SC_STACK_LOOP_INTERCHANGE,
|
|
911
|
+
CA_SC_LAZY_STREAMING_REDUCE,
|
|
912
|
+
CA_SC_SHORT_FIBER_REDUCE,
|
|
913
|
+
/* asked from lib/carray */
|
|
914
|
+
CA_SC_MELD_REDUCE,
|
|
915
|
+
CA_SC_SEGMENT_NUNIQUE,
|
|
916
|
+
CA_SC_SEGMENT_SCAN_KERNEL,
|
|
917
|
+
CA_SC_SEGMENT_EDGE_KERNEL,
|
|
918
|
+
CA_SC_SEGMENT_REDUCE_KERNEL,
|
|
919
|
+
CA_SC_SEGMENT_ALL_ANY_KERNEL,
|
|
920
|
+
CA_SC_CATEGORICAL_GROUP_BY_INDEX,
|
|
921
|
+
CA_SC_AXIS_GROUP_COUNT_KERNEL,
|
|
922
|
+
CA_SC_AXIS_GROUP_WHOLE_BLOCK,
|
|
923
|
+
CA_SC_AXIS_GROUP_REDUCE_KERNEL,
|
|
924
|
+
CA_SC_AXIS_GROUP_SCAN_KERNEL,
|
|
925
|
+
CA_SC_WINDOW_FOLD_BY_OFFSET,
|
|
926
|
+
CA_SC_COUNT
|
|
927
|
+
};
|
|
928
|
+
|
|
785
929
|
#ifdef CARRAY_DEV_BUILD
|
|
786
930
|
extern int ca_fast_paths_on;
|
|
787
931
|
extern int ca_iter_transfer_only_on;
|
|
932
|
+
extern unsigned char ca_shortcut_off[CA_SC_COUNT];
|
|
788
933
|
#define ca_fast_paths_enabled() (ca_fast_paths_on)
|
|
934
|
+
#define ca_fast_path(id) (ca_fast_paths_on && ! ca_shortcut_off[id])
|
|
789
935
|
#define ca_iter_by_transfer_only() (ca_iter_transfer_only_on)
|
|
790
936
|
#else
|
|
791
937
|
#define ca_fast_paths_enabled() (1)
|
|
938
|
+
#define ca_fast_path(id) (1)
|
|
792
939
|
#define ca_iter_by_transfer_only() (0)
|
|
793
940
|
#endif
|
|
794
941
|
|