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

Function AllocateBitmap

cpp/src/arrow/buffer.cc:183–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183Result<std::shared_ptr<Buffer>> AllocateBitmap(int64_t length, MemoryPool* pool) {
184 ARROW_ASSIGN_OR_RAISE(auto buf, AllocateBuffer(bit_util::BytesForBits(length), pool));
185 // Zero out any trailing bits
186 if (buf->size() > 0) {
187 buf->mutable_data()[buf->size() - 1] = 0;
188 }
189 // R build with openSUSE155 requires an explicit shared_ptr construction
190 return std::shared_ptr<Buffer>(std::move(buf));
191}
192
193Result<std::shared_ptr<Buffer>> AllocateEmptyBitmap(int64_t length, MemoryPool* pool) {
194 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