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

Method dispatch_kern

dnn/src/naive/handle.h:144–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 */
143 template <class T>
144 void dispatch_kern(T&& kern) {
145 // this impl mainly serves to reduce binary size: we only need to
146 // call ctor here, and dtor can be called from the cpp so its code
147 // only needs to be generated once
148 std::aligned_storage<sizeof(KernFunc), alignof(KernFunc)>::type s;
149 move_kern_func_to_new_kern_and_dispatch(
150 *new (&s) KernFunc(std::forward<T>(kern)));
151 }
152
153 /*!
154 * \brief pass a kernel to the multi thread dispatcher associated with the

Callers 5

execMethod · 0.45
execMethod · 0.45
do_exec_ctMethod · 0.45
dispatch_with_ctypeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected