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

Method lookup_const

crates/rustc_codegen_spirv/src/builder_spirv.rs:665–672  ·  view source on GitHub ↗
(&self, def: SpirvValue)

Source from the content-addressed store, hash-verified

663 }
664
665 pub fn lookup_const(&self, def: SpirvValue) -> Option<SpirvConst<'tcx>> {
666 match def.kind {
667 SpirvValueKind::Def(id) | SpirvValueKind::IllegalConst(id) => {
668 self.lookup_const_by_id(id)
669 }
670 _ => None,
671 }
672 }
673
674 pub fn lookup_const_u64(&self, def: SpirvValue) -> Option<u64> {
675 match self.lookup_const(def)? {

Callers 2

lookup_const_u64Method · 0.80
vector_splatMethod · 0.80

Calls 1

lookup_const_by_idMethod · 0.80

Tested by

no test coverage detected