Generates the C++ function signature for the 'write ' function, which handles serialization for a specific cuda_tile operation. Returns FailureOr where the size_t is the number of results that were serialized.
| 233 | /// Returns FailureOr<size_t> where the size_t is the number of results |
| 234 | /// that were serialized. |
| 235 | static void generateFunctionSignature(const Operator &op, raw_ostream &os) { |
| 236 | StringRef opClassName = op.getCppClassName(); |
| 237 | StringRef dialectNamespace = op.getDialect().getCppNamespace(); |
| 238 | std::string qualifiedClassName = |
| 239 | dialectNamespace.str() + "::" + opClassName.str(); |
| 240 | os << "FailureOr<size_t> write" << opClassName << "( " << qualifiedClassName |
| 241 | << " op, \n" |
| 242 | << " EncodingWriter &writer, \n" |
| 243 | << " TypeManager &typeMgr, \n" |
| 244 | << " ConstantManager &constMgr, \n" |
| 245 | << " StringManager &strMgr, \n" |
| 246 | << " const BytecodeWriterConfig " |
| 247 | "&config) {\n"; |
| 248 | } |
| 249 | |
| 250 | /// Generates the flags field serialization for optional attributes and |
| 251 | /// operands. Version checking is only done for optional attributes and |