MCPcopy Create free account
hub / github.com/apache/arrow / VisitTwoArrayValuesInline

Function VisitTwoArrayValuesInline

cpp/src/arrow/compute/kernels/codegen_internal.h:510–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508
509template <typename Arg0Type, typename Arg1Type, typename VisitFunc, typename NullFunc>
510void VisitTwoArrayValuesInline(const ArraySpan& arr0, const ArraySpan& arr1,
511 VisitFunc&& valid_func, NullFunc&& null_func) {
512 ArrayIterator<Arg0Type> arr0_it(arr0);
513 ArrayIterator<Arg1Type> arr1_it(arr1);
514
515 auto visit_run = [&](int64_t position, int64_t run_length, bool is_set) {
516 if (is_set) {
517 for (int64_t i = 0; i < run_length; ++i) {
518 valid_func(GetViewType<Arg0Type>::LogicalValue(arr0_it()),
519 GetViewType<Arg1Type>::LogicalValue(arr1_it()));
520 }
521 } else {
522 for (int64_t i = 0; i < run_length; ++i) {
523 arr0_it();
524 arr1_it();
525 null_func();
526 }
527 }
528 };
529
530 ::arrow::internal::VisitTwoBitRunsVoid(arr0.buffers[0].data, arr0.offset,
531 arr1.buffers[0].data, arr1.offset, arr0.length,
532 std::move(visit_run));
533}
534
535// ----------------------------------------------------------------------
536// Reusable type resolvers

Callers

nothing calls this directly

Calls 1

VisitTwoBitRunsVoidFunction · 0.85

Tested by

no test coverage detected