| 1057 | // OpKernel registration ------------------------------------------------------ |
| 1058 | |
| 1059 | struct KernelRegistration { |
| 1060 | KernelRegistration(const KernelDef& d, StringPiece c, |
| 1061 | std::unique_ptr<kernel_factory::OpKernelFactory> f) |
| 1062 | : def(d), kernel_class_name(c), factory(std::move(f)) {} |
| 1063 | |
| 1064 | const KernelDef def; |
| 1065 | const string kernel_class_name; |
| 1066 | std::unique_ptr<kernel_factory::OpKernelFactory> factory; |
| 1067 | }; |
| 1068 | |
| 1069 | // This maps from 'op_type' + DeviceType to the set of KernelDefs and |
| 1070 | // factory functions for instantiating the OpKernel that matches the |