| 52 | } |
| 53 | |
| 54 | Result<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 | |
| 63 | Result<std::vector<std::shared_ptr<Tensor>>> Tensors() { |
| 64 | std::vector<std::shared_ptr<Tensor>> tensors; |
nothing calls this directly
no test coverage detected