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

Function BitmapOp

cpp/src/arrow/util/bitmap_ops.cc:472–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470// necessary, or correct the tail bits by subsequent calls.
471template <typename Op>
472void BitmapOp(const uint8_t* left, int64_t left_offset, const uint8_t* right,
473 int64_t right_offset, int64_t length, int64_t out_offset, uint8_t* dest) {
474 if (out_offset % 8 == left_offset % 8 && out_offset % 8 == right_offset % 8) {
475 // Fast case: can use byte-wise BitOp after handling leading unaligned bits.
476 int64_t leading_unaligned_bits = (8 - left_offset % 8) % 8;
477 if (leading_unaligned_bits > 0) {
478 UnalignedBitmapOp<Op>(left, left_offset, right, right_offset, dest, out_offset,
479 leading_unaligned_bits);
480 }
481 if (length > leading_unaligned_bits) {
482 AlignedBitmapOp<Op>(left, left_offset + leading_unaligned_bits, right,
483 right_offset + leading_unaligned_bits, dest,
484 out_offset + leading_unaligned_bits,
485 length - leading_unaligned_bits);
486 }
487 } else {
488 // Unaligned
489 UnalignedBitmapOp<Op>(left, left_offset, right, right_offset, dest, out_offset,
490 length);
491 }
492}
493
494template <typename Op>
495Result<std::shared_ptr<Buffer>> BitmapOp(MemoryPool* pool, const uint8_t* left,

Callers

nothing calls this directly

Calls 1

mutable_dataMethod · 0.45

Tested by

no test coverage detected