vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
1
2
3
4
5
6
use super::{hash_params::MOD, push_hash::push_hash};

pub(crate) fn roll_hash(hash: u64, old: u8, new: u8, highest: u64) -> u64 {
    let without_old = (hash + MOD - ((u64::from(old) * highest) % MOD)) % MOD;
    push_hash(without_old, new)
}