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

Method constant_i16

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

Source from the content-addressed store, hash-verified

22 }
23
24 pub fn constant_i16(&self, span: Span, val: i16) -> SpirvValue {
25 let ty = SpirvType::Integer(16, true).def(span, self);
26 self.def_constant(ty, SpirvConst::U32(val as u32))
27 }
28
29 pub fn constant_u16(&self, span: Span, val: u16) -> SpirvValue {
30 let ty = SpirvType::Integer(16, false).def(span, self);

Callers 1

const_i16Method · 0.80

Calls 3

IntegerInterface · 0.85
def_constantMethod · 0.80
defMethod · 0.45

Tested by

no test coverage detected