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

Function generateRegionSerialization

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

Generates C++ code within the 'write ' function to serialize the regions of the given operation, if it has any.

Source from the content-addressed store, hash-verified

522/// Generates C++ code within the 'write<OpName>' function to serialize the
523/// regions of the given operation, if it has any.
524static void generateRegionSerialization(const Operator &op, raw_ostream &os) {
525 // Only emit region code if this op can have regions
526 if (!op.getNumRegions())
527 return;
528
529 os << " // Serialize Regions\n"
530 << " writer.writeVarInt(op->getNumRegions());\n"
531 << " for (Region &region : op->getRegions()) {\n"
532 << " if (failed(writeRegion(region, writer)))\n"
533 << " return failure();\n"
534 << " }\n\n";
535}
536
537/// Generate result serialization without version checking.
538static void generateSimpleResultSerialization(const Operator &op,

Callers 1

generateOpWriterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected