Returns the builder function name for the given op definition.
| 73 | |
| 74 | // Returns the builder function name for the given op definition. |
| 75 | static inline std::string GetOperatorBuilderName(StringRef op_name) { |
| 76 | assert(op_name.startswith("TFL_") && "unexpected op prefix"); |
| 77 | assert(op_name.endswith("Op") && "unexpected op suffix"); |
| 78 | |
| 79 | // E.g., AddOp -> CreateAddOperator |
| 80 | std::ostringstream oss; |
| 81 | oss << "Create" << op_name.drop_front(4).str() << "erator"; |
| 82 | return oss.str(); |
| 83 | } |
| 84 | |
| 85 | static void EmitOptionBuilders(const RecordKeeper &record_keeper, |
| 86 | const std::vector<Record *> &defs, |
no outgoing calls
no test coverage detected