| 84 | /// \brief Helper method to reinterpret the buffer as an array of `T`. |
| 85 | template <typename T> |
| 86 | T* base() const { |
| 87 | return reinterpret_cast<T*>(data()); |
| 88 | } |
| 89 | |
| 90 | /// \brief Whether this TensorBuffer owns the underlying memory. |
| 91 | virtual bool OwnsMemory() const { return true; } |