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

Function AllocateBitmap

cpp/src/arrow/buffer.cc:182–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182Result<std::shared_ptr<Buffer>> AllocateBitmap(int64_t length, MemoryPool* pool) {
183 ARROW_ASSIGN_OR_RAISE(auto buf, AllocateBuffer(bit_util::BytesForBits(length), pool));
184 // Zero out any trailing bits
185 if (buf->size() > 0) {
186 buf->mutable_data()[buf->size() - 1] = 0;
187 }
188 return buf;
189}
190
191Result<std::shared_ptr<Buffer>> AllocateEmptyBitmap(int64_t length, MemoryPool* pool) {
192 return AllocateEmptyBitmap(length, kDefaultBufferAlignment, pool);

Callers 15

ConvertImpFunction · 0.85
InitMethod · 0.85
RemapInputValuesMethod · 0.85
TakeUsingVectorFunction · 0.85
InsertMethod · 0.85
ConcatenateBitmapsFunction · 0.85
TweakValidityBitFunction · 0.85
DoBitmapVisitAndWriteFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
SetUpMethod · 0.85
FinalizeMethod · 0.85

Calls 2

sizeMethod · 0.45
mutable_dataMethod · 0.45

Tested by 7

TakeUsingVectorFunction · 0.68
TweakValidityBitFunction · 0.68
DoBitmapVisitAndWriteFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68
SetUpMethod · 0.68
TESTFunction · 0.68