pub struct HTable {
pub table: Box<[[HTableEntry; 64]; 64]>,
pub max: u32,
}
Fields§
§table: Box<[[HTableEntry; 64]; 64]>
§max: u32
Implementations§
source§impl HTable
impl HTable
sourcepub fn add(&mut self, from: usize, to: usize, depth: u8)
pub fn add(&mut self, from: usize, to: usize, depth: u8)
Increases [from][to]
history slot value based on depth
.
sourcepub fn punish(&mut self, from: usize, to: usize, depth: u8)
pub fn punish(&mut self, from: usize, to: usize, depth: u8)
Punishes [from][to]
history slot value based on depth
.
sourcepub fn get(&self, from: usize, to: usize, max: u8) -> u8
pub fn get(&self, from: usize, to: usize, max: u8) -> u8
Gets [from][to]
history slot value, relative to max
.
sourcepub fn age_values(&mut self)
pub fn age_values(&mut self)
Ages all values in the history table by dividing them by the AGING_DIVISOR.
sourcefn age_value(&self, value: u32) -> u32
fn age_value(&self, value: u32) -> u32
Ages a single value by dividing value by the AGING_DIVISOR.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for HTable
impl Send for HTable
impl Sync for HTable
impl Unpin for HTable
impl UnwindSafe for HTable
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