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

Function SerializeTensor

cpp/src/arrow/ipc/generate_tensor_fuzz_corpus.cc:54–63  ·  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 ARROW_SUPPRESS_DEPRECATION_WARNING
56 return MakeSerializedBuffer(
57 [&](const std::shared_ptr<io::BufferOutputStream>& sink) -> Status {
58 int32_t metadata_length;
59 int64_t body_length;
60 return ipc::WriteTensor(*tensor, sink.get(), &metadata_length, &body_length);
61 });
62 ARROW_UNSUPPRESS_DEPRECATION_WARNING
63}
64
65Result<std::vector<std::shared_ptr<Tensor>>> Tensors() {
66 std::vector<std::shared_ptr<Tensor>> tensors;

Callers

nothing calls this directly

Calls 2

WriteTensorFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected