arnaucube
arnaucube/poulpyPublic Self-hosted repository
poulpy/src/modulus/barrett.rs
src/modulus/barrett.rsRaw
 1pub struct BarrettPrecomp<O>(O, O);
 2
 3impl<O> BarrettPrecomp<O>{
 4
 5    #[inline(always)]
 6    pub fn new(a:O, b: O) -> Self{
 7        Self(a, b)
 8    }
 9
10    #[inline(always)]
11    pub fn value_hi(&self) -> &O{
12        &self.0
13    }
14
15    #[inline(always)]
16    pub fn value_lo(&self) -> &O{
17        &self.1
18    }
19}