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

Function WriteSparseTensorMessage

cpp/src/arrow/ipc/metadata_internal.cc:1364–1374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1362}
1363
1364Result<std::shared_ptr<Buffer>> WriteSparseTensorMessage(
1365 const SparseTensor& sparse_tensor, int64_t body_length,
1366 const std::vector<BufferMetadata>& buffers, const IpcWriteOptions& options) {
1367 FBB fbb;
1368 SparseTensorOffset fb_sparse_tensor;
1369 RETURN_NOT_OK(
1370 MakeSparseTensor(fbb, sparse_tensor, body_length, buffers, &fb_sparse_tensor));
1371 return WriteFBMessage(fbb, flatbuf::MessageHeader::MessageHeader_SparseTensor,
1372 fb_sparse_tensor.Union(), body_length, options.metadata_version,
1373 /*custom_metadata=*/nullptr, options.memory_pool);
1374}
1375
1376Status WriteDictionaryMessage(
1377 int64_t id, bool is_delta, int64_t length, int64_t body_length,

Callers 1

SerializeMetadataMethod · 0.85

Calls 2

MakeSparseTensorFunction · 0.85
WriteFBMessageFunction · 0.85

Tested by

no test coverage detected