| 36 | public: |
| 37 | static TensorBuffer* Buffer(const Tensor& tensor) { return tensor.buf_; } |
| 38 | static Tensor MakeTensor(TF_DataType type, const TensorShape& shape, |
| 39 | TensorBuffer* buf) { |
| 40 | return Tensor(static_cast<DataType>(type), shape, buf); |
| 41 | } |
| 42 | }; |
| 43 | |
| 44 | // Allocates tensor data buffer using specified allocator. |