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

Method select

crates/rustc_codegen_spirv/src/builder/builder_methods.rs:2014–2032  ·  view source on GitHub ↗
(
        &mut self,
        cond: Self::Value,
        then_val: Self::Value,
        else_val: Self::Value,
    )

Source from the content-addressed store, hash-verified

2012 }
2013
2014 fn select(
2015 &mut self,
2016 cond: Self::Value,
2017 then_val: Self::Value,
2018 else_val: Self::Value,
2019 ) -> Self::Value {
2020 assert_ty_eq!(self, then_val.ty, else_val.ty);
2021 let result_type = then_val.ty;
2022 self.emit()
2023 .select(
2024 result_type,
2025 None,
2026 cond.def(self),
2027 then_val.def(self),
2028 else_val.def(self),
2029 )
2030 .unwrap()
2031 .with_type(result_type)
2032 }
2033
2034 fn va_arg(&mut self, _list: Self::Value, _ty: Self::Type) -> Self::Value {
2035 todo!()

Callers 3

rotateMethod · 0.80
fptoint_satMethod · 0.80
intcastMethod · 0.80

Calls 3

with_typeMethod · 0.80
emitMethod · 0.45
defMethod · 0.45

Tested by

no test coverage detected