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

Method AddInstrConstantUInt

Source/SpireCore/SpirVCodeGen.cpp:2275–2287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2273 }
2274
2275 int AddInstrConstantUInt(unsigned int i)
2276 {
2277 auto Type = GetTypeFromString("uint");
2278 if (Dictionary_ConstantUIntToID.ContainsKey(i))
2279 return Dictionary_ConstantUIntToID[i].GetValue();
2280
2281 int typeID = DefineType(Type);
2282 ++CurrentID;
2283 CodeGen.OpConstantUInt(CurrentID, typeID, i);
2284 IDInfos[CurrentID] = IDInfo::CreateIDInfoForValue(CurrentID, Type, 0, typeID);
2285 Dictionary_ConstantUIntToID[i] = CurrentID;
2286 return CurrentID;
2287 }
2288
2289 int AddInstrConstantCompositeFloat(float *f, int len)
2290 {

Callers 3

GetOperandValueMethod · 0.80
PrintExportInstrMethod · 0.80
PrintImportInstrMethod · 0.80

Calls 3

GetTypeFromStringFunction · 0.85
OpConstantUIntMethod · 0.80
ContainsKeyMethod · 0.45

Tested by

no test coverage detected