| 128 | // Typed ref-counted buffer: T[n]. |
| 129 | template <typename T> |
| 130 | class Buffer : public BufferBase { |
| 131 | public: |
| 132 | Buffer(Allocator* a, int64 n); |
| 133 | Buffer(Allocator* a, int64 n, const AllocationAttributes& allocation_attr); |
| 134 | |
| 135 | size_t size() const override { return sizeof(T) * elem_; } |
| 136 | |
| 137 | private: |
| 138 | T* data_; |
| 139 | int64 elem_; |
| 140 | |
| 141 | ~Buffer() override; |
| 142 | |
| 143 | TF_DISALLOW_COPY_AND_ASSIGN(Buffer); |
| 144 | }; |
| 145 | |
| 146 | void LogUnexpectedSize(int64 actual, int64 expected) { |
| 147 | LOG(ERROR) << "Input size was " << actual << " and expected " << expected; |
no outgoing calls
no test coverage detected