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

Method not

crates/rustc_codegen_spirv/src/builder/builder_methods.rs:997–1013  ·  view source on GitHub ↗
(&mut self, val: Self::Value)

Source from the content-addressed store, hash-verified

995 .with_type(ty)
996 }
997 fn not(&mut self, val: Self::Value) -> Self::Value {
998 match self.lookup_type(val.ty) {
999 SpirvType::Integer(_, _) => self.emit().not(val.ty, None, val.def(self)),
1000 SpirvType::Bool => {
1001 let true_ = self.constant_bool(self.span(), true);
1002 // intel-compute-runtime doesn't like OpLogicalNot
1003 self.emit()
1004 .logical_not_equal(val.ty, None, val.def(self), true_.def(self))
1005 }
1006 o => self.fatal(&format!(
1007 "not() not implemented for type {}",
1008 o.debug(val.ty, self)
1009 )),
1010 }
1011 .unwrap()
1012 .with_type(val.ty)
1013 }
1014
1015 fn checked_binop(
1016 &mut self,

Callers

nothing calls this directly

Calls 7

with_typeMethod · 0.80
lookup_typeMethod · 0.80
constant_boolMethod · 0.80
spanMethod · 0.80
fatalMethod · 0.80
emitMethod · 0.45
defMethod · 0.45

Tested by

no test coverage detected