We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
store
update
1 parent 43231bb commit b09e6b5Copy full SHA for b09e6b5
src/modint.rs
@@ -355,7 +355,7 @@ impl<I: Id> DynamicModInt<I> {
355
if modulus == 0 {
356
panic!("the modulus must not be 0");
357
}
358
- I::companion_barrett().store(modulus);
+ I::companion_barrett().update(modulus);
359
360
361
/// Creates a new `DynamicModInt`.
@@ -478,7 +478,7 @@ impl Barrett {
478
479
480
#[inline]
481
- fn store(&self, m: u32) {
+ fn update(&self, m: u32) {
482
let im = (-1i64 as u64 / m as u64).wrapping_add(1);
483
self.m.store(m, atomic::Ordering::SeqCst);
484
self.im.store(im, atomic::Ordering::SeqCst);
0 commit comments