MCPcopy Create free account
hub / github.com/csyonghe/Spire / OpEntryPoint

Method OpEntryPoint

Source/SpireCore/SpirVCodeGen.cpp:955–972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

953 return stream.Count() - oldSize;
954 }
955 void OpEntryPoint(const ExecutionModel currentExecutionModel, const int entryID, const List<int> &interfaceIDs)
956 {
957 sbTextHeader << LR"(OpEntryPoint )";
958 sbTextHeader << ExecutionModelToString(currentExecutionModel) << LR"( )";
959 sbTextHeader << LR"(%)" << entryID << LR"( "main" )";
960 for (auto & id : interfaceIDs)
961 sbTextHeader << LR"( %)" << id;
962 sbTextHeader << EndLine;
963
964 int len_i = streamHeader.Count();
965 streamHeader.Add(0);
966 streamHeader.Add((int)currentExecutionModel);
967 streamHeader.Add(entryID);
968 int NameLen = EncodeString(streamHeader, "main");
969 for (auto & id : interfaceIDs)
970 streamHeader.Add(id);
971 streamHeader[len_i] = (15) + ((1 + 1 + NameLen + 1 + interfaceIDs.Count()) << 16);
972 }
973 void OpExecutionMode(const int entryID, const ExecutionMode mode, const int op1, const int op2, const int op3)
974 {
975 bool LocalSize = false;

Callers 1

AddInstrEntryPointMethod · 0.80

Calls 3

ExecutionModelToStringFunction · 0.85
CountMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected