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

Function padding_for_alignment_within_row

cpp/src/arrow/compute/row/row_internal.h:87–92  ·  view source on GitHub ↗

Rounding up offset within row to the nearest multiple of alignment value. Alignment must be a power of 2.

Source from the content-addressed store, hash-verified

85 /// Rounding up offset within row to the nearest multiple of alignment value.
86 /// Alignment must be a power of 2.
87 static inline uint32_t padding_for_alignment_within_row(uint32_t offset,
88 int required_alignment) {
89 ARROW_DCHECK(std::popcount(static_cast<uint64_t>(required_alignment)) == 1);
90 return static_cast<uint32_t>((-static_cast<int32_t>(offset)) &
91 (required_alignment - 1));
92 }
93
94 /// Rounding up offset within row to the beginning of next column,
95 /// choosing required alignment based on the data type of that column.

Callers 4

DecodeMethod · 0.85
EncodeSelectedImpMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected