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

Method AddInstrConstantFloat

Source/SpireCore/SpirVCodeGen.cpp:2251–2259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2249 }
2250
2251 int AddInstrConstantFloat(float f)
2252 {
2253 auto Type = GetTypeFromString("float");
2254 int typeID = DefineType(Type);
2255 ++CurrentID;
2256 CodeGen.OpConstantFloat(CurrentID, typeID, f);
2257 IDInfos[CurrentID] = IDInfo::CreateIDInfoForValue(CurrentID, Type, 0, typeID);
2258 return CurrentID;
2259 }
2260
2261 int AddInstrConstantInt(int i)
2262 {

Callers 2

GetOperandValueMethod · 0.80
PrintCallInstrMethod · 0.80

Calls 2

GetTypeFromStringFunction · 0.85
OpConstantFloatMethod · 0.80

Tested by

no test coverage detected