MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / constant_f32

Method constant_f32

crates/rustc_codegen_spirv/src/codegen_cx/constant.rs:83–86  ·  view source on GitHub ↗
(&self, span: Span, val: f32)

Source from the content-addressed store, hash-verified

81 }
82
83 pub fn constant_f32(&self, span: Span, val: f32) -> SpirvValue {
84 let ty = SpirvType::Float(32).def(span, self);
85 self.def_constant(ty, SpirvConst::F32(val.to_bits()))
86 }
87
88 pub fn constant_f64(&self, span: Span, val: f64) -> SpirvValue {
89 let ty = SpirvType::Float(64).def(span, self);

Callers 3

def_constant_cxMethod · 0.80
scalar_to_backendMethod · 0.80
memset_const_patternMethod · 0.80

Calls 3

FloatInterface · 0.85
def_constantMethod · 0.80
defMethod · 0.45

Tested by

no test coverage detected