| 3288 | } |
| 3289 | |
| 3290 | inline CUresult KernelLauncher_impl::launch( |
| 3291 | jitify::detail::vector<void*> arg_ptrs, |
| 3292 | jitify::detail::vector<std::string> arg_types) const { |
| 3293 | #if JITIFY_PRINT_LAUNCH |
| 3294 | Kernel_impl const& kernel = _kernel_inst._kernel; |
| 3295 | std::string arg_types_string = |
| 3296 | (arg_types.empty() ? "..." : reflection::reflect_list(arg_types)); |
| 3297 | std::cout << "Launching " << kernel._name << _kernel_inst._template_inst |
| 3298 | << "<<<" << _grid << "," << _block << "," << _smem << "," << _stream |
| 3299 | << ">>>" |
| 3300 | << "(" << arg_types_string << ")" << std::endl; |
| 3301 | #endif |
| 3302 | if (!_kernel_inst._cuda_kernel) { |
| 3303 | throw std::runtime_error( |
| 3304 | "Kernel pointer is NULL; you may need to define JITIFY_THREAD_SAFE 1"); |
| 3305 | } |
| 3306 | return _kernel_inst._cuda_kernel->launch(_grid, _block, _smem, _stream, |
| 3307 | arg_ptrs); |
| 3308 | } |
| 3309 | |
| 3310 | inline KernelInstantiation_impl::KernelInstantiation_impl( |
| 3311 | Kernel_impl const& kernel, std::vector<std::string> const& template_args) |