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

Method PutNextWord

cpp/src/arrow/util/bitmap_writer.h:203–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201 }
202
203 void PutNextWord(Word word) {
204 if (may_have_byte_offset && offset_) {
205 // split one word into two adjacent words, don't touch unused bits
206 // |<------ word ----->|
207 // +-----+-------------+
208 // | A | B |
209 // +-----+-------------+
210 // | |
211 // v v offset
212 // +-------------+-----+-------------+-----+
213 // | --- | A | B | --- |
214 // +-------------+-----+-------------+-----+
215 // |<------ next ----->|<---- current ---->|
216 word = (word << offset_) | (word >> (sizeof(Word) * 8 - offset_));
217 Word next_word = load<Word>(bitmap_ + sizeof(Word));
218 current_data.word_ = (current_data.word_ & mask_) | (word & ~mask_);
219 next_word = (next_word & ~mask_) | (word & mask_);
220 store<Word>(bitmap_, current_data.word_);
221 store<Word>(bitmap_ + sizeof(Word), next_word);
222 current_data.word_ = next_word;
223 } else {
224 store<Word>(bitmap_, word);
225 }
226 bitmap_ += sizeof(Word);
227 }
228
229 void PutNextTrailingByte(uint8_t byte, int valid_bits) {
230 if (valid_bits == 8) {

Callers 3

TransferBitmapFunction · 0.80
UnalignedBitmapOpFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected