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

Method do_new_handle

imperative/src/impl/ops/rng.cpp:93–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 }
92
93 Handle do_new_handle(CompNode comp_node, uint64_t seed) {
94 auto handle = m_handle_pool.alloc(comp_node, seed);
95 return reinterpret_cast<Handle>(handle);
96 }
97
98 void do_delete_handle(Handle handle) {
99 m_handle_pool.free(reinterpret_cast<HandleData*>(handle));

Callers 3

new_handleMethod · 0.80
get_default_handleMethod · 0.80
set_glob_default_seedMethod · 0.80

Calls 1

allocMethod · 0.45

Tested by

no test coverage detected