| 910 | |
| 911 | template <typename Op, typename FunctionImpl = ArithmeticFunction> |
| 912 | std::shared_ptr<ScalarFunction> MakeArithmeticFunction(std::string name, |
| 913 | FunctionDoc doc) { |
| 914 | auto func = std::make_shared<FunctionImpl>(name, Arity::Binary(), std::move(doc)); |
| 915 | for (const auto& ty : NumericTypes()) { |
| 916 | auto exec = ArithmeticExecFromOp<ScalarBinaryEqualTypes, Op>(ty); |
| 917 | DCHECK_OK(func->AddKernel({ty, ty}, ty, exec)); |
| 918 | } |
| 919 | AddNullExec(func.get()); |
| 920 | return func; |
| 921 | } |
| 922 | |
| 923 | // Like MakeArithmeticFunction, but for arithmetic ops that need to run |
| 924 | // only on non-null output. |
nothing calls this directly
no test coverage detected