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

Function SerializeTensor

cpp/src/arrow/ipc/generate_tensor_fuzz_corpus.cc:54–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54Result<std::shared_ptr<Buffer>> SerializeTensor(const std::shared_ptr<Tensor>& tensor) {
55 return MakeSerializedBuffer(
56 [&](const std::shared_ptr<io::BufferOutputStream>& sink) -> Status {
57 int32_t metadata_length;
58 int64_t body_length;
59 return ipc::WriteTensor(*tensor, sink.get(), &metadata_length, &body_length);
60 });
61}
62
63Result<std::vector<std::shared_ptr<Tensor>>> Tensors() {
64 std::vector<std::shared_ptr<Tensor>> tensors;

Callers

nothing calls this directly

Calls 3

MakeSerializedBufferFunction · 0.85
WriteTensorFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected