vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Rabin–Karp rolling-hash parameters.
//!
//! The substring search interprets each byte as a digit in base `BASE` and
//! reduces modulo a large prime `MOD`. These two constants define the hash
//! family and must stay in sync between `push_hash` and `roll_hash`; kept in
//! one file so a drift between them is impossible.

/// Base for the rolling polynomial hash (one greater than the byte alphabet).
pub(crate) const BASE: u64 = 257;

/// Prime modulus — large enough that two 32-byte needles almost never collide.
pub(crate) const MOD: u64 = 1_000_000_007;