MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Buffer

Class Buffer

tensorflow/core/framework/tensor.cc:130–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128// Typed ref-counted buffer: T[n].
129template <typename T>
130class 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
146void LogUnexpectedSize(int64 actual, int64 expected) {
147 LOG(ERROR) << "Input size was " << actual << " and expected " << expected;

Callers 5

TF_TensorMaybeMoveFunction · 0.50
TF_TensorByteSizeFunction · 0.50
TF_TensorDataFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected