Rounding up offset within row to the nearest multiple of alignment value. Alignment must be a power of 2.
| 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. |
no outgoing calls
no test coverage detected