MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / generateFunctionSignature

Function generateFunctionSignature

tools/cuda-tile-tblgen/BytecodeGen.cpp:235–248  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

233/// Returns FailureOr<size_t> where the size_t is the number of results
234/// that were serialized.
235static 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

Callers 1

generateOpWriterFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected