| 803 | }; |
| 804 | |
| 805 | void AddKernel(Type::type type_id, std::shared_ptr<KernelSignature> signature, |
| 806 | ArrayKernelExec exec, VectorKernel::ChunkedExec exec_chunked, |
| 807 | FunctionRegistry* registry, VectorFunction* func) { |
| 808 | VectorKernel kernel; |
| 809 | kernel.can_execute_chunkwise = false; |
| 810 | if (is_fixed_width(type_id)) { |
| 811 | kernel.null_handling = NullHandling::type::COMPUTED_PREALLOCATE; |
| 812 | } else { |
| 813 | kernel.can_write_into_slices = false; |
| 814 | kernel.null_handling = NullHandling::type::COMPUTED_NO_PREALLOCATE; |
| 815 | } |
| 816 | kernel.mem_allocation = MemAllocation::type::PREALLOCATE; |
| 817 | kernel.signature = std::move(signature); |
| 818 | kernel.exec = std::move(exec); |
| 819 | kernel.exec_chunked = exec_chunked; |
| 820 | kernel.can_execute_chunkwise = false; |
| 821 | kernel.output_chunked = false; |
| 822 | DCHECK_OK(func->AddKernel(std::move(kernel))); |
| 823 | } |
| 824 | |
| 825 | template <template <class> class Functor, template <class> class ChunkedFunctor> |
| 826 | void RegisterVectorFunction(FunctionRegistry* registry, |
no test coverage detected