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

Method BufferTable

tensorflow/compiler/xla/tools/driver.cc:232–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230class BufferTable {
231 public:
232 explicit BufferTable(BufferAssignment assignment) : assignment_(assignment) {
233 int num_buffers = assignment.buffers_size.size();
234 ptr_ = new char*[num_buffers];
235 for (int buffer_idx = 0; buffer_idx < num_buffers; buffer_idx++) {
236 // Call malloc to ensure alignment up to std::max_align_t.
237 ptr_[buffer_idx] =
238 static_cast<char*>(malloc(assignment.buffers_size[buffer_idx]));
239 }
240 }
241
242 char** AsPtr() { return ptr_; }
243

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected