| 45 | } |
| 46 | |
| 47 | Result<std::shared_ptr<Buffer>> MakeSerializedBuffer( |
| 48 | std::function<Status(const std::shared_ptr<io::BufferOutputStream>&)> fn) { |
| 49 | ARROW_ASSIGN_OR_RAISE(auto sink, io::BufferOutputStream::Create(1024)); |
| 50 | RETURN_NOT_OK(fn(sink)); |
| 51 | return sink->Finish(); |
| 52 | } |
| 53 | |
| 54 | Result<std::shared_ptr<Buffer>> SerializeTensor(const std::shared_ptr<Tensor>& tensor) { |
| 55 | return MakeSerializedBuffer( |
no test coverage detected