MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / GetFloatConst

Method GetFloatConst

source/opt/constants.cpp:480–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480const Constant* ConstantManager::GetFloatConst(float val) {
481 Type* float_type = context()->get_type_mgr()->GetFloatType();
482 utils::FloatProxy<float> v(val);
483 const Constant* c = GetConstant(float_type, v.GetWords());
484 return c;
485}
486
487uint32_t ConstantManager::GetDoubleConstId(double val) {
488 const Constant* c = GetDoubleConst(val);

Callers 3

GetNanFunction · 0.80
GetInfFunction · 0.80
NegateFPConstFunction · 0.80

Calls 3

GetFloatTypeMethod · 0.80
get_type_mgrMethod · 0.80
GetWordsMethod · 0.80

Tested by

no test coverage detected