MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / Resize

Method Resize

oneflow/core/embedding/persistent_table.cpp:131–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 ~AlignedBuffer() = default;
130
131 void Resize(size_t new_size) {
132 if (new_size > size_) {
133 ptr_.reset(static_cast<char*>(aligned_alloc(alignment_, new_size)));
134 size_ = new_size;
135 }
136 }
137
138 void* ptr() { return ptr_.get(); }
139

Callers 2

GetMethod · 0.45
PutMethod · 0.45

Calls 2

aligned_allocFunction · 0.85
resetMethod · 0.45

Tested by

no test coverage detected