| 710 | |
| 711 | template <typename Op> |
| 712 | void AddHalfFloatUnaryKernel(ScalarFunction* func) { |
| 713 | OutputType out_type(FirstType); |
| 714 | auto in_type = InputType(Type::HALF_FLOAT); |
| 715 | auto exec = ScalarUnaryNotNull<HalfFloatType, HalfFloatType, Op>::Exec; |
| 716 | DCHECK_OK(func->AddKernel({in_type}, out_type, exec)); |
| 717 | } |
| 718 | |
| 719 | // Generate a kernel given an arithmetic functor |
| 720 | template <template <typename...> class KernelGenerator, typename OutType, typename Op> |