| 1188 | template <typename ExecutorType, |
| 1189 | typename FunctionType = typename ExecutorType::FunctionType> |
| 1190 | Result<std::unique_ptr<KernelExecutor>> MakeExecutor(ExecContext* ctx, |
| 1191 | const Function* func, |
| 1192 | const FunctionOptions* options) { |
| 1193 | DCHECK_EQ(ExecutorType::function_kind, func->kind()); |
| 1194 | auto typed_func = checked_cast<const FunctionType*>(func); |
| 1195 | return std::make_unique<ExecutorType>(ctx, typed_func, options); |
| 1196 | } |
| 1197 | |
| 1198 | } // namespace |
| 1199 |