| 55 | } |
| 56 | |
| 57 | std::shared_ptr<CastFunction> GetCastToExtension(std::string name) { |
| 58 | auto func = std::make_shared<CastFunction>(std::move(name), Type::EXTENSION); |
| 59 | for (Type::type in_ty : AllTypeIds()) { |
| 60 | DCHECK_OK(func->AddKernel(in_ty, {InputType(in_ty)}, kOutputTargetType, |
| 61 | CastToExtension, NullHandling::COMPUTED_NO_PREALLOCATE, |
| 62 | MemAllocation::NO_PREALLOCATE)); |
| 63 | } |
| 64 | return func; |
| 65 | } |
| 66 | |
| 67 | }; // namespace |
| 68 |
no test coverage detected