pub struct OneHotGroup {
pub members: Vec<Wire>,
pub allow_all_zero: bool,
}Expand description
Exact bits of which exactly one is 1, or, with allow_all_zero, at most one. A promise from the caller, like a
range, checkable with Circuit::validate_one_hot_groups. Compilation lowers a sum of products of the group’s
members with candidate values to a gather: a read of the selected candidate.
Fields§
§members: Vec<Wire>§allow_all_zero: boolTrait Implementations§
Source§impl Clone for OneHotGroup
impl Clone for OneHotGroup
Source§impl Debug for OneHotGroup
impl Debug for OneHotGroup
Source§impl PartialEq for OneHotGroup
impl PartialEq for OneHotGroup
impl StructuralPartialEq for OneHotGroup
Auto Trait Implementations§
impl Freeze for OneHotGroup
impl RefUnwindSafe for OneHotGroup
impl Send for OneHotGroup
impl Sync for OneHotGroup
impl Unpin for OneHotGroup
impl UnsafeUnpin for OneHotGroup
impl UnwindSafe for OneHotGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more