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

Method parseVersion

tools/cuda-tile-tblgen/BytecodeGenUtilities.cpp:26–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24using namespace mlir;
25
26std::pair<std::string, std::string>
27mlir::tblgen::parseVersion(StringRef version) {
28 const size_t dotPos = version.find('.');
29 const StringRef majorStr = version.substr(0, dotPos);
30 const StringRef minorStr =
31 (dotPos != StringRef::npos) ? version.substr(dotPos + 1) : "0";
32 return {majorStr.str(), minorStr.str()};
33}
34
35std::pair<std::string, std::string>
36mlir::tblgen::extractVersionFromAttribute(const NamedAttribute &namedAttr,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected