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

Function BitmapFromVector

cpp/src/arrow/util/bitmap_test.cc:58–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void BitmapFromVector(const std::vector<int>& values, int64_t bit_offset,
59 std::shared_ptr<Buffer>* out_buffer, int64_t* out_length) {
60 const int64_t length = values.size();
61 *out_length = length;
62 ASSERT_OK_AND_ASSIGN(*out_buffer, AllocateEmptyBitmap(length + bit_offset));
63 auto writer = BitmapWriter((*out_buffer)->mutable_data(), bit_offset, length);
64 WriteVectorToWriter(writer, values);
65}
66
67std::shared_ptr<Buffer> BitmapFromString(const std::string& s) {
68 TypedBufferBuilder<bool> builder;

Callers 3

TESTFunction · 0.70
TestAlignedMethod · 0.70
TestUnalignedMethod · 0.70

Calls 6

AllocateEmptyBitmapFunction · 0.85
WriteVectorToWriterFunction · 0.85
ASSERT_OK_AND_ASSIGNFunction · 0.70
BitmapWriterClass · 0.70
sizeMethod · 0.45
mutable_dataMethod · 0.45

Tested by

no test coverage detected