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

Function WriteFlatbufferBuilder

cpp/src/arrow/ipc/metadata_internal.h:233–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 std::shared_ptr<Buffer>* out);
232
233static inline Result<std::shared_ptr<Buffer>> WriteFlatbufferBuilder(
234 flatbuffers::FlatBufferBuilder& fbb, // NOLINT non-const reference
235 MemoryPool* pool = default_memory_pool()) {
236 int32_t size = fbb.GetSize();
237
238 ARROW_ASSIGN_OR_RAISE(auto result, AllocateBuffer(size, pool));
239
240 uint8_t* dst = result->mutable_data();
241 memcpy(dst, fbb.GetBufferPointer(), size);
242 // R build with openSUSE155 requires an explicit shared_ptr construction
243 return std::shared_ptr<Buffer>(std::move(result));
244}
245
246ARROW_EXPORT
247flatbuf::TimeUnit ToFlatbufferUnit(TimeUnit::type unit);

Callers 2

WriteFBMessageFunction · 0.85
TEST_PFunction · 0.85

Calls 3

default_memory_poolFunction · 0.85
GetSizeMethod · 0.45
mutable_dataMethod · 0.45

Tested by 1

TEST_PFunction · 0.68