| 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 |
no outgoing calls
no test coverage detected