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

Method OpConstantInt

Source/SpireCore/SpirVCodeGen.cpp:1272–1280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1270 //printf("%.8f -> %x\n", f, streamTypeDefinition[streamTypeDefinition.Count() - 1]);
1271 }
1272 void OpConstantInt(const int ID, const int typeID, int i)
1273 {
1274 sbTextTypeDefinition << LR"(%)" << ID << LR"( = OpConstant %)" << typeID << LR"( )" << i << EndLine;
1275
1276 streamTypeDefinition.Add(43 + (4 << 16));
1277 streamTypeDefinition.Add(typeID);
1278 streamTypeDefinition.Add(ID);
1279 streamTypeDefinition.Add(*reinterpret_cast<unsigned int*>(&i));
1280 }
1281 void OpConstantUInt(const int ID, const int typeID, const unsigned int i)
1282 {
1283 sbTextTypeDefinition << LR"(%)" << ID << LR"( = OpConstant %)" << typeID << LR"( )";

Callers 1

AddInstrConstantIntMethod · 0.80

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected