MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / alloc_unique

Method alloc_unique

src/core/include/megbrain/utils/mempool.h:83–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82 template <typename... Args>
83 UniquePtr alloc_unique(Args&&... args) {
84 auto ptr = alloc(std::forward<Args>(args)...);
85 return {ptr, {this}};
86 }
87
88 void free(T* ptr) {
89 ptr->~T();

Callers 5

init_seqMethod · 0.80
perform_dtrMethod · 0.80
apply_discard_planMethod · 0.80
register_shape_inferMethod · 0.80
allocMethod · 0.80

Calls 1

allocFunction · 0.85

Tested by

no test coverage detected