Skip to main content

GateKind

Enum GateKind 

Source
pub enum GateKind {
    Select {
        always: bool,
    },
    Compare {
        always: bool,
    },
    Clamp {
        peak_fraction_of_bound: f32,
    },
    Saturated {
        occupancy: f32,
    },
}
Expand description

The four structural findings Expr::flag_gates reports.

Variants§

§

Select

A select() whose condition only ever went one way — so one branch is dead and the preset renders as if the select() were the constant it always chose.

Fields

§always: bool

The side it always took: true means the condition never went false.

§

Compare

A comparison that only ever took one value, and that no select() flag already names (ADR-0043). Either the whole binding is the comparison (reseed = "onset > 0.55" — a boolean param stuck at one value), or it is a term inside a composite condition, where it is the half a select() flag would have hidden behind the other.

Fields

§always: bool

The value it always took: true means the comparison never went false.

§

Clamp

A clamp() whose inner value never approached its upper bound.

Fields

§peak_fraction_of_bound: f32

Peak of value / upper_bound over the run.

§

Saturated

A clamp() whose inner value sat at its upper bound for at least SATURATED_OCCUPANCY of the run (ADR-0062). The mirror of Clamp and the more serious of the two: a decorative ceiling only narrows a parameter’s real range, while a ceiling that never releases has turned the binding into a constant that no reachability walk can see, because a gain contains no fork to observe.

The number states its own fix. 0.97 on clamp(mid * 16, 0, 0.3) means the ceiling is reached at mid = 0.019, so the gain is 16x too hot.

Fields

§occupancy: f32

Fraction of evaluated hops spent at the upper bound.

Trait Implementations§

Source§

impl Clone for GateKind

Source§

fn clone(&self) -> GateKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GateKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for GateKind

Source§

fn eq(&self, other: &GateKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for GateKind

Source§

impl StructuralPartialEq for GateKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,