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

Method GetRegionTranspose

r/src/altrep.cpp:724–739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722
723 template <typename Type, typename Transpose>
724 static void GetRegionTranspose(const std::shared_ptr<Array>& array,
725 const std::shared_ptr<Array>& indices,
726 Transpose transpose, int* out) {
727 using index_type = typename Type::c_type;
728
729 VisitArraySpanInline<Type>(
730 *array->data(),
731 /*valid_func=*/
732 [&](index_type index) {
733 int64_t transposed = transpose(index) + 1;
734 ARROW_R_DCHECK(transposed >= 1);
735 ARROW_R_DCHECK(transposed <= std::numeric_limits<int>::max());
736 *out++ = static_cast<int>(transposed);
737 },
738 /*null_func=*/[&]() { *out++ = cpp11::na<int>(); });
739 }
740
741 static SEXP Min(SEXP alt, Rboolean narm) { return nullptr; }
742 static SEXP Max(SEXP alt, Rboolean narm) { return nullptr; }

Callers

nothing calls this directly

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected