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

Method constant_i32

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

Source from the content-addressed store, hash-verified

32 }
33
34 pub fn constant_i32(&self, span: Span, val: i32) -> SpirvValue {
35 let ty = SpirvType::Integer(32, true).def(span, self);
36 self.def_constant(ty, SpirvConst::U32(val as u32))
37 }
38
39 pub fn constant_u32(&self, span: Span, val: u32) -> SpirvValue {
40 let ty = SpirvType::Integer(32, false).def(span, self);

Callers 1

const_i32Method · 0.80

Calls 3

IntegerInterface · 0.85
def_constantMethod · 0.80
defMethod · 0.45

Tested by

no test coverage detected